Analyzer
Enhancements
- Add a code action to replace
rome-ignore
withbiome-ignore
. Usebiome check --apply-unsafe
to update all the comments. The action is not bulletproof, and it might generate unwanted code, that's why it's unsafe action.
CLI
Enhancements
- Biome now reports a diagnostics when a
rome.json
file is found. biome migrate --write
createsbiome.json
fromrome.json
, but it won't delete therome.json
file.
Bug fixes
- Biome uses
biome.json
first, then it attempts to userome.json
. - Fix a case where Biome couldn't compute correctly the ignored files when the VSC integration is enabled.
Configuration
Editors
Bug fixes
- The LSP now uses its own socket and won't rely on Biome's socket. This fixes some cases where users were seeing
multiple servers in therage
output.
Formatter
Enhancements
- You can use
// biome-ignore
as suppression comment. - The
// rome-ignore
suppression is deprecated.
JavaScript APIs
Linter
Enhancements
-
useTemplate now reports all string concatenations.
Previously, the rule ignored concatenation of a value and a newline or a backquote.
For example, the following concatenation was not reported:v + "\n"; "`" + v + "`";
The rule now reports these cases and suggests the following code fixes:
- v + "\n"; + `${v}\n`; - v + "`"; + `\`${v}\``;
-
useExponentiationOperator suggests better code fixes.
The rule now preserves any comment preceding the exponent,
and it preserves any parenthesis around the base or the exponent.
It also adds spaces around the exponentiation operator**
,
and always adds parentheses for pre- and post-updates.- Math.pow(a++, /**/ (2)) + (a++) ** /**/ (2)
-
You can use
// biome-ignore
as suppression comment. -
The
// rome-ignore
suppression is deprecated. -
noUselessConstructor now ignores decorated classes and decorated parameters.
The rule now gives suggestions instead of safe fixes when parameters are annotated with types.
Bug fixes
-
Fix #80, making noDuplicateJsxProps case-insensitive.
Some frameworks, such as Material UI, rely on the case-sensitivity of JSX properties.
For example, TextField has two properties with the same name, but distinct cases:<TextField inputLabelProps="" InputLabelProps=""></TextField>
-
Fix #138
noCommaOperator now correctly ignores all use of comma operators inside the update part of a
for
loop.
The following code is now correctly ignored:for ( let i = 0, j = 1, k = 2; i < 100; i++, j++, k++ ) {}
-
Fix rome#4713.
Previously, useTemplate made the following suggestion:
- a + b + "px" + `${a}${b}px`
This breaks code where
a
andb
are numbers.Now, the rule makes the following suggestion:
- a + b + "px" + `${a + b}px`
-
Fix rome#4109
Previously, useTemplate suggested an invalid code fix when a leading or trailing single-line comment was present:
// leading comment - 1 /* inner comment */ + "+" + 2 // trailing comment + `${// leading comment + 1 /* inner comment */}+${2 //trailing comment}` // trailing comment
Now, the rule correctly handle this case:
// leading comment - 1 + "+" + 2 // trailing comment + `${1}+${2}` // trailing comment
As a sideeffect, the rule also suggests the removal of any inner comments.
-
Fix rome#3850
Previously useExponentiationOperator suggested invalid code in a specific edge case:
- 1 +Math.pow(++a, 2) + 1 +++a**2
Now, the rule properly adds parentheses:
- 1 +Math.pow(++a, 2) + 1 +(++a) ** 2
-
Fix #106
noUndeclaredVariables now correctly recognizes some TypeScript types such as
Uppercase
. -
Fix rome#4616
Previously noUnreachableSuper reported valid codes with complex nesting of control flow structures.
What's Changed
- blog: mention new features in first migration step by @Vivalldi in #84
- fix(website): avatar overlapping with header nav by @lutaok in #82
- fix(formatter): respect
IndentWidth
inIndentStyle::Tab
by @magic-akari in #86 - fix(lint/useTemplate): preserve leading non-string addition by @Conaclos in #70
- fix: update remaining discord links by @Conaclos in #90
- docs(CONTRIBUTING): update changelog guidelines by @Conaclos in #91
- small typo fix by @jharrell in #94
- ci: extract changelog for GitHub release notes by @Conaclos in #92
- fix(lint/noDuplicateJsxProps): make the rule case-sensitive by @Conaclos in #100
- fix(lint/noUndeclaredVariables): recognize
Uppercase
by @Conaclos in #109 - docs: fix 'performance reason' typo everywhere left by @jrysana in #110
- chore: rust 1.72.0 by @ematipico in #111
- refactor(website): use starlight by @ematipico in #102
- docs(website): fix broken links on getting-started by @vinnyA3 in #117
- fix(lint/useTemplate): correctly handle comments by @Conaclos in #114
- docs/fix-analyzer-opt-in-reference by @stephwestgarth in #122
- refactor(utils): remove utils::to_camel_case by @Conaclos in #123
- feat(cli): emit warning when
rome.json
file is found by @ematipico in #107 - fix: docs typo by @akash1412 in #126
- fix(website): broken rule links on
biome-v1
blog page by @GabenGar in #127 - refactor(analyzer): avoid cloning and redundant checks by @Conaclos in #124
- fix: restore "nursery end" comment in
categories.rs
by @unvalley in #130 - fix(website/playground): fix missing scroll by @Levieber in #133
- fix(docs): a bunch of broken links, not all of them by @ematipico in #142
- fix: use
biome.json
instead by @ematipico in #140 - feat: migrate
rome.json
tobiome.json
by @ematipico in #144 - docs: fix broken links in CONTRIBUTING.md by @nissy-dev in #147
- docs: Update README.md by @nissy-dev in #149
- fix(lint/useExponentiationOperator): avoid incorrect code fixes by @Conaclos in #121
- fix(lint/noUnreachableSuper): handle complex CFG by @Conaclos in #97
- fix(lint/noCommaOperator): ignore update part of for loops by @Conaclos in #152
- fix: support deno by @zuisong in #151
- fix: support deno by @zuisong in #153
- fix(cli): correctly compute ignored files by @ematipico in #150
- refactor(lint/noUselessConstructor): reduce false positives by @Conaclos in #158
- feat:
biome-ignore
as suppression comment by @ematipico in #163 - ci: run action only from own branches by @ematipico in #167
- feat(lint): useCollapsedElseIf by @n-gude in #160
- feat: create action for replacing outdated suppression comments by @ematipico in #166
- release: 1.1.0 by @ematipico in #155
New Contributors
- @Vivalldi made their first contribution in #84
- @lutaok made their first contribution in #82
- @magic-akari made their first contribution in #86
- @jharrell made their first contribution in #94
- @jrysana made their first contribution in #110
- @vinnyA3 made their first contribution in #117
- @stephwestgarth made their first contribution in #122
- @akash1412 made their first contribution in #126
- @GabenGar made their first contribution in #127
- @unvalley made their first contribution in #130
- @Levieber made their first contribution in #133
- @zuisong made their first contribution in #151
- @n-gude made their first contribution in #160
Full Changelog: lsp/v1.0.1...lsp/v1.2.0