Biome 2.5.8

2.5.8

Biome CLI v2.5.8

Added 3
  • 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
Changed 4
  • 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
Fixed 6
  • 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 0a0fbc1 Thanks @dyc3! - Added a new nursery rule useReactCompiler, which reports diagnostics from React Compiler lint mode.

  • #11251 ea9dd8a Thanks @dyc3! - Improved performance of noImportCycles.

  • #11247 52b44d6 Thanks @dyc3! - Added the nursery rule noSvelteLegacyConst, 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 d5f5704 Thanks @Turtle-Hwan! - Fixed #11250: useAwait no longer reports async functions that contain an await using declaration.

  • #11143 6be7be1 Thanks @vznh! - Fixed #11017: noUselessUndefined no longer reports return undefined when the enclosing function has a return type annotation other than undefined or void.

  • #11234 caefe39 Thanks @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 bca1f73 Thanks @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 af16a0b Thanks @dyc3! - HTML style attribute values are now parsed as CSS. All Biome CSS lint rules are applied to the style attributes.

  • #11195 6a85588 Thanks @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 481d008 Thanks @Austin1serb! - Fixed #10242: JavaScript GritQL patterns with multiple metavariables now match snippets consistently in WebAssembly.

  • #11187 23c0369 Thanks @ematipico! - Added the nursery rule noInvalidPropertyInitValue, which reports an @property whose initial-value does not match its syntax descriptor. For example, the following declaration triggers the rule because red is not a <length>:

    @property --size {
      syntax: "<length>";
      inherits: false;
      initial-value: red;
    }
    
  • #11272 73896e6 Thanks @ematipico! - Improved the diagnostic emitted by noRootType.

  • #11240 bd0b68d Thanks @ematipico! - Fixed #11223: Improved the performance of noMisusedPromises when analyzing async class methods that call other methods through this.

  • #11172 4a0bc5c Thanks @saberoueslati! - Fixed #10806: noUselessFragments no longer causes Biome to panic when its unsafe fix removes a fragment used as a JSX attribute value.

  • #11227 4d603b0 Thanks @saberoueslati! - Fixed #11178: noUndeclaredVariables no longer reports Vue's built-in instance properties, such as $slots and $attrs, in template expressions or $event in inline event-handler expressions. The instance properties are still reported inside <script setup>, where they are not defined.

  • #11187 23c0369 Thanks @ematipico! - Fixed CSS parsing of registered custom properties: Biome now correctly validates the syntax descriptor of @property rules.

What's Changed
New Contributors

Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.7...@biomejs/biome@2.5.8

View original

Upgraded? How did it go?

Discussion