CLI v1.8.1
CLI
Bug fixes
- Fix #3069, prevent overwriting paths when using
--staged
or--changed
options. Contributed by @unvalley - Fix a case where the file link inside a diagnostic wasn't correctly displayed inside a terminal run by VSCode. Contributed by @uncenter
Configuration
Bug fixes
- Fix #3067, by assigning the correct default value to
indentWidth
. Contributed by @ematipico
Formatter
Bug fixes
- Fix the bug where whitespace after the & character in CSS nesting was incorrectly trimmed, ensuring proper targeting of child classes #3061. Contributed by @denbezrukov
- Fix #3068 where the CSS formatter was inadvertently converting variable declarations and function calls to lowercase. Contributed by @denbezrukov
- Fix the formatting of CSS grid layout properties. Contributed by @denbezrukov
Linter
Bug fixes
-
The
noEmptyBlock
css lint rule now treats empty blocks containing comments as valid ones. Contributed by @Sec-ant -
useLiteralKeys no longer reports quoted member names (#3085).
Previously useLiteralKeys reported quoted member names that can be unquoted.
For example, the rule suggested the following fix:- const x = { "prop": 0 }; + const x = { prop: 0 };
This conflicted with the option quoteProperties of our formatter.
The rule now ignores quoted member names.
Contributed by @Conaclos
-
noEmptyInterface now ignores empty interfaces in ambient modules (#3110). Contributed by @Conaclos
-
noUnusedVariables and noUnusedFunctionParameters no longer report the parameters of a constructor type (#3135).
Previously,
arg
was reported as unused in a constructor type like:export type Classlike = new (arg: unknown) => string;
Contributed by @Conaclos
-
noStringCaseMismatch now ignores escape sequences (#3134).
The following code is no longer reported by the rule:
s.toUpperCase() === "\u001b";
Contributed by @Conaclos
Parser
New features
- Implemented CSS Unknown At-Rule parsing, allowing the parser to gracefully handle unsupported or unrecognized CSS at-rules. Contributed by @denbezrukov
Bug fixes
- Fix #3055 CSS: Layout using named grid lines is now correctly parsed. Contributed by @denbezrukov
- Fix #3091. Allows the parser to handle nested style rules and at-rules properly, enhancing the parser's compatibility with the CSS Nesting Module. Contributed by @denbezrukov
Other changes
- fix(docs): incorrect snippets by @ematipico in #3059
- feat(grit): parse Grit literal snippets by @arendjr in #3051
- chore: delete stale snapshots by @siosio34 in #3062
- fix(noUnusedFunctionParameters): fix typo in documentation code example by @printfn in #3065
- feat(graphql_parser): parse enum extension by @vohoanglong0107 in #3044
- docs(useNamingConvention): fix conventions example by @Conaclos in #3070
- docs(readme): fix replace
apply
bywrite
option by @Jayllyz in #3071 - refactor: use --write instead of --apply in CLI advices by @Conaclos in #3083
- fix:
use-adjacent-overload-signature
diagnostic by @chansuke in #3095 - chore: fix JSON schema for biome config file by @Conaclos in #3109
- chore(deps): update dependency dprint to v0.46.1 by @renovate in #3042
- fix(deps): update rust crates by @renovate in #3041
- refactor(lint): add SonarJs and UnusedImports rule sources by @Conaclos in #3128
- fix(graphql_parser): allow backlash in block string by @vohoanglong0107 in #3113
- feat(graphql_parser): parse input object type extension by @vohoanglong0107 in #3112
- feat(biome_css_analyzer): implement selector-pseudo-class-no-unknown by @tunamaguro in #3034
- fix(deps): update rust crate roaring to 0.10.5 by @renovate in #3144
- chore(deps): update rust crate regex to 1.10.5 by @renovate in #3141
- chore(deps): update rust crate enumflags2 to 0.7.10 by @renovate in #3139
- chore(deps): update dependency dprint to v0.46.2 by @renovate in #3138
- chore(deps): update rust docker tag to v1.78.0 by @renovate in #3147
- ci: add check for rules docs by @ematipico in #3150
- ci: add check for rules docs by @ematipico in #3152
- chore: format
package.json
like npm does by @ematipico in #3155 - feat(biome_css_analyzer): noShorthandPropertyOverrides by @neokidev in #2958
- feat(biome_css_analyzer):
useConsistentGridAreas
by @chansuke in #2940
New Contributors
Full Changelog: cli/v1.8.0...cli/v1.8.1