CLI v1.5.2
CLI
Bug fixes
-
Fix #1512 by skipping verbose diagnostics from the count. Contributed by @ematipico
-
Correctly handle cascading
include
andignore
.Previously Biome incorrectly included files that were included at tool level and ignored at global level.
In the following example,file.js
was formatted when it should have been ignored.
Now, Biome correctly ignores the directory./src/sub/
.❯ tree src src └── sub └── file.js ❯ cat biome.json { "files": { "ignore": ["./src/sub/"] }, "formatter": { "include": ["./src"] } }
Contributed by @Conaclos
-
Don't emit verbose warnings when a protected file is ignored.
Some files, such as
package.json
andtsconfig.json
, are protected.
Biome emits a verbose warning when it encounters a protected file.Previously, Biome emitted this verbose warning even if the file was ignored by the configuration.
Now, it doesn't emit verbose warnings for protected files that are ignored.Contributed by @Conaclos
-
overrides
no longer affect which files are ignored. Contributed by @Conaclos -
The file
biome.json
can't be ignored anymore. Contributed by @ematipico -
Fix #1541 where the content of protected files wasn't returned to
stdout
. Contributed by @ematipico -
Don't handle CSS files, the formatter isn't ready yet. Contributed by @ematipico
Configuration
Bug fixes
-
Fix 1440, a case where
extends
andoverrides
weren't correctly emitting the final configuration. Contributed by @arendjr -
Correctly handle
include
whenignore
is set (#1468). Contributed by @ConaclosPreviously, Biome ignored
include
ifignore
was set.
Now, Biome check bothinclude
andignore
.
A file is processed if it is included and not ignored.
Ifinclude
is not set all files are considered included.
Formatter
Bug fixes
-
Fix placement of comments before
*
token in generator methods with decorators. #1537 Contributed by @ah-yu -
Fix #1406. Ensure comments before the
async
keyword are placed before it. Contributed by @ah-yu -
Fix #1172. Fix placement of line comment after function expression parentheses, they are now attached to first statement in body. Contributed by @kalleep
-
Fix #1511 that made the JavaScript formatter crash. Contributed @Conaclos
Linter
Enhancements
-
Add an unsafe code fix for noConsoleLog. Contributed by @vasucp1207
-
useArrowFunction no longer reports function in
extends
clauses or in anew
expression. Contributed by @ConaclosThis cases requires the presence of a prototype.
Bug fixes
-
The fix of useArrowFunction now adds parentheses around the arrow function in more cases where it is needed (#1524).
A function expression doesn't need parentheses in most expressions where it can appear.
This is not the case with the arrow function.
We previously added parentheses when the function appears in a call or member expression.
We now add parentheses in binary-like expressions and other cases where they are needed, hopefully covering all cases.Previously:
- f = f ?? function() {}; + f = f ?? () => {};
Now:
- f = f ?? function() {}; + f = f ?? (() => {});
Contributed by @Conaclos
-
Fix #1514. Fix autofix suggestion to avoid the syntax error in
no_useless_fragments
. Contributed by @togami2864
What's Changed
Other changes
- docs(website): sync minor differences with the english version by @makotot in #1515
- docs(website): update
biomejs/setup-biome@v2
by @Marukome0743 in #1520 - refactor(cli): some cleanup by @ematipico in #1526
- docs(website): fix code snippets that take more space by @vasucp1207 in #1529
- chore: add myself as a maintainer by @vasucp1207 in #1532
- doc(website): upgrade doc for cn by @eryue0220 in #1525
- refactor(linter): add source metadata by @Conaclos in #1519
- docs(website): add git-hook Japanese translation by @OldBigBuddha in #1503
- Arendjr maintainer by @arendjr in #1540
- fix(docs): update $schema url by @malobre in #1539
- docs(pt-br): translated git hooks page by @CookieDasora in #1498
- feat: HTML grammar by @ematipico in #1544
- feat: foudations for migration from prettier by @ematipico in #1545
- chore: move
nhedger
to core contributors by @nhedger in #1557
New Contributors
- @makotot made their first contribution in #1515
- @ah-yu made their first contribution in #1500
- @OldBigBuddha made their first contribution in #1503
- @malobre made their first contribution in #1539
Full Changelog: cli/v1.5.1...cli/v1.5.2