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 c6b73733a964..9a39b95c073b 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 @@ -73,6 +73,16 @@ pub(crate) fn migrate_eslint_any_rule( let rule = group.use_literal_keys.get_or_insert(Default::default()); rule.set_level(rule_severity.into()); } + "@typescript-eslint/explicit-function-return-type" => { + if !options.include_nursery { + return false; + } + let group = rules.nursery.get_or_insert_with(Default::default); + let rule = group + .use_explicit_function_return_type + .get_or_insert(Default::default()); + rule.set_level(rule_severity.into()); + } "@typescript-eslint/explicit-member-accessibility" => { if !options.include_nursery { return false; diff --git a/crates/biome_cli/tests/snapshots/main_commands_check/top_level_all_down_level_not_all.snap b/crates/biome_cli/tests/snapshots/main_commands_check/top_level_all_down_level_not_all.snap index 8319f49f84cf..eb7ace276198 100644 --- a/crates/biome_cli/tests/snapshots/main_commands_check/top_level_all_down_level_not_all.snap +++ b/crates/biome_cli/tests/snapshots/main_commands_check/top_level_all_down_level_not_all.snap @@ -40,6 +40,25 @@ check ━━━━━━━━━━━━━━━━━━━━━━━━ # Emitted Messages +```block +fix.js:1:1 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ + + ! Missing return type on function. + + > 1 │ + │ + > 2 │ function f() {arguments;} + │ ^^^^^^^^^^ + 3 │ const FOO = "FOO"; + 4 │ var x, y; + + i Declaring the return type makes the code self-documenting and can speed up TypeScript type checking. + + i Add a return type annotation. + + +``` + ```block fix.js:2:14 lint/correctness/noUnusedVariables ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ @@ -151,5 +170,5 @@ fix.js format ━━━━━━━━━━━━━━━━━━━━━━ ```block Checked 1 file in