Biome CLI v2.5.8
- Add a new nursery rule useReactCompiler which reports diagnostics from React Compiler lint mode
- Add the nursery rule noSvelteLegacyConst which disallows legacy Svelte {@const} tags and recommends declaration tags with $derived()
- Add the nursery rule noInvalidPropertyInitValue which reports an @property whose initial-value does not match its syntax descriptor
- Improve performance of noImportCycles
- Parse HTML style attribute values as CSS and apply all Biome CSS lint rules to style attributes
- Improve the diagnostic emitted by noRootType
- Improve the performance of noMisusedPromises when analyzing async class methods that call other methods through this
- Fix useAwait to no longer report async functions that contain an await using declaration
- Fix noUselessUndefined to no longer report return undefined when the enclosing function has a return type annotation other than undefined or void
- Fix CSS block comments between a declaration colon and value to preserve their source indentation
- Fix CSS formatting to keep comments inside functional pseudo-classes and pseudo-elements instead of moving them before the function name
- Fix Svelte files failing to parse when an expression begins with an object literal
- Fix JavaScript GritQL patterns with multiple metavariables to match snippets consistently in WebAssembly
2.5.8
Patch Changes
-
#10710
0a0fbc1Thanks @dyc3! - Added a new nursery ruleuseReactCompiler, which reports diagnostics from React Compiler lint mode. -
#11251
ea9dd8aThanks @dyc3! - Improved performance ofnoImportCycles. -
#11247
52b44d6Thanks @dyc3! - Added the nursery rulenoSvelteLegacyConst, which disallows legacy Svelte{@const}tags and recommends declaration tags with$derived().Invalid:
{#each boxes as box} {@const area = box.width * box.height} <p>{area}</p> {/each}Valid:
{#each boxes as box} {const area = $derived(box.width * box.height)} <p>{area}</p> {/each} -
#11252
d5f5704Thanks @Turtle-Hwan! - Fixed #11250:useAwaitno longer reports async functions that contain anawait usingdeclaration. -
#11143
6be7be1Thanks @vznh! - Fixed #11017:noUselessUndefinedno longer reportsreturn undefinedwhen the enclosing function has a return type annotation other thanundefinedorvoid. -
#11234
caefe39Thanks @subotac! - Fixed #11228: CSS block comments between a declaration colon and value now preserve their source indentation.:root { --font-stack: -/* comment */ + /* comment */ system-ui; } -
#11285
bca1f73Thanks @denbezrukov! - Fixed #11280: CSS formatting keeps comments inside functional pseudo-classes and pseudo-elements instead of moving them before the function name.-:/* comment */ where(div) {} +:where(/* comment */ div) {} -
#11080
af16a0bThanks @dyc3! - HTMLstyleattribute values are now parsed as CSS. All Biome CSS lint rules are applied to thestyleattributes. -
#11195
6a85588Thanks @dyc3! - Fixed Svelte files failing to parse when an expression begins with an object literal.Now the following snippet is correctly parsed:
<p>{{ a: true }}</p> <div class={{ active: isActive }}></div> -
#11173
481d008Thanks @Austin1serb! - Fixed #10242: JavaScript GritQL patterns with multiple metavariables now match snippets consistently in WebAssembly. -
#11187
23c0369Thanks @ematipico! - Added the nursery rulenoInvalidPropertyInitValue, which reports an@propertywhoseinitial-valuedoes not match itssyntaxdescriptor. For example, the following declaration triggers the rule becauseredis not a<length>:@property --size { syntax: "<length>"; inherits: false; initial-value: red; } -
#11272
73896e6Thanks @ematipico! - Improved the diagnostic emitted bynoRootType. -
#11240
bd0b68dThanks @ematipico! - Fixed #11223: Improved the performance ofnoMisusedPromiseswhen analyzing async class methods that call other methods throughthis. -
#11172
4a0bc5cThanks @saberoueslati! - Fixed #10806:noUselessFragmentsno longer causes Biome to panic when its unsafe fix removes a fragment used as a JSX attribute value. -
#11227
4d603b0Thanks @saberoueslati! - Fixed #11178:noUndeclaredVariablesno longer reports Vue's built-in instance properties, such as$slotsand$attrs, in template expressions or$eventin inline event-handler expressions. The instance properties are still reported inside<script setup>, where they are not defined. -
#11187
23c0369Thanks @ematipico! - Fixed CSS parsing of registered custom properties: Biome now correctly validates thesyntaxdescriptor of@propertyrules.
What's Changed
- feat(service): treat html style attributes as CSS by @dyc3 in https://github.com/biomejs/biome/pull/11080
- feat: code review skill by @ematipico in https://github.com/biomejs/biome/pull/11235
- refactor(inference): prepare legacy type removal by @ematipico in https://github.com/biomejs/biome/pull/11010
- fix(lint/noUselessFragments): panic when fixing a fragment used as a JSX attribute value by @saberoueslati in https://github.com/biomejs/biome/pull/11172
- ci: update codspeed crates by @ematipico in https://github.com/biomejs/biome/pull/11239
- feat(lint/js): add
useReactCompilerby @dyc3 in https://github.com/biomejs/biome/pull/10710 - ci: fix windows builds by @dyc3 in https://github.com/biomejs/biome/pull/11245
- ci: enable longpaths in main.yml by @dyc3 in https://github.com/biomejs/biome/pull/11246
- fix(inference): query local types before global by @ematipico in https://github.com/biomejs/biome/pull/11240
- feat(lint/html): add
noSvelteLegacyConstby @dyc3 in https://github.com/biomejs/biome/pull/11247 - fix(useAwait): treat await using as an async operation by @Turtle-Hwan in https://github.com/biomejs/biome/pull/11252
- feat(css): support SCSS nesting combinator by @denbezrukov in https://github.com/biomejs/biome/pull/11243
- feat: markdown linter by @ematipico in https://github.com/biomejs/biome/pull/11253
- fix(analyzer): scope Vue template globals correctly by @saberoueslati in https://github.com/biomejs/biome/pull/11227
- fix(grit): use byte offsets for WASM snippets by @Austin1serb in https://github.com/biomejs/biome/pull/11173
- fix(lint): preserve explicitly typed undefined returns by @vznh in https://github.com/biomejs/biome/pull/11143
- refactor(md/parse): two-phase parse by @ematipico in https://github.com/biomejs/biome/pull/11256
- perf(noImportCycles): exclude node_modules, add more tests by @dyc3 in https://github.com/biomejs/biome/pull/11251
- fix(css_formatter): preserve block comment indentation by @subotac in https://github.com/biomejs/biome/pull/11234
- chore: markdown rule generator by @Netail in https://github.com/biomejs/biome/pull/11261
- perf(md/parse): restore parser state via checkpoint by @ematipico in https://github.com/biomejs/biome/pull/11257
- chore: markdownlint rule source by @Netail in https://github.com/biomejs/biome/pull/11265
- fix(parse/html): stop reading
{{as an interpolation in Svelte by @dyc3 in https://github.com/biomejs/biome/pull/11195 - fix(yaml/parse): catch more errors by @ematipico in https://github.com/biomejs/biome/pull/11259
- fix(tools): rule gen and rename rule by @ematipico in https://github.com/biomejs/biome/pull/11269
- fix(tools): path normalisation by @ematipico in https://github.com/biomejs/biome/pull/11271
- test(format/html): format embedded content in the formatter tests by @dyc3 in https://github.com/biomejs/biome/pull/11209
- feat(useSortedClasses): order variants in sort_v4 by @johncarmack1984 in https://github.com/biomejs/biome/pull/11249
- fix(lint/graphql): text range by @ematipico in https://github.com/biomejs/biome/pull/11272
- test(format/html): indent script and style in the HTML Prettier samples by @dyc3 in https://github.com/biomejs/biome/pull/11210
- feat(lint): nursery noInvalidPropertyInitValue by @ematipico in https://github.com/biomejs/biome/pull/11187
- fix(css_formatter): preserve pseudo function comments by @denbezrukov in https://github.com/biomejs/biome/pull/11285
- chore(deps): update rust crate rust-lapper to 1.3.0 by @renovate[bot] in https://github.com/biomejs/biome/pull/11292
- chore(deps): update pnpm to v11.20.0 by @renovate[bot] in https://github.com/biomejs/biome/pull/11291
- feat: useTopLevelHeading by @Netail in https://github.com/biomejs/biome/pull/11286
- ci: release by @github-actions[bot] in https://github.com/biomejs/biome/pull/11236
New Contributors
- @Turtle-Hwan made their first contribution in https://github.com/biomejs/biome/pull/11252
- @Austin1serb made their first contribution in https://github.com/biomejs/biome/pull/11173
- @vznh made their first contribution in https://github.com/biomejs/biome/pull/11143
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.7...@biomejs/biome@2.5.8