diff --git a/.cargo/config.toml b/.cargo/config.toml index 71f0f4914b86..dd49a9b1bced 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -6,6 +6,7 @@ codegen-bindings = "run -p xtask_codegen --features schema -- bindings" codegen-configuration = "run -p xtask_codegen --features configuration -- configuration" # updates a newly created crate codegen-license = "run -p xtask_codegen --features license -- license" +codegen-migrate = "run -p xtask_codegen --features configuration -- migrate-eslint" codegen-schema = "run -p xtask_codegen --features schema -- schema" contributors = "run -p xtask_contributors --" coverage = "run -p xtask_coverage --profile=release-with-debug --" diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 14e1f27df2fd..cb8beda8a175 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -177,6 +177,8 @@ jobs: run: cargo codegen-schema - name: Run the bindings codegen run: cargo codegen-bindings + - name: Run the migrate codegen + run: cargo codegen-migrate - name: Check for git diff run: | if [[ `git status --porcelain` ]]; then 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 3457f55f33a6..c209938d7093 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 @@ -186,18 +186,6 @@ pub(crate) fn migrate_eslint_any_rule( .get_or_insert(Default::default()); rule.set_level(rule_severity.into()); } - "@typescript-eslint/no-throw-literal" => { - if !options.include_inspired { - results.has_inspired_rules = true; - return false; - } - if !options.include_nursery { - return false; - } - let group = rules.nursery.get_or_insert_with(Default::default); - let rule = group.use_throw_only_error.get_or_insert(Default::default()); - rule.set_level(rule_severity.into()); - } "@typescript-eslint/no-unnecessary-type-constraint" => { let group = rules.complexity.get_or_insert_with(Default::default); let rule = group diff --git a/justfile b/justfile index 933896c8900d..620527f495f4 100644 --- a/justfile +++ b/justfile @@ -22,7 +22,7 @@ upgrade-tools: gen-all: cargo run -p xtask_codegen -- all cargo codegen-configuration - cargo run -p xtask_codegen --features configuration -- migrate-eslint + cargo codegen-migrate just gen-bindings just format @@ -35,7 +35,7 @@ gen-bindings: gen-lint: cargo run -p xtask_codegen -- analyzer cargo codegen-configuration - cargo run -p xtask_codegen --features configuration -- migrate-eslint + cargo codegen-migrate just gen-bindings cargo run -p rules_check just format