chore: fix typos in biome js analyze crate#7210
Conversation
|
WalkthroughThis PR fixes numerous typos and comment/doc examples across the biome_js_analyze crate and its tests. Changes are almost entirely non-functional: comment and documentation corrections, a single local variable rename ( Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (24)
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (8)
crates/biome_js_analyze/src/react/components.rs (1)
249-252: Nit: fix “expressionn” typo in comment.Tiny polish to keep the docs pristine.
Apply this diff:
- // If the expressionn is not wrapped in memo or forwardRef, + // If the expression is not wrapped in memo or forwardRef,crates/biome_js_analyze/src/lint/style/use_array_literals.rs (1)
160-160: Nit: preferis_empty()overlen() == 0.Slight readability win and idiomatic Rust.
Apply this diff:
- let array_is_empty = new_node.elements().len() == 0; + let array_is_empty = new_node.elements().is_empty();crates/biome_js_analyze/src/lint/suspicious/no_unsafe_negation.rs (1)
84-84: Minor grammar nits in comments and action titleTwo tiny polish points to keep the docs crisp:
- Use lower-case “split” and add “into” for flow.
- Prefer “Wrap the expression in parentheses” for natural phrasing.
Proposed diff:
- // The action could be Split to three steps + // The action could be split into three steps- markup! { "Wrap the expression with a parenthesis" }.to_owned(), + markup! { "Wrap the expression in parentheses" }.to_owned(),Also applies to: 133-135
crates/biome_js_analyze/src/lint/performance/no_unwanted_polyfillio.rs (1)
196-197: Make URL splitter robust to lowercase percent-encodingPercent-encoding is case-insensitive; current regex only matches “%2C” (upper-case). Consider matching “%2c” as well.
Apply:
-static URL_SPLIT_REGEX: LazyLock<Regex> = LazyLock::new(|| Regex::new(r",|%2C").unwrap()); +static URL_SPLIT_REGEX: LazyLock<Regex> = LazyLock::new(|| Regex::new(r",|(?i)%2c").unwrap());Optional: add a test case using lowercase “%2c” in
test_check_unwanted_polyfill()to lock this in.crates/biome_js_analyze/src/lint/style/no_useless_else.rs (1)
227-229: Tiny grammar tweak in the commentLowercase “we” after a comma reads better.
Apply:
- // To simplify, We do not take fallthroughs into account. + // To simplify, we do not take fallthroughs into account.crates/biome_js_analyze/src/lint/style/use_readonly_class_properties.rs (2)
444-447: Two small doc polish suggestions near here
- “all all” → “all”.
- Add code formatting for private_only to aid readability.
Apply:
-/// Collects all all mutable (non-readonly) constructor parameters from a given class declaration. If private_only is true, it only includes parameters with private visibility. +/// Collects all mutable (non-readonly) constructor parameters from a given class declaration. If `private_only` is true, it only includes parameters with private visibility. /// It returns a Vec<PropOrParam> representing these parameters, which are candidates for being marked as readonly. /// e.g. constructor(private paramOne: string, public paramTwo: number) {} makes both paramOne and paramTwo class member properties.
270-276: Message wording: “decorator” → “modifier”Readonly is a TypeScript modifier, not a decorator.
Apply:
- markup! { "Add "<Emphasis>"readonly"</Emphasis>" decorator." }.to_owned(), + markup! { "Add "<Emphasis>"readonly"</Emphasis>" modifier." }.to_owned(),crates/biome_js_analyze/src/lint/complexity/no_useless_string_raw.rs (1)
85-85: Minor grammar/style polish for the diagnostic message.Slight reword for clarity; same intent.
Apply this diff:
- "Remove the String.raw call because it's useless here, String.raw can deal with string which contains escape sequence like \\n, \\t, \\r, \\\\, \\\", \\\'." + "Remove this String.raw call; it's unnecessary here. String.raw is only useful when the template contains escape sequences such as \\n, \\t, \\r, \\\\, \\\", \\\'."
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (28)
crates/biome_js_analyze/tests/specs/a11y/useAltText/img.jsx.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/complexity/noUselessFragments/assignments.jsx.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/complexity/noUselessStringRaw/invalid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/complexity/useNumericLiterals/overridden.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/valid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/correctness/noUndeclaredVariables/invalidNamespaceReference.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/correctness/noUnreachable/SuppressionComments.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/correctness/noUnusedVariables/invalidSelfWrite.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/correctness/noUnusedVariables/validNamespaceExportType.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/invalid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/valid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/noMagicNumbers/valid.tsx.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/noUselessElse/missed.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useComponentExportOnlyModules/valid_component_and_constant_with_ignored_constant_export.jsx.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useComponentExportOnlyModules/valid_component_and_number_constant_with_ignored_constant_export.jsx.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useExponentiationOperator/invalidBaseExponentHigherPrecedence.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useExponentiationOperator/invalidBaseExponentLowerPrecedence.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useImportType/invalid-namespace-imports.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidCustomStyleExceptions.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidPropertyShorthand.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyle.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyleExceptions.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useNumberNamespace/invalid.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/style/useShorthandFunctionType/valid.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/suspicious/noCompareNegZero/invalidComments.js.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts.snapis excluded by!**/*.snapand included by**crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid-shadowing.js.snapis excluded by!**/*.snapand included by**
📒 Files selected for processing (38)
crates/biome_js_analyze/src/assist/source/organize_imports.rs(1 hunks)crates/biome_js_analyze/src/lint/a11y/no_svg_without_title.rs(1 hunks)crates/biome_js_analyze/src/lint/complexity/no_useless_string_raw.rs(1 hunks)crates/biome_js_analyze/src/lint/complexity/no_useless_this_alias.rs(1 hunks)crates/biome_js_analyze/src/lint/correctness/no_unreachable.rs(2 hunks)crates/biome_js_analyze/src/lint/correctness/use_json_import_attributes.rs(2 hunks)crates/biome_js_analyze/src/lint/performance/no_await_in_loops.rs(1 hunks)crates/biome_js_analyze/src/lint/performance/no_unwanted_polyfillio.rs(1 hunks)crates/biome_js_analyze/src/lint/style/no_useless_else.rs(1 hunks)crates/biome_js_analyze/src/lint/style/use_array_literals.rs(1 hunks)crates/biome_js_analyze/src/lint/style/use_enum_initializers.rs(1 hunks)crates/biome_js_analyze/src/lint/style/use_object_spread.rs(1 hunks)crates/biome_js_analyze/src/lint/style/use_readonly_class_properties.rs(1 hunks)crates/biome_js_analyze/src/lint/suspicious/no_confusing_void_type.rs(1 hunks)crates/biome_js_analyze/src/lint/suspicious/no_document_cookie.rs(1 hunks)crates/biome_js_analyze/src/lint/suspicious/no_unsafe_negation.rs(1 hunks)crates/biome_js_analyze/src/react/components.rs(1 hunks)crates/biome_js_analyze/tests/spec_tests.rs(1 hunks)crates/biome_js_analyze/tests/specs/a11y/useAltText/img.jsx(1 hunks)crates/biome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/valid.ts(1 hunks)crates/biome_js_analyze/tests/specs/correctness/noUnreachable/SuppressionComments.js(1 hunks)crates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/invalid.ts(1 hunks)crates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/valid.ts(1 hunks)crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts(1 hunks)crates/biome_js_analyze/tests/specs/style/noMagicNumbers/valid.tsx(1 hunks)crates/biome_js_analyze/tests/specs/style/noUselessElse/missed.js(1 hunks)crates/biome_js_analyze/tests/specs/style/useConst/valid.jsonc(1 hunks)crates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidCustomStyleExceptions.options.json(1 hunks)crates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidCustomStyleExceptions.ts(1 hunks)crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyle.options.json(1 hunks)crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyle.ts(1 hunks)crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyleExceptions.options.json(1 hunks)crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyleExceptions.ts(1 hunks)crates/biome_js_analyze/tests/specs/style/useNumberNamespace/invalid.js(1 hunks)crates/biome_js_analyze/tests/specs/style/useShorthandFunctionType/valid.ts(1 hunks)crates/biome_js_analyze/tests/specs/suspicious/noCompareNegZero/invalidComments.js(1 hunks)crates/biome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts(1 hunks)crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid-shadowing.js(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
crates/biome_*/**/*
📄 CodeRabbit Inference Engine (CLAUDE.md)
Core crates must be located in
/crates/biome_*/
Files:
crates/biome_js_analyze/tests/specs/style/useShorthandFunctionType/valid.tscrates/biome_js_analyze/src/lint/suspicious/no_document_cookie.rscrates/biome_js_analyze/src/lint/complexity/no_useless_this_alias.rscrates/biome_js_analyze/src/lint/correctness/no_unreachable.rscrates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyle.options.jsoncrates/biome_js_analyze/src/lint/performance/no_await_in_loops.rscrates/biome_js_analyze/src/lint/style/no_useless_else.rscrates/biome_js_analyze/src/lint/suspicious/no_unsafe_negation.rscrates/biome_js_analyze/src/lint/complexity/no_useless_string_raw.rscrates/biome_js_analyze/tests/specs/correctness/noUnreachable/SuppressionComments.jscrates/biome_js_analyze/tests/specs/style/noUselessElse/missed.jscrates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidCustomStyleExceptions.options.jsoncrates/biome_js_analyze/src/lint/style/use_readonly_class_properties.rscrates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyleExceptions.tscrates/biome_js_analyze/tests/specs/style/useConst/valid.jsonccrates/biome_js_analyze/src/lint/style/use_array_literals.rscrates/biome_js_analyze/tests/specs/a11y/useAltText/img.jsxcrates/biome_js_analyze/src/lint/style/use_object_spread.rscrates/biome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.tscrates/biome_js_analyze/tests/specs/style/useNumberNamespace/invalid.jscrates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyleExceptions.options.jsoncrates/biome_js_analyze/src/assist/source/organize_imports.rscrates/biome_js_analyze/tests/spec_tests.rscrates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/valid.tscrates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid-shadowing.jscrates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.tscrates/biome_js_analyze/src/lint/performance/no_unwanted_polyfillio.rscrates/biome_js_analyze/src/lint/suspicious/no_confusing_void_type.rscrates/biome_js_analyze/src/react/components.rscrates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidCustomStyleExceptions.tscrates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/invalid.tscrates/biome_js_analyze/src/lint/correctness/use_json_import_attributes.rscrates/biome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/valid.tscrates/biome_js_analyze/tests/specs/style/noMagicNumbers/valid.tsxcrates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyle.tscrates/biome_js_analyze/tests/specs/suspicious/noCompareNegZero/invalidComments.jscrates/biome_js_analyze/src/lint/a11y/no_svg_without_title.rscrates/biome_js_analyze/src/lint/style/use_enum_initializers.rs
**/*.{rs,toml}
📄 CodeRabbit Inference Engine (CLAUDE.md)
Format code (Rust + TOML) using
just formatFormat Rust and TOML files before committing (use
just f/just format).
Files:
crates/biome_js_analyze/src/lint/suspicious/no_document_cookie.rscrates/biome_js_analyze/src/lint/complexity/no_useless_this_alias.rscrates/biome_js_analyze/src/lint/correctness/no_unreachable.rscrates/biome_js_analyze/src/lint/performance/no_await_in_loops.rscrates/biome_js_analyze/src/lint/style/no_useless_else.rscrates/biome_js_analyze/src/lint/suspicious/no_unsafe_negation.rscrates/biome_js_analyze/src/lint/complexity/no_useless_string_raw.rscrates/biome_js_analyze/src/lint/style/use_readonly_class_properties.rscrates/biome_js_analyze/src/lint/style/use_array_literals.rscrates/biome_js_analyze/src/lint/style/use_object_spread.rscrates/biome_js_analyze/src/assist/source/organize_imports.rscrates/biome_js_analyze/tests/spec_tests.rscrates/biome_js_analyze/src/lint/performance/no_unwanted_polyfillio.rscrates/biome_js_analyze/src/lint/suspicious/no_confusing_void_type.rscrates/biome_js_analyze/src/react/components.rscrates/biome_js_analyze/src/lint/correctness/use_json_import_attributes.rscrates/biome_js_analyze/src/lint/a11y/no_svg_without_title.rscrates/biome_js_analyze/src/lint/style/use_enum_initializers.rs
🧠 Learnings (17)
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/**/src/lint/nursery/**/*.rs : Diagnostics must follow three pillars: state what the error is, why it triggers, and what to do (ideally via a code action or note)
Applied to files:
crates/biome_js_analyze/src/lint/correctness/no_unreachable.rscrates/biome_js_analyze/src/lint/suspicious/no_unsafe_negation.rscrates/biome_js_analyze/src/lint/complexity/no_useless_string_raw.rscrates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/**/src/lint/nursery/**/*.rs : Code blocks in docs must specify language; invalid examples must use expect_diagnostic; snippets must emit exactly one diagnostic
Applied to files:
crates/biome_js_analyze/src/lint/correctness/no_unreachable.rscrates/biome_js_analyze/src/lint/performance/no_await_in_loops.rs
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/**/src/lint/nursery/**/*.rs : Use meaningful, cross-language-capable rule names when appropriate; use language/framework-specific names when constrained
Applied to files:
crates/biome_js_analyze/src/lint/correctness/no_unreachable.rscrates/biome_js_analyze/src/lint/performance/no_await_in_loops.rscrates/biome_js_analyze/src/lint/complexity/no_useless_string_raw.rscrates/biome_js_analyze/src/assist/source/organize_imports.rs
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/**/src/lint/nursery/**/*.rs : When banning globals (e.g., console.log), consult the semantic model to avoid flagging locally shadowed bindings
Applied to files:
crates/biome_js_analyze/src/lint/performance/no_await_in_loops.rscrates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts
📚 Learning: 2025-08-11T11:48:52.001Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:48:52.001Z
Learning: Applies to crates/biome_js_formatter/**/*.rs : Do not attempt to fix code: if a mandatory token/node is missing, return None instead
Applied to files:
crates/biome_js_analyze/src/lint/style/no_useless_else.rs
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/**/src/lint/nursery/**/*.rs : Avoid unnecessary string allocations; compare against &str or use TokenText instead of to_string()
Applied to files:
crates/biome_js_analyze/src/lint/complexity/no_useless_string_raw.rs
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/crates/biome_js_analyze/tests/specs/** : Place JS rule snapshot tests under tests/specs/<group>/<ruleName>/ with files prefixed by invalid* and valid*
Applied to files:
crates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidCustomStyleExceptions.options.jsoncrates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyleExceptions.options.json
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/crates/biome_js_analyze/tests/specs/**/*.jsonc : .jsonc snapshot test files must contain an array of strings (snippets) and are interpreted as script
Applied to files:
crates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidCustomStyleExceptions.options.jsoncrates/biome_js_analyze/tests/specs/style/useConst/valid.jsonc
📚 Learning: 2025-08-11T11:50:12.090Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:50:12.090Z
Learning: Applies to crates/biome_js_type_info/src/**/*.rs : Represent links between types using TypeReference (not Arc) to avoid cross-module retention and recursive structures; store type data in linear vectors
Applied to files:
crates/biome_js_analyze/src/lint/style/use_array_literals.rs
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/**/src/lint/nursery/**/*.rs : Set the language field in declare_lint_rule! to the primary language/dialect (js, jsx, ts, tsx)
Applied to files:
crates/biome_js_analyze/src/lint/style/use_array_literals.rscrates/biome_js_analyze/src/assist/source/organize_imports.rs
📚 Learning: 2025-08-11T11:50:12.090Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_js_type_info/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:50:12.090Z
Learning: Applies to crates/biome_js_type_info/src/**/*.rs : Use TypeData::Unknown for unimplemented inference and TypeData::UnknownKeyword for the explicit TypeScript unknown keyword; treat them semantically the same but keep them distinct for measurement
Applied to files:
crates/biome_js_analyze/src/lint/style/use_array_literals.rs
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/**/src/lint/nursery/**/*.rs : When porting a lint rule, specify sources in declare_lint_rule! (e.g., RuleSource::Eslint(...).same() or .inspired())
Applied to files:
crates/biome_js_analyze/src/assist/source/organize_imports.rs
📚 Learning: 2025-08-11T11:40:38.097Z
Learnt from: CR
PR: biomejs/biome#0
File: CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:40:38.097Z
Learning: For documentation of rules/assists/options, use inline Rustdoc in source code; other docs updates should go to the website repo’s next branch.
Applied to files:
crates/biome_js_analyze/src/assist/source/organize_imports.rs
📚 Learning: 2025-08-11T11:48:27.774Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:48:27.774Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/tests/spec_test.rs : Create tests/spec_test.rs implementing the run(spec_input_file, _expected_file, test_directory, _file_type) function as shown and include!("language.rs")
Applied to files:
crates/biome_js_analyze/tests/spec_tests.rs
📚 Learning: 2025-08-11T11:43:46.619Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:43:46.619Z
Learning: Applies to crates/biome_analyze/crates/biome_js_analyze/tests/quick_test.rs : Quick test lives in biome_js_analyze/tests/quick_test.rs; unignore it and set RuleFilter appropriately when using
Applied to files:
crates/biome_js_analyze/tests/spec_tests.rscrates/biome_js_analyze/src/lint/performance/no_unwanted_polyfillio.rs
📚 Learning: 2025-08-11T11:53:15.299Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:53:15.299Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in biome_lsp’s server.tests.rs
Applied to files:
crates/biome_js_analyze/tests/spec_tests.rs
📚 Learning: 2025-08-11T11:48:27.774Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-08-11T11:48:27.774Z
Learning: Applies to crates/biome_formatter/biome_html_formatter/tests/spec_tests.rs : Create tests/spec_tests.rs in the biome_html_formatter crate that generates tests via tests_macros::gen_tests! for all HTML files at tests/specs/html/**/*.html
Applied to files:
crates/biome_js_analyze/tests/spec_tests.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
- GitHub Check: Test Node.js API
- GitHub Check: Documentation
- GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
- GitHub Check: Lint project (depot-windows-2022)
- GitHub Check: Check Dependencies
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: End-to-end tests
- GitHub Check: Test (depot-ubuntu-24.04-arm-16)
- GitHub Check: autofix
- GitHub Check: Bench (biome_css_parser)
- GitHub Check: Bench (biome_configuration)
- GitHub Check: Bench (biome_graphql_formatter)
- GitHub Check: Bench (biome_html_formatter)
- GitHub Check: Bench (biome_module_graph)
- GitHub Check: Bench (biome_package)
- GitHub Check: Bench (biome_html_parser)
- GitHub Check: Bench (biome_json_formatter)
- GitHub Check: Bench (biome_graphql_parser)
- GitHub Check: Bench (biome_json_analyze)
- GitHub Check: Bench (biome_css_analyze)
- GitHub Check: Bench (biome_js_analyze)
- GitHub Check: Bench (biome_json_parser)
- GitHub Check: Bench (biome_css_formatter)
- GitHub Check: Bench (biome_js_parser)
- GitHub Check: Bench (biome_js_formatter)
🔇 Additional comments (35)
crates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/invalid.ts (1)
294-294: Typo fix in test name looks good.Renaming to testInvalidObjectMethodCalls improves clarity and keeps naming consistent with the valid case. No behavioural impact.
crates/biome_js_analyze/tests/spec_tests.rs (1)
465-465: Spelling correction acknowledged.“suppression comments” is correct; thanks for tidying the docs.
crates/biome_js_analyze/tests/specs/style/noUselessElse/missed.js (1)
17-17: Comment typo fixed.“fallthrough” is the right term for switch-case behaviour. All good.
crates/biome_js_analyze/tests/specs/nursery/noFloatingPromises/valid.ts (1)
216-216: Consistent test name correction.testValidObjectMethodCalls matches the invalid suite’s naming. Neat and tidy.
crates/biome_js_analyze/src/lint/performance/no_await_in_loops.rs (1)
92-92: Minor comment typo fixed.The “binding in for in” note reads correctly now. No functional changes.
crates/biome_js_analyze/src/react/components.rs (1)
57-57: Nice catch: spelling fixed.Docstring typo "definition" reads correctly now. No behaviour change.
crates/biome_js_analyze/src/lint/style/use_array_literals.rs (1)
178-179: Spelling correction reads better.Comment now uses “its” correctly; no code changes.
crates/biome_js_analyze/src/lint/complexity/no_useless_this_alias.rs (1)
101-104: Comment fix LGTM.The intent of the guard is clearer now.
crates/biome_js_analyze/tests/specs/style/useConst/valid.jsonc (1)
103-103: Typo fix approved.“assignment” is correct; snapshot semantics unchanged.
crates/biome_js_analyze/tests/specs/nursery/useExplicitType/invalid.ts (1)
62-62: Comment tweak looks good.Clearer guidance for the test case.
crates/biome_js_analyze/src/lint/suspicious/no_document_cookie.rs (1)
86-86: Nice catch on the typoThe corrected example comment reads well and keeps the intent clear. No functional changes introduced.
crates/biome_js_analyze/src/lint/style/use_enum_initializers.rs (1)
181-181: Typo fix looks goodReference to JsSyntaxKind is correct; comment now matches the actual symbol names.
crates/biome_js_analyze/tests/specs/style/noMagicNumbers/valid.tsx (1)
152-152: No lingering “isFourtyTwo” references found
Both the source and snapshot now consistently useisFortyTwo. Ship it!crates/biome_js_analyze/src/lint/a11y/no_svg_without_title.rs (1)
191-191: Doc tweak LGTM“child element” reads correctly now. No behavioural impact.
crates/biome_js_analyze/src/lint/style/use_object_spread.rs (1)
148-156: Comment wording fix looks goodPurely editorial; no behaviour change. Thanks for tidying the phrasing.
crates/biome_js_analyze/tests/specs/correctness/noUnreachable/SuppressionComments.js (1)
11-12: Fixed suppression comment typoAccurate wording in tests helps future readers. No test semantics changed.
crates/biome_js_analyze/src/lint/performance/no_unwanted_polyfillio.rs (1)
258-258: Minor test comment tweak is fineNit-level text fix; tests remain the same. All good.
crates/biome_js_analyze/src/lint/correctness/no_unreachable.rs (1)
377-378: Comment typo fixes approvedCopy edits only (“terminator instruction”); analysis logic untouched. Ship it.
Also applies to: 447-448
crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyleExceptions.options.json (1)
11-11: Regex typo correctedGood catch on aSpecial_CASE. Assuming companion fixtures/snapshots were updated, this should keep tests consistent.
crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyle.options.json (2)
11-11: Regex typo fix looks goodSpelling corrected to aSpecial_CASE. No behavioural changes beyond the test fixture rename.
11-11: All clear—no lingering typos; consider anchoring your regex
- Repository scan found no instances of
aSepcialorseperators.- The only occurrence of
aSpecial_CASElives in
crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyle.options.json:11If your intent is to match only
aSpecial_CASE, tighten the pattern:- "match": "aSpecial_CASE|(.*)" + "match": "^aSpecial_CASE$"crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyle.ts (1)
2-2: Identifier typo fix — all goodRenaming to aSpecial_CASE aligns with the updated options. No side effects expected.
crates/biome_js_analyze/src/lint/suspicious/no_confusing_void_type.rs (1)
25-26: Doc typo fix approved“assigned” is correct; the explanatory sentence matches TS assignability rules.
crates/biome_js_analyze/tests/specs/suspicious/noCompareNegZero/invalidComments.js (1)
1-1: Typo fix in inline block comment looks good.No behavioural change; fixture intent remains the same.
crates/biome_js_analyze/tests/specs/style/useShorthandFunctionType/valid.ts (1)
25-25: Spelling correction reads better.Purely a comment tweak; nothing functional affected.
crates/biome_js_analyze/tests/specs/a11y/useAltText/img.jsx (1)
35-35: Fixed mismatched closing tag ensures valid JSX.This makes the “valid” block actually parseable—nice catch.
crates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidCustomStyleExceptions.options.json (1)
11-11: Regex typo fix aligns with updated identifiers.Consistent with the related test files; good housekeeping.
crates/biome_js_analyze/tests/specs/correctness/noInvalidConstructorSuper/valid.ts (1)
78-82: LGTM: typo-only class renameGood catch on Satisfies vs Statisfies. No behavioural impact on the test intent.
crates/biome_js_analyze/src/assist/source/organize_imports.rs (1)
328-328: LGTM: documentation example fixedThe example now correctly excludes @my/lib/special. Nice and tidy.
crates/biome_js_analyze/tests/specs/style/useNumberNamespace/invalid.js (1)
74-75: LGTM: typo fixes in comments“suport” → “support” reads correctly now. Tests remain semantically identical.
Also applies to: 79-80
crates/biome_js_analyze/src/lint/correctness/use_json_import_attributes.rs (1)
204-205: ✅ All clear: no ‘seperators’ found
Ranrg -n --fixed-strings 'seperators'with zero matches, so the rename toseparatorsis consistent across the codebase. Ready to merge!crates/biome_js_analyze/tests/specs/style/useNamingConvention/validCustomStyleExceptions.ts (1)
2-2: No stale ‘aSpecial_CASE’ references detected—ready to mergeRan
rg -n --fixed-strings 'aSpecial_CASE'; all hits appear only in the updated test, snapshot and options files, so no bad refs linger.crates/biome_js_analyze/tests/specs/suspicious/useIsArray/valid-shadowing.js (1)
4-4: LGTM: instanceof typo fixed; shadowing semantics preservedGood catch—no more rogue R in Arrray. Using the locally bound Array for both construction and instanceof keeps the test intent intact.
crates/biome_js_analyze/tests/specs/suspicious/noRedeclare/valid-declaration-merging.ts (1)
33-38: All clear: no straySplittedreferences found
- Ran
rg -n --hidden --ignore-case '\bSplitted\b'across the repo- Zero matches, including in specs/snapshots
Everything now consistently uses
Split. You’re good to merge!crates/biome_js_analyze/tests/specs/style/useNamingConvention/invalidCustomStyleExceptions.ts (1)
1-2: No remaining references to the old typo
Ranrg -n --no-heading 'aSepcial_CASE(_2)?\b'across the repo—zero matches. Ready to merge.
crates/biome_js_analyze/src/lint/suspicious/no_unsafe_negation.rs
Outdated
Show resolved
Hide resolved
CodSpeed Performance ReportMerging #7210 will not alter performanceComparing Summary
|
…ation.rs Co-authored-by: Naoki Ikeguchi <me@s6n.jp>
Summary
Fix typos and spelling errors across the biome_js_analyze crate, including code identifiers, comments, documentation strings, test specs, and snapshots.
Enhancements:
seperatorstoseparatorsin the JSON import attributes ruleDocumentation:
Tests:
Test Plan
cargo test