feat(lint): scope public-API rules to the package's public surface#50
Draft
natemoo-re wants to merge 1 commit into
Draft
feat(lint): scope public-API rules to the package's public surface#50natemoo-re wants to merge 1 commit into
natemoo-re wants to merge 1 commit into
Conversation
Derives the public API surface from package.json (exports/bin/main, dist paths mapped back to src) and applies exported-function-async and require-export-jsdoc only to those files via oxlint overrides, instead of firing on every export in the repo. Internal modules, apps without a publish surface, and wildcard passthroughs are exempt.
🦋 Changeset detectedLatest commit: 58be12f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
This was referenced Jul 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bombshell-dev/exported-function-asyncandbombshell-dev/require-export-jsdocexist to prevent breaking changes for consumers — but they fired on everyexportin the repo, which trained agents to sprinkle// oxlint-disable-linecomments everywhere (1,194 and 444 occurrences across session logs, including one project with disable headers prepended to 26 files).This PR adds
src/surface.ts, which derives the public API surface frompackage.json(exports,bin,main/module, mappingdist/paths back tosrc/), including conventionalpackages/*/workspace members.bsh lintgenerates an effective oxlint config at runtime that lifts those two rules out of the global ruleset and re-applies them viaoverridesscoped to the surface.Design decisions:
"./": "./dist/*") do not designate surface — they make files importable by convention but aren't a curated public APIValidation
overridesblocks (patterns resolve relative to the config location, so the effective config is written into the project root and cleaned up after)getPublicSurface+ 2 integration tests throughrunOxlintcooper/packages/identity: the falseexported-function-asyncwarnings on internal modules go silent; self-lint warnings on this repo drop 61 → 44Includes changeset (minor).