Skip to content

docs(linter): document nested-config support for the root-only options - #1288

Open
KuSh wants to merge 2 commits into
oxc-project:mainfrom
KuSh:docs/scoped-root-only-options
Open

KuSh wants to merge 2 commits into
oxc-project:mainfrom
KuSh:docs/scoped-root-only-options

Conversation

@KuSh

@KuSh KuSh commented Sep 4, 2026

Copy link
Copy Markdown

Documentation counterpart of oxc-project/oxc#26342, which makes the "root-only" linter options resolve by scope instead of by config file. Design discussion: oxc-project/oxc#19937.

nested-config.md currently says:

options.typeAware and options.typeCheck are root-config-only. If either is set in a nested config file, Oxlint reports an error.

That is replaced by a "Linter options in nested configs" section covering the three scopes:

  • typeAware, reportUnusedDisableDirectives and respectEslintDisableDirectives are resolved from the config which governs each file, so a single package can opt into type-aware linting. They are not inherited from the root config — extends is how a value is shared — which keeps a file's result independent of the directory Oxlint was started from.
  • typeCheck is reported per run by tsgolint, not per directory, so it belongs in the root config and warns when set in a nested one.
  • denyWarnings and maxWarnings decide the exit code of the run; a nested config which sets one gets a warning and the option is ignored, instead of the whole config being rejected.

Plus a worked example (type-aware for one package, and the inverse), and a note about the warning Oxlint prints when a nested config enables type-aware rules without setting options.typeAware.

config.md, type-aware.md and editors.md had the same "only supported in the root config file" claim and now link to nested-config.

generated-config.md and generated-lsp-config.md are edited by hand so the diff stays on the descriptions that changed: regenerating them with just website reformats the whole file until vp fmt runs, which would bury the change under ~350 lines of unrelated churn. Running the real flow will produce the same content.

The two commits are the original documentation change and the update after the design review, kept separate for review.

🤖 Generated with Claude Code

KuSh and others added 2 commits September 5, 2026 00:10
Follows oxc-project/oxc#19937: `typeAware`,
`reportUnusedDisableDirectives` and `respectEslintDisableDirectives` are
resolved per file from the config which governs it, so a single package
can opt into type-aware linting. `typeCheck` is still reported per run and
`denyWarnings`/`maxWarnings` still decide the exit code, so both belong in
the root config and now warn when set in a nested one.

`generated-config.md` and `generated-lsp-config.md` were edited by hand to
keep the diff to the descriptions that changed; regenerating them with
`just website` reformats the whole file until `vp fmt` runs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follows the review of oxc-project/oxc#19937: an option a nested config
leaves unset takes its default rather than the root config's value, so a
file is linted the same way whether the repository root or the package
folder is opened, and whether CI runs from the root or from the package.
`extends` is how a value is shared, and a package config can override it.

Also document the warning oxlint now prints when a nested config enables
type-aware rules without setting `options.typeAware`, and add the
"type-aware everywhere except one package" variant of the example.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@netlify

netlify Bot commented Sep 4, 2026

Copy link
Copy Markdown

Deploy Preview for oxc-project ready!

Name Link
🔨 Latest commit 4c37b32
🔍 Latest deploy log https://app.netlify.com/projects/oxc-project/deploys/6aae5e1bb15dfa0009deb4cc
😎 Deploy Preview https://deploy-preview-1288--oxc-project.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant