CLI
New features
-
Added support for custom GritQL definitions, including:
- Pattern and predicate definitions: https://docs.grit.io/guides/patterns
- Function definitions: https://docs.grit.io/language/functions#function-definitions
Contributed by @arendjr
Bug fixes
- Fix #3917, where the fixed files were incorrectly computed. Contributed by @ematipico
- Fixed an issue that caused GritQL
contains
queries to report false positives when the matched
node appeared inside a sibling node. Contributed by @arendjr
Editors
Bug fixes
-
Fix #3923. Now the
.editorconfig
is correctly parsed by the LSP, and the options are correctly applied to files when formatting is triggered.
Plus, the Biome LSP now watches for any change to the.editorconfig
, and updates the formatting settings. -
Reduced the number of log files generated by the LSP server. Now the maximum number of logs saved on disk is seven. Contributed by @ematipico
-
Fix the code actions capabilities available in the LSP Biome server. Before, the LSP was using the default capabilities, which resulted in pulling code actions even when they were disabled by the editor.
This means that the code actions are pulled by the client only when the editor enables
quickfix.biome
,source.organizeImports.biome
andsource.fixAll.biome
.Now, if you enable
organizeImports.enabled: true
in thebiome.json
, and then you configure your editor with the following code actionsource.organizeImports.biome: false
, the editor won't sort the imports.Contributed by @ematipico
Linter
New features
- Add nursery/noMissingVarFunction. Contributed by @michellocana
- Add nursery/useComponentExportOnlyModules. Use this rule in React projects to enforce a code styling that fits React Refresh. Contributed by @GunseiKPaseri
Bug fixes
-
noLabelWithoutControl now accept JSX expression as label value (#3875). Contributed by @Conaclos
-
useFilenamingConvention no longer suggests names with a disallowed case (#3952). Contributed by @Conaclos
-
useFilenamingConvention now recognizes file names starting with ASCII digits as lowercase (#3952).
Thus,
2024-09-17-filename
,2024_09_17_filename
and20240917FileName
are inkebab-case
,snake_case
, andcamelCase
respectively.Contributed by @Conaclos
-
useFilenamingConvention now applies the configured formats to the file extensions (#3650). Contributed by @Conaclos
Parser
Bug fixes
-
useStrictMode now reports Script files with some directives, but without the
use strict
directive. Contributed by @Conaclos -
The CSS parser now accepts the characters U+FFDCF and U+FFFD in identifiers. Contributed by @Conaclos
What's Changed
Other changes
- chore: update biome version of rules by @nhedger in #3901
- chore(ci): add gh token for setup-rust by @Jayllyz in #3902
- fix(deps): update rust crates by @renovate in #3910
- chore(deps): update rust crate serde_json to 1.0.128 by @renovate in #3909
- feat(format/grit): grit formatter initial configuration by @branberry in #3885
- docs(readme): add zh-tw readme translation by @jacklee814 in #3894
- chore(deps): update dependency eslint to v9.10.0 by @renovate in #3913
- chore(deps): update rust crate tokio to 1.40.0 by @renovate in #3918
- chore(deps): update rust docker tag to v1.81.0 by @renovate in #3919
- fix: re-implement #3856 to improve correctness by @anthonyshew in #3865
- chore(deps): update rust crate insta to 1.40.0 by @renovate in #3916
- chore(deps): update rust crate dashmap to 6.1.0 by @renovate in #3915
- chore(deps): update dependency @typescript-eslint/eslint-plugin to v8.5.0 by @renovate in #3912
- chore(deps): update @biomejs packages by @renovate in #3911
- chore(deps): update rust crate serde to 1.0.210 by @renovate in #3906
- chore(deps): update rust crate anyhow to 1.0.89 by @renovate in #3905
- fix(parser/html): fix whitespace being lexed as html literal by @dyc3 in #3908
- fix(config): handle
unset
andoff
values in editorconfig files by @dyc3 in #3907 - fix: preserve other children in
useConsistentCurlyBraces
by @suzak in #3925 - test: fix outdated snapshot tests by @ematipico in #3953
- feat(format/html): port
JsxChildList
formatting toHtmlElementList
by @dyc3 in #3782 - chore(deps): update dependency vite to v5.4.6 [security] by @renovate in #3963
- fix(parser/html): check void element names case insensitively by @dyc3 in #3959
- fix(format/html): keep single quotes if string contains a double quote by @dyc3 in #3960
- fix(format/html): fix doctype formatting by @dyc3 in #3961
- feat(markdown): support markdown grammar code generation by @suxin2017 in #3775
- feat(parser/html): lex and parse unquoted attribute values by @dyc3 in #3951
- feat(parser/html): parse doctype declarations by @dyc3 in #3962
- feat(parser/html): handle script and style tags by @dyc3 in #3970
- build: upgrade to Rust 1.81 by @Conaclos in #3972
- feat(html): add
experimental-html
feature flag to enable html file handler by @dyc3 in #3967 - feat(grit): support for Grit pattern, predicate and function definitions by @arendjr in #3983
- feat(grit): implement Grit built-ins by @arendjr in #3987
- fix(grit): fix node walking by @arendjr in #3988
New Contributors
- @branberry made their first contribution in #3885
- @jacklee814 made their first contribution in #3894
- @suzak made their first contribution in #3925
Full Changelog: cli/v1.9.1...cli/v1.9.2