Biome CLI v2.5.9
2.5.9
Patch Changes
- #11321
41386f3Thanks @dyc3! - Fixed #11315: The CSS parser now recovers at declaration boundaries after bogus declarations, allowing subsequent valid declarations to be parsed. - #11248
57b197eThanks @yanthomasdev! - Expanded the environment variable metadata used bybiome rageto includeBIOME_BINARY,BIOME_LOG_FILE, andRUST_BACKTRACEas well as reworded explanations for better readability. - #11377
a8798eaThanks @Netail! - Added a new nursery ruleuseNamedLayerwhich disallows anonymous cascade layers.@layer { a { color: red; } } - #11327
6771cf5Thanks @dyc3! - The HTML formatter now preserves meaningful blank lines in HTML, including spacing after elements with trailing spaces and blank lines between comment groups.+
- #10312
ba8aa18Thanks @dyc3! - Added the nursery ruleuseTailwindShorthandClasses, which suggests shorter Tailwind utility classes. For example, the rule suggests replacingw-4 h-4withsize-4. - #11333
715e0cdThanks @kkkhs! - Fixed #11328:lint/nursery/useExpectnow recognizes Vitest Browser Modeexpect.element()calls as assertions. - #11343
9b98211Thanks @johncarmack1984! - Fixed #11311: the CSS parser now accepts Tailwind container-query variant names in@variant, such as@xland@max-xl. These previously produced a parse error and anoUnknownAtRulesdiagnostic.@variant @xl { div { background: red; } } - #11220
3e8c488Thanks @santichausis! - Fixed #9541:noUndeclaredVariables,noUnusedImports, andnoUnusedVariablesnow correctly recognise exported variables and functions declared in one embedded block as usable from a sibling block, in Svelte's / pair and Vue's non-setupblocks. For example, Biome no longer reportsgreetas undeclared in the following Svelte component: - #11300
36430ebThanks @dyc3! - Fixed the HTML formatter's whitespace handling formarquee,noscript,video,audio, andobjectelements.- This text will bounce + This text will bounce
- #11299
6559e6cThanks @jp-knj! - Added the nursery ruleuseAstroClientOnlyDirectiveValue, which reports Astroclient:onlydirectives without an initializer. For example, triggers the rule. - #11365
7529811Thanks @MHJahanbakhsh! - Fixed #11229: TheuseGenericFontNamesrule now treatsmathas a valid generic font family. - #11346
674f5f4Thanks @Jayllyz! - Fixed #11335:noComponentHookFactoriesnow reports ause-prefixed variable only when a function is assigned to it directly.function factory() { const useColors = true; // no longer reported const useStore = createStore({ count: 0 }); // no longer reported const useData = () => useState(null); // still reported return useColors; } - #11334
c87c46aThanks @zkasuran! - Fixed #11317:noSvgWithoutTitleno longer reports ansvgthat uses the boolean shorthandaria-hidden(equivalent toaria-hidden={true}in React). - #11364
13853b1Thanks @ematipico! - Fixed a bug whereuseJsxKeyInIterableincorrectly flagged Astro files. - #11321
41386f3Thanks @dyc3! - Fixed #11315: Invalid CSS declarations in HTMLstyleattributes now produce parser diagnostics instead of causing a panic. - #11325
67c3bf0Thanks @dyc3! - Fixed HTML text wrapping to account for the width of an adjacent closing tag, avoiding lines that exceed the configured width when the final word and tag must move together.foo bar foo bar foo bar foo bar foo bar foo bar foo barfoo bar foo bar foo bar foo bar foo bar foo + bar
- #11367
fe5b5d4Thanks @ematipico! - Fixed TypeScriptcompilerOptions.pathsresolution when mapping targets omit./. Biome now resolves these targets relative to their configured path base. - #11316
17e48d6Thanks @wanxiankai! - Fixed #11289: the safe fix fornoExtraBooleanCastnow preserves parentheses around nested conditional expressions. - #11254
d25d113Thanks @dyc3! - Fixed #11242: Biome no longer crashes with an access violation when analysing files on Windows ARM64. - #11221
85aac73Thanks @freeatnet! - Added the nursery rulenoUnsafeTypeAssertion, which disallows TypeScript type assertions while allowing const assertions.const value = input as SomeType;
- #11314
7ffb677Thanks @ematipico! - Fixed #11310: Restored the performance ofnoMisusedPromisesandnoFloatingPromiseswhen analyzed expressions share deep imported type paths. - #11356
6cd3263Thanks @johncarmack1984! - The Tailwind parser now understands modifiers on bare utilities (@container/sidebar,shadow/50). - #11318
76059e9Thanks @johncarmack1984! - The Tailwind parser now understands container-query variants (@sm:,@max-lg:,@min-[400px]:) and child and descendant variants (*:,**:). - #11357
faa2074Thanks @johncarmack1984! - The Tailwind parser now accepts the legacy leading!important marker (!flex,hover:!p-4). - #11344
f34e15cThanks @johncarmack1984! - The Tailwind parser now understands combinator selectors in arbitrary variants (has-[>svg]:,has-[+p]:), modifiers on variants (group-hover/menu:,@sm/main:), and arbitrary container-query sizes (@[400px]:). - #11324
2f5d452Thanks @dyc3! - Fixed HTML formatting that inserted rendered whitespace between an element and touching text when the line wrapped.- before - after + beforeafter
- #11312
e65f07eThanks @xosnos! - Added a new nursery ruleuseControlLabelfor both HTML and JSX, which reports interactive control elements (button,menuitem) without an accessible label. - #11364
13853b1Thanks @ematipico! - Fixed SVG parsing for files with an XML declaration followed by aPUBLICdoctype, such as<?xml version="1.0"?><!DOCTYPE svg PUBLIC "a" "b">. - #11301
610ee28Thanks @dyc3! - Fixed parent tag wrapping when an HTML element starts or ends with a block-like or hidden child such assource,track, orparam.- +
What's Changed
- fix(deps): revert mimalloc to older version to mitigate access violation errors by @dyc3 in #11254
- chore(deps): update github-actions by @renovate[bot] in #11288
- feat(flags): add missing flags and reword metadata by @yanthomasdev in #11248
- feat(useSortedClasses): sort custom properties and reject invalid modifiers in sort_v4 by @johncarmack1984 in #11274
- fix(format/html): correct whitespace display classifications by @dyc3 in #11300
- fix(noExtraBooleanCast): preserve conditional parentheses by @wanxiankai in #11316
- fix(parse/css): handle bogus declarations slightly more gracefully by @dyc3 in #11321
- fix(format/html): keep block edge children structural by @dyc3 in #11301
- fix(format/html): preserve touching text adjacency by @dyc3 in #11324
- fix(format/html): include closing tags in fill width by @dyc3 in #11325
- fix(lint): recognize expect.element assertions by @kkkhs in #11333
- docs: address changes on CLI rework by @yanthomasdev in #11151
- fix(linter): noSvgWithoutTitle allows svg with shorthand aria-hidden by @zkasuran in #11334
- fix(md/parse): remove inline node from html comments by @ematipico in #11337
- refactor: store projects in salsa db by @ematipico in #11330
- fix(css/parser): allow Tailwind variant names to reference container-query variants by @johncarmack1984 in #11343
- fix(noMisusedPromises): perf regression by @ematipico in #11314
- feat(useSortedClasses): parse and sort container-query and child variants by @johncarmack1984 in #11318
- feat(useSortedClasses): parse combinator selectors and variant modifiers by @johncarmack1984 in #11344
- fix(js_analyze): recognize exported bindings across embedded script blocks by @santichausis in #11220
- fix(noComponentHookFactories): don't report non-function use* bindings by @Jayllyz in #11346
- fix(format/html): preserve meaningful blank lines by @dyc3 in #11327
- feat(lint): add
useTailwindShorthandClassesby @dyc3 in #10312 - fix(inference): skip return arguments lookup by @ematipico in #11347
- test(noUnnecessaryConditions): add regression fixture for #10704 by @Jayllyz in #11350
- feat(useSortedClasses): sort
@containerand other bare utilities with modifiers by @johncarmack1984 in #11356 - feat(lint): nursery useControlLabel by @xosnos in #11312
- fix: html and svg bugs, plus false positive on lint rule by @ematipico in #11364
- fix(lint/css): treat math as a generic font family by @MHJahanbakhsh in #11365
- fix(resolver): relative paths without dot prefix by @ematipico in #11367
- chore(deps): update github-actions by @renovate[bot] in #11369
- chore(deps): update pnpm to v11.21.0 by @renovate[bot] in #11371
- fix(useSortedClasses): match Tailwind on ties, handle the legacy
!by @johncarmack1984 in #11357 - feat(lint): add
noUnsafeTypeAssertionrule by @freeatnet in #11221 - feat: useNamedLayer by @Netail in #11377
- feat: adds the
useAstroClientOnlyDirectiveValuerule for .astro files by @jp-knj in #11299 - refactor(lint): put
impl Ruleblocks first by @dyc3 in #11382 - ci: release by @github-actions[bot] in #11309
New Contributors
- @wanxiankai made their first contribution in #11316
- @kkkhs made their first contribution in #11333
- @zkasuran made their first contribution in #11334
- @santichausis made their first contribution in #11220
- @xosnos made their first contribution in #11312
- @MHJahanbakhsh made their first contribution in #11365
- @freeatnet made their first contribution in #11221
- @jp-knj made their first contribution in #11299
Full Changelog: https://github.com/biomejs/biome/compare/@biomejs/biome@2.5.8...@biomejs/biome@2.5.9
评论
?
参与讨论