From 7627ab0198cdb58f34aa3e8277c2dd5601e9d37b Mon Sep 17 00:00:00 2001 From: Anthony Shew Date: Mon, 4 Nov 2024 13:27:20 -0700 Subject: [PATCH] docs: add typescript-eslint rule source for `useArrayLiterals` (#4455) --- .../src/execute/migrate/eslint_any_rule_to_biome.rs | 5 +++++ .../src/lint/correctness/use_array_literals.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs b/crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs index 1701be91588f..5b26123d9de5 100644 --- a/crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs +++ b/crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs @@ -158,6 +158,11 @@ pub(crate) fn migrate_eslint_any_rule( .get_or_insert(Default::default()); rule.set_level(rule_severity.into()); } + "@typescript-eslint/no-array-constructor" => { + let group = rules.correctness.get_or_insert_with(Default::default); + let rule = group.use_array_literals.get_or_insert(Default::default()); + rule.set_level(rule_severity.into()); + } "@typescript-eslint/no-dupe-class-members" => { let group = rules.suspicious.get_or_insert_with(Default::default); let rule = group diff --git a/crates/biome_js_analyze/src/lint/correctness/use_array_literals.rs b/crates/biome_js_analyze/src/lint/correctness/use_array_literals.rs index fc359428d1b0..418abc960b3a 100644 --- a/crates/biome_js_analyze/src/lint/correctness/use_array_literals.rs +++ b/crates/biome_js_analyze/src/lint/correctness/use_array_literals.rs @@ -51,7 +51,7 @@ declare_lint_rule! { version: "1.7.2", name: "useArrayLiterals", language: "js", - sources: &[RuleSource::Eslint("no-array-constructor")], + sources: &[RuleSource::Eslint("no-array-constructor"), RuleSource::EslintTypeScript("no-array-constructor")], recommended: false, fix_kind: FixKind::Unsafe, }