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 63f78d8a524c..46f6938063ce 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 @@ -104,9 +104,7 @@ pub(crate) fn migrate_eslint_any_rule( 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()); + let rule = group.use_explicit_type.get_or_insert(Default::default()); rule.set_level(rule_severity.into()); } "@typescript-eslint/explicit-member-accessibility" => { diff --git a/crates/biome_configuration/src/analyzer/linter/rules.rs b/crates/biome_configuration/src/analyzer/linter/rules.rs index a768982d9438..f90a75cf02e2 100644 --- a/crates/biome_configuration/src/analyzer/linter/rules.rs +++ b/crates/biome_configuration/src/analyzer/linter/rules.rs @@ -3401,8 +3401,7 @@ pub struct Nursery { Option>, #[doc = "Require explicit return types on functions and class methods."] #[serde(skip_serializing_if = "Option::is_none")] - pub use_explicit_function_return_type: - Option>, + pub use_explicit_type: Option>, #[doc = "Require for-in loops to include an if statement."] #[serde(skip_serializing_if = "Option::is_none")] pub use_guard_for_in: Option>, @@ -3478,7 +3477,7 @@ impl Nursery { "useConsistentCurlyBraces", "useConsistentMemberAccessibility", "useDeprecatedReason", - "useExplicitFunctionReturnType", + "useExplicitType", "useGuardForIn", "useImportRestrictions", "useSortedClasses", @@ -3750,7 +3749,7 @@ impl Nursery { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34])); } } - if let Some(rule) = self.use_explicit_function_return_type.as_ref() { + if let Some(rule) = self.use_explicit_type.as_ref() { if rule.is_enabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35])); } @@ -3964,7 +3963,7 @@ impl Nursery { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[34])); } } - if let Some(rule) = self.use_explicit_function_return_type.as_ref() { + if let Some(rule) = self.use_explicit_type.as_ref() { if rule.is_disabled() { index_set.insert(RuleFilter::Rule(Self::GROUP_NAME, Self::GROUP_RULES[35])); } @@ -4175,8 +4174,8 @@ impl Nursery { .use_deprecated_reason .as_ref() .map(|conf| (conf.level(), conf.get_options())), - "useExplicitFunctionReturnType" => self - .use_explicit_function_return_type + "useExplicitType" => self + .use_explicit_type .as_ref() .map(|conf| (conf.level(), conf.get_options())), "useGuardForIn" => self diff --git a/crates/biome_diagnostics_categories/src/categories.rs b/crates/biome_diagnostics_categories/src/categories.rs index 46f8a426108d..8e78a861b235 100644 --- a/crates/biome_diagnostics_categories/src/categories.rs +++ b/crates/biome_diagnostics_categories/src/categories.rs @@ -189,7 +189,7 @@ define_categories! { "lint/nursery/useConsistentCurlyBraces": "https://biomejs.dev/linter/rules/use-consistent-curly-braces", "lint/nursery/useConsistentMemberAccessibility": "https://biomejs.dev/linter/rules/use-consistent-member-accessibility", "lint/nursery/useDeprecatedReason": "https://biomejs.dev/linter/rules/use-deprecated-reason", - "lint/nursery/useExplicitFunctionReturnType": "https://biomejs.dev/linter/rules/use-explicit-function-return-type", + "lint/nursery/useExplicitType": "https://biomejs.dev/linter/rules/use-explicit-function-return-type", "lint/nursery/useGuardForIn": "https://biomejs.dev/linter/rules/use-guard-for-in", "lint/nursery/useImportRestrictions": "https://biomejs.dev/linter/rules/use-import-restrictions", "lint/nursery/useJsxCurlyBraceConvention": "https://biomejs.dev/linter/rules/use-jsx-curly-brace-convention", diff --git a/crates/biome_js_analyze/src/lint/nursery.rs b/crates/biome_js_analyze/src/lint/nursery.rs index 006b021974fa..b427e251a876 100644 --- a/crates/biome_js_analyze/src/lint/nursery.rs +++ b/crates/biome_js_analyze/src/lint/nursery.rs @@ -28,7 +28,7 @@ pub mod use_at_index; pub mod use_component_export_only_modules; pub mod use_consistent_curly_braces; pub mod use_consistent_member_accessibility; -pub mod use_explicit_function_return_type; +pub mod use_explicit_type; pub mod use_guard_for_in; pub mod use_import_restrictions; pub mod use_sorted_classes; @@ -66,7 +66,7 @@ declare_lint_group! { self :: use_component_export_only_modules :: UseComponentExportOnlyModules , self :: use_consistent_curly_braces :: UseConsistentCurlyBraces , self :: use_consistent_member_accessibility :: UseConsistentMemberAccessibility , - self :: use_explicit_function_return_type :: UseExplicitFunctionReturnType , + self :: use_explicit_type :: UseExplicitType , self :: use_guard_for_in :: UseGuardForIn , self :: use_import_restrictions :: UseImportRestrictions , self :: use_sorted_classes :: UseSortedClasses , diff --git a/crates/biome_js_analyze/src/lint/nursery/use_explicit_function_return_type.rs b/crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs similarity index 99% rename from crates/biome_js_analyze/src/lint/nursery/use_explicit_function_return_type.rs rename to crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs index 46000228b2e5..dd4bda33b777 100644 --- a/crates/biome_js_analyze/src/lint/nursery/use_explicit_function_return_type.rs +++ b/crates/biome_js_analyze/src/lint/nursery/use_explicit_type.rs @@ -202,9 +202,9 @@ declare_lint_rule! { /// } /// ``` /// - pub UseExplicitFunctionReturnType { + pub UseExplicitType { version: "1.9.3", - name: "useExplicitFunctionReturnType", + name: "useExplicitType", language: "ts", recommended: false, sources: &[RuleSource::EslintTypeScript("explicit-function-return-type")], @@ -215,7 +215,7 @@ declare_node_union! { pub AnyJsFunctionWithReturnType = AnyJsFunction | JsMethodClassMember | JsMethodObjectMember | JsGetterClassMember | JsGetterObjectMember } -impl Rule for UseExplicitFunctionReturnType { +impl Rule for UseExplicitType { type Query = Ast; type State = TextRange; type Signals = Option; diff --git a/crates/biome_js_analyze/src/options.rs b/crates/biome_js_analyze/src/options.rs index 662b0072df58..ca357f3e2226 100644 --- a/crates/biome_js_analyze/src/options.rs +++ b/crates/biome_js_analyze/src/options.rs @@ -314,8 +314,9 @@ pub type UseEnumInitializers = pub type UseErrorMessage = ::Options; pub type UseExhaustiveDependencies = < lint :: correctness :: use_exhaustive_dependencies :: UseExhaustiveDependencies as biome_analyze :: Rule > :: Options ; -pub type UseExplicitFunctionReturnType = < lint :: nursery :: use_explicit_function_return_type :: UseExplicitFunctionReturnType as biome_analyze :: Rule > :: Options ; pub type UseExplicitLengthCheck = < lint :: style :: use_explicit_length_check :: UseExplicitLengthCheck as biome_analyze :: Rule > :: Options ; +pub type UseExplicitType = + ::Options; pub type UseExponentiationOperator = < lint :: style :: use_exponentiation_operator :: UseExponentiationOperator as biome_analyze :: Rule > :: Options ; pub type UseExportType = ::Options; diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/invalid.ts b/crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/invalid.ts rename to crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/invalid.ts.snap b/crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts.snap similarity index 78% rename from crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/invalid.ts.snap rename to crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts.snap index f64962a5730d..6f34976d42c3 100644 --- a/crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/invalid.ts.snap +++ b/crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts.snap @@ -103,7 +103,7 @@ const x = { bar: { prop: () => {} } } # Diagnostics ``` -invalid.ts:1:1 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:1:1 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -120,7 +120,7 @@ invalid.ts:1:1 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:3:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:3:2 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -142,7 +142,7 @@ invalid.ts:3:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:9:10 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:9:10 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -164,7 +164,7 @@ invalid.ts:9:10 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:13:15 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:13:15 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -183,7 +183,7 @@ invalid.ts:13:15 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:17:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:17:2 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -205,7 +205,7 @@ invalid.ts:17:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:21:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:21:2 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -227,7 +227,7 @@ invalid.ts:21:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:24:10 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:24:10 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -246,7 +246,7 @@ invalid.ts:24:10 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:25:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:25:2 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -268,7 +268,7 @@ invalid.ts:25:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:31:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:31:2 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -289,7 +289,7 @@ invalid.ts:31:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:37:3 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:37:3 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -310,7 +310,7 @@ invalid.ts:37:3 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:42:14 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:42:14 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -329,7 +329,7 @@ invalid.ts:42:14 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:43:14 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:43:14 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -347,7 +347,7 @@ invalid.ts:43:14 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:45:16 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:45:16 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -366,7 +366,7 @@ invalid.ts:45:16 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:46:16 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:46:16 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -384,7 +384,7 @@ invalid.ts:46:16 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:49:23 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:49:23 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -402,7 +402,7 @@ invalid.ts:49:23 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:50:23 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:50:23 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -421,7 +421,7 @@ invalid.ts:50:23 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:52:10 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:52:10 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -440,7 +440,7 @@ invalid.ts:52:10 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:57:17 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:57:17 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -464,7 +464,7 @@ invalid.ts:57:17 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:66:17 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:66:17 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -488,7 +488,7 @@ invalid.ts:66:17 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:78:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:78:2 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -510,7 +510,7 @@ invalid.ts:78:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:85:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:85:2 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -532,7 +532,7 @@ invalid.ts:85:2 lint/nursery/useExplicitFunctionReturnType ━━━━━━━ ``` ``` -invalid.ts:94:19 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:94:19 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. @@ -550,7 +550,7 @@ invalid.ts:94:19 lint/nursery/useExplicitFunctionReturnType ━━━━━━ ``` ``` -invalid.ts:95:26 lint/nursery/useExplicitFunctionReturnType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ +invalid.ts:95:26 lint/nursery/useExplicitType ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ! Missing return type on function. diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.d.ts b/crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.d.ts similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.d.ts rename to crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.d.ts diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.d.ts.snap b/crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.d.ts.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.d.ts.snap rename to crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.d.ts.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.js b/crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.js similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.js rename to crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.js diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.js.snap b/crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.js.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.js.snap rename to crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.js.snap diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.ts b/crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.ts similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.ts rename to crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.ts diff --git a/crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.ts.snap b/crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.ts.snap similarity index 100% rename from crates/biome_js_analyze/tests/specs/nursery/useExplicitFunctionReturnType/valid.ts.snap rename to crates/biome_js_analyze/tests/specs/nursery/useExplicitType/valid.ts.snap diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts index b19fabf0ff6d..bcd9c6160611 100644 --- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts +++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts @@ -1365,7 +1365,7 @@ export interface Nursery { /** * Require explicit return types on functions and class methods. */ - useExplicitFunctionReturnType?: RuleConfiguration_for_Null; + useExplicitType?: RuleConfiguration_for_Null; /** * Require for-in loops to include an if statement. */ @@ -2945,7 +2945,7 @@ export type Category = | "lint/nursery/useConsistentCurlyBraces" | "lint/nursery/useConsistentMemberAccessibility" | "lint/nursery/useDeprecatedReason" - | "lint/nursery/useExplicitFunctionReturnType" + | "lint/nursery/useExplicitType" | "lint/nursery/useGuardForIn" | "lint/nursery/useImportRestrictions" | "lint/nursery/useJsxCurlyBraceConvention" diff --git a/packages/@biomejs/biome/configuration_schema.json b/packages/@biomejs/biome/configuration_schema.json index 440f32f16f15..9402fa335c0f 100644 --- a/packages/@biomejs/biome/configuration_schema.json +++ b/packages/@biomejs/biome/configuration_schema.json @@ -2338,7 +2338,7 @@ { "type": "null" } ] }, - "useExplicitFunctionReturnType": { + "useExplicitType": { "description": "Require explicit return types on functions and class methods.", "anyOf": [ { "$ref": "#/definitions/RuleConfiguration" },