-
-
Notifications
You must be signed in to change notification settings - Fork 924
Closed
Bug
Copy link
Labels
A-linterArea - LinterArea - Linter
Description
What version of Oxlint are you using?
1.51.0
What command did you run?
oxlint via npm workspaces script
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
a repro setup can be found here: https://github.com/kavsingh/oxlint-nested-tsconfig-typeaware-repro
the linked npm workspaces monorepo sets up
- a base configuration at
oxlint.config.ts, which setstypeAwareto true as per these docs - a nested package configuration at
packages/a/oxlint.config.tsas per these docs - a lint script in the root
package.jsonwhich runsnpm run lint --workspaces
oxlint.config.ts at repo root
import { defineConfig } from "oxlint";
export default defineConfig({ options: { typeAware: true } });oxlint.config.ts in workspace package
import { defineConfig } from "oxlint";
import base from "../../oxlint.config.ts";
export default defineConfig({ extends: [base] });What happened?
❯ npm run lintresults in:
> oxlint-nested-tsconfig-typeaware-repro@1.0.0 lint
> npm run lint --workspaces
> a@1.0.0 lint
> oxlint
Failed to parse oxlint configuration file.
× The `options.typeAware` option is only supported in the root config, but it was found in /[PATH_TO]/oxlint-nested-tsconfig-typeaware-repro/oxlint.config.ts.
help: Move `options.typeAware` to the root configuration file.
npm error Lifecycle script `lint` failed with error:
npm error code 1
npm error path /[PATH_TO]/oxlint-nested-tsconfig-typeaware-repro/packages/a
npm error workspace a@1.0.0
npm error location /[PATH_TO]/oxlint-nested-tsconfig-typeaware-repro/packages/a
npm error command failed
npm error command sh -c oxlintfor this setup of extending a base oxlint.config.ts, is the base configuration at the repo root taken to be the "root configuration"? if i move options: { typeAware: true } to the workspace package's config at packages/a/oxlint.config.ts, then npm run lint works. maybe this is expected and just needs documentation (or more likely, i have misread the documentation)?
note - i don't see any in-ide config errors as mentioned in #19930
thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter
Type
Fields
Give feedbackPriority
None yet
Effort
None yet