Upgrading @biomejs/biome 1 to 2
Breaking1.9.4 → 2.6.4Breaking76Security21Platform1Deprecated1New1196Changed1169Fixed1865Other1452
Fetching 85 releases from GitHub…84 / 85
SecurityRestricts access to the Unix daemon socket to the user running Biome, placing it in a user-only `biome-daemon` cache directory with mode `0600`.#11928 ↗
BreakingUpgrade verdict
76 breaking changes and a platform requirement change and 20 security fixes.
In plain terms
- If your configuration file sets javascript.parser.gritMetavariables, Biome will now refuse to run until you delete that setting.
- The Tailwind class sorting rule now uses Tailwind v4 ordering, and its settings moved to the shared tailwind config section.
- The Tailwind class sorting rule has a new name, so existing configuration must be updated.
- If your config sets the attributes or functions options on this nursery rule, you must remove them.
Must act Top 5 of 98 that need code or config changes
No longer runs postinstall when installed.
Adds @biomejs/cli-android-arm64 2.6.4, @biomejs/cli-android-x64 2.6.4.
Installs 10 packages in all (was 8).
What you must change
Breaking76
Removes the javascript.parser.gritMetavariables option; configs using it now fail with an unknown key error.
javascript.parser.gritMetavariablesSwitches useTailwindSortedClasses to Tailwind CSS v4 class order and removes its attributes and functions options in favor of top-level tailwind configuration.
useTailwindSortedClassesattributesfunctionstailwind.attributestailwind.mergeFunctionstailwind.variantFunctionsRenames the nursery rule useSortedClasses to useTailwindSortedClasses.
useSortedClassesuseTailwindSortedClassesRemoves the
attributes and functions options from the nursery rule noTailwindArbitraryValue, which now uses the same Tailwind detection as useTailwindShorthandClasses.noTailwindArbitraryValueuseTailwindShorthandClassesattributesfunctionsPromotes 73 nursery rules to stable groups and renames four rules: noFloatingClasses, noMultiStr, useFind and useSpread.
noFloatingClassesnoUnusedInstantiationnoMultiStrnoMultilineStringuseFinduseArrayFinduseSpreaduseSpreadOverApply85d3a3a - The rules in a domain are no longer enabled automatically by the installed dependencies unless the rule is recommended.
2afaa49 - Implemented. useConst no longer reports variables that are read before being written.
useConstfvundefinedRemoves one level of indirection for CSS declarations with semicolon in the Rust API.
as_any_css_declaration_with_semicolon()as_css_declaration_with_semicolon()Removes the
--config-path argument from biome lsp-proxy and biome start.--config-pathbiome lsp-proxybiome startworkspace/configurationRemoves
include and ignore fields in favor of the new includes field with a different glob format.includeignoreincludesnoDefaultExportnoUndeclaredVariables no longer reports TypeScript types by default; checkTypes now defaults to false.noUndeclaredVariablescheckTypesnoUnusedVariables no longer reports unused function parameters; use noUnusedFunctionParameters instead.noUnusedVariablesnoUnusedFunctionParametersThe formatter no longer adds trailing commas in
.json files, even when json.formatter.trailingCommas is true.json.formatter.trailingCommasFormatter now matches Prettier 3.4 by no longer unescaping useless escape sequences in string literals.
Formatter options no longer accept the old PascalCase and other legacy value names.
--quote-style--quote-properties--semicolons--arrow-parenthesis--trailing-commas--attribute-positionRemoves the
enumMemberCase option from useNamingConvention in favor of conventions.useNamingConventionenumMemberCaseconventionsRemoves support for the
BIOME_LOG_DIR environment variable; use BIOME_LOG_PATH instead.BIOME_LOG_DIRBIOME_LOG_PATHDeletes deprecated rules
noInvalidNewBuiltin, noNewSymbol, useShorthandArrayType, useSingleCaseStatement and noConsoleLog.noInvalidNewBuiltinnoNewSymboluseShorthandArrayTypeuseSingleCaseStatementnoConsoleLogRemoves the deprecated
indentSize option and its CLI flags in favor of indentWidth.formatter.indentSizejavascript.formatter.indentSizejson.formatter.indentSize--indent-size--javascript-formatter-indent-size--json-formatter-indent-sizeindentWidthRemoves
ROME_BINARY; use BIOME_BINARY instead.ROME_BINARYBIOME_BINARYRemoves support for legacy suppressions.
Removes support for legacy suppressions in the form biome-ignore lint(rule): reason.
biome-ignoreRemoves support for max_line_length from .editorconfig.
max_line_lengthRemoves support for rome-ignore suppression comments in favor of biome-ignore.
rome-ignorebiome-ignoreRemoves support for rome.json configuration files.
rome.jsonbiome.jsonbiome.jsoncRemoves the linter option all, including linter.rules.all and linter.rules.<group>.all.
linter.rules.alllinter.rules.<group>.allbiome migrate --writeRemoves the trailingComma option from configuration and CLI in favor of trailingCommas.
trailingCommatrailingCommas--trailing-comma--trailing-commasRemoves the CLI options --apply and --apply-unsafe in favor of --write and --write --unsafe.
--apply--apply-unsafe--write--unsafeRemoves support for the assert import syntax in favor of the with syntax.
assertwithRenames useImportRestrictions to noPrivateImports with configurable visibility, JSDoc overrides, and recommended-by-default status.
useImportRestrictionsnoPrivateImportsChanges default severity levels: recommended rules are no longer all error and non-recommended rules are no longer all warn.
Reworks recommended rules to be less pedantic: several rules change severity or are no longer recommended, and some are recommended only with the react domain.
noDeletenoForEachnoSuspiciousSemicolonInJsxnoThisInStaticnoUnusedLabelsnoUselessCatchnoRenderReturnValueuseExhaustiveDependenciesRenames the global option --skip-errors to --skip-parse-errors.
--skip-errors--skip-parse-errorsRemoves the quickfix.suppressRule code action in favour of quickfix.suppressRule.inline.biome and quickfix.suppressRule.topLevel.biome.
quickfix.suppressRulequickfix.suppressRule.inline.biomequickfix.suppressRule.topLevel.biomeUpdates useImportExtensions to suggest actual file extensions, removes the suggestedExtensions option, adds forceJsExtensions, and stops reporting missing paths.
useImportExtensionssuggestedExtensionsforceJsExtensionsMakes useNamingConvention reject non-ASCII characters by default; set requireAscii to false to allow them.
useNamingConventionrequireAsciiRenames the rule noUnnecessaryContinue to noUselessContinue; run biome migrate to update configuration.
noUnnecessaryContinuenoUselessContinuebiome migrateRenames the rule noMultipleSpacesInRegularExpressionLiterals to noAdjacentSpacesInRegex; run biome migrate to update configuration.
noMultipleSpacesInRegularExpressionLiteralsnoAdjacentSpacesInRegexbiome migrateRenames the CLI flag --javascript-attribute-position to --javascript-formatter-attribute-position.
--javascript-attribute-position--javascript-formatter-attribute-positionRenames the rule
noDuplicatedFields to noDuplicateFields; run biome migrate to update configuration.noDuplicatedFieldsnoDuplicateFieldsbiome migrateRemoves the typePlacement option from organizeImports.
organizeImportstypePlacementRenames the
--skip-errors CLI flag to --skip-parse-error.--skip-errors--skip-parse-errorRemoves the
all option.allRemoves deprecated rules.
Removes the organizeImports option.
organizeImportsRemoves the
ROME_BINARY environment variable.ROME_BINARYRemoves the postinstall script from the package.
postinstallRemoves EditorConfig
max_line_length support.max_line_lengthRemoves non-printing related options from
FormatOptions.FormatOptionsRenames the CLI flag --javascript-attribute-position to --javascript-formatter-attribute-position.
--javascript-attribute-position--javascript-formatter-attribute-positionRemoves the ignore and include configuration fields.
ignoreincludeRenames the CLI flag --javascript-object-wrap to --javascript-formatter-object-wrap.
--javascript-object-wrap--javascript-formatter-object-wrapRemoves the overrides.include configuration option.
overrides.includeRemoves the enumMemberCase option from the useNamingConvention rule.
useNamingConventionenumMemberCaseRemoves support for dynamic regexes in js_analyze.
Removes
--config-path from lsp-proxy and daemon.--config-pathlsp-proxydaemonRenames the
noMultipleSpacesInRegularExpressionLiterals lint rule.noMultipleSpacesInRegularExpressionLiteralsRemoves detection of multiple config files.
Renames the rule to noAdjacentSpacesInRegex.
noAdjacentSpacesInRegexMakes the level option mandatory.
levelRequires sortBareImports for bare matchers in organizeImports.
organizeImportssortBareImportsRemoves the experimental rename feature from Biome LSP, which caused issues in editors such as Zed.
LSPBiome now resolves globs and paths from the configuration instead of the working directory.
Downgrades fixes of
noFlatMapIdentity and noUnusedImports to unsafe.noFlatMapIdentitynoUnusedImportsnoControlCharactersInRegex and noMisleadingCharacterClass now only check regular expression literals.noControlCharactersInRegexnoMisleadingCharacterClassnew RegExpnoRestrictedGlobals supports per-global custom messages and deniedGlobals becomes a record instead of an array.noRestrictedGlobalsdeniedGlobalsReplaces
include and ignore with includes patterns that support unignoring files and root-relative matching.files.includeslinter.includesoverrides.includesUpdates noBlankTarget to accept rel="noopener", adds an option to disable rel="noreferrer", and moves it to the security group.
noBlankTargetMoves several rules to new groups, promotes nursery and CSS rules, and updates the recommended rule set.
complexity/noArgumentscomplexity/noCommaOperatorcomplexity/noFlatMapIdentitycomplexity/noUselessContinuecomplexity/useNumericLiteralscorrectness/useValidTypeofperformance/noNamespaceImportstyle/useArrayLiteralsMoves organizeImports into Biome Assist.
organizeImportsMoves the noVar rule to the suspicious group.
noVarMoves the useWhile rule to the complexity group.
useWhileBiome now requires every biome-ignore-start suppression to have a matching biome-ignore-end comment.
biome-ignore-startbiome-ignore-endSupports custom messages in the noRestrictedGlobals rule.
noRestrictedGlobalsMerges the
objectWrap option into expand.objectWrapexpandThe package now requires v2 of the WebAssembly packages, and internal Workspace APIs are now camelCase.
WorkspaceSecurity20
Restricts access to the Unix daemon socket to the user running Biome, placing it in a user-only
biome-daemon cache directory with mode 0600.biome-daemonUpdates the vitest dependency to v4.1.11 as a security update.
vitestHardens the Biome Language Server by improving its synchronisation logic.
Updates crossbeam-epoch to fix a security advisory.
crossbeam-epochFixes an internal CVE.
Updates the vite dependency to v7.3.5 for a security fix.
vitePromotes noScriptUrl to the security group as a recommended rule.
noScriptUrlFix some node vulnerabilities.
Fix more node vulnerabilities.
Fix vulnerabilities in dependencies.
Updates the vite dependency to v6.3.4 for security.
viteUpdates the crossbeam channel dependency due to a CVE.
Updates the vite dependency to v5.4.16 for a security fix.
Updates the vite dependency to v5.4.17 for a security fix.
Updates the vite dependency to v5.4.18 for a security fix.
viteUpdates vite to v5.4.12 for a security fix.
viteUpdates hashbrown to fix a security advisory.
hashbrownUpdates the vitest dependency to v1.6.1 for a security fix.
Updates dependency happy-dom to v15.10.1 for security.
happy-domUpdates dependency happy-dom to v15.10.2 for security.
happy-domPlatform1
Adds Android (Termux) support to the npm distribution via new @biomejs/cli-android-arm64 and @biomejs/cli-android-x64 packages.
@biomejs/cli-android-arm64@biomejs/cli-android-x64Deprecations to plan for
Deprecated1
ebbddc4 - Deprecated the option files.experimentalScannerIgnores in favour of force-ignore syntax in files.includes.
files.experimentalScannerIgnoresfiles.includesbiome.jsongenerateddistfixtures/example/