github biomejs/biome cli/v1.9.5-nightly.92879ae
CLI v1.9.5-nightly.92879ae

pre-releaseone day ago

Analyzer

Bug fixes

  • Fix CSS parser case error, @-moz-document url-prefix(https://example.com) and @-moz-document domain(example.com) are now valid. Contributed by @eryue0220
  • Fix #4258, where fixed css parse error with @-moz-document url-prefix(). Contributed by @eryue0220

Linter

New features

  • Add noUselessUndefined. Contributed by @unvalley

  • useFilenamingConvention accepts a new option match (#4105).

    You can now validate filenames with a regular expression.
    For instance, you can allow filenames to start with %:

    {
      "linter": {
        "rules": {
          "style": {
            "useFilenamingConvention": {
              "level": "warn",
              "options": {
                  "match": "%?(.+?)[.](.+)",
                  "filenameCases": ["camelCase"]
              }
            }
          }
        }
      }
    }

    If the regular expression captures strings, the first capture is considered to be the name of the file, and the second one to be the extensions (dot-separated values).
    The name of the file and the extensions are checked against filenameCases.
    Given the previous configuration, the filename %index.d.ts is valid because the first capture index is in camelCase and the second capture d.ts include dot-separated values in lowercase.
    On the other hand, %Index.d.ts is not valid because the first capture Index is in PascalCase.

    Note that specifying match disallows any exceptions that are handled by the rule by default.
    For example, the previous configuration doesn't allow filenames to be prefixed with underscores,
    a period or a plus sign.
    You need to include them in the regular expression if you still want to allow these exceptions.

    Contributed by @Conaclos

  • useFilenamingConvention and useNamingConvention match options now accept case-insensitive and case-sensitive groups.

    By default, the regular expression in match is case-sensitive.
    You can now make it case-insensitive by using a case-insensitive group (?i:).
    For example, the regular expression (?i:a) matches a and A.

    Contributed by @Conaclos

Parser

Bug fixes

  • Fix #4317, setter parameter can contain a trailing comma, the following example will now parsed correctly:

    export class DummyClass {
      set input(
        value: string,
      ) {}
    }

    Contributed by @fireairforce

  • Fix #3836, css parser allow multiple semicolons after a declaration, the following example will now parsed correctly:

    .foo {
      color: red;;
    }

    Contributed by @fireairforce

What's Changed

Other changes

  • refactor(contributing): update Releasing section by @Conaclos in #4325
  • feat(format/grit): add logic for formatting with separators and other predicates by @branberry in #4327
  • build: upgrade to rust 1.82.0 by @unvalley in #4341
  • chore(deps): update rust crate anyhow to 1.0.90 by @renovate in #4348
  • feat: flag to suppress existing diagnostics by @anthonyshew in #4008
  • feat(lint/noPrototypeBuiltins): add code fix action and cover scenarios from prefer-object-has-own by @kaioduarte in #3997
  • chore(deps): update rust:1.81.0 docker digest to 7b7f7ae by @renovate in #4344
  • chore(deps): update @biomejs packages by @renovate in #4345
  • chore(deps): update dependency dprint to v0.47.4 by @renovate in #4346
  • chore(deps): update pnpm to v9.12.2 by @renovate in #4347
  • chore(deps): update rust crate serde_json to 1.0.132 by @renovate in #4351
  • feat(organize_import): utilities for ordering import sources by @Conaclos in #4313
  • docs(useAtIndex): fix typo chatAt -> charAt by @GeniusTimo in #4363
  • feat(organize_import): move legacy code to a deidicated module an dintroduce restricted globs by @Conaclos in #4357

New Contributors

Full Changelog: cli/v1.9.4...cli/v1.9.5-nightly.92879ae

Don't miss a new biome release

NewReleases is sending notifications on new releases.