cli/v1.6.4-nightly.a995ada
版本发布时间: 2024-04-06 23:48:05
biomejs/biome最新发布版本:js-api/v0.7.1(2024-10-02 00:17:16)
Analyzer
Bug fixes
- Now Biome can detect the script language in Svelte and Vue script blocks more reliably (#2245). Contributed by @Sec-ant
CLI
Bug fixes
- Biome now tags the diagnostics emitted by
organizeImports
andformatter
with correct severity levels, so they will be properly filtered by the flag--diagnositic-level
(#2288). Contributed by @Sec-ant - Biome now correctly filters out files that are not present in the current directory when using the
--changed
flag #1996.
New features
-
Add a command to migrate from ESLint
@biomejs/biome migrate eslint
allows you to migrate an ESLint configuration to Biome. The command supports legacy ESLint configurations and new flat ESLint configurations. Legacy ESLint configurations using the YAML format are not supported.When loading a legacy ESLint configuration, Biome resolves the
extends
field. It resolves both shared configurations and plugin presets! To do this, it invokes NodeJS.Biome relies on the metadata of its rules to determine the equivalent rule of an ESLint rule. A Biome rule is either inspired or roughly identical to an ESLint rules. By default, inspired and nursery rules are excluded from the migration. You can use the CLI flags
--include-inspired
and--include-nursery
to migrate them as well.Note that this is a best-effort approach. You are not guaranteed to get the same behavior as ESLint.
Given the following ESLint configuration:
{ "ignore_patterns": ["**/*.test.js"], "globals": { "var2": "readonly" }, "rules": { "eqeqeq": "error" }, "overrides": [{ "files": ["lib/*.js"], "rules": { "default-param-last": "off" } }] }
@biomejs/biome migrate eslint --write
changes the Biome configuration as follows:{ "linter": { "rules": { "recommended": false, "suspicious": { "noDoubleEquals": "error" } } }, "javascript": { "globals": ["var2"] }, "overrides": [{ "include": ["lib/*.js"], "linter": { "rules": { "style": { "useDefaultParameterLast": "off" } } } }] }
Also, if the working diretcory contains
.eslintignore
, then Biome migrates the glob patterns. Nested.eslintignore
in subdirectories and negated glob patterns are not supported.If you find any issue, please don't hesitate to report them.
Contributed by @Conaclos
Enhancements
-
Improve support of
.prettierignore
when migrating from PrettierNow, Biome translates most of the glob patterns in
.prettierignore
to the equivalent Biome ignore pattern. Only negated glob patterns are not supported.Contributed by @Conaclos
Configuration
Enhancements
-
Biome now displays the location of a parsing error for its configuration file (#1627).
Previously, when Biome encountered a parsing error in its configuration file, it didn't indicate the location of the error. It now displays the name of the configuration file and the range where the error occurred.
Contributed by @Conaclos
Editors
Formatter
JavaScript APIs
Linter
New features
-
Add a new option
ignoreReact
to noUnusedImports.When
ignoreReact
is enabled, Biome ignores imports ofReact
from thereact
package. The option is disabled by default.Contributed by @Conaclos
-
Implement #2043: The React rule
useExhaustiveDependencies
is now also compatible with Preact hooks imported frompreact/hooks
orpreact/compat
. Contributed by @arendjr
Enhancements
Bug fixes
- Lint rules
useNodejsImportProtocol
,useNodeAssertStrict
,noRestrictedImports
,noNodejsModules
will no longer checkdeclare module
statements anymore. Contributed by @Sec-ant
Parser
What's Changed
Other changes
- chore: derive
Diagnostic
onenum
by @arendjr in https://github.com/biomejs/biome/pull/2282 - chore(deps): update dependency vite to v5.1.7 [security] by @renovate in https://github.com/biomejs/biome/pull/2290
- feat(css_formatter): ValueListLayout::SingleLine by @denbezrukov in https://github.com/biomejs/biome/pull/2226
- Describe multi-root workspace limitation in docs by @smikitky in https://github.com/biomejs/biome/pull/2297
- refactor(project): new crate biome_configuration by @unvalley in https://github.com/biomejs/biome/pull/2269
- refactor(biome_deserialize): replace
is_type()
withvisitable_type()
by @Conaclos in https://github.com/biomejs/biome/pull/2310 - feat: graphql lexer by @vohoanglong0107 in https://github.com/biomejs/biome/pull/2271
- docs: add warning around nested config by @ematipico in https://github.com/biomejs/biome/pull/2318
- feat(cli): generic reporter APIs by @ematipico in https://github.com/biomejs/biome/pull/853
- fix(js_analyzer): add graphics-symbol role by @drwpow in https://github.com/biomejs/biome/pull/2294
New Contributors
- @smikitky made their first contribution in https://github.com/biomejs/biome/pull/2297
- @castarco made their first contribution in https://github.com/biomejs/biome/pull/2319
- @drwpow made their first contribution in https://github.com/biomejs/biome/pull/2294
Full Changelog: https://github.com/biomejs/biome/compare/cli/v1.6.4...cli/v1.6.4-nightly.a995ada
1、 biome-darwin-arm64 17.17MB
2、 biome-darwin-x64 18.57MB
3、 biome-linux-arm64 18.24MB
4、 biome-linux-x64 20.53MB
5、 biome-win32-x64.exe 23.3MB
6、 biome-win32-arm64.exe 19.76MB
7、 biome-linux-arm64-musl 16.27MB
8、 biome-linux-x64-musl 19.86MB