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(lint): add rule noUselessLengthCheck #4060

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
530a61a
add rule noUselessLengthCheck
GunseiKPaseri Sep 24, 2024
38a4d7f
fix: remove the recursive function
GunseiKPaseri Sep 26, 2024
e400b00
Update crates/biome_js_analyze/src/lint/nursery/no_useless_length_che…
GunseiKPaseri Oct 15, 2024
292607f
Update crates/biome_js_analyze/src/lint/nursery/no_useless_length_che…
GunseiKPaseri Oct 15, 2024
1bbcf83
doc: add doc comment
GunseiKPaseri Oct 15, 2024
3a467e3
Merge branch 'main' into no-useless-length-check
GunseiKPaseri Oct 15, 2024
6c56b42
Update crates/biome_js_analyze/src/lint/nursery/no_useless_length_che…
GunseiKPaseri Oct 25, 2024
afc6c6b
Merge branch 'main' into no-useless-length-check
GunseiKPaseri Oct 25, 2024
9b00a82
fix: test message
GunseiKPaseri Oct 25, 2024
904b4cb
Update crates/biome_js_analyze/src/lint/nursery/no_useless_length_che…
GunseiKPaseri Oct 25, 2024
7a5e3ca
Update crates/biome_js_analyze/src/lint/nursery/no_useless_length_che…
GunseiKPaseri Oct 25, 2024
2c9a5d0
Update crates/biome_js_analyze/src/lint/nursery/no_useless_length_che…
GunseiKPaseri Oct 25, 2024
114d618
fix: use Emphasis
GunseiKPaseri Oct 25, 2024
ee38a15
fix: use `text_trimmed` & JsBinaryExpression#operator()
GunseiKPaseri Oct 25, 2024
9791ff3
Update crates/biome_js_analyze/src/lint/nursery/no_useless_length_che…
GunseiKPaseri Oct 25, 2024
c101768
Update crates/biome_js_analyze/src/lint/nursery/no_useless_length_che…
GunseiKPaseri Oct 25, 2024
9903022
fix: need "&"
GunseiKPaseri Oct 25, 2024
a9e0167
test: add Parenthesized case
GunseiKPaseri Oct 25, 2024
9c88555
fix: use `omit_parentheses`
GunseiKPaseri Oct 25, 2024
e21412c
fix: replace `error_type` => `function_kind`
GunseiKPaseri Oct 25, 2024
f0bf13d
fix: remove `fixable_list` cast
GunseiKPaseri Oct 25, 2024
8326315
fix: remove cast(HashMap & HashSet)
GunseiKPaseri Oct 25, 2024
f0237dd
fix: replace `err_type` => `function_kind`
GunseiKPaseri Oct 25, 2024
c37e017
fix: use struct
GunseiKPaseri Oct 25, 2024
f1fa671
fix: rename replacer=>fixable_point & use struct
GunseiKPaseri Oct 26, 2024
2a31e86
doc: add `get_comparing_length_exp` document
GunseiKPaseri Oct 26, 2024
a796989
fix: remove unused function
GunseiKPaseri Oct 26, 2024
a2fd11f
fix: use `as_js_static_member_expression`
GunseiKPaseri Oct 26, 2024
30a1a00
fix: remove i64 cast
GunseiKPaseri Oct 26, 2024
d5efa3c
fix: use `text_trimmed()`
GunseiKPaseri Oct 26, 2024
6b71815
fix: use `as_*`
GunseiKPaseri Oct 26, 2024
edfadf5
fix: remove equal length check
GunseiKPaseri Oct 26, 2024
06b2efc
doc: add `search_logical_exp` argument document
GunseiKPaseri Oct 26, 2024
b8e7493
Merge branch 'main' into no-useless-length-check
GunseiKPaseri Oct 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 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.

78 changes: 49 additions & 29 deletions crates/biome_configuration/src/analyzer/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 @@ -172,6 +172,7 @@ define_categories! {
"lint/nursery/noUnmatchableAnbSelector": "https://biomejs.dev/linter/rules/no-unmatchable-anb-selector",
"lint/nursery/noUnusedFunctionParameters": "https://biomejs.dev/linter/rules/no-unused-function-parameters",
"lint/nursery/noUselessEscapeInRegex": "https://biomejs.dev/linter/rules/no-useless-escape-in-regex",
"lint/nursery/noUselessLengthCheck": "https://biomejs.dev/linter/rules/no-useless-length-check",
"lint/nursery/noValueAtRule": "https://biomejs.dev/linter/rules/no-value-at-rule",
"lint/nursery/useAdjacentOverloadSignatures": "https://biomejs.dev/linter/rules/use-adjacent-overload-signatures",
"lint/nursery/useAriaPropsSupportedByRole": "https://biomejs.dev/linter/rules/use-aria-props-supported-by-role",
Expand Down
2 changes: 2 additions & 0 deletions crates/biome_js_analyze/src/lint/nursery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ pub mod no_secrets;
pub mod no_static_element_interactions;
pub mod no_substr;
pub mod no_useless_escape_in_regex;
pub mod no_useless_length_check;
pub mod use_adjacent_overload_signatures;
pub mod use_aria_props_supported_by_role;
pub mod use_component_export_only_modules;
Expand Down Expand Up @@ -46,6 +47,7 @@ declare_lint_group! {
self :: no_static_element_interactions :: NoStaticElementInteractions ,
self :: no_substr :: NoSubstr ,
self :: no_useless_escape_in_regex :: NoUselessEscapeInRegex ,
self :: no_useless_length_check :: NoUselessLengthCheck ,
self :: use_adjacent_overload_signatures :: UseAdjacentOverloadSignatures ,
self :: use_aria_props_supported_by_role :: UseAriaPropsSupportedByRole ,
self :: use_component_export_only_modules :: UseComponentExportOnlyModules ,
Expand Down
Loading