You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#9103fc9850c Thanks @dyc3! - Fixed #9098: useImportType no longer incorrectly flags imports used in Svelte control flow blocks ({#if}, {#each}, {#await}, {#key}) as type-only imports.
#9106f4b7296 Thanks @dyc3! - Updated rule source metadata for rules from html-eslint.
#89604a5ff40 Thanks @abossenbroek! - Added the nursery rule noConditionalExpect. This rule disallows conditional expect() calls inside tests, which can lead to tests that silently pass when assertions never run.
// Invalid - conditional expect may not runtest("conditional",async({ page })=>{if(someCondition){awaitexpect(page).toHaveTitle("Title");}});// Valid - unconditional expecttest("unconditional",async({ page })=>{awaitexpect(page).toHaveTitle("Title");});
#89604a5ff40 Thanks @abossenbroek! - Enhanced noSkippedTests to detect Playwright patterns (.fixme, test.describe, test.step, bracket notation, bare calls). Consolidated noPlaywrightSkippedTest into this rule.
#91010c0fb6f Thanks @siketyan! - Fixed #9080: The noUnusedVariables rule no longer reports a top-level Props interface or type alias as unused in Astro files.
#89604a5ff40 Thanks @abossenbroek! - Added the nursery rule useExpect. This rule ensures that test functions contain at least one expect() assertion.
// Invalid - test without assertiontest("no assertion",async({ page })=>{awaitpage.goto("/");});// Valid - test with assertiontest("has assertion",async({ page })=>{awaitexpect(page).toHaveTitle("Title");});
#90926edd600 Thanks @ematipico! - Fixed #9052. This PR reverts changes introduced by #8519, which caused unwanted changes on how paths are resolved.
#90913bf674d Thanks @ematipico! - Fixed #9090, where SCSS files were incorrectly processed by Biome. This was a regressions caused by the latest developments for supporting SCSS out of the box.
#910066931a8 Thanks @siketyan! - Fixed #9081: The noUnknownPseudoElement rule no longer reports false positives for any known pseudo elements in CSS modules. This was a regression introduced in v2.4.0.
#9102d01b903 Thanks @ematipico! - Fixed #9095, where Biome didn't print anything in stdin mode. This was a regression caused by a recent, internal refactor.
#8769d0358b0 Thanks @rahuld109! - Added the rule useAnchorContent for HTML to enforce that anchor elements have accessible content for screen readers. The rule flags empty anchors, anchors with only whitespace, and anchors where all content is hidden with aria-hidden. Anchors with aria-label or title attributes providing a non-empty accessible name are considered valid.
#87426340ce6 Thanks @rahuld109! - Added the rule useMediaCaption to the HTML language. Enforces that audio and video elements have a track element with kind="captions" for accessibility. Muted videos are allowed without captions.
#8621d11130b Thanks @Netail! - Added support for multiple reporters, and the ability to save reporters on arbitrary files.
Combine two reporters in CI
If you run Biome on GitHub, take advantage of the reporter and still see the errors in console, you can now use both reporters:
biome ci --reporter=default --reporter=github
Save reporter output to a file
With the new --reporter-file CLI option, it's now possible to save the output of all reporters to a file. The file is a path,
so you can pass a relative or an absolute path:
biome ci --reporter=rdjson --reporter-file=/etc/tmp/report.json
biome ci --reporter=summary --reporter-file=./reports/file.txt
You can combine these two features. For example, have the default reporter written on terminal, and the rdjson reporter written on file:
biome ci --reporter=default --reporter=rdjson --reporter-file=/etc/tmp/report.json
The --reporter and --reporter-file flags must appear next to each other, otherwise an error is thrown.
#8399ab88099 Thanks @ematipico! - The Biome CSS parser is now able to parse Vue SFC syntax such as :slotted and :deep. These pseudo functions are only correctly parsed when the CSS is defined inside .vue components. Otherwise, Biome will a emit a parse error.
This capability is only available when experimentalFullHtmlSupportedEnabled is set to true.
#86633dfea16 Thanks @ematipico! - Added support for Cursor files. When Biome sees a Cursor JSON file, it will parse it with comments enabled and trailing commas enabled:
$PROJECT/.cursor/
%APPDATA%\Cursor\User\ on Windows
~/Library/Application Support/Cursor/User/ on macOS
~/.config/Cursor/User/ on Linux
#8723fe2c642 Thanks @cbstns! - Added JSON as a target language for GritQL pattern matching. You can now write Grit plugins for JSON files.
This enables users to write GritQL patterns that match against JSON files, useful for:
Searching and transforming JSON configuration files
Enforcing patterns in package.json and other JSON configs
Writing custom lint rules for JSON using GritQL
Example patterns:
Match all key-value pairs:
language json
pair(key = $k, value = $v)
Match objects with specific structure:
language json
JsonObjectValue()
Supports both native Biome AST names (JsonMember, JsonObjectValue) and TreeSitter-compatible names (pair, object, array) for compatibility with existing Grit patterns.
#88144d9c676 Thanks @Netail! - Added ignore option to noUnknownProperty. If an unknown property name matches any of the items provided in ignore, a diagnostic won't be emitted.
#86314d8f19d Thanks @Netail! - Add a new reporter --reporter=sarif, that emits diagnostics using the SARIF format.
#82704f7909d Thanks @lucasweng! - Added the useIframeTitle lint rule for HTML. The rule enforces the usage of the title attribute for the iframe element.
Invalid:
<iframe></iframe><iframetitle=""></iframe>
Valid:
<iframetitle="title"></iframe>
#81641d25856 Thanks @ematipico! - Added a new assist action useSortedInterfaceMembers that sorts TypeScript interface members, for readability.
#86474c7c06f Thanks @siketyan! - It's now possible to provide the stacktrace for a fatal error. The stacktrace is only available when the environment variable RUST_BACKTRACE=1 is set, either via the CLI or exported $PATH. This is useful when providing detailed information for debugging purposes:
RUST_BACKTRACE=1 biome lint
#7961a04c8df Thanks @siketyan! - The Biome Language Server now reports progress while scanning files and dependencies in the project.
#7847e90b14f Thanks @Jagget! - Added support for jsxFactory and jsxFragmentFactory.Biome now respects jsxFactory and jsxFragmentFactory settings from tsconfig.json when using the classic JSX runtime, preventing false positive noUnusedImports errors for custom JSX libraries like Preact.
#80717f5bcf4 Thanks @ematipico! - Added new CLI options to the commands lsp-proxy and start that allow to control the Biome file watcher.
--watcher-kind
Controls how the Biome file watcher should behave. By default, Biome chooses the best watcher strategy for the
current OS, however sometimes this could result in some issues, such as folders locked.
The option accepts the current values:
recommended: the default option, which chooses the best watcher for the current platform.
polling: uses the polling strategy.
none: it doesn't enable the watcher. When the watcher is disabled, changes to files aren't recorded anymore by Biome. This might have
repercussions on some lint rules that might rely on updated types or updated paths.
The environment variable BIOME_WATCHER_KIND can be used as alias.
--watcher-polling-interval
The polling interval in milliseconds. This is only applicable when using the polling watcher. It defaults to 2000 milliseconds.
The environment variable BIOME_WATCHER_POLLING_INTERVAL can be used as alias.
#82624186b83 Thanks @lucasweng! - Added the useHtmlLang lint rule for HTML. The rule enforces that the html element has a lang attribute.
#779954682aa Thanks @PaulRBerg! - Added groupByNesting option to the useSortedKeys assist. When enabled, object keys are grouped by their value's nesting depth before sorting alphabetically.
Simple values (primitives, single-line arrays, and single-line objects) are sorted first, followed by nested values (multi-line arrays and multi-line objects).
Example
To enable this option, configure it in your biome.json:
#86411dc8dc2 Thanks @tt-a1i! - Added the noAutofocus lint rule for HTML. This rule enforces that the autofocus attribute is not used on elements, as it can cause usability issues for sighted and non-sighted users. The rule allows autofocus inside dialog elements or elements with the popover attribute, as these are modal contexts where autofocus is expected.
#85018eb3f19 Thanks @tt-a1i! - Added noPositiveTabindex to HTML. This rule prevents the usage of positive integers on the tabindex attribute, which can disrupt natural keyboard navigation order.
#8661b36ff03 Thanks @tt-a1i! - Added the useAltText lint rule for HTML. This rule enforces that elements requiring alternative text (<img>, <area>, <input type="image">, <object>) provide meaningful information for screen reader users via alt, title (for objects), aria-label, or aria-labelledby attributes. Elements with aria-hidden="true" are exempt.
This rule is now capable of finding invalid hook usage in more locations. A diagnostic will now be generated if:
A hook is used at the module level (top of the file, outside any function).
A hook is used within a function or method which is not a hook or component, unless it is a function expression (such as arrow functions commonly used in tests).
Invalid:
// Invalid: hooks cannot be called at the module level.useHook();
// Invalid: hooks must be called from another hook or component.functionnotAHook(){useHook();}
Valid:
// Valid: hooks may be called from function expressions, such as in tests.test("my hook",()=>{renderHook(()=>useHook());renderHook(function(){returnuseHook();});});
#8307789b0e7 Thanks @mehm8128! - Added the useValidAriaRole lint rule for HTML. The rule enforces that elements with ARIA roles must use a valid, non-abstract ARIA role.
#88144d9c676 Thanks @Netail! - Added ignore option to noUnknownFunction. If an unknown function name matches any of the items provided in ignore, a diagnostic won't be emitted.
#88144d9c676 Thanks @Netail! - Added ignore option to noUnknownPseudoClass. If an unknown pseudo-class name matches any of the items provided in ignore, a diagnostic won't be emitted.
#8399ab88099 Thanks @ematipico! - Improved the CSS parser for CSS modules. Biome now automatically enables CSS modules parsing for *.module.css files.
If your codebase has only *.module.css files, you can remove the parser feature as follows, because now Biome does it for you:
{
"css": {
"parser": {
- "cssModules": true
}
}
}
#8399ab88099 Thanks @ematipico! - Added support for parsing :global and :local inside .astro, .svelte and .vue files, in <style> portion of the file.
This capability is only available when experimentalFullHtmlSupportedEnabled is set to true.
Promoted the following rules to the correctness group:
noUnresolvedImports. The rule reports imports that cannot be resolved.
The default rule severity is set to error.
noVueReservedProps. The rule reports Vue reserved props usage.
The default rule severity is set to error.
noVueReservedKeys. The rule reports Vue reserved keys usage.
The default rule severity is set to error.
noVueDataObjectDeclaration. The rule reports Vue 2 data declared as an object instead of a function.
The default rule severity is set to warn.
noNextAsyncClientComponent. The rule reports async Next.js client components.
The default rule severity is set to warn.
noVueDuplicateKeys. The rule reports duplicate keys in Vue component options.
The default rule severity is set to error.
noVueSetupPropsReactivityLoss. The rule reports destructuring of props in Vue 3 setup which causes reactivity loss.
The default rule severity is set to error.
useQwikMethodUsage. The rule enforces correct Qwik framework method usage.
The default rule severity is set to error.
useQwikValidLexicalScope. The rule enforces valid lexical scope in Qwik framework.
The default rule severity is set to error.
Suspicious
Promoted the following rules to the suspicious group:
noImportCycles. The rule reports circular imports.
The default rule severity is set to warn.
noDeprecatedImports. The rule reports imports of deprecated symbols.
The default rule severity is set to warn.
noReactForwardRef. The rule reports usage of React.forwardRef.
The default rule severity is set to warn.
noUnusedExpressions. The rule reports expressions that are never used.
The default rule severity is set to warn.
noEmptySource. The rule reports empty source files.
The default rule severity is set to warn.
useDeprecatedDate. The rule enforces use of GraphQL @deprecated directive with date.
The default rule severity is set to warn.
noDuplicateDependencies. The rule reports duplicate dependencies in package.json.
The default rule severity is set to warn.
Complexity
Promoted the following rules to the complexity group:
noUselessUndefined. The rule reports useless undefined initialization and returns.
The default rule severity is set to info.
useMaxParams. The rule enforces a maximum number of function parameters.
The default rule severity is set to warn.
noUselessCatchBinding. The rule reports useless catch binding parameters.
The default rule severity is set to info.
Style
Promoted the following rules to the style group:
useConsistentArrowReturn. The rule enforces consistent return in arrow functions.
The default rule severity is set to info.
noJsxLiterals. The rule reports literal strings in JSX.
The default rule severity is set to info.
#8695d8f0309 Thanks @ematipico! - Added support for the top-level suppression comment biome-ignore-all format: <explanation>.
When the comment biome-ignore-all format: <explanation> is placed at the beginning of the document, Biome won't format the code.
The feature works for all supported languages. In the following JavaScript snippet, the code isn't formatted and will stay as is.
#8165e0b3f62 Thanks @lucasweng! - Added the noAccessKey lint rule for HTML. The rule enforces that the accesskey attribute is not used on any HTML element, as it can conflict with keyboard commands used by screen readers and keyboard-only users.
#82787207eff Thanks @ematipico! - Added a feature that allows editors to inject a Biome configuration to the Biome Language Server without affecting the configuration of the project.
If you have a Biome extension that is compatible with your preferred LSP-ready editor, you can map inlineConfig. The configuration will be merged with the configuration of the project (or the default configuration):
For example, with the Zed editor, you would have the following configuration, which will format all files using four spaces as indentation style:
/** Does objs have "cow" inside it? */functionhasCow(objs: string[]): boolean;/** @​deprecated - convert to array */functionhasCow(objs: string): boolean;
#8562361350e Thanks @dyc3! - Added the rule profiler behind the --profile-rules cli flag. You can now see a report of which lint rules took the longest to execute.
#8234e2e6e66 Thanks @ongyuxing! - Updated the CSS properties ordering to align with stylelint-config-recess-order v7.4.0.
#88144d9c676 Thanks @Netail! - Added ignore option to noUnknownPseudoElement. If an unknown pseudo-element name matches any of the items provided in ignore, a diagnostic won't be emitted.
#86633dfea16 Thanks @ematipico! - Added the ability to load the configuration from new known paths. Biome now attempts to load the configuration files
from the following locations:
$XDG_CONFIG_HOME or $HOME/.config/biome on Linux
/Users/$USER/Library/Application Support/biome on macOS
C:\Users\$USER\AppData\Roaming\biome\config on Windows
The priority how Biome will attempt to load the configuration files is the following:
project folder (working directory)
parent folders
config home
$XDG_CONFIG_HOME or $HOME/.config/biome on Linux
/Users/$USER/Library/Application Support/biome on macOS
C:\Users\$USER\AppData\Roaming\biome\config on Windows
#7973bc0e8b4 Thanks @siketyan! - Added support for formatting and linting embedded CSS snippets in JavaScript.
For example, the following snippets are now formatted and linted:
#838150c3513 Thanks @mehm8128! - Added the useAriaPropsForRole lint rule for HTML. The rule enforces that elements with ARIA roles must have all required ARIA attributes for that role.
#77625901d79 Thanks @dyc3! - Added the extensionMappings option to useImportExtensions. This allows users to specify custom file extensions for different module types.
For example, if you want to ban all .ts imports in favor of .js imports, you can now do so with this option:
#853201bccc8 Thanks @jonaylor89! - Added --only and --skip options to biome check and biome ci, covering both lint diagnostics and assist actions. Biome now lets you run or exclude specific lint rules, assist actions, group or rules and actions, or domains when running these commands.
Examples:
biome check --only=suspicious/noDebugger src/**/*.js
biome ci --skip=project src/**
#86667733f90 Thanks @ematipico! - Added the rule noRedundantAlt to HTML. The rule enforces that the img element alt attribute does not contain the words “image”, “picture”, or “photo”.
#8287a248e88 Thanks @mehm8128! - Added the noDistractingElements lint rule for HTML. The rule enforces that no distracting elements like <marquee> or <blink> are used.
#8564adcce82 Thanks @ematipico! - Added the new linter domain types. This is a domain that enables all rules that require the type inference engine.
As opposed to the project domain, which only enables rules that require the module graph to function.
The following nursery rules have been moved to the types domain:
Support for graphics-document and graphics-symbol roles.
Support for multiple role specifications.
#86633dfea16 Thanks @ematipico! - Added the ability to load the hidden files .biome.json and .biome.jsonc. This is the order how Biome will attempt the configuration file is:
When set to false, the formatter will remove the trailing newline at the end of formatted files. The default value is true, which preserves the current behavior of adding a trailing newline.
This option is available globally and for each language-specific formatter configuration:
The following CLI flags have been added. They accept true or false as value:
--formatter-trailing-newline
--javascript-formatter-trailing-newline
--json-formatter-trailing-newline
--graphql-formatter-trailing-newline
--css-formatter-trailing-newline
--html-formatter-trailing-newline
#88541469968 Thanks @ematipico! - Formatting is now applied when applying safe/unsafe fixes via biome check.
#864246f33a7 Thanks @ematipico! - Improved the rule noUnusedVariables in Svelte files, by correctly detecting variables defined in the JavaScript blocks, and used inside the templates.
#82434291ff3 Thanks @ashnewmanjones! - Added the useButtonType lint rule for HTML. The rule enforces that the type attribute is present and valid on all button elements.
#88987e48bd4 Thanks @ematipico! - Added e18e ESLint plugin as a recognized rule source. Six Biome rules now reference their e18e equivalents: useAtIndex, useExponentiationOperator, noPrototypeBuiltins, useDateNow, useSpread, and useObjectSpread.
#8719a215408 Thanks @ematipico! - Added proper parsing and formatting for Svelte directives when the html.experimentalFullSupportEnabled is set to true.
#80717f5bcf4 Thanks @ematipico! - Revamped the logging options for all Biome commands. Now the commands format, lint, check, ci, search, lsp-proxy and start accept the following CLI options.
Some options might have been present before, but they were inconsistent. Plus, all new options have an environment variable as aliases.
--log-file
Optional path/file to redirect log m
Configuration
📅 Schedule: Branch creation - "before 4am on monday" in timezone Asia/Seoul, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
If you want to rebase/retry this PR, check this box
To trigger a single review, invoke the @coderabbitai review command.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
🔍 Trigger a full review
Note
.coderabbit.yaml has unrecognized properties
CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.
⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'finishing_touches'
If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
Comment @coderabbitai help to get the list of available commands and usage tips.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^1.9.4→^2.0.0^19.8.1→^20.0.0^19.8.1→^20.0.0^9.0.16→^10.0.0^9.0.1→^10.0.0^9.0.1→^10.0.0^22.0.0→^24.0.0^12.0.0→^15.0.0^1.11.13→^2.0.0^9.0.16→^10.0.0Release Notes
biomejs/biome (@biomejs/biome)
v2.4.2Compare Source
Patch Changes
#9103
fc9850cThanks @dyc3! - Fixed #9098:useImportTypeno longer incorrectly flags imports used in Svelte control flow blocks ({#if},{#each},{#await},{#key}) as type-only imports.#9106
f4b7296Thanks @dyc3! - Updated rule source metadata for rules fromhtml-eslint.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoConditionalExpect. This rule disallows conditionalexpect()calls inside tests, which can lead to tests that silently pass when assertions never run.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightElementHandle. Prefers locators to element handles.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightEval. Disallowspage.$eval()andpage.$$eval()methods.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightForceOption. Disallows theforceoption on user interactions.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightMissingAwait. Enforces awaiting async Playwright APIs.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightNetworkidle. Disallows deprecatednetworkidlewait option.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightPagePause. Disallowspage.pause()debugging calls in committed code.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightUselessAwait. Disallows unnecessaryawaiton synchronous Playwright methods.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightWaitForNavigation. Prefers modern navigation APIs over deprecatedwaitForNavigation().#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightWaitForSelector. Prefers locators over deprecatedwaitForSelector().#8960
4a5ff40Thanks @abossenbroek! - Added the nursery rulenoPlaywrightWaitForTimeout. Disallows hard-coded timeouts withwaitForTimeout().#8960
4a5ff40Thanks @abossenbroek! - EnhancednoSkippedTeststo detect Playwright patterns (.fixme,test.describe,test.step, bracket notation, bare calls). ConsolidatednoPlaywrightSkippedTestinto this rule.#9101
0c0fb6fThanks @siketyan! - Fixed#9080: ThenoUnusedVariablesrule no longer reports a top-levelPropsinterface or type alias as unused in Astro files.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery ruleuseExpect. This rule ensures that test functions contain at least oneexpect()assertion.#8960
4a5ff40Thanks @abossenbroek! - Added the nursery ruleusePlaywrightValidDescribeCallback. Validates that describe callback signatures are not async.v2.4.1Compare Source
Patch Changes
#9092
6edd600Thanks @ematipico! - Fixed #9052. This PR reverts changes introduced by #8519, which caused unwanted changes on how paths are resolved.#9091
3bf674dThanks @ematipico! - Fixed #9090, where SCSS files were incorrectly processed by Biome. This was a regressions caused by the latest developments for supporting SCSS out of the box.#9100
66931a8Thanks @siketyan! - Fixed #9081: ThenoUnknownPseudoElementrule no longer reports false positives for any known pseudo elements in CSS modules. This was a regression introduced in v2.4.0.#9102
d01b903Thanks @ematipico! - Fixed #9095, where Biome didn't print anything in stdin mode. This was a regression caused by a recent, internal refactor.v2.4.0Compare Source
Minor Changes
#8964
0353fa0Thanks @dyc3! - Addedignoreoption to theuseHookAtTopLevelrule.You can now specify function names that should not be treated as hooks, even if they follow the
use*naming convention.Example configuration:
{ "linter": { "rules": { "correctness": { "useHookAtTopLevel": { "options": { "ignore": ["useDebounce", "useCustomUtility"] } } } } } }#8769
d0358b0Thanks @rahuld109! - Added the ruleuseAnchorContentfor HTML to enforce that anchor elements have accessible content for screen readers. The rule flags empty anchors, anchors with only whitespace, and anchors where all content is hidden witharia-hidden. Anchors witharia-labelortitleattributes providing a non-empty accessible name are considered valid.#8742
6340ce6Thanks @rahuld109! - Added the ruleuseMediaCaptionto the HTML language. Enforces thataudioandvideoelements have atrackelement withkind="captions"for accessibility. Muted videos are allowed without captions.#8621
d11130bThanks @Netail! - Added support for multiple reporters, and the ability to save reporters on arbitrary files.Combine two reporters in CI
If you run Biome on GitHub, take advantage of the reporter and still see the errors in console, you can now use both reporters:
Save reporter output to a file
With the new
--reporter-fileCLI option, it's now possible to save the output of all reporters to a file. The file is a path,so you can pass a relative or an absolute path:
You can combine these two features. For example, have the
defaultreporter written on terminal, and therdjsonreporter written on file:The
--reporterand--reporter-fileflags must appear next to each other, otherwise an error is thrown.#8399
ab88099Thanks @ematipico! - The Biome CSS parser is now able to parse Vue SFC syntax such as:slottedand:deep. These pseudo functions are only correctly parsed when the CSS is defined inside.vuecomponents. Otherwise, Biome will a emit a parse error.This capability is only available when
experimentalFullHtmlSupportedEnabledis set totrue.#8663
3dfea16Thanks @ematipico! - Added support for Cursor files. When Biome sees a Cursor JSON file, it will parse it with comments enabled and trailing commas enabled:$PROJECT/.cursor/%APPDATA%\Cursor\User\on Windows~/Library/Application Support/Cursor/User/on macOS~/.config/Cursor/User/on Linux#8723
fe2c642Thanks @cbstns! - Added JSON as a target language for GritQL pattern matching. You can now write Grit plugins for JSON files.This enables users to write GritQL patterns that match against JSON files, useful for:
package.jsonand other JSON configsExample patterns:
Match all key-value pairs:
Match objects with specific structure:
Supports both native Biome AST names (
JsonMember,JsonObjectValue) and TreeSitter-compatible names (pair,object,array) for compatibility with existing Grit patterns.For more details, see the GritQL documentation.
#8814
4d9c676Thanks @Netail! - Addedignoreoption tonoUnknownProperty. If an unknown property name matches any of the items provided inignore, a diagnostic won't be emitted.#8631
4d8f19dThanks @Netail! - Add a new reporter--reporter=sarif, that emits diagnostics using the SARIF format.#8270
4f7909dThanks @lucasweng! - Added theuseIframeTitlelint rule for HTML. The rule enforces the usage of thetitleattribute for theiframeelement.Invalid:
Valid:
#8164
1d25856Thanks @ematipico! - Added a new assist actionuseSortedInterfaceMembersthat sorts TypeScript interface members, for readability.It includes an autofix.
Invalid example.
Valid example (after using the assist).
#8647
4c7c06fThanks @siketyan! - It's now possible to provide the stacktrace for a fatal error. The stacktrace is only available when the environment variableRUST_BACKTRACE=1is set, either via the CLI or exported$PATH. This is useful when providing detailed information for debugging purposes:#7961
a04c8dfThanks @siketyan! - The Biome Language Server now reports progress while scanning files and dependencies in the project.#8289
a9025d4Thanks @theshadow27! - Fixed #8024. The ruleuseIterableCallbackReturnnow supports acheckForEachoption. When set tofalse, the rule will skip checking forforEach()callbacks for returning values.#8690
e06e5d1Thanks @ematipico! - Added the ruleuseValidLangto the HTML language.#7847
e90b14fThanks @Jagget! - Added support forjsxFactoryandjsxFragmentFactory.Biome now respectsjsxFactoryandjsxFragmentFactorysettings fromtsconfig.jsonwhen using the classic JSX runtime, preventing false positive noUnusedImports errors for custom JSX libraries like Preact.#8071
7f5bcf4Thanks @ematipico! - Added new CLI options to the commandslsp-proxyandstartthat allow to control the Biome file watcher.--watcher-kindControls how the Biome file watcher should behave. By default, Biome chooses the best watcher strategy for the
current OS, however sometimes this could result in some issues, such as folders locked.
The option accepts the current values:
recommended: the default option, which chooses the best watcher for the current platform.polling: uses the polling strategy.none: it doesn't enable the watcher. When the watcher is disabled, changes to files aren't recorded anymore by Biome. This might haverepercussions on some lint rules that might rely on updated types or updated paths.
The environment variable
BIOME_WATCHER_KINDcan be used as alias.--watcher-polling-intervalThe polling interval in milliseconds. This is only applicable when using the
pollingwatcher. It defaults to2000milliseconds.The environment variable
BIOME_WATCHER_POLLING_INTERVALcan be used as alias.#8262
4186b83Thanks @lucasweng! - Added theuseHtmlLanglint rule for HTML. The rule enforces that thehtmlelement has alangattribute.Invalid:
Valid:
#8376
1a9334cThanks @siketyan! - Added support for formatting and linting embedded GraphQL snippets in JavaScript.For example, the following snippets are now formatted:
This feature is experimental and must be enabled explicitly in the configuration:
{ "javascript": { "experimentalEmbeddedSnippetsEnabled": true } }#7799
54682aaThanks @PaulRBerg! - AddedgroupByNestingoption to theuseSortedKeysassist. When enabled, object keys are grouped by their value's nesting depth before sorting alphabetically.Simple values (primitives, single-line arrays, and single-line objects) are sorted first, followed by nested values (multi-line arrays and multi-line objects).
Example
To enable this option, configure it in your
biome.json:{ "linter": { "rules": { "source": { "useSortedKeys": { "options": { "groupByNesting": true } } } } } }With this option, the following unsorted object:
Will be sorted as:
#8641
1dc8dc2Thanks @tt-a1i! - Added thenoAutofocuslint rule for HTML. This rule enforces that theautofocusattribute is not used on elements, as it can cause usability issues for sighted and non-sighted users. The rule allowsautofocusinsidedialogelements or elements with thepopoverattribute, as these are modal contexts where autofocus is expected.#8501
8eb3f19Thanks @tt-a1i! - AddednoPositiveTabindexto HTML. This rule prevents the usage of positive integers on thetabindexattribute, which can disrupt natural keyboard navigation order.#8661
b36ff03Thanks @tt-a1i! - Added theuseAltTextlint rule for HTML. This rule enforces that elements requiring alternative text (<img>,<area>,<input type="image">,<object>) provide meaningful information for screen reader users viaalt,title(for objects),aria-label, oraria-labelledbyattributes. Elements witharia-hidden="true"are exempt.#7749
1c59333Thanks @andogq! - Implements #1984. UpdateduseHookAtTopLevelto better catch invalid hook usage.This rule is now capable of finding invalid hook usage in more locations. A diagnostic will now be generated if:
Invalid:
Valid:
#8307
789b0e7Thanks @mehm8128! - Added theuseValidAriaRolelint rule for HTML. The rule enforces that elements with ARIA roles must use a valid, non-abstract ARIA role.#8814
4d9c676Thanks @Netail! - Addedignoreoption tonoUnknownFunction. If an unknown function name matches any of the items provided inignore, a diagnostic won't be emitted.#8814
4d9c676Thanks @Netail! - Addedignoreoption tonoUnknownPseudoClass. If an unknown pseudo-class name matches any of the items provided inignore, a diagnostic won't be emitted.#8623
dc1f94eThanks @mldangelo! - Added thenoDuplicateClassesassist action to detect and remove duplicate CSS classes.For JSX files: Supports
class,classNameattributes and utility functions likeclsx,cn,cva.For HTML files: Checks
classattributes. This is the first assist action for HTML.#8399
ab88099Thanks @ematipico! - Improved the CSS parser for CSS modules. Biome now automatically enables CSS modules parsing for*.module.cssfiles.If your codebase has only
*.module.cssfiles, you can remove the parser feature as follows, because now Biome does it for you:{ "css": { "parser": { - "cssModules": true } } }#8399
ab88099Thanks @ematipico! - Added support for parsing:globaland:localinside.astro,.svelteand.vuefiles, in<style>portion of the file.This capability is only available when
experimentalFullHtmlSupportedEnabledis set totrue.#9011
e014336Thanks @ematipico! - Promoted 21 nursery rules to stable groups.Correctness
Promoted the following rules to the
correctnessgroup:noUnresolvedImports. The rule reports imports that cannot be resolved.The default rule severity is set to
error.noVueReservedProps. The rule reports Vue reserved props usage.The default rule severity is set to
error.noVueReservedKeys. The rule reports Vue reserved keys usage.The default rule severity is set to
error.noVueDataObjectDeclaration. The rule reports Vue 2 data declared as an object instead of a function.The default rule severity is set to
warn.noNextAsyncClientComponent. The rule reports async Next.js client components.The default rule severity is set to
warn.noVueDuplicateKeys. The rule reports duplicate keys in Vue component options.The default rule severity is set to
error.noVueSetupPropsReactivityLoss. The rule reports destructuring of props in Vue 3 setup which causes reactivity loss.The default rule severity is set to
error.useQwikMethodUsage. The rule enforces correct Qwik framework method usage.The default rule severity is set to
error.useQwikValidLexicalScope. The rule enforces valid lexical scope in Qwik framework.The default rule severity is set to
error.Suspicious
Promoted the following rules to the
suspiciousgroup:noImportCycles. The rule reports circular imports.The default rule severity is set to
warn.noDeprecatedImports. The rule reports imports of deprecated symbols.The default rule severity is set to
warn.noReactForwardRef. The rule reports usage ofReact.forwardRef.The default rule severity is set to
warn.noUnusedExpressions. The rule reports expressions that are never used.The default rule severity is set to
warn.noEmptySource. The rule reports empty source files.The default rule severity is set to
warn.useDeprecatedDate. The rule enforces use of GraphQL@deprecateddirective with date.The default rule severity is set to
warn.noDuplicateDependencies. The rule reports duplicate dependencies in package.json.The default rule severity is set to
warn.Complexity
Promoted the following rules to the
complexitygroup:noUselessUndefined. The rule reports uselessundefinedinitialization and returns.The default rule severity is set to
info.useMaxParams. The rule enforces a maximum number of function parameters.The default rule severity is set to
warn.noUselessCatchBinding. The rule reports useless catch binding parameters.The default rule severity is set to
info.Style
Promoted the following rules to the
stylegroup:useConsistentArrowReturn. The rule enforces consistent return in arrow functions.The default rule severity is set to
info.noJsxLiterals. The rule reports literal strings in JSX.The default rule severity is set to
info.#8695
d8f0309Thanks @ematipico! - Added support for the top-level suppression commentbiome-ignore-all format: <explanation>.When the comment
biome-ignore-all format: <explanation>is placed at the beginning of the document, Biome won't format the code.The feature works for all supported languages. In the following JavaScript snippet, the code isn't formatted and will stay as is.
#8255
da85e3cThanks @ryan-m-walker! - Added support for the typedattrfunction. Addresses issue #6183.Example
#8165
e0b3f62Thanks @lucasweng! - Added thenoAccessKeylint rule for HTML. The rule enforces that theaccesskeyattribute is not used on any HTML element, as it can conflict with keyboard commands used by screen readers and keyboard-only users.Invalid:
Valid:
#8278
7207effThanks @ematipico! - Added a feature that allows editors to inject a Biome configuration to the Biome Language Server without affecting the configuration of the project.If you have a Biome extension that is compatible with your preferred LSP-ready editor, you can map
inlineConfig. The configuration will be merged with the configuration of the project (or the default configuration):For example, with the Zed editor, you would have the following configuration, which will format all files using four spaces as indentation style:
#8368
8aa5f5bThanks @Bertie690! - Added 2 options fromtypescript-eslint(ignoreDifferentlyNamedParametersandignoreDifferentJsDoc) touseUnifiedTypeSignatures.Each option makes the rule ignore overload signatures whose parameter names or JSDoc comments differ.
Examples
Valid code with
ignoreDifferentlyNamedParametersset totrue:Valid code with
ignoreDifferentJsDocset totrue:#8562
361350eThanks @dyc3! - Added the rule profiler behind the--profile-rulescli flag. You can now see a report of which lint rules took the longest to execute.#8234
e2e6e66Thanks @ongyuxing! - Updated the CSS properties ordering to align withstylelint-config-recess-orderv7.4.0.It adds support for:
For the complete list of changes, see: stormwarning/stylelint-config-recess-order@v6.0.0...v7.4.0.
#8814
4d9c676Thanks @Netail! - Addedignoreoption tonoUnknownPseudoElement. If an unknown pseudo-element name matches any of the items provided inignore, a diagnostic won't be emitted.#8663
3dfea16Thanks @ematipico! - Added the ability to load the configuration from new known paths. Biome now attempts to load the configuration filesfrom the following locations:
$XDG_CONFIG_HOMEor$HOME/.config/biomeon Linux/Users/$USER/Library/Application Support/biomeon macOSC:\Users\$USER\AppData\Roaming\biome\configon WindowsThe priority how Biome will attempt to load the configuration files is the following:
$XDG_CONFIG_HOMEor$HOME/.config/biomeon Linux/Users/$USER/Library/Application Support/biomeon macOSC:\Users\$USER\AppData\Roaming\biome\configon Windows#7973
bc0e8b4Thanks @siketyan! - Added support for formatting and linting embedded CSS snippets in JavaScript.For example, the following snippets are now formatted and linted:
However, snippets with interpolations are not supported yet. For example, the following snippet isn't formatted:
This feature is experimental and must be enabled explicitly in the configuration:
{ "javascript": { "experimentalEmbeddedSnippetsEnabled": true } }#8381
50c3513Thanks @mehm8128! - Added theuseAriaPropsForRolelint rule for HTML. The rule enforces that elements with ARIA roles must have all required ARIA attributes for that role.#7762
5901d79Thanks @dyc3! - Added theextensionMappingsoption touseImportExtensions. This allows users to specify custom file extensions for different module types.For example, if you want to ban all
.tsimports in favor of.jsimports, you can now do so with this option:{ "options": { "extensionMappings": { "ts": "js" } } }#8532
01bccc8Thanks @jonaylor89! - Added--onlyand--skipoptions tobiome checkandbiome ci, covering both lint diagnostics and assist actions. Biome now lets you run or exclude specific lint rules, assist actions, group or rules and actions, or domains when running these commands.Examples:
#8666
7733f90Thanks @ematipico! - Added the rulenoRedundantAltto HTML. The rule enforces that theimgelementaltattribute does not contain the words “image”, “picture”, or “photo”.#8287
a248e88Thanks @mehm8128! - Added thenoDistractingElementslint rule for HTML. The rule enforces that no distracting elements like<marquee>or<blink>are used.#8564
adcce82Thanks @ematipico! - Added the new linter domaintypes. This is a domain that enables all rules that require the type inference engine.As opposed to the
projectdomain, which only enables rules that require the module graph to function.The following nursery rules have been moved to the
typesdomain:useArraySortCompareuseAwaitThenableuseFinduseRegexpExecnoUnnecessaryConditionsnoMisusedPromisesnoFloatingPromises#8556
47a79f1Thanks @mehm8128! - Added two new behaviors to thenoSvgWithoutTitlerule.graphics-documentandgraphics-symbolroles.#8663
3dfea16Thanks @ematipico! - Added the ability to load the hidden files.biome.jsonand.biome.jsonc. This is the order how Biome will attempt the configuration file is:biome.jsonbiome.jsonc.biome.json.biome.jsonc#8334
ae8ac8eThanks @ematipico! - Added the formatter optiontrailingNewline.When set to
false, the formatter will remove the trailing newline at the end of formatted files. The default value istrue, which preserves the current behavior of adding a trailing newline.This option is available globally and for each language-specific formatter configuration:
{ "formatter": { "trailingNewline": false }, "javascript": { "formatter": { "trailingNewline": true } } }The following CLI flags have been added. They accept
trueorfalseas value:--formatter-trailing-newline--javascript-formatter-trailing-newline--json-formatter-trailing-newline--graphql-formatter-trailing-newline--css-formatter-trailing-newline--html-formatter-trailing-newline#8854
1469968Thanks @ematipico! - Formatting is now applied when applying safe/unsafe fixes viabiome check.#8642
46f33a7Thanks @ematipico! - Improved the rulenoUnusedVariablesin Svelte files, by correctly detecting variables defined in the JavaScript blocks, and used inside the templates.#8839
79b38aaThanks @ryan-m-walker! - Added support for parsing and formatting the CSS@functionat-rule from the CSS Mixins Module Level 1 specification. Addresses issue #8184.#8412
73f4f53Thanks @mehm8128! - Added thenoSvgWithoutTitlelint rule to HTML. The rule enforces the usage of thetitleelement for thesvgelement.#8243
4291ff3Thanks @ashnewmanjones! - Added theuseButtonTypelint rule for HTML. The rule enforces that thetypeattribute is present and valid on all button elements.Invalid:
Valid:
Patch Changes
#8898
7e48bd4Thanks @ematipico! - Added e18e ESLint plugin as a recognized rule source. Six Biome rules now reference their e18e equivalents:useAtIndex,useExponentiationOperator,noPrototypeBuiltins,useDateNow,useSpread, anduseObjectSpread.#8719
a215408Thanks @ematipico! - Added proper parsing and formatting for Svelte directives when thehtml.experimentalFullSupportEnabledis set totrue.#8071
7f5bcf4Thanks @ematipico! - Revamped the logging options for all Biome commands. Now the commandsformat,lint,check,ci,search,lsp-proxyandstartaccept the following CLI options.Some options might have been present before, but they were inconsistent. Plus, all new options have an environment variable as aliases.
--log-fileOptional path/file to redirect log m
Configuration
📅 Schedule: Branch creation - "before 4am on monday" in timezone Asia/Seoul, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.