Version History
Version 2.2.4
Patch Changes
-
#7453
aa8cea3Thanks @arendjr! - Fixed #7242: Aliases specified inpackage.json’simportssection now support having multiple targets as part of an array. -
#7454
ac17183Thanks @arendjr! - Greatly improved performance ofnoImportCyclesby eliminating allocations.In one repository, the total runtime of Biome with only
noImportCyclesenabled went from ~23s down to ~4s. -
#7447
7139aadThanks @rriski! - Fixes #7446. The GritQL$...spread metavariable now correctly matches members in object literals, aligning its behavior with arrays and function calls. -
#6710
98cf9afThanks @arendjr! - Fixed #4723: Type inference now recognises index signatures and their accesses when they are being indexed as a string.Example
type BagOfPromises = {// This is an index signature definition. It declares that instances of type// `BagOfPromises` can be indexed using arbitrary strings.[property: string]: Promise<void>;};let bag: BagOfPromises = {};// Because `bag.iAmAPromise` is equivalent to `bag["iAmAPromise"]`, this is// considered an access to the string index, and a Promise is expected.bag.iAmAPromise; -
#7415
d042f18Thanks @qraqras! - Fixed #7212, now theuseOptionalChainrule recognizes optional chaining usingtypeof(e.g.,typeof foo !== 'undefined' && foo.bar). -
#7419
576baf4Thanks @Conaclos! - Fixed #7323.noUnusedPrivateClassMembersno longer reports as unused TypeScriptprivatemembers if the rule encounters a computed access onthis.In the following example,
memberas previously reported as unused. It is no longer reported.class TsBioo {private member: number;set_with_name(name: string, value: number) {this[name] = value;}} -
351bccdThanks @ematipico! - Added the new nursery lint rulenoJsxLiterals, which disallows the use of string literals inside JSX.The rule catches these cases:
<><div>test</div> {/* test is invalid */}<>test</><div>{/* this string is invalid */}asdjfl test foo</div></> -
#7406
b906112Thanks @mdevils! - Fixed an issue (#6393) where the useHookAtTopLevel rule reported excessive diagnostics for nested hook calls.The rule now reports only the offending top-level call site, not sub-hooks of composite hooks.
// Before: reported twice (useFoo and useBar).function useFoo() {return useBar();}function Component() {if (cond) useFoo();}// After: reported once at the call to useFoo(). -
#7461
ea585a9Thanks @arendjr! - Improved performance ofnoPrivateImportsby eliminating allocations.In one repository, the total runtime of Biome with only
noPrivateImportsenabled went from ~3.2s down to ~1.4s. -
351bccdThanks @ematipico! - Fixed #7411. The Biome Language Server had a regression where opening an editor with a file already open wouldn’t load the project settings correctly. -
#7142
53ff5aeThanks @Netail! - Added the new nursery rulenoDuplicateDependencies, which verifies that no dependencies are duplicated between thebundledDependencies,bundleDependencies,dependencies,devDependencies,overrides,optionalDependencies, andpeerDependenciessections.For example, the following snippets will trigger the rule:
{"dependencies": {"foo": ""},"devDependencies": {"foo": ""}}{"dependencies": {"foo": ""},"optionalDependencies": {"foo": ""}}{"dependencies": {"foo": ""},"peerDependencies": {"foo": ""}} -
351bccdThanks @ematipico! - Fixed #3824. Now the option CLI--coloris correctly applied to logging too.
Copyright (c) 2023-present Biome Developers and Contributors.