cli/v1.2.0
版本发布时间: 2023-09-15 22:13:55
biomejs/biome最新发布版本:js-api/v0.7.1(2024-10-02 00:17:16)
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
biomejs#88 by @kyu08 in https://github.com/biomejs/biome/pull/170 - feat: rename rome_analyze -> biome_analyze #88 by @ekusiadadus in https://github.com/biomejs/biome/pull/192
- Updated the linter rules link by @buntured in https://github.com/biomejs/biome/pull/189
- Update NumberOfRules.astro by @buntured in https://github.com/biomejs/biome/pull/176
- docs: add bun commands to getting started guide by @jakeboone02 in https://github.com/biomejs/biome/pull/188
- fix: code generation by @ematipico in https://github.com/biomejs/biome/pull/194
- chore: rename rome_text_* to biome_text_* by @nissy-dev in https://github.com/biomejs/biome/pull/198
- feat(lint/noConfusingVoidType): add no-confusing-void-type by @shulandmimi in https://github.com/biomejs/biome/pull/184
- chore: rename
rome_js_unicode_table
tobiome_js_unicode_table
biomejs#88 by @kyu08 in https://github.com/biomejs/biome/pull/205 - chore: rename some crates by @nissy-dev in https://github.com/biomejs/biome/pull/201
- chore: rename rome_diagnostics by @nissy-dev in https://github.com/biomejs/biome/pull/207
- fix useLiteralKeys bug with empty string key by @ssssota in https://github.com/biomejs/biome/pull/203
- fix(vscode): disable extension if required config file is missing by @nhedger in https://github.com/biomejs/biome/pull/210
- chore: rename
rome_cli
tobiome_cli
by @nhedger in https://github.com/biomejs/biome/pull/211 - chore: rename some crates by @nissy-dev in https://github.com/biomejs/biome/pull/212
- chore: update links displayed in
biome init
, the previous were broken by @WagnerMoreira in https://github.com/biomejs/biome/pull/213 - feat(lint/useIsNan): add code fix action by @victor-teles in https://github.com/biomejs/biome/pull/125
- chore: rename some crates by @nissy-dev in https://github.com/biomejs/biome/pull/216
- chore: rename some crates by @nissy-dev in https://github.com/biomejs/biome/pull/218
- chore: rename some crates by @nissy-dev in https://github.com/biomejs/biome/pull/220
- chore: rename
rome_js_transform
androme_js_parser
tobiome_*
by @kyu08 in https://github.com/biomejs/biome/pull/224 - Update configuration.mdx by @dinckelman in https://github.com/biomejs/biome/pull/226
- fix(lint/noConfusingVoidType): separate invalid examples by @Conaclos in https://github.com/biomejs/biome/pull/233
- feat(vscode): lower minimum engine version to
1.80.0
by @nhedger in https://github.com/biomejs/biome/pull/235 - chore: improve vscode extension debug dx by @nhedger in https://github.com/biomejs/biome/pull/221
- chore: rename
rome_formatter
androme_formatter_test
tobiome_*
by @nhedger in https://github.com/biomejs/biome/pull/223 - chore(vscode): switch from
npm
topnpm
by @nhedger in https://github.com/biomejs/biome/pull/219 - docs: add section for Vue and Svelte by @ematipico in https://github.com/biomejs/biome/pull/238
- fix(analyzer): add external module declaration by @denbezrukov in https://github.com/biomejs/biome/pull/242
- chore: rename some crates by @nissy-dev in https://github.com/biomejs/biome/pull/241
- docs: rename rome to biome by @DavidSint in https://github.com/biomejs/biome/pull/246
- ci(release_lsp): fix vscode extension build by @nhedger in https://github.com/biomejs/biome/pull/249
- fix(biome-lsp): only filter quickactions when action category is 'quickfix.biome' by @victor-teles in https://github.com/biomejs/biome/pull/248
- chore: rename rome_js_analyze to biome_js_analyze by @Conaclos in https://github.com/biomejs/biome/pull/250
- chore: rename some crates by @nissy-dev in https://github.com/biomejs/biome/pull/251
- ci(release_lsp): fix extension packaging by @nhedger in https://github.com/biomejs/biome/pull/253
- ci: update workflow deps and cancel jobs on PR update by @Conaclos in https://github.com/biomejs/biome/pull/261
- chore: update contribution links by @ematipico in https://github.com/biomejs/biome/pull/277
- fix(vscode): server bin path resolution by @nhedger in https://github.com/biomejs/biome/pull/227
- fix(cli): set the right name for binary executable by @NumberOneBot in https://github.com/biomejs/biome/pull/278
New Contributors
- @kyu08 made their first contribution in https://github.com/biomejs/biome/pull/170
- @buntured made their first contribution in https://github.com/biomejs/biome/pull/189
- @jakeboone02 made their first contribution in https://github.com/biomejs/biome/pull/188
- @shulandmimi made their first contribution in https://github.com/biomejs/biome/pull/184
- @ssssota made their first contribution in https://github.com/biomejs/biome/pull/203
- @nhedger made their first contribution in https://github.com/biomejs/biome/pull/210
- @denbezrukov made their first contribution in https://github.com/biomejs/biome/pull/214
- @WagnerMoreira made their first contribution in https://github.com/biomejs/biome/pull/213
- @victor-teles made their first contribution in https://github.com/biomejs/biome/pull/125
- @dinckelman made their first contribution in https://github.com/biomejs/biome/pull/226
- @DavidSint made their first contribution in https://github.com/biomejs/biome/pull/246
- @NumberOneBot made their first contribution in https://github.com/biomejs/biome/pull/278
Full Changelog: https://github.com/biomejs/biome/compare/cli/v1.1.2...cli/v1.2.0
1、 biome-darwin-arm64 12.34MB
2、 biome-darwin-x64 12.96MB
3、 biome-linux-arm64 12.91MB
4、 biome-linux-x64 14.57MB
5、 biome-win32-arm64.exe 14.47MB
6、 biome-win32-x64.exe 17.41MB