cli/v1.8.2
版本发布时间: 2024-06-20 18:38:30
biomejs/biome最新发布版本:js-api/v0.7.1(2024-10-02 00:17:16)
CLI
Bug fixes
- Fix #3201 by correctly injecting the source code of the file when printing the diagnostics. Contributed by @ematipico
- Fix #3179 where comma separators are not correctly removed after running
biome migrate
and thus choke the parser. Contributed by @Sec-ant - Fix #3232 by correctly using the colors set by the user. Contributed by @ematipico
Enhancement
-
Reword the reporter message
No fixes needed
toNo fixes applied
.The former message is misleading when there're still errors or warnings in the files that should be taken care of manually. For example:
Checked 2 files in <TIME>. No fixes needed. Found 2 errors.
The new message suits better in these cases.
Contributed by @Sec-ant
Configuration
Bug fixes
-
Don't conceal previous overrides (#3176).
Previously, each override inherited the unset configuration of the base configuration. This means that setting a configuration in an override can be concealed by a subsequent override that inherits of the value from the base configuration.
For example, in the next example,
noDebugger
was disabled for theindex.js
file.{ "linter": { "rules": { "suspicious": { "noDebugger": "off" } } }, "overrides": [ { "include": ["index.js"], "linter": { "rules": { "suspicious": { "noDebugger": "warn" } } } }, { "include": ["index.js"], "linter": { "rules": { "suspicious": { "noDoubleEquals": "off" } } } } ] }
The rule is now correctly enabled for the
index.js
file.Contributed by @Conaclos
Formatter
Bug fixes
- Fix #3103 by correctly resolving CSS formatter options. Contributed by @ah-yu
- Fix #3192 don't add an extra whitespace within :has. Contributed by @denbezrukov
JavaScript APIs
Bug fixes
- Fix a regression introduced by the release of
v1.8.0
Linter
New features
- Add nursery/useValidAutocomplete. Contributed by @unvalley
Bug fixes
-
Add nursery/noShorthandPropertyOverrides. #2958 Contributed by @neokidev
-
Fix [#3084] false positive by correctly recognize parenthesized return statement. Contributed by @unvalley
-
useImportExtensions now suggests a correct fix for
import '.'
andimport './.'
. Contributed by @minht11 -
Fix useDateNow false positive when new Date object has arguments
new Date(0).getTime()
. Contributed by @minht11. -
The
noUnmatchableAnbSelector
rule is now able to catch unmatchablean+b
selectors like0n+0
or-0n+0
. Contributed by @Sec-ant. -
The
useHookAtTopLevel
rule now recognizes properties named as hooks likefoo.useFoo()
. Contributed by @ksnyder9801 -
Fix #3092, prevent warning for
Custom properties (--*)
. Contributed by @chansuke -
Fix a false positive in the
useLiteralKeys
rule. (#3160)This rule now ignores the following kind of computed member name:
const a = { [`line1 line2`]: true, };
Contributed by @Sec-ant
-
The noUnknownProperty rule now ignores the
composes
property often used in css modules. #3000 Contributed by @chansuke -
Fix false positives of the useExhaustiveDependencies rule.
The component itself is considered stable when it is used recursively inside a hook closure defined inside of it:
import { useMemo } from "react"; function MyRecursiveComponent() { // MyRecursiveComponent is stable, we don't need to add it to the dependencies list. const children = useMemo(() => <MyRecursiveComponent />, []); return <div>{children}</div>; }
Also,
export default function
andexport default class
are considered stable now because they can only appear at the top level of a module.Contributed by @Sec-ant
-
Fix missing
withDefaults
macro in vue files for globals variables. Contributed by @Shyam-Chen
Parser
Bug fixes
- Fix CSS modules settings mapping. Contributed by @denbezrukov
What's Changed
Other changes
- chore(ci): improve rules_check task by @Sec-ant in https://github.com/biomejs/biome/pull/3165
- chore: change
js
code blocks containing JSX elements tojsx
by @Sec-ant in https://github.com/biomejs/biome/pull/3168 - feat(biome_js_analyzer):
noSubstr
by @chansuke in https://github.com/biomejs/biome/pull/3125 - chore(deps): update rust crate tokio to 1.38.0 by @renovate in https://github.com/biomejs/biome/pull/3146
- chore(grit): implement Grit snippet bindings by @arendjr in https://github.com/biomejs/biome/pull/3162
- chore(deps): update @biomejs packages by @renovate in https://github.com/biomejs/biome/pull/3145
- feat(analyzer):
useSortedKeys
for JSON objects by @ematipico in https://github.com/biomejs/biome/pull/2412 - docs(useImportType): add docs about TypeScript settings by @Conaclos in https://github.com/biomejs/biome/pull/3171
- docs(noUndeclaredDependencies,useImportExtensions): add note about LSP configs by @Conaclos in https://github.com/biomejs/biome/pull/3173
- docs(no_undeclared_dependencies): follow up fix of #3173 by @Sec-ant in https://github.com/biomejs/biome/pull/3175
- chore(ci): try enable
--compact
flag forpkg.pr.new
by @Sec-ant in https://github.com/biomejs/biome/pull/3180 - chore(ci): remove
--compact
flag by @Sec-ant in https://github.com/biomejs/biome/pull/3181 - fix(formatter): escape double quotes when printing formatter IR by @dyc3 in https://github.com/biomejs/biome/pull/3036
- fix: remove unnecessary example by @lanker in https://github.com/biomejs/biome/pull/3185
- chore: move maintainers to past maintainers by @ematipico in https://github.com/biomejs/biome/pull/3189
- chore: removes old files by @ematipico in https://github.com/biomejs/biome/pull/3188
- chore: move Sec-ant to core contributor by @Sec-ant in https://github.com/biomejs/biome/pull/3190
- chore: add minht11 to the maintainers team by @minht11 in https://github.com/biomejs/biome/pull/3191
- chore: add
chansuke
to maintainers list by @chansuke in https://github.com/biomejs/biome/pull/3206 - chore: rust 1.79.0 by @ematipico in https://github.com/biomejs/biome/pull/3222
- chore(deps): update github-actions by @renovate in https://github.com/biomejs/biome/pull/3225
- chore(deps): update @biomejs packages by @renovate in https://github.com/biomejs/biome/pull/3224
- chore(grit): improve snippet compiler by @arendjr in https://github.com/biomejs/biome/pull/3223
- refactor(analyzer): use
enumflags2
by @ematipico in https://github.com/biomejs/biome/pull/3230 - feat(biome_css_analyzer): implement function-linear-gradient-no-nonstandard-direction by @mdm317 in https://github.com/biomejs/biome/pull/2911
- chore(deps): update dependency eslint to v9.5.0 by @renovate in https://github.com/biomejs/biome/pull/3227
- fix(deps): update rust crates by @renovate in https://github.com/biomejs/biome/pull/3226
New Contributors
- @ksnyder9801 made their first contribution in https://github.com/biomejs/biome/pull/3140
- @lanker made their first contribution in https://github.com/biomejs/biome/pull/3185
- @aldahick made their first contribution in https://github.com/biomejs/biome/pull/3239
Full Changelog: https://github.com/biomejs/biome/compare/cli/v1.8.1...cli/v1.8.2
1、 biome-darwin-arm64 19.64MB
2、 biome-darwin-x64 21.19MB
3、 biome-linux-arm64 21.21MB
4、 biome-linux-arm64-musl 18.72MB
5、 biome-linux-x64 24.12MB
6、 biome-linux-x64-musl 23.29MB
7、 biome-win32-arm64.exe 22.62MB
8、 biome-win32-x64.exe 27MB