Releases: biomejs/biome
CLI v1.4.1
Biome scores 96% compatibility with Prettier! Read our announcement on our blog.
Editors
- Fix #933. Some files are properly ignored in the LSP too. E.g.
package.json
,tsconfig.json
, etc.
Formatter
Bug fixes
-
Fix some accidental line breaks when printing array expressions within arrow functions and other long lines #917. Contributed by @faultyserver
-
Match Prettier's breaking strategy for
ArrowChain
layouts #934. Contributed by @faultyserver -
Fix double-printing of leading comments in arrow chain expressions #951. Contributed by @faultyserver
Linter
Bug fixes
- Fix #910, where the rule
noSvgWithoutTitle
should skip elements that havearia-hidden
attributes. Contributed by @vasucp1207
Enhancement
-
Implements #924 and #920. noUselessElse now ignores
else
clauses that follow at least oneif
statement that doesn't break early. Contributed by @ConaclosFor example, the following code is no longer reported by the rule:
function f(x) { if (x < 0) { // this `if` doesn't break early. } else if (x > 0) { return x; } else { // This `else` block was previously reported as useless. } }
Bug fixes
-
Fix #918, useSimpleNumberKeys no longer repports false positive on comments. Contributed by @kalleep
-
Fix #953, noRedeclare no longer reports type parameters with the same name in different mapped types as redeclarations. Contributed by @Conaclos
-
Fix #608, useExhaustiveDependencies no longer repports missing dependencies for React hooks without dependency array. Contributed by @kalleep
Parser
What's Changed
Other changes
- fix: fix blog list not showing all posts by @Yan-Thomas in #915
- fix(js_formatter): array printing and grouping in arrows by @faultyserver in #917
- ci(release_cli): fix homebrew job by @nhedger in #919
- fix(website): fix title tags by @Yan-Thomas in #925
- fix: typo by @u-abyss in #929
- doc(ja): translate
How Biome works
into Japanese by @Spice-Z in #930 - doc(ja): translate
versioning
into Japanese by @yossydev in #906 - doc(ja): translate
Formatter
doc into Japanese by @Gumichocopengin8 in #904 - doc(ja): translate
credits
into Japanese by @hitohata in #903 - fix: typo by @gc in #936
- fix:
noSvgWithoutTitle
skip on aria-hidden by @vasucp1207 in #928 - docs(ja): translate
Getting Started
into Japanese by @Yuiki in #940 - docs(website): show sponsors on japanese document by @unvalley in #945
- fix(website): json schema for 1.4.0 by @Conaclos in #948
- fix(js_formatter): Match Prettier's breaking strategy for ArrowChain layouts by @faultyserver in #934
- feat(css_parser): CSS Parser pseudo element selector #268 by @denbezrukov in #883
- fix(js_formatter): Avoid double-printing the first leading comments in arrow chains by @faultyserver in #951
- fix(package): add ROME MIT license by @Conaclos in #949
- docs(ja): translate
vscode
into Japanese by @sakimyto in #938 - doc(ja): translate continuous-integration into Japanese by @yossydev in #955
- docs(ja): translate
Philosophy
into Japanese by @yoshi2no in #944 - docs(ja): translate
Architecture
into Japanese by @seo1nk in #912 - feat(website): Move blog to CC and fix RSS by @Yan-Thomas in #937
- docs(ja): translate big-projects into Japanese by @u-abyss in #962
- feat(css_parser): CSS Parser charset #268 by @denbezrukov in #950
- fix(website): fix fragile blog links by @Yan-Thomas in #965
- feat(css_parser): CSS Parser color profile at rule #268 by @denbezrukov in #966
- feat(website): optimize blog images and fix meta/a11y by @Yan-Thomas in #973
- chore: improve issue templates by @Conaclos in #981
New Contributors
- @Yan-Thomas made their first contribution in #915
- @u-abyss made their first contribution in #929
- @Spice-Z made their first contribution in #930
- @hitohata made their first contribution in #903
- @gc made their first contribution in #936
- @sakimyto made their first contribution in #938
- @kalleep made their first contribution in #957
- @seo1nk made their first contribution in #912
Full Changelog: cli/v1.4.0...cli/v1.4.1
CLI v1.4.0
Biome scores 96% compatibility with Prettier! Read our announcement on our blog.
CLI
-
Remove the CLI options from the
lsp-proxy
, as they were never meant to be passed to that command. Contributed by @ematipico -
Add option
--config-path
tolsp-proxy
andstart
commands. It's now possible to tell the Daemon server to loadbiome.json
from a custom path. Contributed by @ematipico -
Add new
--diagnostic-level
option to let users control the level of diagnostics printed by the CLI. Possible values are:"info"
,"warn"
,"hint"
. Contributed by @simonxabris -
Add option
--line-feed
to theformat
command. Contributed by @SuperchupuDev -
Add option
--bracket-same-line
to theformat
command. Contributed by @faultyserve -
Add option
--bracket-spacing
to theformat
command. Contributed by @faultyserve
Bug fixes
- Fix the command
format
, now it returns a non-zero exit code when if there pending diffs. Contributed by @ematipico
Configuration
- Add option
formatter.lineFeed
. Contributed by @SuperchupuDev - Add option
javascript.formatter.bracketSameLine
. Contributed by @faultyserve - Add option
javascript.formatter.bracketSpacing
. Contributed by @faultyserve
Formatter
New features
- Add a new option
--line-ending
. This option allows changing the type of line endings. Contributed by @SuperchupuDev - Added a new option called
--bracket-spacing
to the formatter. This option allows you to control whether spaces are inserted around the brackets of object literals. #627. Contributed by @faultyserver - Added a new option called
--bracket-same-line
to the formatter. This option allows you to control whether spaces are inserted around the brackets of object literals. #627. Contributed by @faultyserver
Bug fixes
-
Fix #832, the formatter no longer keeps an unnecessary trailing comma in type parameter lists. Contributed by @Conaclos
-
Fix #301, the formatter should not break before the
in
keyword. Contributed by @ematipico
Linter
Promoted rules
- a11y/noInteractiveElementToNoninteractiveRole
- complexity/noThisInStatic
- complexity/useArrowFunction
- correctness/noEmptyCharacterClassInRegex
- correctness/noInvalidNewBuiltin
- style/noUselessElse
- style/useAsConstAssertion
- style/useShorthandAssign
- suspicious/noApproximativeNumericConstant
- suspicious/noMisleadingInstantiator
- suspicious/noMisrefactoredShorthandAssign
The following rules are now recommended:
The following rules are now deprecated:
- correctness/noNewSymbol
The rule is replaced by correctness/noInvalidNewBuiltin
New features
-
Add noDefaultExport which disallows
export default
. Contributed by @Conaclos -
Add noAriaHiddenOnFocusable which reports hidden and focusable elements. Contributed by @vasucp1207
-
Add noImplicitAnyLet that reports variables declared with
let
and without initialization and type annotation. Contributed by @TaKO8Ki and @b4s36t4 -
Add useAwait that reports
async
functions that don't use anawait
expression. -
Add useValidAriaRole. Contributed by @vasucp1207
-
Add useRegexLiterals that suggests turning call to the regex constructor into regex literals. Contributed by @Yuiki
Enhancements
- Add an unsafe code fix for a11y/useAriaActivedescendantWithTabindex
Bug fixes
-
Fix #639 by ignoring unused TypeScript's mapped key. Contributed by @Conaclos
-
Fix #565 by handling several
infer
with the same name in extends clauses of TypeScript's conditional types. Contributed by @Conaclos -
Fix #653. noUnusedImports now correctly removes the entire line where the unused
import
is. Contributed by @Conaclos -
Fix #607
useExhaustiveDependencies
, ignore optional chaining, Contributed by @msdlisper -
Fix #676, by using the correct node for the
"noreferrer"
when applying the code action. Contributed by @ematipico -
Fix #455. The CLI can now print complex emojis to the console correctly.
-
Fix #727. noInferrableTypes now correctly keeps type annotations when the initialization expression is
null
. Contributed by @Conaclos -
Fix #784, noSvgWithoutTitle fixes false-positives to
aria-label
and reports svg's role attribute is implicit. Contributed by @unvalley -
Fix #834 that made noUselessLoneBlockStatements reports block statements of switch clauses. Contributed by @vasucp1207
-
Fix #783 that made noUselessLoneBlockStatements reports block statements of
try-catch
structures. Contributed by @hougesen -
Fix #69 that made correctness/noUnnecessaryContinue incorrectly reports a
continue
used to break a switch clause. Contributed by @TaKO8Ki -
Fix #664 by improving the diagnostic of style/useNamingConvention when double capital are detected in strict camel case mode. Contributed by @vasucp1207
-
Fix #643 that erroneously parsed the option of complexity/useExhaustiveDependencies. Contributed by @arendjr
Parser
Bug fixes
- Fix #846 that erroneously parsed
<const T,>() => {}
as a JSX tag instead of an arrow function when both TypeScript and JSX are enabled.
VSCode
What's Changed
Other changes
- fix: avoid escape for jsx by @Gumichocopengin8 in #842
- feat(js_formatter): es5 trailing comma revision by @Conaclos in #848
- chore: upgrade prettier to v3.1.0 by @seitarof in #855
- fix(formatter): fix wrong Indentation for leading comments in empty statement by @TaKO8Ki in #858
- fix(matcher): fix wrongly ignored paths by @TaKO8Ki in #859
- chore: Add TaKO8Ki to Maintainers team by @TaKO8Ki in #862
- chore: use the same
Prettier
version in Biome by @Gumichocopengin8 in #864 - docs: clarify
organizeImports
is opt-out by @kt3k in #866 - feat(css_parser): CSS Parser pseudo element selector #268 by @denbezrukov in #839
- feat: add more ignored files by @Gumichocopengin8 in #875
- fix(formatter): Line breaking after
extends
in type parameters by @Yuiki in #876 - challenge: update reports by @Conaclos in #877
- fix(tooling): update the script to bump the nightly version by @chansuke in #874
- chore: Add myself as a maintainer in CONTRIBUTING.md by @faultyserver in #884
- chore: upgrade Rust to 1.74.0 by @togami2864 in #889
- docs: fix link to playground instrunctions by @chansuke in #888
- docs: fix link to technical principals by @yoshi2no in https://github.com/bio...
VSCode Extension v1.7.20231109
Analyzer
CLI
-
Remove the CLI options from the
lsp-proxy
, as they were never meant to be passed to that command. Contributed by @ematipico -
Add option
--config-path
tolsp-proxy
andstart
commands. It's now possible to tell the Daemon server to loadbiome.json
from a custom path. Contributed by @ematipico -
Add new
--diagnostic-level
option to let users control the level of diagnostics printed by the CLI. Possible values are:"info"
,"warn"
,"hint"
. Contributed by @simonxabris
Bug fixes
- Fix the command
format
, now it returns a non-zero exit code when if there pending diffs. Contributed by @ematipico
Configuration
Editors
Formatter
JavaScript APIs
Linter
Bug fixes
-
Fix #639 by ignoring unused TypeScript's mapped key. Contributed by @Conaclos
-
Fix #565 by handling several
infer
with the same name in extends clauses of TypeScript's conditional types. Contributed by @Conaclos -
Fix #653. noUnusedImports now correctly removes the entire line where the unused
import
is. Contributed by @Conaclos -
Fix #607
useExhaustiveDependencies
, ignore optional chaining, Contributed by @msdlisper -
Fix #676, by using the correct node for the
"noreferrer"
when applying the code action. Contributed by @ematipico
Parser
VSCode
What's Changed
Other changes
- refactor(diagnostics): use
ParseDiagnostic
instead by @ematipico in #640 - ci(release_cli): move homebrew bump to own job by @nhedger in #641
- Fix parsing
maxAllowedComplexity
by @arendjr in #646 - feat: add
biome_project
by @ematipico in #626 - docs(website): add page that explains some biome's assumptions/behaviour by @ematipico in #649
- docs(website): new guide for editors by @ematipico in #652
- refactor(js_semantic): handle bindings with bogus names by @Conaclos in #654
- feat(cli): help with colours by @ematipico in #658
- chore: refactor readme by @ematipico in #663
- docs(website): reworked the editor plugins section by @ematipico in #665
- ci(pull_request): free disk space on ubuntu-latest by @nhedger in #667
- refactor: small test infrastructure by @msdlisper in #672
- docs: replace deprecated
indentSize
withindentWidth
by @4strodev in #687 - feat(css_parser): CSS Parser pseudo element selector #268 by @denbezrukov in #673
New Contributors
- @4strodev made their first contribution in #687
- @simonxabris made their first contribution in #677
Full Changelog: cli/v1.3.3...lsp/v1.7.20231109
VSCode Extension v1.6.2
Analyzer
Bug fixes
- Fix #604 which made noConfusingVoidType report false positives when the
void
type is used in a generic type parameter. Contributed by @unvalley
CLI
Bug fixes
- Fix how
overrides
behave. Nowignore
andinclude
apply or not the override pattern, so they override each other.
Now the options insideoverrides
override the top-level options. - Bootstrap the logger only when needed. Contributed by @ematipico
Editors
Bug fixes
- Fix #592, by changing binary resolution in the IntelliJ plugin. Contributed by @Joshuabaker2
Formatter
Bug fixes
- Apply the correct layout when the right hand of an assignment expression is a await expression or a yield expression. Contributed by @ematipico
- Fix #303, where nested arrow functions didn't break. Contributed by @victor-teles
Linter
Bug fixes
-
Fix #175 which made noRedeclare report index signatures using the name of a variable in the parent scope.
-
Fix #557 which made noUnusedImports report imported types used in
typeof
expression. Contributed by @Conaclos -
Fix #576 by removing some erroneous logic in noSelfAssign. Contributed by @ematipico
-
Fix #595 by updating unsafe-apply logic to avoid unexpected errors in noUselessFragments. Contributed by @nissy-dev
-
Fix #591 which made noRedeclare report type parameters with identical names but in different method signatures. Contributed by @Conaclos
-
Support more a11y roles and fix some methods for a11y lint rules Contributed @nissy-dev
-
Fix
useExhaustiveDependencies
, by removinguseContext
,useId
anduseSyncExternalStore
from the known hooks. Contributed by @msdlisper
Parser
Enhancements
- Support RegExp v flag. Contributed by @nissy-dev
- Improve error messages. Contributed by @ematipico
What's Changed
Other changes
- ci(release_cli): add homebrew formula bumper by @nhedger in #569
- docs(website): fix
useYield
source reference by @unvalley in #583 - fix: check
elseClause
insidenoUselessLoneBlockStatements
by @vasucp1207 in #584 - docs(lint/useNamingConvention): type prop and method names in camelCase by @Conaclos in #588
- chore: fix hook linting message grammar by @crutchcorn in #580
- fix(project): changed structure to correctly emit schema for overrides by @ematipico in #602
- fix(intellij): binary resolution execution sequence by @Joshuabaker2 in #601
- refactor(linter-config): remove dead code and deduplicate code by @Conaclos in #612
- refactor(json_deserialize): improve
map_to_*
API by @Conaclos in #616 - refactor(json_deserailize): remove
visit_member_name
by @Conaclos in #618 - fix: bug with useContext/useSyncExternalStore (#609) by @msdlisper in #621
- feat(css_parser): CSS Parser pseudo element selector #268 by @denbezrukov in #600
- fix(biome_js_parser): report error when using u and v flag at the same time by @nissy-dev in #631
- ci(release_cli): continue on error when bumping homebrew formula by @nhedger in #637
New Contributors
- @crutchcorn made their first contribution in #580
- @Joshuabaker2 made their first contribution in #601
- @ditorodev made their first contribution in #366
- @msdlisper made their first contribution in #621
Full Changelog: cli/v1.3.1...lsp/v1.6.2
Intellij Plugin v0.0.6
Analyzer
Bug fixes
- Fix #604 which made noConfusingVoidType report false positives when the
void
type is used in a generic type parameter. Contributed by @unvalley
CLI
Bug fixes
- Fix how
overrides
behave. Nowignore
andinclude
apply or not the override pattern, so they override each other.
Now the options insideoverrides
override the top-level options. - Bootstrap the logger only when needed. Contributed by @ematipico
Editors
Bug fixes
- Fix #592, by changing binary resolution in the IntelliJ plugin. Contributed by @Joshuabaker2
Formatter
Bug fixes
- Apply the correct layout when the right hand of an assignment expression is a await expression or a yield expression. Contributed by @ematipico
- Fix #303, where nested arrow functions didn't break. Contributed by @victor-teles
Linter
Bug fixes
-
Fix #175 which made noRedeclare report index signatures using the name of a variable in the parent scope.
-
Fix #557 which made noUnusedImports report imported types used in
typeof
expression. Contributed by @Conaclos -
Fix #576 by removing some erroneous logic in noSelfAssign. Contributed by @ematipico
-
Fix #595 by updating unsafe-apply logic to avoid unexpected errors in noUselessFragments. Contributed by @nissy-dev
-
Fix #591 which made noRedeclare report type parameters with identical names but in different method signatures. Contributed by @Conaclos
-
Support more a11y roles and fix some methods for a11y lint rules Contributed @nissy-dev
-
Fix
useExhaustiveDependencies
, by removinguseContext
,useId
anduseSyncExternalStore
from the known hooks. Contributed by @msdlisper
Parser
Enhancements
- Support RegExp v flag. Contributed by @nissy-dev
- Improve error messages. Contributed by @ematipico
What's Changed
Other changes
- ci(release_cli): add homebrew formula bumper by @nhedger in #569
- docs(website): fix
useYield
source reference by @unvalley in #583 - fix: check
elseClause
insidenoUselessLoneBlockStatements
by @vasucp1207 in #584 - docs(lint/useNamingConvention): type prop and method names in camelCase by @Conaclos in #588
- chore: fix hook linting message grammar by @crutchcorn in #580
- fix(project): changed structure to correctly emit schema for overrides by @ematipico in #602
- fix(intellij): binary resolution execution sequence by @Joshuabaker2 in #601
- refactor(linter-config): remove dead code and deduplicate code by @Conaclos in #612
- refactor(json_deserialize): improve
map_to_*
API by @Conaclos in #616 - refactor(json_deserailize): remove
visit_member_name
by @Conaclos in #618 - fix: bug with useContext/useSyncExternalStore (#609) by @msdlisper in #621
- feat(css_parser): CSS Parser pseudo element selector #268 by @denbezrukov in #600
- fix(biome_js_parser): report error when using u and v flag at the same time by @nissy-dev in #631
- ci(release_cli): continue on error when bumping homebrew formula by @nhedger in #637
New Contributors
- @crutchcorn made their first contribution in #580
- @Joshuabaker2 made their first contribution in #601
- @ditorodev made their first contribution in #366
- @msdlisper made their first contribution in #621
Full Changelog: cli/v1.3.1...lsp-intellij/v0.0.6
CLI v1.3.3
Analyzer
Bug fixes
- Fix #604 which made noConfusingVoidType report false positives when the
void
type is used in a generic type parameter. Contributed by @unvalley
CLI
Bug fixes
- Fix how
overrides
behave. Nowignore
andinclude
apply or not the override pattern, so they override each other.
Now the options insideoverrides
override the top-level options. - Bootstrap the logger only when needed. Contributed by @ematipico
Editors
Bug fixes
- Fix #592, by changing binary resolution in the IntelliJ plugin. Contributed by @Joshuabaker2
Formatter
Bug fixes
- Apply the correct layout when the right hand of an assignment expression is a await expression or a yield expression. Contributed by @ematipico
- Fix #303, where nested arrow functions didn't break. Contributed by @victor-teles
Linter
Bug fixes
-
Fix #175 which made noRedeclare report index signatures using the name of a variable in the parent scope.
-
Fix #557 which made noUnusedImports report imported types used in
typeof
expression. Contributed by @Conaclos -
Fix #576 by removing some erroneous logic in noSelfAssign. Contributed by @ematipico
-
Fix #595 by updating unsafe-apply logic to avoid unexpected errors in noUselessFragments. Contributed by @nissy-dev
-
Fix #591 which made noRedeclare report type parameters with identical names but in different method signatures. Contributed by @Conaclos
-
Support more a11y roles and fix some methods for a11y lint rules Contributed @nissy-dev
-
Fix
useExhaustiveDependencies
, by removinguseContext
,useId
anduseSyncExternalStore
from the known hooks. Contributed by @msdlisper
Parser
Enhancements
- Support RegExp v flag. Contributed by @nissy-dev
- Improve error messages. Contributed by @ematipico
What's Changed
Other changes
- ci(release_cli): add homebrew formula bumper by @nhedger in #569
- docs(website): fix
useYield
source reference by @unvalley in #583 - fix: check
elseClause
insidenoUselessLoneBlockStatements
by @vasucp1207 in #584 - docs(lint/useNamingConvention): type prop and method names in camelCase by @Conaclos in #588
- chore: fix hook linting message grammar by @crutchcorn in #580
- fix(project): changed structure to correctly emit schema for overrides by @ematipico in #602
- fix(intellij): binary resolution execution sequence by @Joshuabaker2 in #601
- refactor(linter-config): remove dead code and deduplicate code by @Conaclos in #612
- refactor(json_deserialize): improve
map_to_*
API by @Conaclos in #616 - refactor(json_deserailize): remove
visit_member_name
by @Conaclos in #618 - fix: bug with useContext/useSyncExternalStore (#609) by @msdlisper in #621
- feat(css_parser): CSS Parser pseudo element selector #268 by @denbezrukov in #600
- fix(biome_js_parser): report error when using u and v flag at the same time by @nissy-dev in #631
- ci(release_cli): continue on error when bumping homebrew formula by @nhedger in #637
New Contributors
- @crutchcorn made their first contribution in #580
- @Joshuabaker2 made their first contribution in #601
- @ditorodev made their first contribution in #366
- @msdlisper made their first contribution in #621
Full Changelog: cli/v1.3.1...cli/v1.3.3
VSCode Extension v1.6.1
CLI
Bug fixes
- Fix
rage
command, now it doesn't print info about running servers. Contributed by @ematipico
Editors
Bug fixes
- Fix #552, where the formatter isn't correctly triggered in Windows systems. Contributed by @victor-teles
Linter
Bug fixes
- Fix #548 which made noSelfAssign panic.
- Fix #555, by correctly map
globals
into the workspace.
What's Changed
Other changes
- fix(docs): config file name by @bushuai in #561
- fix(intellij): binary resolution on windows by @victor-teles in #556
New Contributors
Full Changelog: cli/v1.3.0...lsp/v1.6.1
Intellij Plugin v0.0.5
CLI
Bug fixes
- Fix
rage
command, now it doesn't print info about running servers. Contributed by @ematipico
Editors
Bug fixes
- Fix #552, where the formatter isn't correctly triggered in Windows systems. Contributed by @victor-teles
Linter
Bug fixes
- Fix #548 which made noSelfAssign panic.
- Fix #555, by correctly map
globals
into the workspace.
What's Changed
Other changes
- fix(docs): config file name by @bushuai in #561
- fix(intellij): binary resolution on windows by @victor-teles in #556
New Contributors
Full Changelog: cli/v1.3.0...lsp-intellij/v0.0.5
CLI v1.3.1
CLI
Bug fixes
- Fix
rage
command, now it doesn't print info about running servers. Contributed by @ematipico
Editors
Bug fixes
- Fix #552, where the formatter isn't correctly triggered in Windows systems. Contributed by @victor-teles
Linter
Bug fixes
- Fix #548 which made noSelfAssign panic.
- Fix #555, by correctly map
globals
into the workspace.
What's Changed
Other changes
- fix(docs): config file name by @bushuai in #561
- fix(intellij): binary resolution on windows by @victor-teles in #556
New Contributors
Full Changelog: cli/v1.3.0...cli/v1.3.1
VSCode Extension v1.6.0
Analyzer
Enhancements
-
Import sorting is safe to apply now, and it will be applied when running
check --apply
instead ofcheck --apply-unsafe
. -
Import sorting now handles Bun imports
bun:<name>
, absolute path imports/<path>
, and Node's subpath imports#<name>
. See our documentation for more details. Contributed by @Conaclos
CLI
Bug fixes
- Fix #319. The command
biome lint
now shows the correct options. Contributed by @ematipico - Fix #312. Running
biome --version
now exits with status code0
instead of1
. Contributed by @nhedger - Fix a bug where the
extends
functionality doesn't carry overorganizeImports.ignore
. Contributed by @ematipico - The CLI now returns the original content when using
stdin
and the original content doesn't change. Contributed by @ematipico
New features
-
Add support for
BIOME_BINARY
environment variable to override the location of the binary. Contributed by @ematipico -
Add option
--indent-width
, and deprecated the option--indent-size
. Contributed by @ematipico -
Add option
--javascript-formatter-indent-width
, and deprecated the option--javascript-formatter-indent-size
. Contributed by @ematipico -
Add option
--json-formatter-indent-width
, and deprecated the option--json-formatter-indent-size
. Contributed by @ematipico -
Add option
--daemon-logs
tobiome rage
. The option is required to view Biome daemon server logs. Contributed by @unvalley -
Add support for logging. By default, Biome doesn't log anything other than diagnostics. Logging can be enabled with the new option
--log-level
:biome format --log-level=info ./src
There are four different levels of logging, from the most verbose to the least verbose:
debug
,info
,warn
anderror
. Here's how anINFO
log will look like:2023-10-05T08:27:01.954727Z INFO Analyze file ./website/src/playground/components/Resizable.tsx at crates/biome_service/src/file_handlers/javascript.rs:298 on biome::worker_5 in Pulling diagnostics with categories: RuleCategories(SYNTAX) in Processes formatting with path: "./website/src/playground/components/Resizable.tsx" in Process check with path: "./website/src/playground/components/Resizable.tsx"
You can customize how the log will look like with a new option
--log-kind
. The supported kinds are:pretty
,compact
andjson
.pretty
is the default logging. Here's how acompact
log will look like:2023-10-05T08:29:04.864247Z INFO biome::worker_2 Process check:Processes linting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(LINT) 2023-10-05T08:29:04.864290Z INFO biome::worker_7 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Tabs.tsx path="./website/src/playground/components/Tabs.tsx" path="./website/src/playground/components/Tabs.tsx" 2023-10-05T08:29:04.879332Z INFO biome::worker_2 Process check:Processes formatting:Pulling diagnostics: crates/biome_service/src/file_handlers/javascript.rs: Analyze file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx" categories=RuleCategories(SYNTAX) 2023-10-05T08:29:04.879383Z INFO biome::worker_2 Process check:Processes formatting: crates/biome_service/src/file_handlers/javascript.rs: Format file ./website/src/playground/components/Resizable.tsx path="./website/src/playground/components/Resizable.tsx" path="./website/src/playground/components/Resizable.tsx"
Enhancements
- Deprecated the environment variable
ROME_BINARY
. UseBIOME_BINARY
instead. Contributed by @ematipico - Biome doesn't check anymore the presence of the
.git
folder when VCS support is enabled. Contributed by @ematipico biome rage
doesn't print the logs of the daemon, usebiome rage --daemon-logs
to print them. Contributed by @unvalley
Configuration
New features
-
Add option
formatter.indentWidth
, and deprecated the optionformatter.indentSize
. Contributed by @ematipico -
Add option
javascript.formatter.indentWidth
, and deprecated the optionjavascript.formatter.indentSize
. Contributed by @ematipico -
Add option
json.formatter.indentWidth
, and deprecated the optionjson.formatter.indentSize
. Contributed by @ematipico -
Add option
include
to multiple sections of the configurationfiles.include
;formatter.include
;linter.include
;organizeImports.include
;
Wheninclude
andignore
are both specified,ignore
takes precedence overinclude
-
Add option
overrides
, where users can modify the behaviour of the tools for certain files or paths.For example, it's possible to modify the formatter
lineWidth
, and evenquoteStyle
for certain files that are included in glob pathgenerated/**
:{ "formatter": { "lineWidth": 100 }, "overrides": [ { "include": ["generated/**"], "formatter": { "lineWidth": 160 }, "javascript": { "formatter": { "quoteStyle": "single" } } } ] }
Or, you can disable certain rules for certain path, and disable the linter for other paths:
{ "linter": { "enabled": true, "rules": { "recommended": true } }, "overrides": [ { "include": ["lib/**"], "linter": { "rules": { "suspicious": { "noDebugger": "off" } } } }, { "include": ["shims/**"], "linter": { "enabled": false } } ] }
Bug fixes
- Fix #343,
extends
was incorrectly applied to thebiome.json
file. Contributed by @ematipico
Editors
Bug fixes
-
Fix #404. Biome intellij plugin now works on Windows. Contributed by @victor-teles
-
Fix #402. Biome
format
on intellij plugin now recognize biome.json. Contributed by @victor-teles
Formatter
Enhancements
- Use
OnceCell
for the Memoized memory because that's what theRefCell<Option>
implemented. Contributed by @denbezrukov
Linter
Promoted rules
- complexity/noExcessiveCognitiveComplexity
- complexity/noVoid
- correctness/useExhaustiveDependencies
- correctness/useHookAtTopLevel
- performance/noAccumulatingSpread
- style/useCollapsedElseIf
- suspicious/noConfusingVoidType
- suspicious/noFallthroughSwitchClause
- suspicious/noGlobalIsFinite
- suspicious/noGlobalIsNan
- suspicious/useIsArray
The following rules are now recommended:
Bug fixes
- Fix #243 a false positive case where the incorrect scope was defined for the
infer
type. in rule noUndeclaredVariables. Contributed by @denbezrukov - Fix #322, now noSelfAssign correctly handles literals inside call expressions.
- Changed how noSelfAssign behaves. The rule is not triggered anymore on function calls. Contributed by @ematipico
New features
-
Add noEmptyCharacterClassInRegex rule. The rule reports empty character classes and empty negated character classes in regular expression literals. Contributed by @Conaclos
-
Add noMisleadingInstantiator rule. The rule reports the misleading use of the
new
andconstructor
methods. Contributed by @unvalley -
Add noUselessElse rule.
The rule reportselse
clauses that can be omitted because theirif
branches break.
Contributed by @Conaclos -
Add noUnusedImports rule.
The rule reports unused imports and suggests to remove them.
Contributed by @ConaclosnoUnusedVariables reports also unused imports, but don't suggest their removal.
Once [noUnusedI...