Skip to content

Commit

Permalink
fix(linter): fix typo in rule name. `useConsistentBuiltinInstatiation…
Browse files Browse the repository at this point in the history
…` to `useConsistentBuiltinInstantiation` (#2662)
  • Loading branch information
minht11 authored May 1, 2024
1 parent e86df46 commit 773a735
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 68 deletions.
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

### Linter

#### Bug fixes

- Fix typo by renaming `useConsistentBuiltinInstatiation` to `useConsistentBuiltinInstantiation`
Contributed by @minht11

### Parser


Expand Down Expand Up @@ -81,19 +86,19 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b

#### New features

- Add [nusery/noReactSpecificProps](https://biomejs.dev/linter/rules/no-react-specific-props/).
- Add [nursery/noReactSpecificProps](https://biomejs.dev/linter/rules/no-react-specific-props/).
Contributed by @marvin-j97

- Add [noUselessUndefinedInitialization](https://biomejs.dev/linter/rules/no-useless-undefined-initialization/).
Contributed by @lutaok

- Add [nusery/useArrayLiterals](https://biomejs.dev/linter/rules/use-array-literals/).
- Add [nursery/useArrayLiterals](https://biomejs.dev/linter/rules/use-array-literals/).
Contributed by @Kazuhiro-Mimaki

- Add [nusery/useConsistentBuiltinInstatiation](https://biomejs.dev/linter/rules/use-consistent-builtin-instatiation/).
- Add [nursery/useConsistentBuiltinInstatiation](https://biomejs.dev/linter/rules/use-consistent-builtin-instantiation/).
Contributed by @minht11

- Add [nusery/useDefaultSwitchClause](https://biomejs.dev/linter/rules/use-default-switch-clause/).
- Add [nursery/useDefaultSwitchClause](https://biomejs.dev/linter/rules/use-default-switch-clause/).
Contributed by @michellocana

#### Bug fixes
Expand Down

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

14 changes: 7 additions & 7 deletions crates/biome_configuration/src/linter/rules.rs

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

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 @@ -134,7 +134,7 @@ define_categories! {
"lint/nursery/noUselessUndefinedInitialization": "https://biomejs.dev/linter/rules/no-useless-undefined-initialization",
"lint/nursery/noUnknownUnit": "https://biomejs.dev/linter/rules/no-unknown-unit",
"lint/nursery/useBiomeSuppressionComment": "https://biomejs.dev/linter/rules/use-biome-suppression-comment",
"lint/nursery/useConsistentBuiltinInstatiation": "https://biomejs.dev/linter/rules/use-consistent-new-builtin",
"lint/nursery/useConsistentBuiltinInstantiation": "https://biomejs.dev/linter/rules/use-consistent-new-builtin",
"lint/nursery/useGenericFontNames": "https://biomejs.dev/linter/rules/use-generic-font-names",
"lint/nursery/useDefaultSwitchClause": "https://biomejs.dev/linter/rules/use-default-switch-clause",
"lint/nursery/useImportRestrictions": "https://biomejs.dev/linter/rules/use-import-restrictions",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ declare_rule! {
pub NoInvalidNewBuiltin {
version: "1.3.0",
name: "noInvalidNewBuiltin",
// TODO: Remove this source once `useConsistentBuiltinInstatiation` is stable
// TODO: Remove this source once `useConsistentBuiltinInstantiation` is stable
sources: &[RuleSource::Eslint("no-new-native-nonconstructor")],
recommended: true,
// TODO: Deprecate this source once `useConsistentBuiltinInstatiation` is stable
//deprecated: "Use the rule useConsistentBuiltinInstatiation instead.",
// TODO: Deprecate this source once `useConsistentBuiltinInstantiation` is stable
//deprecated: "Use the rule useConsistentBuiltinInstantiation instead.",
fix_kind: FixKind::Unsafe,
}
}
Expand Down
4 changes: 2 additions & 2 deletions crates/biome_js_analyze/src/lint/nursery.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 @@ -97,9 +97,9 @@ declare_rule! {
/// ]);
/// ```
///
pub UseConsistentBuiltinInstatiation {
pub UseConsistentBuiltinInstantiation {
version: "1.7.2",
name: "useConsistentBuiltinInstatiation",
name: "useConsistentBuiltinInstantiation",
sources: &[
RuleSource::EslintUnicorn("new-for-builtins"),
RuleSource::Eslint("no-new-wrappers"),
Expand All @@ -111,9 +111,9 @@ declare_rule! {
}
}

impl Rule for UseConsistentBuiltinInstatiation {
impl Rule for UseConsistentBuiltinInstantiation {
type Query = Semantic<JsNewOrCallExpression>;
type State = UseConsistentBuiltinInstatiationState;
type State = UseConsistentBuiltinInstantiationState;
type Signals = Option<Self::State>;
type Options = ();

Expand All @@ -130,7 +130,7 @@ impl Rule for UseConsistentBuiltinInstatiation {
.is_ok()
{
return ctx.model().binding(&reference).is_none().then_some(
UseConsistentBuiltinInstatiationState {
UseConsistentBuiltinInstantiationState {
name: name_text.to_string(),
creation_rule,
},
Expand Down Expand Up @@ -249,7 +249,7 @@ impl BuiltinCreationRule {
}
}

pub struct UseConsistentBuiltinInstatiationState {
pub struct UseConsistentBuiltinInstantiationState {
name: String,
creation_rule: BuiltinCreationRule,
}
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_js_analyze/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ pub type UseButtonType =
pub type UseCollapsedElseIf =
<lint::style::use_collapsed_else_if::UseCollapsedElseIf as biome_analyze::Rule>::Options;
pub type UseConsistentArrayType = < lint :: style :: use_consistent_array_type :: UseConsistentArrayType as biome_analyze :: Rule > :: Options ;
pub type UseConsistentBuiltinInstatiation = < lint :: nursery :: use_consistent_builtin_instatiation :: UseConsistentBuiltinInstatiation as biome_analyze :: Rule > :: Options ;
pub type UseConsistentBuiltinInstantiation = < lint :: nursery :: use_consistent_builtin_instantiation :: UseConsistentBuiltinInstantiation as biome_analyze :: Rule > :: Options ;
pub type UseConst = <lint::style::use_const::UseConst as biome_analyze::Rule>::Options;
pub type UseDefaultParameterLast = < lint :: style :: use_default_parameter_last :: UseDefaultParameterLast as biome_analyze :: Rule > :: Options ;
pub type UseDefaultSwitchClause = < lint :: nursery :: use_default_switch_clause :: UseDefaultSwitchClause as biome_analyze :: Rule > :: Options ;
Expand Down
Loading

0 comments on commit 773a735

Please sign in to comment.