You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(linter): support ignores in overrides (#22148)
Adds override-local `ignores` support so matching files can be excluded from a specific oxlint override without being globally ignored.
Example:
```json
{
"overrides": [
{
"files": ["**/*.js"],
"ignores": ["**/*.generated.js"],
"rules": {
"no-var": "error"
}
}
]
}
```
closes#15997fixes#15932
Copy file name to clipboardExpand all lines: npm/oxlint/configuration_schema.json
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -596,6 +596,15 @@
596
596
],
597
597
"markdownDescription": "Enabled or disabled specific global variables."
598
598
},
599
+
"ignores": {
600
+
"description": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\n## Example\n`[ \"*.generated.ts\", \"fixtures/**\" ]`",
601
+
"allOf": [
602
+
{
603
+
"$ref": "#/definitions/GlobSet"
604
+
}
605
+
],
606
+
"markdownDescription": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\n## Example\n`[ \"*.generated.ts\", \"fixtures/**\" ]`"
607
+
},
599
608
"jsPlugins": {
600
609
"description": "JS plugins for this override, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are in alpha and not subject to semver.",
Copy file name to clipboardExpand all lines: tasks/website_linter/src/snapshots/schema_json.snap
+9Lines changed: 9 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -600,6 +600,15 @@ expression: json
600
600
],
601
601
"markdownDescription": "Enabled or disabled specific global variables."
602
602
},
603
+
"ignores": {
604
+
"description": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\n## Example\n`[ \"*.generated.ts\", \"fixtures/**\" ]`",
605
+
"allOf": [
606
+
{
607
+
"$ref": "#/definitions/GlobSet"
608
+
}
609
+
],
610
+
"markdownDescription": "A list of glob patterns to exclude from this override.\n\nFiles matching these patterns are not globally ignored; this override\nsimply does not apply to them.\n\n## Example\n`[ \"*.generated.ts\", \"fixtures/**\" ]`"
611
+
},
603
612
"jsPlugins": {
604
613
"description": "JS plugins for this override, allows usage of ESLint plugins with Oxlint.\n\nRead more about JS plugins in\n[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).\n\nNote: JS plugins are in alpha and not subject to semver.",
0 commit comments