Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions crates/oxc_linter/src/config/config_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,7 @@ mod test {
assert_eq!(*severity, AllowWarnDeny::Deny);
}
}

// turn on a rule that isn't configured yet and set it to "warn"
// note that this is an eslint rule, a plugin that's already turned on.
#[test]
Expand Down
3 changes: 1 addition & 2 deletions crates/oxc_linter/src/config/external_plugins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ impl JsonSchema for ExternalPluginEntry {
natively in Rust within oxlint and cannot be used for JS plugins:\n\
- react (includes react-hooks)\n\
- unicorn\n\
- typescript\n\
- typescript (includes @typescript-eslint)\n\
- oxc\n\
- import (includes import-x)\n\
- jsdoc\n\
Expand All @@ -141,7 +141,6 @@ impl JsonSchema for ExternalPluginEntry {
- react-perf\n\
- promise\n\
- node\n\
- regex\n\
- vue\n\
- eslint\n\n\
If you need to use the JavaScript version of any of these plugins, \
Expand Down
7 changes: 5 additions & 2 deletions crates/oxc_linter/src/config/overrides.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,13 @@ pub struct OxlintOverride {
#[serde(default)]
pub plugins: Option<LintPlugins>,

/// JS plugins for this override.
/// JS plugins for this override, allows usage of ESLint plugins with Oxlint.
///
/// Read more about JS plugins in
/// [the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).
///
/// Note: JS plugins are experimental and not subject to semver.
/// They are not supported in language server at present.
/// They are not supported in the language server (and thus editor integrations) at present.
#[serde(rename = "jsPlugins", default, skip_serializing_if = "Option::is_none")]
#[schemars(schema_with = "external_plugins_schema")]
pub external_plugins: Option<FxHashSet<ExternalPluginEntry>>,
Expand Down
7 changes: 5 additions & 2 deletions crates/oxc_linter/src/config/oxlintrc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,13 @@ pub struct Oxlintrc {
/// NOTE: Setting the `plugins` field will overwrite the base set of plugins.
/// The `plugins` array should reflect all of the plugins you want to use.
pub plugins: Option<LintPlugins>,
/// JS plugins.
/// JS plugins, allows usage of ESLint plugins with Oxlint.
///
/// Read more about JS plugins in
/// [the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).
///
/// Note: JS plugins are experimental and not subject to semver.
/// They are not supported in language server at present.
/// They are not supported in the language server (and thus editor integrations) at present.
#[serde(rename = "jsPlugins", default, skip_serializing_if = "Option::is_none")]
#[schemars(schema_with = "external_plugins_schema")]
pub external_plugins: Option<FxHashSet<ExternalPluginEntry>>,
Expand Down
12 changes: 6 additions & 6 deletions crates/oxc_linter/src/snapshots/schema_json.snap
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ expression: json
"markdownDescription": "Globs to ignore during linting. These are resolved from the configuration file path."
},
"jsPlugins": {
"description": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
"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.",
"anyOf": [
{
"type": "null"
Expand All @@ -77,7 +77,7 @@ expression: json
"uniqueItems": true
}
],
"markdownDescription": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
"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."
},
"overrides": {
"description": "Add, remove, or otherwise reconfigure rules for specific files or groups of files.",
Expand Down Expand Up @@ -250,9 +250,9 @@ expression: json
],
"properties": {
"name": {
"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.",
"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.",
"type": "string",
"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."
"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."
},
"specifier": {
"description": "Path or package name of the plugin",
Expand Down Expand Up @@ -522,7 +522,7 @@ expression: json
"markdownDescription": "Enabled or disabled specific global variables."
},
"jsPlugins": {
"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.",
"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.",
"anyOf": [
{
"type": "null"
Expand All @@ -535,7 +535,7 @@ expression: json
"uniqueItems": true
}
],
"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."
"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."
},
"plugins": {
"description": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used.",
Expand Down
12 changes: 6 additions & 6 deletions npm/oxlint/configuration_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"markdownDescription": "Globs to ignore during linting. These are resolved from the configuration file path."
},
"jsPlugins": {
"description": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present.",
"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.",
"anyOf": [
{
"type": "null"
Expand All @@ -73,7 +73,7 @@
"uniqueItems": true
}
],
"markdownDescription": "JS plugins.\n\nNote: JS plugins are experimental and not subject to semver.\nThey are not supported in language server at present."
"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."
},
"overrides": {
"description": "Add, remove, or otherwise reconfigure rules for specific files or groups of files.",
Expand Down Expand Up @@ -246,9 +246,9 @@
],
"properties": {
"name": {
"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.",
"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.",
"type": "string",
"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."
"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."
},
"specifier": {
"description": "Path or package name of the plugin",
Expand Down Expand Up @@ -518,7 +518,7 @@
"markdownDescription": "Enabled or disabled specific global variables."
},
"jsPlugins": {
"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.",
"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.",
"anyOf": [
{
"type": "null"
Expand All @@ -531,7 +531,7 @@
"uniqueItems": true
}
],
"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."
"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."
},
"plugins": {
"description": "Optionally change what plugins are enabled for this override. When\nomitted, the base config's plugins are used.",
Expand Down
20 changes: 12 additions & 8 deletions tasks/website_linter/src/snapshots/schema_markdown.snap
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,13 @@ Globs to ignore during linting. These are resolved from the configuration file p
type: `array | null`


JS plugins.
JS plugins, allows usage of ESLint plugins with Oxlint.

Read more about JS plugins in
[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).

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


### jsPlugins[n]
Expand All @@ -233,7 +236,7 @@ Custom name/alias for the plugin.
Note: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:
- react (includes react-hooks)
- unicorn
- typescript
- typescript (includes @typescript-eslint)
- oxc
- import (includes import-x)
- jsdoc
Expand All @@ -244,7 +247,6 @@ Note: The following plugin names are reserved because they are implemented nativ
- react-perf
- promise
- node
- regex
- vue
- eslint

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


JS plugins for this override.
JS plugins for this override, allows usage of ESLint plugins with Oxlint.

Read more about JS plugins in
[the docs](https://oxc.rs/docs/guide/usage/linter/js-plugins.html).

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


##### overrides[n].jsPlugins[n]
Expand All @@ -328,7 +333,7 @@ Custom name/alias for the plugin.
Note: The following plugin names are reserved because they are implemented natively in Rust within oxlint and cannot be used for JS plugins:
- react (includes react-hooks)
- unicorn
- typescript
- typescript (includes @typescript-eslint)
- oxc
- import (includes import-x)
- jsdoc
Expand All @@ -339,7 +344,6 @@ Note: The following plugin names are reserved because they are implemented nativ
- react-perf
- promise
- node
- regex
- vue
- eslint

Expand Down
Loading