Releases: biomejs/biome
VSCode Extension v1.4.0
CLI
New features
- Add new options to customize the behaviour the formatter based on the language of the file
--json-formatter-enabled
--json-formatter-indent-style
--json-formatter-indent-size
--json-formatter-line-width
--javascript-formatter-enabled
--javascript-formatter-indent-style
--javascript-formatter-indent-size
--javascript-formatter-line-width
Bug fixes
- Fix a bug where
--errors-on-warning
didn't work when runningbiome ci
command.
Configuration
New features
- Add new options to customize the behaviour of the formatter based on the language of the file
json.formatter.enabled
json.formatter.indentStyle
json.formatter.indentSize
json.formatter.lineWidth
javascript.formatter.enabled
javascript.formatter.indentStyle
javascript.formatter.indentSize
javascript.formatter.lineWidth
Linter
Promoted rules
New rules are incubated in the nursery group.
Once stable, we promote them to a stable group.
The following rules are promoted:
- a11y/noAriaUnsupportedElements
- a11y/noNoninteractiveTabindex
- a11y/noRedundantRoles
- a11y/useValidAriaValues
- complexity/noBannedTypes
- complexity/noStaticOnlyClass
- complexity/noUselessEmptyExport
- complexity/noUselessThisAlias
- correctness/noConstantCondition
- correctness/noNonoctalDecimalEscape
- correctness/noSelfAssign
- style/useLiteralEnumMembers
- style/useNamingConvention
- suspicious/noControlCharactersInRegex
- suspicious/noUnsafeDeclarationMerging
- suspicious/useGetterReturn
New rules
- Add noConfusingVoidType rule. The rule reports the unusual use of the
void
type. Contributed by @shulandmimi
Removed rules
-
Remove noConfusingArrow.
Code formatters, such as prettier and Biome, always adds parentheses around the parameter or the body of an arrow function.
This makes the rule useless.Contributed by @Conaclos
Enhancements
-
noFallthroughSwitchClause now relies on control flow analysis to report most of switch clause fallthrough. Contributed by @Conaclos
-
noAssignInExpressions no longer suggests code fixes. Most of the time the suggestion didn't match users' expectations. Contributed by @Conaclos
-
noUselessConstructor no longer emits safe code fixes. Contributed by @Conaclos
All code fixes are now emitted as unsafe code fixes.
Removing a constructor can change the behavior of a program. -
useCollapsedElseIf now only provides safe code fixes. Contributed by @Conaclos
-
noUnusedVariables now reports more cases.
The rule is now able to ignore self-writes.
For example, the rule reports the following unused variable:let a = 0; a++; a += 1;
The rule is also capable of detecting an unused declaration that uses itself.
For example, the rule reports the following unused interface:interface I { instance(): I }
Finally, the rule now ignores all TypeScript declaration files,
including global declaration files.Contributed by @Conaclos
Bug fixes
-
Fix #182, making useLiteralKeys retains optional chaining. Contributed by @denbezrukov
-
Fix #168, fix useExhaustiveDependencies false positive case when stable hook is on a new line. Contributed by @denbezrukov
-
Fix #137, fix noRedeclare false positive case with TypeScript module declaration:
declare module '*.gif' { const src: string; } declare module '*.bmp' { const src: string; }
Contributed by @denbezrukov
-
Fix #258, fix noUselessFragments the case where the rule removing an assignment. Contributed by @denbezrukov
-
Fix #266, where
complexity/useLiteralKeys
emitted a code action with an invalid AST. Contributed by @ematipico -
Fix #105, removing false positives reported by noUnusedVariables.
The rule no longer reports the following used variable:
const a = f(() => a);
Contributed by @Conaclos
VSCode
Enhancements
-
Improve server binary resolution when using certain package managers, notably pnpm.
The new strategy is to point to
node_modules/.bin/biome
path,
which is consistent for all package managers.Contributed by @nhedger
What's Changed
- chore: rename
rome_flags
tobiome_flags
,rome_aria_metadata
tobiome_aria_metadata
androme_aria
tobiome_aria
#88 by @kyu08 in #170 - feat: rename rome_analyze -> biome_analyze #88 by @ekusiadadus in #192
- Updated the linter rules link by @buntured in #189
- Update NumberOfRules.astro by @buntured in #176
- docs: add bun commands to getting started guide by @jakeboone02 in #188
- fix: code generation by @ematipico in #194
- chore: rename rome_text_* to biome_text_* by @nissy-dev in #198
- feat(lint/noConfusingVoidType): add no-confusing-void-type by @shulandmimi in #184
- chore: rename
rome_js_unicode_table
tobiome_js_unicode_table
#88 by @kyu08 in #205 - chore: rename some crates by @nissy-dev in #201
- chore: rename rome_diagnostics by @nissy-dev in #207
- fix useLiteralKeys bug with empty string key by @ssssota in #203
- fix(vscode): disable extension if required config file is missing by @nhedger in #210
- chore: rename
rome_cli
tobiome_cli
by @nhedger in #211 - chore: rename some crates by @nissy-dev in #212
- chore: update links displayed in
biome init
, the previous were broken by @WagnerMoreira in #213 - feat(lint/useIsNan): add code fix action by @victor-teles in #125
- chore: rename some crates by @nissy-dev in #216
- chore: rename some crates by @nissy-dev in #218
- chore: rename some crates by @nissy-dev in #220
- chore: rename
rome_js_transform
androme_js_parser
tobiome_*
by @kyu08 in #224 - Update configuration.mdx by @dinckelman in #226
- fix(lint/noConfusingVoidType): separate invalid examples by @Conaclos in #233
- feat(vscode): lower minimum engine version to
1.80.0
by @nhedger in #235 - chore: improve vscode extension debug dx by @nhedger in #221
- chore: rename
rome_formatter
androme_formatter_test
tobiome_*
by @nhedger in #223 - chore(vscode): switch from
npm
topnpm
by @nhedger in #219 - docs: add section for Vue and Svelte by @ematipico in #238
- fix(analyzer): add external module declaration by @denbezrukov in #242
- chore: rename some crates by @nissy-dev in #241
- docs: rename rome to biome by @DavidSint in #246
- ci(release_lsp): fix vscode extension build by @...
CLI v1.2.1
Configuration
- Fix an edge case where the formatter language configuration wasn't picked.
- Fix the configuration schema, where
json.formatter
properties weren't transformed in camel case.
What's Changed
Other changes
Full Changelog: cli/v1.2.0...cli/v1.2.1
CLI v1.2.0
CLI
New features
- Add new options to customize the behaviour the formatter based on the language of the file
--json-formatter-enabled
--json-formatter-indent-style
--json-formatter-indent-size
--json-formatter-line-width
--javascript-formatter-enabled
--javascript-formatter-indent-style
--javascript-formatter-indent-size
--javascript-formatter-line-width
Bug fixes
- Fix a bug where
--errors-on-warning
didn't work when runningbiome ci
command.
Configuration
New features
- Add new options to customize the behaviour of the formatter based on the language of the file
json.formatter.enabled
json.formatter.indentStyle
json.formatter.indentSize
json.formatter.lineWidth
javascript.formatter.enabled
javascript.formatter.indentStyle
javascript.formatter.indentSize
javascript.formatter.lineWidth
Linter
Promoted rules
New rules are incubated in the nursery group.
Once stable, we promote them to a stable group.
The following rules are promoted:
- a11y/noAriaUnsupportedElements
- a11y/noNoninteractiveTabindex
- a11y/noRedundantRoles
- a11y/useValidAriaValues
- complexity/noBannedTypes
- complexity/noStaticOnlyClass
- complexity/noUselessEmptyExport
- complexity/noUselessThisAlias
- correctness/noConstantCondition
- correctness/noNonoctalDecimalEscape
- correctness/noSelfAssign
- style/useLiteralEnumMembers
- style/useNamingConvention
- suspicious/noControlCharactersInRegex
- suspicious/noUnsafeDeclarationMerging
- suspicious/useGetterReturn
New rules
- Add noConfusingVoidType rule. The rule reports the unusual use of the
void
type. Contributed by @shulandmimi
Removed rules
-
Remove noConfusingArrow.
Code formatters, such as prettier and Biome, always adds parentheses around the parameter or the body of an arrow function.
This makes the rule useless.Contributed by @Conaclos
Enhancements
-
noFallthroughSwitchClause now relies on control flow analysis to report most of switch clause fallthrough. Contributed by @Conaclos
-
noAssignInExpressions no longer suggests code fixes. Most of the time the suggestion didn't match users' expectations. Contributed by @Conaclos
-
noUselessConstructor no longer emits safe code fixes. Contributed by @Conaclos
All code fixes are now emitted as unsafe code fixes.
Removing a constructor can change the behavior of a program. -
useCollapsedElseIf now only provides safe code fixes. Contributed by @Conaclos
-
noUnusedVariables now reports more cases.
The rule is now able to ignore self-writes.
For example, the rule reports the following unused variable:let a = 0; a++; a += 1;
The rule is also capable of detecting an unused declaration that uses itself.
For example, the rule reports the following unused interface:interface I { instance(): I }
Finally, the rule now ignores all TypeScript declaration files,
including global declaration files.Contributed by @Conaclos
Bug fixes
-
Fix #182, making useLiteralKeys retains optional chaining. Contributed by @denbezrukov
-
Fix #168, fix useExhaustiveDependencies false positive case when stable hook is on a new line. Contributed by @denbezrukov
-
Fix #137, fix noRedeclare false positive case with TypeScript module declaration:
declare module '*.gif' { const src: string; } declare module '*.bmp' { const src: string; }
Contributed by @denbezrukov
-
Fix #258, fix noUselessFragments the case where the rule removing an assignment. Contributed by @denbezrukov
-
Fix #266, where
complexity/useLiteralKeys
emitted a code action with an invalid AST. Contributed by https://github.com/ematipico -
Fix #105, removing false positives reported by noUnusedVariables.
The rule no longer reports the following used variable:
const a = f(() => a);
Contributed by @Conaclos
VSCode
Enhancements
-
Improve server binary resolution when using certain package managers, notably pnpm.
The new strategy is to point to
node_modules/.bin/biome
path,
which is consistent for all package managers.Contributed by @nhedger
What's Changed
- chore: rename
rome_flags
tobiome_flags
,rome_aria_metadata
tobiome_aria_metadata
androme_aria
tobiome_aria
#88 by @kyu08 in #170 - feat: rename rome_analyze -> biome_analyze #88 by @ekusiadadus in #192
- Updated the linter rules link by @buntured in #189
- Update NumberOfRules.astro by @buntured in #176
- docs: add bun commands to getting started guide by @jakeboone02 in #188
- fix: code generation by @ematipico in #194
- chore: rename rome_text_* to biome_text_* by @nissy-dev in #198
- feat(lint/noConfusingVoidType): add no-confusing-void-type by @shulandmimi in #184
- chore: rename
rome_js_unicode_table
tobiome_js_unicode_table
#88 by @kyu08 in #205 - chore: rename some crates by @nissy-dev in #201
- chore: rename rome_diagnostics by @nissy-dev in #207
- fix useLiteralKeys bug with empty string key by @ssssota in #203
- fix(vscode): disable extension if required config file is missing by @nhedger in #210
- chore: rename
rome_cli
tobiome_cli
by @nhedger in #211 - chore: rename some crates by @nissy-dev in #212
- chore: update links displayed in
biome init
, the previous were broken by @WagnerMoreira in #213 - feat(lint/useIsNan): add code fix action by @victor-teles in #125
- chore: rename some crates by @nissy-dev in #216
- chore: rename some crates by @nissy-dev in #218
- chore: rename some crates by @nissy-dev in #220
- chore: rename
rome_js_transform
androme_js_parser
tobiome_*
by @kyu08 in #224 - Update configuration.mdx by @dinckelman in #226
- fix(lint/noConfusingVoidType): separate invalid examples by @Conaclos in #233
- feat(vscode): lower minimum engine version to
1.80.0
by @nhedger in #235 - chore: improve vscode extension debug dx by @nhedger in #221
- chore: rename
rome_formatter
androme_formatter_test
tobiome_*
by @nhedger in #223 - chore(vscode): switch from
npm
topnpm
by @nhedger in #219 - docs: add section for Vue and Svelte by @ematipico in #238
- fix(analyzer): add external module declaration by @denbezrukov in #242
- chore: rename some crates by @nissy-dev in #241
- docs: rename rome to biome by @DavidSint in #246
- ci(release_lsp): fix vscode e...
VSCode Extension v1.3.20230915
Analyzer
CLI
Features
- Add new options to customize the behaviour the formatter based on the language of the file
--json-formatter-enabled
--json-formatter-indent-style
--json-formatter-indent-size
--json-formatter-line-width
--javascript-formatter-enabled
--javascript-formatter-indent-style
--javascript-formatter-indent-size
--javascript-formatter-line-width
Bug fixes
- Fix a bug where
--errors-on-warning
didn't work when runningbiome ci
command.
Configuration
Features
- Add new options to customize the behaviour of the formatter based on the language of the file
json.formatter.enabled
json.formatter.indentStyle
json.formatter.indentSize
json.formatter.lineWidth
javascript.formatter.enabled
javascript.formatter.indentStyle
javascript.formatter.indentSize
javascript.formatter.lineWidth
Editors
Formatter
JavaScript APIs
Linter
New features
- Add noConfusingVoidType rule. The rule reports the unusual use of the
void
type. Contributed by @shulandmimi
Enhancements
-
noFallthroughSwitchClause now relies on control flow analysis to report most of switch clause fallthrough. Contributed by @Conaclos
-
noAssignInExpressions no longer suggest code fixes. Most of the time the suggestion didn't match users' expectations. Contributed by @Conaclos
-
noUselessConstructor no longer emits safe code fixes. Contributed by @Conaclos
All code fixes are now emitted as unsafe code fixes.
Removing a constructor can change the behavior of a program. -
useCollapsedElseIf now only provides safe code fixes. Contributed by @Conaclos
-
noUnusedVariables now reports more cases.
The rule is now able to ignore self-writes.
For example, the rule reports the following unused variable:let a = 0; a++; a += 1;
The rule is also capable of detecting an unused declaration that uses itself.
For example, the rule reports the following unused interface:interface I { instance(): I }
Finally, the rule now ignores all TypeScript declaration files,
including global declaration files.Contributed by @Conaclos
-
Remove noConfusingArrow.
Code formatters, such as prettier and Biome, always adds parentheses around the parameter or the body of an arrow function.
This makes the rule useless.Contributed by @Conaclos
Bug fixes
-
Fix #182, making useLiteralKeys retains optional chaining. Contributed by @denbezrukov
-
Fix #168, fix useExhaustiveDependencies false positive case when stable hook is on a new line. Contributed by @denbezrukov
-
Fix #137, fix noRedeclare false positive case with TypeScript module declaration:
declare module '*.gif' { const src: string; } declare module '*.bmp' { const src: string; }
Contributed by @denbezrukov
-
Fix #258, fix noUselessFragments the case where the rule removing an assignment. Contributed by @denbezrukov
-
Fix #266, where
complexity/useLiteralKeys
emitted a code action with an invalid AST. Contributed by @ematipico -
Fix #105, removing false positives reported by noUnusedVariables.
The rule no longer reports the following used variable:
const a = f(() => a);
Contributed by @Conaclos
Parser
VSCode
What's Changed
Other changes
- chore: rename
rome_flags
tobiome_flags
,rome_aria_metadata
tobiome_aria_metadata
androme_aria
tobiome_aria
#88 by @kyu08 in #170 - feat: rename rome_analyze -> biome_analyze #88 by @ekusiadadus in #192
- Updated the linter rules link by @buntured in #189
- Update NumberOfRules.astro by @buntured in #176
- docs: add bun commands to getting started guide by @jakeboone02 in #188
- fix: code generation by @ematipico in #194
- chore: rename rome_text_* to biome_text_* by @nissy-dev in #198
- feat(lint/noConfusingVoidType): add no-confusing-void-type by @shulandmimi in #184
- chore: rename
rome_js_unicode_table
tobiome_js_unicode_table
#88 by @kyu08 in #205 - chore: rename some crates by @nissy-dev in #201
- chore: rename rome_diagnostics by @nissy-dev in #207
- fix useLiteralKeys bug with empty string key by @ssssota in #203
- fix(vscode): disable extension if required config file is missing by @nhedger in #210
- chore: rename
rome_cli
tobiome_cli
by @nhedger in #211 - chore: rename some crates by @nissy-dev in #212
- chore: update links displayed in
biome init
, the previous were broken by @WagnerMoreira in #213 - feat(lint/useIsNan): add code fix action by @victor-teles in #125
- chore: rename some crates by @nissy-dev in #216
- chore: rename some crates by @nissy-dev in #218
- chore: rename some crates by @nissy-dev in #220
- chore: rename
rome_js_transform
androme_js_parser
tobiome_*
by @kyu08 in #224 - Update configuration.mdx by @dinckelman in #226
- fix(lint/noConfusingVoidType): separate invalid examples by @Conaclos in #233
- feat(vscode): lower minimum engine version to
1.80.0
by @nhedger in #235 - chore: improve vscode extension debug dx by @nhedger in #221
- chore: rename
rome_formatter
androme_formatter_test
tobiome_*
by @nhedger in #223 - chore(vscode): switch from
npm
topnpm
by @nhedger in #219 - docs: add section for Vue and Svelte by @ematipico in #238
- fix(analyzer): add external module declaration by @denbezrukov in #242
- chore: rename some crates by @nissy-dev in #241
- refactor(lint/useCollapsedElseIf): remove unsafe code fixes by @Conaclos in #244
- docs: rename rome to biome by @DavidSint in #246
- ci(release_lsp): fix vscode extension build by @nhedger in #249
- fix(biome-lsp): only filter quickactions when action category is 'quickfix.biome' by @victor-teles in #248
- chore: rename rome_js_analyze to biome_js_analyze by @Conaclos in #250
- chore: rename some crates by @nissy-dev in #251
- ci(release_lsp): fix extension packaging by @nhedger in #253
- ci: update workflow deps and cancel jobs on PR update by @Conaclos in #261
- ci: cleanup cache when a PR is closed by @Conaclos in #262
- Revert "ci: cleanup cache when a PR is closed (#262)" by @Conaclos in #272
- chore: update contribution links by @ematipico in #277
- fix(vscode): server bin path resolution by @nhedger in #227
- fix(cli): set the right name for binary executable by @NumberOneBot in #278
New Contributors
- @kyu08 made their first contribution in #170
- @buntured made their first contribution in #189
- @jakeboone02 made their first contribution in #188
- @shulandmimi made their first contribution in #184
- @ssssota made their first contributi...
VSCode Extension v1.2.2
Analyzer
CLI
Configuration
Editors
Formatter
JavaScript APIs
Linter
Parser
VSCode
What's Changed
- refactor(lint/useNamingConvention): allow import namespace in PascalCase by @Conaclos in #174
- ci: install taplo binary by @ematipico in #181
- chore: rename rome_css_* to biome_css__* by @nissy-dev in #183
- release: 1.1.2 by @ematipico in #186
Full Changelog: cli/v1.1.1...lsp/v1.2.2
VSCode Extension v1.2.1
Analyzer
CLI
Configuration
Editors
Formatter
JavaScript APIs
Linter
Parser
VSCode
What's Changed
- fix: fix website links by @matejkrajcovic in #172
- feat: rename markup, test_utils... -> biome #88 by @ekusiadadus in #169
- docs: update 1.1.0 changelog entries by @Vivalldi in #173
- release: 1.1.1 by @ematipico in #179
New Contributors
- @matejkrajcovic made their first contribution in #172
- @ekusiadadus made their first contribution in #169
Full Changelog: cli/v1.1.0...lsp/v1.2.1
CLI v1.1.2
Editors
Bug fixes
- Fixed a case where an empty JSON file would cause the LSP server to crash.
Linter
Enhancements
-
useNamingConvention now accepts import namespaces in PascalCase and rejects export namespaces in CONSTANT_CASE.
The following code is now valid:
import * as React from "react";
And the following code is now invalid:
export * as MY_NAMESPACE from "./lib.js";
What's Changed
- refactor(lint/useNamingConvention): allow import namespace in PascalCase by @Conaclos in #174
- ci: install taplo binary by @ematipico in #181
- chore: rename rome_css_* to biome_css__* by @nissy-dev in #183
- release: 1.1.2 by @ematipico in #186
Full Changelog: cli/v1.1.1...cli/v1.1.2
CLI v1.1.1
Analyzer
Bug fixes
- The diagnostic for
// rome-ignore
suppression comment should not be a warning. A warning could block the CI, marking a gradual migration difficult. The code action that changes// rome-ignore
to// biome-ignore
is disabled as consequence.
What's Changed
- fix: fix website links by @matejkrajcovic in #172
- feat: rename markup, test_utils... -> biome #88 by @ekusiadadus in #169
- docs: update 1.1.0 changelog entries by @Vivalldi in #173
- release: 1.1.1 by @ematipico in #179
New Contributors
- @matejkrajcovic made their first contribution in #172
- @ekusiadadus made their first contribution in #169
Full Changelog: cli/v1.1.0...cli/v1.1.1
VSCode Extension v1.2.0
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
- @A...
CLI v1.1.0
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
- ...