From e4b3a3c06a9d30a1fb60b1758bc9176377c48d58 Mon Sep 17 00:00:00 2001 From: Boshen <1430279+Boshen@users.noreply.github.com> Date: Fri, 17 May 2024 16:09:19 +0000 Subject: [PATCH] feat(linter): backward compability for `react-hooks` and `deepscan` plugins (#3334) closes #3317 --- crates/oxc_linter/src/config/rules.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/oxc_linter/src/config/rules.rs b/crates/oxc_linter/src/config/rules.rs index 2254d13be..732834ac3 100644 --- a/crates/oxc_linter/src/config/rules.rs +++ b/crates/oxc_linter/src/config/rules.rs @@ -70,6 +70,10 @@ fn parse_rule_key(name: &str) -> (String, String) { "react-perf" => ("react_perf", rule_name), // e.g. "@next/next/google-font-display" "@next" => ("nextjs", rule_name.trim_start_matches("next/")), + // For backwards compatibility, react hook rules reside in the react plugin. + "react-hooks" => ("react", rule_name), + // For backwards compatibility, deepscan rules reside in the oxc plugin. + "deepscan" => ("oxc", rule_name), _ => (plugin_name, rule_name), };