Skip to content

Commit 7e5fc90

Browse files
committed
docs(linter): Update list of plugins that are reserved. (#17516)
Somehow, the regex plugin returned... I've also updated the jsPlugins field description to include a bit more info and a link to the docs.
1 parent 5b15708 commit 7e5fc90

File tree

7 files changed

+36
-26
lines changed

7 files changed

+36
-26
lines changed

crates/oxc_linter/src/config/config_builder.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,7 @@ mod test {
783783
assert_eq!(*severity, AllowWarnDeny::Deny);
784784
}
785785
}
786+
786787
// turn on a rule that isn't configured yet and set it to "warn"
787788
// note that this is an eslint rule, a plugin that's already turned on.
788789
#[test]

crates/oxc_linter/src/config/external_plugins.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ impl JsonSchema for ExternalPluginEntry {
130130
natively in Rust within oxlint and cannot be used for JS plugins:\n\
131131
- react (includes react-hooks)\n\
132132
- unicorn\n\
133-
- typescript\n\
133+
- typescript (includes @typescript-eslint)\n\
134134
- oxc\n\
135135
- import (includes import-x)\n\
136136
- jsdoc\n\
@@ -141,7 +141,6 @@ impl JsonSchema for ExternalPluginEntry {
141141
- react-perf\n\
142142
- promise\n\
143143
- node\n\
144-
- regex\n\
145144
- vue\n\
146145
- eslint\n\n\
147146
If you need to use the JavaScript version of any of these plugins, \

crates/oxc_linter/src/config/overrides.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,13 @@ pub struct OxlintOverride {
9696
#[serde(default)]
9797
pub plugins: Option<LintPlugins>,
9898

99-
/// JS plugins for this override.
99+
/// JS plugins for this override, allows usage of ESLint plugins with Oxlint.
100+
///
101+
/// Read more about JS plugins in
102+
/// [the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).
100103
///
101104
/// Note: JS plugins are experimental and not subject to semver.
102-
/// They are not supported in language server at present.
105+
/// They are not supported in the language server (and thus editor integrations) at present.
103106
#[serde(rename = "jsPlugins", default, skip_serializing_if = "Option::is_none")]
104107
#[schemars(schema_with = "external_plugins_schema")]
105108
pub external_plugins: Option<FxHashSet<ExternalPluginEntry>>,

crates/oxc_linter/src/config/oxlintrc.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,13 @@ pub struct Oxlintrc {
7878
/// NOTE: Setting the `plugins` field will overwrite the base set of plugins.
7979
/// The `plugins` array should reflect all of the plugins you want to use.
8080
pub plugins: Option<LintPlugins>,
81-
/// JS plugins.
81+
/// JS plugins, allows usage of ESLint plugins with Oxlint.
82+
///
83+
/// Read more about JS plugins in
84+
/// [the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).
8285
///
8386
/// Note: JS plugins are experimental and not subject to semver.
84-
/// They are not supported in language server at present.
87+
/// They are not supported in the language server (and thus editor integrations) at present.
8588
#[serde(rename = "jsPlugins", default, skip_serializing_if = "Option::is_none")]
8689
#[schemars(schema_with = "external_plugins_schema")]
8790
pub external_plugins: Option<FxHashSet<ExternalPluginEntry>>,

crates/oxc_linter/src/snapshots/schema_json.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ expression: json
6464
"markdownDescription": "Globs to ignore during linting. These are resolved from the configuration file path."
6565
},
6666
"jsPlugins": {
67-
"description": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
67+
"description": "JS plugins, 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 experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present.",
6868
"anyOf": [
6969
{
7070
"type": "null"
@@ -77,7 +77,7 @@ expression: json
7777
"uniqueItems": true
7878
}
7979
],
80-
"markdownDescription": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
80+
"markdownDescription": "JS plugins, 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 experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present."
8181
},
8282
"overrides": {
8383
"description": "Add, remove, or otherwise reconfigure rules for specific files or groups of files.",
@@ -250,9 +250,9 @@ expression: json
250250
],
251251
"properties": {
252252
"name": {
253-
"description": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- regex\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.",
253+
"description": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript (includes @typescript-eslint)\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.",
254254
"type": "string",
255-
"markdownDescription": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- regex\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts."
255+
"markdownDescription": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript (includes @typescript-eslint)\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts."
256256
},
257257
"specifier": {
258258
"description": "Path or package name of the plugin",
@@ -522,7 +522,7 @@ expression: json
522522
"markdownDescription": "Enabled or disabled specific global variables."
523523
},
524524
"jsPlugins": {
525-
"description": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
525+
"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 experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present.",
526526
"anyOf": [
527527
{
528528
"type": "null"
@@ -535,7 +535,7 @@ expression: json
535535
"uniqueItems": true
536536
}
537537
],
538-
"markdownDescription": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
538+
"markdownDescription": "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 experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present."
539539
},
540540
"plugins": {
541541
"description": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used.",

npm/oxlint/configuration_schema.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"markdownDescription": "Globs to ignore during linting. These are resolved from the configuration file path."
6161
},
6262
"jsPlugins": {
63-
"description": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
63+
"description": "JS plugins, 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 experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present.",
6464
"anyOf": [
6565
{
6666
"type": "null"
@@ -73,7 +73,7 @@
7373
"uniqueItems": true
7474
}
7575
],
76-
"markdownDescription": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
76+
"markdownDescription": "JS plugins, 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 experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present."
7777
},
7878
"overrides": {
7979
"description": "Add, remove, or otherwise reconfigure rules for specific files or groups of files.",
@@ -246,9 +246,9 @@
246246
],
247247
"properties": {
248248
"name": {
249-
"description": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- regex\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.",
249+
"description": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript (includes @typescript-eslint)\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts.",
250250
"type": "string",
251-
"markdownDescription": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- regex\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts."
251+
"markdownDescription": "Custom name/alias for the plugin.\n\nNote: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:\n- react (includes react-hooks)\n- unicorn\n- typescript (includes @typescript-eslint)\n- oxc\n- import (includes import-x)\n- jsdoc\n- jest\n- vitest\n- jsx-a11y\n- nextjs\n- react-perf\n- promise\n- node\n- vue\n- eslint\n\nIf you need to use the JavaScript version of any of these plugins, provide a custom alias to avoid conflicts."
252252
},
253253
"specifier": {
254254
"description": "Path or package name of the plugin",
@@ -518,7 +518,7 @@
518518
"markdownDescription": "Enabled or disabled specific global variables."
519519
},
520520
"jsPlugins": {
521-
"description": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
521+
"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 experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present.",
522522
"anyOf": [
523523
{
524524
"type": "null"
@@ -531,7 +531,7 @@
531531
"uniqueItems": true
532532
}
533533
],
534-
"markdownDescription": "JS plugins for this override.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
534+
"markdownDescription": "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 experimental and not subject to semver.\nThey are not supported in the language server (and thus editor integrations) at present."
535535
},
536536
"plugins": {
537537
"description": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used.",

tasks/website_linter/src/snapshots/schema_markdown.snap

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,13 @@ Globs to ignore during linting. These are resolved from the configuration file p
209209
type: `array | null`
210210

211211

212-
JS plugins.
212+
JS plugins, allows usage of ESLint plugins with Oxlint.
213+
214+
Read more about JS plugins in
215+
[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).
213216

214217
Note: JS plugins are experimental and not subject to semver.
215-
They are not supported in language server at present.
218+
They are not supported in the language server (and thus editor integrations) at present.
216219

217220

218221
### jsPlugins[n]
@@ -233,7 +236,7 @@ Custom name/alias for the plugin.
233236
Note: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:
234237
- react (includes react-hooks)
235238
- unicorn
236-
- typescript
239+
- typescript (includes @typescript-eslint)
237240
- oxc
238241
- import (includes import-x)
239242
- jsdoc
@@ -244,7 +247,6 @@ Note: The following plugin names are reserved because they are implemented nativ
244247
- react-perf
245248
- promise
246249
- node
247-
- regex
248250
- vue
249251
- eslint
250252

@@ -304,10 +306,13 @@ Enabled or disabled specific global variables.
304306
type: `array | null`
305307

306308

307-
JS plugins for this override.
309+
JS plugins for this override, allows usage of ESLint plugins with Oxlint.
310+
311+
Read more about JS plugins in
312+
[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).
308313

309314
Note: JS plugins are experimental and not subject to semver.
310-
They are not supported in language server at present.
315+
They are not supported in the language server (and thus editor integrations) at present.
311316

312317

313318
##### overrides[n].jsPlugins[n]
@@ -328,7 +333,7 @@ Custom name/alias for the plugin.
328333
Note: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:
329334
- react (includes react-hooks)
330335
- unicorn
331-
- typescript
336+
- typescript (includes @typescript-eslint)
332337
- oxc
333338
- import (includes import-x)
334339
- jsdoc
@@ -339,7 +344,6 @@ Note: The following plugin names are reserved because they are implemented nativ
339344
- react-perf
340345
- promise
341346
- node
342-
- regex
343347
- vue
344348
- eslint
345349

0 commit comments

Comments
 (0)