Skip to content

Commit

Permalink
chore(linter): rename useExplicitFunctionReturnType to `useExplicit… (
Browse files Browse the repository at this point in the history
  • Loading branch information
kaykdm authored Oct 12, 2024
1 parent 773f5b0 commit 3cf20eb
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 43 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions crates/biome_configuration/src/analyzer/linter/rules.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3401,8 +3401,7 @@ pub struct Nursery {
Option<RuleConfiguration<biome_graphql_analyze::options::UseDeprecatedReason>>,
#[doc = "Require explicit return types on functions and class methods."]
#[serde(skip_serializing_if = "Option::is_none")]
pub use_explicit_function_return_type:
Option<RuleConfiguration<biome_js_analyze::options::UseExplicitFunctionReturnType>>,
pub use_explicit_type: Option<RuleConfiguration<biome_js_analyze::options::UseExplicitType>>,
#[doc = "Require for-in loops to include an if statement."]
#[serde(skip_serializing_if = "Option::is_none")]
pub use_guard_for_in: Option<RuleConfiguration<biome_js_analyze::options::UseGuardForIn>>,
Expand Down Expand Up @@ -3478,7 +3477,7 @@ impl Nursery {
"useConsistentCurlyBraces",
"useConsistentMemberAccessibility",
"useDeprecatedReason",
"useExplicitFunctionReturnType",
"useExplicitType",
"useGuardForIn",
"useImportRestrictions",
"useSortedClasses",
Expand Down Expand Up @@ -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]));
}
Expand Down Expand Up @@ -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]));
}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_diagnostics_categories/src/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions crates/biome_js_analyze/src/lint/nursery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 ,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")],
Expand All @@ -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<AnyJsFunctionWithReturnType>;
type State = TextRange;
type Signals = Option<Self::State>;
Expand Down
3 changes: 2 additions & 1 deletion crates/biome_js_analyze/src/options.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand All @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions packages/@biomejs/backend-jsonrpc/src/workspace.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/@biomejs/biome/configuration_schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3cf20eb

Please sign in to comment.