Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(linter): add useConsistentNewBuiltin #2540

Merged
merged 13 commits into from
Apr 24, 2024
20 changes: 20 additions & 0 deletions crates/biome_cli/src/execute/migrate/eslint_any_rule_to_biome.rs

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

27 changes: 23 additions & 4 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.

1 change: 1 addition & 0 deletions crates/biome_diagnostics_categories/src/categories.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ define_categories! {
"lint/nursery/noTypeOnlyImportAttributes": "https://biomejs.dev/linter/rules/no-type-only-import-attributes",
"lint/nursery/noUndeclaredDependencies": "https://biomejs.dev/linter/rules/no-undeclared-dependencies",
"lint/nursery/useBiomeSuppressionComment": "https://biomejs.dev/linter/rules/use-biome-suppression-comment",
"lint/nursery/useConsistentNewBuiltin": "https://biomejs.dev/linter/rules/use-consistent-new-builtin",
"lint/nursery/useImportRestrictions": "https://biomejs.dev/linter/rules/use-import-restrictions",
"lint/nursery/useSortedClasses": "https://biomejs.dev/linter/rules/use-sorted-classes",
"lint/performance/noAccumulatingSpread": "https://biomejs.dev/linter/rules/no-accumulating-spread",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ use biome_js_factory::make::js_regex_literal_expression;
use biome_js_semantic::SemanticModel;
use biome_js_syntax::{
global_identifier, static_value::StaticValue, AnyJsCallArgument, AnyJsExpression,
AnyJsLiteralExpression, JsCallArguments, JsCallExpression, JsComputedMemberExpression,
JsNewExpression, JsSyntaxKind, JsSyntaxToken,
};
use biome_rowan::{
declare_node_union, AstNode, AstSeparatedList, BatchMutationExt, SyntaxError, TokenText,
AnyJsLiteralExpression, JsCallArguments, JsComputedMemberExpression, JsNewOrCallExpression,
JsSyntaxKind, JsSyntaxToken,
};
use biome_rowan::{AstNode, AstSeparatedList, BatchMutationExt, SyntaxError, TokenText};

use crate::{services::semantic::Semantic, JsRuleAction};

Expand Down Expand Up @@ -54,10 +52,6 @@ declare_rule! {
}
}

declare_node_union! {
pub JsNewOrCallExpression = JsNewExpression | JsCallExpression
}

pub struct UseRegexLiteralsState {
pattern: String,
flags: Option<String>,
Expand Down
2 changes: 2 additions & 0 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.

Loading
Loading