Skip to content

Commit 8f72834

Browse files
committed
feat(linter): support import-x plugin name
1 parent 157e1a1 commit 8f72834

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

crates/oxc_linter/src/config/plugins.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ impl From<&str> for LintPlugins {
103103
}
104104
// deepscan for backwards compatibility. Those rules have been moved into oxc
105105
"oxc" | "deepscan" => LintPlugins::OXC,
106-
"import" => LintPlugins::IMPORT,
106+
// import-x has the same rules but better performance
107+
"import" | "import-x" => LintPlugins::IMPORT,
107108
"jsdoc" => LintPlugins::JSDOC,
108109
"jest" => LintPlugins::JEST,
109110
"vitest" => LintPlugins::VITEST,

crates/oxc_linter/src/config/rules.rs

+2
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ fn parse_rule_key(name: &str) -> (String, String) {
282282

283283
let (oxlint_plugin_name, rule_name) = match plugin_name {
284284
"@typescript-eslint" => ("typescript", rule_name),
285+
// import-x has the same rules but better performance
286+
"import-x" => ("import", rule_name),
285287
"jsx-a11y" => ("jsx_a11y", rule_name),
286288
"react-perf" => ("react_perf", rule_name),
287289
// e.g. "@next/next/google-font-display"

0 commit comments

Comments
 (0)