-
-
Notifications
You must be signed in to change notification settings - Fork 900
Labels
A-linterArea - LinterArea - Linter
Description
What version of Oxlint are you using?
0.16.6
What command did you run?
oxlint ., vsc extension does the same
What does your .oxlintrc.json config file look like?
The contents of the oxlint-config/index.json don't matter in this case but here you go:
{
"ignorePatterns": ["node_modules", "dist", "coverage", "build"],
"categories": {
"correctness": "error",
"suspicious": "error",
"perf": "error"
},
"plugins": ["typescript", "unicorn", "oxc", "import", "node", "promise"],
"rules": {
"no-unused-vars": [
"error",
{
"argsIgnorePattern": "^(_|e|event)",
"caughtErrorsIgnorePattern": "^(_|e|error)",
"varsIgnorePattern": "^_"
}
],
"no-await-in-loop": "allow",
"consistent-function-scoping": "off",
"prefer-add-event-listener": "off",
"no-unsafe-optional-chaining": "off",
"no-new": "off",
"no-new-array": "off",
"no-useless-spread": "off",
"no-unneeded-ternary": "off",
"no-async-endpoint-handlers": "off",
"no-this-alias": "off"
}
}What happened?
When trying to setup overrides for my test files, i wanted to enable the jest and vitest plugins for test files. I noticed that adding plugins inside overrides does nothing - it only works when added to the root of the config file. I verified the override is being applied correctly by disabling the no-unused-vars rule as a quick test.
Plugins in overrides, not working

Verified override is being applied by disabling no-unused-vars

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter
Type
Fields
Give feedbackPriority
None yet
Effort
None yet

{ "extends": ["../packages/oxlint-config/index.json"], "overrides": [ { "files": ["__tests__/**"], "plugins": ["jest", "vitest"], "rules": { // "no-unused-vars": "off" } } ] }