agnyz / the-bed-stack

Bun + ElysiaJS + DrizzleORM = the stack you don't want to sleep on 🛌💤
https://agnyz.github.io/the-bed-stack/
MIT License
39 stars 3 forks source link

chore(deps): update dependency @biomejs/biome to v1.6.3 #105

Closed renovate[bot] closed 7 months ago

renovate[bot] commented 7 months ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@biomejs/biome (source) 1.4.1 -> 1.6.3 age adoption passing confidence

Release Notes

biomejs/biome (@​biomejs/biome) ### [`v1.6.3`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#163-2024-03-25) [Compare Source](https://togithub.com/biomejs/biome/compare/7669b334ecfb9580abe83bbf6141232805f0e4bd...23b5a73ac7ccd4920f13919aaa712b9364020e88) ##### Analyzer ##### CLI ##### Bug fixes - Fix configuration resolution. Biome is now able to correctly find the `biome.jsonc` configuration file when `--config-path` is explicitly set ([#​2164](https://togithub.com/biomejs/biome/issues/2164)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - JavaScript/TypeScript files of different variants (`.ts`, `.js`, `.tsx`, `.jsx`) in a single workspace now have stable formatting behaviors when running the CLI command in paths of different nested levels or in different operating systems ([#​2080](https://togithub.com/biomejs/biome/issues/2080), [#​2109](https://togithub.com/biomejs/biome/issues/2109)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Configuration ##### Bug fixes - Complete the documentation and overrides support for options `formatter.lineEnding`, `[language].formatter.lineEnding`, `formatter.attributePosition` and `javascript.formatter.attributePosition`. Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Editors ##### Formatter ##### Bug fixes - Fix [#​2172](https://togithub.com/biomejs/biome/issues/2172) by breaking long object destructuring patterns. Contributed by [@​ah-yu](https://togithub.com/ah-yu) ##### JavaScript APIs ##### Linter ##### New features - Add rule [noEvolvingAny](https://biomejs.dev/linter/rules/no-evolving-any) to disallow variables from evolving into `any` type through reassignments. Contributed by [@​fujiyamaorange](https://togithub.com/fujiyamaorange) ##### LSP ##### Bug fixes - Quickfix action no longer autofixes lint rule errors on save when `linter` is disabled ([#​2161](https://togithub.com/biomejs/biome/issues/2161)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Range formatting for Astro/Svelte/Vue doesn't place code out of place, especially when formatting on paste is enabled. Contributed by [@​ematipico](https://togithub.com/ematipico) ##### Parser ### [`v1.6.2`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#162-2024-03-22) [Compare Source](https://togithub.com/biomejs/biome/compare/4ed1cbe96bc9e6d7092e88dd0a54ff8ce78037e5...7669b334ecfb9580abe83bbf6141232805f0e4bd) ##### Analyzer ##### Bug fixes - The `noSuperWithoutExtends` rule now allows for calling `super()` in derived class constructors of class expressions ([#​2108](https://togithub.com/biomejs/biome/issues/2108)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Fix discrepancies on file source detection. Allow module syntax in `.cts` files ([#​2114](https://togithub.com/biomejs/biome/issues/2114)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### CLI ##### Bug fixes - Fixes [#​2131](https://togithub.com/biomejs/biome/issues/2131), where folders were incorrectly ignored when running the command `check`. Now folders are correctly ignored based on their command. Contributed by [@​ematipico](https://togithub.com/ematipico) - Smoother handling of `"endOfLine": "auto"` in prettier migration: falling back to `"lf"` ([#​2145](https://togithub.com/biomejs/biome/pull/2145)). Contributed by [@​eMerzh](https://togithub.com/eMerzh) ##### Configuration ##### Bug fixes - Fix enabled rules calculation. The precendence of individual rules, `all` and `recommend` presets in top-level and group-level configs is now correctly respected. More details can be seen in ([#​2072](https://togithub.com/biomejs/biome/pull/2072)) ([#​2028](https://togithub.com/biomejs/biome/issues/2028)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Formatter ##### Bug fixes - Fix [#​1661](https://togithub.com/biomejs/biome/issues/1661). Now nested conditionals are aligned with Prettier's logic, and won't contain mixed spaces and tabs. Contributed by [@​ematipico](https://togithub.com/ematipico) ##### JavaScript APIs ##### Enhancements - Support applying lint fixes when calling the `lintContent` method of the `Biome` class ([#​1956](https://togithub.com/biomejs/biome/pull/1956)). Contributed by [@​mnahkies](https://togithub.com/mnahkies) ##### Linter ##### Bug fixes - Rule `noUndeclaredDependencies` now also validates `peerDependencies` and `optionalDependencies` ([#​2122](https://togithub.com/biomejs/biome/issues/2122)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Rule `noUndeclaredDependencies` won't check `declare module` statements anymore ([#​2123](https://togithub.com/biomejs/biome/issues/2123)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Fix [#​1925](https://togithub.com/biomejs/biome/issues/1925). The fix for `useOptionalChain` would sometimes suggest an incorrect fix that discarded optional chaining operators on the left-hand side of logical expressions. These are now preserved. Contributed by [@​arendjr](https://togithub.com/arendjr) - Rule `noUndeclaredVariables` now also checks for worker globals ([#​2121](https://togithub.com/biomejs/biome/issues/2121)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### LSP ##### Bug fixes - Correctly parse `.jsonc` files. Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Correctly resolve external `extends` configs. Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ### [`v1.6.1`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#161-2024-03-12) [Compare Source](https://togithub.com/biomejs/biome/compare/560628b380b0b1f61303c8e5ca2175d3b4794089...4ed1cbe96bc9e6d7092e88dd0a54ff8ce78037e5) ##### CLI ##### Bug fixes - CLI is now able to automatically search and resolve `biome.jsonc` ([#​2008](https://togithub.com/biomejs/biome/issues/2008)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Fix a false positive where some files were counted as "fixed" even though they weren't modified. Contributed by [@​ematipico](https://togithub.com/ematipico) ##### Configuration ##### Bug fixes - `json.formatter.trailingCommas` option now works in `overrides` ([#​2009](https://togithub.com/biomejs/biome/issues/2009)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Linter ##### New features - Add rule [noDoneCallback](https://biomejs.dev/linter/rules/no-done-callback), this rule checks the function parameter of hooks & tests for use of the done argument, suggesting you return a promise instead. Contributed by [@​vasucp1207](https://togithub.com/vasucp1207) ```js beforeEach(done => { // ... }); ``` ##### Bug fixes - [useJsxKeyInIterable](https://biomejs.dev/linter/rules/use-jsx-key-in-iterable) now recognizes function bodies wrapped in parentheses ([#​2011](https://togithub.com/biomejs/biome/issues/2011)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - [useShorthandFunctionType](https://biomejs.dev/linter/rules/use-shorthand-function-type) now preserves type parameters of generic interfaces when applying fixes ([#​2015](https://togithub.com/biomejs/biome/issues/2015)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) - Code fixes of [useImportType](https://biomejs.dev/linter/rules/use-import-type) and [useExportType](https://biomejs.dev/linter/rules/use-export-type) now handle multiline statements ([#​2041](https://togithub.com/biomejs/biome/issues/2041)). Contributed by [@​Conaclos](https://togithub.com/Conaclos) - [noRedeclare](https://biomejs.dev/linter/rules/no-redeclare) no longer reports type parameter and parameter with identical names ([#​1992](https://togithub.com/biomejs/biome/issues/1992)). The following code is no longer reported: ```ts function f(a: a) {} ``` Contributed by [@​Conaclos](https://togithub.com/Conaclos) - [noRedeclare](https://biomejs.dev/linter/rules/no-redeclare) now reports duplicate type parameters in a same declaration. The following type parameters are now reported as a redeclaraion: ```ts function f() {} ``` Contributed by [@​Conaclos](https://togithub.com/Conaclos) - [noUndeclaredDependencies](https://biomejs.dev/linter/rules/no-undeclared-dependencies/) now recognizes imports of subpath exports. E.g., the following import statements no longer report errors if `@mui/material` and `tailwindcss` are installed as dependencies: ```ts import Button from "@​mui/material/Button"; import { fontFamily } from "tailwindcss/defaultTheme"; ``` Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ##### Parser ##### Bug fixes - JavaScript lexer is now able to lex regular expression literals with escaped non-ascii chars ([#​1941](https://togithub.com/biomejs/biome/issues/1941)). Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) ### [`v1.6.0`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#160-2024-03-08) [Compare Source](https://togithub.com/biomejs/biome/compare/906de83449b5066554cd8e97c78a1f8e43749016...560628b380b0b1f61303c8e5ca2175d3b4794089) ##### Analyzer ##### New features - Add partial for `.astro` files. Biome is able to sort imports inside the frontmatter of the Astro files. Contributed by [@​ematipico](https://togithub.com/ematipico) ### [`v1.5.3`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#153-2024-01-22) [Compare Source](https://togithub.com/biomejs/biome/compare/80bb3d7d978ca2eb376190ac7cfdcd45902a6b75...906de83449b5066554cd8e97c78a1f8e43749016) ##### LSP ##### Bug fixes - Fix [#​1584](https://togithub.com/biomejs/biome/issues/1584). Ensure the LSP only registers the formatter once. Contributed by [@​nhedger](https://togithub.com/nhedger) - Fix [#​1589](https://togithub.com/biomejs/biome/issues/1589). Fix invalid formatting of own line comments when they were at the end of an import/export list. Contributed by [@​spanishpear](https://togithub.com/spanishpear) ##### Configuration ##### Bug fixes - Override correctly the recommended preset ([#​1349](https://togithub.com/biomejs/biome/issues/1349)). Previously, if unspecified, Biome turned on the recommended preset in overrides. This resulted in reporting diagnostics with a severity level set to `off`. This in turn caused Biome to fail. Now Biome won't switch on the recommended preset in `overrides` unless told to do so. Contributed by [@​Conaclos](https://togithub.com/Conaclos) - Don't format **ignored** files that are well-known JSONC files when `files.ignoreUnknown` is enabled ([#​1607](https://togithub.com/biomejs/biome/issues/1607)). Previously, Biome always formatted files that are known to be JSONC files (e.g. `.eslintrc`) when `files.ignoreUnknown` was enabled. Contributed by [@​Conaclos](https://togithub.com/Conaclos) ##### Formatter ##### Bug fixes - Fix [#​1178](https://togithub.com/biomejs/biome/issues/1178), where the line ending option wasn't correctly applied. Contributed by [@​ematipico](https://togithub.com/ematipico) - Fix [#​1571](https://togithub.com/biomejs/biome/issues/1571). Fix invalid formatting of nested multiline comments. Contributed by [@​ah-yu](https://togithub.com/ah-yu) ##### Linter ##### Bug fixes - Fix [#​1575](https://togithub.com/biomejs/biome/issues/1575). [noArrayIndexKey](https://biomejs.dev/linter/rules/no-array-index-key/) now captures array index value inside template literals and with string concatination. Contributed by [@​vasucp1207](https://togithub.com/vasucp1207) - Linter rules that inspect regexes now handle multibyte characters correctly ([#​1522](https://togithub.com/biomejs/biome/issues/1522)). Previously, [noMisleadingCharacterClass](https://biomejs.dev/linter/no-misleading-character-class), [noMultipleSpacesInRegularExpressionLiterals](https://biomejs.dev/linter/no-multiple-spaces-in-regular-expression-literals), and [noEmptyCharacterClassInRegex](https://biomejs.dev/linter/no-empty-character-class-in-regex) made Biome errors on multi-bytes characters. Multibyte characters are now handled correctly. The following code no longer raises an internal error: ```js // Cyrillic characters /[\u200E\u2066-\u2069]/gu; ``` Contributed by [@​Conaclos](https://togithub.com/Conaclos) - [useExhaustiveDependencies](https://biomejs.dev/linter/use-exhaustive-dependencies) no longer made Biome errors in code TypeScript import equal declarations ([#​1194](https://togithub.com/biomejs/biome/issues/1194)). Contributed by [@​Conaclos](https://togithub.com/Conaclos) - Fix typo in the diagnostic of [noNodejsModules](https://biomejs.dev/linter/rules/no-nodejs-modules). Contributed by [@​huseeiin](https://togithub.com/huseeiin) ##### Parser ##### Bug fixes - Accept the `const` modifier for type parameter in method type signature ([#​1624](https://togithub.com/biomejs/biome/issues/1624)). The following code is now correctly parsed: ```ts type Foo = { (); method(); }; ``` Contributed by [@​magic-akari](https://togithub.com/magic-akari) - Correctly parse type arguments in expression([#​1184](https://togithub.com/biomejs/biome/issues/1184)). The following code is now correctly parsed in typescript: ```ts 0 < (0 >= 1); ``` Contributed by [@​ah-yu](https://togithub.com/ah-yu) ##### Website ##### New - Add a [page that maps the Biome rule to its source](https://biomejs.dev/linter/rules-sources/). Contributed by [@​ematipico](https://togithub.com/ematipico) ##### Fixes - Generate Open Graph images based on the linked page. Contributed by [@​ematipico](https://togithub.com/ematipico) - Fix examples of the [git hook page](https://biomejs.dev/recipes/git-hooks/). Contributed by [@​9renpoto](https://togithub.com/9renpoto), [@​lmauromb](https://togithub.com/lmauromb), and [@​Conaclos](https://togithub.com/Conaclos) - Fix dead and erroneous hyperlinks. Contributed by [@​Sec-ant](https://togithub.com/Sec-ant) and Conaclos ### [`v1.5.2`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#152-2024-01-15) [Compare Source](https://togithub.com/biomejs/biome/compare/0ed9e3ef0a1ac0bcf3ba7f0030999dbc3e34a619...80bb3d7d978ca2eb376190ac7cfdcd45902a6b75) ##### CLI ##### Bug fixes - Fix [#​1512](https://togithub.com/biomejs/biome/issues/1512) by skipping verbose diagnostics from the count. Contributed by [@​ematipico](https://togithub.com/ematipico) - Correctly handle cascading `include` and `ignore`. Previously Biome incorrectly included files that were included at tool level and ignored at global level. In the following example, `file.js` was formatted when it should have been ignored. Now, Biome correctly ignores the directory `./src/sub/`. ```shell ❯ tree src src └── sub └── file.js ❯ cat biome.json { "files": { "ignore": ["./src/sub/"] }, "formatter": { "include": ["./src"] } } ``` Contributed by [@​Conaclos](https://togithub.com/Conaclos) - Don't emit verbose warnings when a protected file is ignored. Some files, such as `package.json` and `tsconfig.json`, are [protected](https://biomejs.dev/guides/how-biome-works/#protected-files). Biome emits a verbose warning when it encounters a protected file. Previously, Biome emitted this verbose warning even if the file was ignored by the configuration. Now, it doesn't emit verbose warnings for protected files that are ignored. Contributed by [@​Conaclos](https://togithub.com/Conaclos) - `overrides` no longer affect which files are ignored. Contributed by [@​Conaclos](https://togithub.com/Conaclos) - The file `biome.json` can't be ignored anymore. Contributed by [@​ematipico](https://togithub.com/ematipico) - Fix [#​1541](https://togithub.com/biomejs/biome/issues/1541) where the content of protected files wasn't returned to `stdout`. Contributed by [@​ematipico](https://togithub.com/ematipico) - Don't handle CSS files, the formatter isn't ready yet. Contributed by [@​ematipico](https://togithub.com/ematipico) ##### Configuration ##### Bug fixes - Fix [1440](https://togithub.com/biomejs/biome/issues/1440), a case where `extends` and `overrides` weren't correctly emitting the final configuration. Contributed by [@​arendjr](https://togithub.com/arendjr) - Correctly handle `include` when `ignore` is set ([#​1468](https://togithub.com/biomejs/biome/issues/1468)). Contributed by [@​Conaclos](https://togithub.com/Conaclos) Previously, Biome ignored `include` if `ignore` was set. Now, Biome check both `include` and `ignore`. A file is processed if it is included and not ignored. If `include` is not set all files are considered included. ##### Formatter ##### Bug fixes - Fix placement of comments before `*` token in generator methods with decorators. [#​1537](https://togithub.com/biomejs/biome/pull/1537) Contributed by [@​ah-yu](https://togithub.com/ah-yu) - Fix [#​1406](https://togithub.com/biomejs/biome/issues/1406). Ensure comments before the `async` keyword are placed before it. Contributed by [@​ah-yu](https://togithub.com/ah-yu) - Fix [#​1172](https://togithub.com/biomejs/biome/issues/1172). Fix placement of line comment after function expression parentheses, they are now attached to first statement in body. Contributed by [@​kalleep](https://togithub.com/kalleep) - Fix [#​1511](https://togithub.com/biomejs/biome/issues/1511) that made the JavaScript formatter crash. Contributed [@​Conaclos](https://togithub.com/Conaclos) ##### Linter ##### Enhancements - Add an unsafe code fix for [noConsoleLog](https://biomejs.dev/linter/rules/no-console-log/). Contributed by [@​vasucp1207](https://togithub.com/vasucp1207) - [useArrowFunction](https://biomejs.dev/linter/rules/use-arrow-function) no longer reports function in `extends` clauses or in a `new` expression. Contributed by [@​Conaclos](https://togithub.com/Conaclos) These cases require the presence of a prototype. - Add dependency variable names on error message when useExhaustiveDependencies rule shows errors. Contributed by [@​mehm8128](https://togithub.com/mehm8128) ##### Bug fixes - The fix of [useArrowFunction](https://biomejs.dev/linter/rules/use-arrow-function) now adds parentheses around the arrow function in more cases where it is needed ([#​1524](https://togithub.com/biomejs/biome/issues/1524)). A function expression doesn't need parentheses in most expressions where it can appear. This is not the case with the arrow function. We previously added parentheses when the function appears in a call or member expression. We now add parentheses in binary-like expressions and other cases where they are needed, hopefully covering all cases. Previously: ```diff - f = f ?? function() {}; + f = f ?? () => {}; ``` Now: ```diff - f = f ?? function() {}; + f = f ?? (() => {}); ``` Contributed by [@​Conaclos](https://togithub.com/Conaclos) - Fix [#​1514](https://togithub.com/biomejs/biome/issues/1514). Fix autofix suggestion to avoid the syntax error in `no_useless_fragments`. Contributed by [@​togami2864](https://togithub.com/togami2864) ### [`v1.5.1`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#151-2024-01-10) [Compare Source](https://togithub.com/biomejs/biome/compare/c1fdabcde7f6517aa48bc511e71c8c66796637dd...0ed9e3ef0a1ac0bcf3ba7f0030999dbc3e34a619) ##### CLI ##### Bug fixes - The diagnostics `files/missingHandler` are now shown only when the option `--verbose` is passed. Contributed by [@​ematipico](https://togithub.com/ematipico) - The diagnostics for protected files are now shown only when the option `--verbose` is passed. Contributed by [@​ematipico](https://togithub.com/ematipico) - Fix [#​1465](https://togithub.com/biomejs/biome/issues/1465), by taking in consideration the workspace folder when matching a pattern. Contributed by [@​ematipico](https://togithub.com/ematipico) - Fix [#​1465](https://togithub.com/biomejs/biome/issues/1465), by correctly process globs that contain file names. Contributed by [@​ematipico](https://togithub.com/ematipico) ##### Formatter ##### Bug fixes - Fix [#​1170](https://togithub.com/biomejs/biome/issues/1170). Fix placement of comments inside default switch clause. Now all line comments that have a preceding node will keep their position. Contributed by [@​kalleep](https://togithub.com/kalleep) ##### Linter ##### Bug fixes - Fix [#​1335](https://togithub.com/biomejs/biome/issues/1335). [noUselessFragments](https://biomejs.dev/linter/rules/no-useless-fragments/) now ignores code action on component props when the fragment is empty. Contributed by [@​vasucp1207](https://togithub.com/vasucp1207) - [useConsistentArrayType](https://biomejs.dev/linter/rules/use-consistent-array-type) was accidentally placed in the `style` rule group instead of the `nursery` group. It is now correctly placed under `nursery`. - Fix [#​1483](https://togithub.com/biomejs/biome/issues/1483). [useConsistentArrayType](https://biomejs.dev/linter/rules/use-consistent-array-type) now correctly handles its option. Contributed by [@​Conaclos](https://togithub.com/Conaclos) - Fix [#​1502](https://togithub.com/biomejs/biome/issues/1502). [useArrowFunction](https://biomejs.dev/linter/rules/use-arrow-function) now correctly handle functions that return a (comma) sequence expression. Contributed by [@​Conaclos](https://togithub.com/Conaclos) Previously the rule made an erroneous suggestion: ```diff - f(function() { return 0, 1; }, ""); + f(() => 0, 1, "") ``` Now, the rule wraps any comma sequence between parentheses: ```diff - f(function() { return 0, 1; }, ""); + f(() => (0, 1), "") ``` - Fix [#​1473](https://togithub.com/biomejs/biome/issues/1473): [useHookAtTopLevel](https://biomejs.dev/linter/rules/use-hook-at-top-level/) now correctly handles React components and hooks that are nested inside other functions. Contributed by [@​arendjr](https://togithub.com/arendjr) ### [`v1.5.0`](https://togithub.com/biomejs/biome/blob/HEAD/CHANGELOG.md#150-2024-01-08) [Compare Source](https://togithub.com/biomejs/biome/compare/a88751306242058374575b9f511e3c22213032b6...c1fdabcde7f6517aa48bc511e71c8c66796637dd) Biome now scores 97% compatibility with Prettier and features more than 180 linter rules. ##### Analyzer ##### CLI ##### New features - Biome now shows a diagnostic when it encounters a protected file. Contributed by [@​ematipico](https://togithub.com/ematipico) - The command `biome migrate` now updates the `$schema` if there's an outdated version. - The CLI now takes in consideration the `.gitignore` in the home directory of the user, if it exists. Contributed by [@​ematipico](https://togithub.com/ematipico) - The `biome ci` command is now able to print [GitHub Workflow Commands](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions) when there are diagnostics in our code. Contributed by [@​nikeee](https://togithub.com/nikeee) This **might** require setting the proper permissions on your GitHub action: ```yaml permissions: pull-requests: write ``` - The commands `format`, `lint`, `check` and `ci` now accept two new arguments: `--changed` and `--since`. Use these options with the VCS integration is enabled to process only the files that were changed. Contributed by [@​simonxabris](https://togithub.com/simonxabris) ```shell biome format --write --changed ``` - Introduced a new command called `biome explain`, which has the capability to display documentation for lint rules. Contributed by [@​kalleep](https://togithub.com/kalleep) - You can use the command `biome explain` to print the documentation of lint rules. Contributed by [@​kalleep](https://togithub.com/kalleep) ```shell biome explain noDebugger biome explain useAltText ``` - You can use the command `biome explain` to print the directory where daemon logs are stored. Contributed by [@​ematipico](https://togithub.com/ematipico) ```shell biome explain daemon-logs ``` - Removed the hard coded limit of 200 printable diagnostics. Contributed by [@​ematipico](https://togithub.com/ematipico) ##### Bug fixes - Fix [#​1247](https://togithub.com/biomejs/biome/issues/1247), Biome now prints a **warning** diagnostic if it encounters files that can't handle. Contributed by [@​ematipico](https://togithub.com/ematipico) You can ignore unknown file types using the [`files.ignoreUnknown`](https://biomejs.dev/reference/configuration/#filesignoreunknown) configuration in `biome.json`: ```jsonc { "files": { "ignoreUnknown": true } } ``` Or the `--files-ignore-unknown` CLI option: ```shell biome format --files-ignore-unknown=true --write . ``` - Fix [#​709](https://togithub.com/biomejs/biome/issues/709) and [#​805](https://togithub.com/biomejs/biome/issues/805) by correctly parsing `.gitignore` files. Contributed by [@​ematipico](https://togithub.com/ematipico) - Fix [#​1117](https://togithub.com/biomejs/biome/issues/1117) by correctly respecting the matching. Contributed by [@​ematipico](https://togithub.com/ematipico) - Fix [#​691](https://togithub.com/biomejs/biome/issues/691) and [#​1190](https://togithub.com/biomejs/biome/issues/1190), by correctly apply the configuration when computing [`overrides` configuration](https://biomejs.dev/reference/configuration/#overrides). Contributed by [@​ematipico](https://togithub.com/ematipico) ##### Configuration ##### New features - Users can specify *git ignore patterns* inside `ignore` and `include` properties, for example it's possible to **allow list** globs of files using the `!` character: ```jsonc { "files": { "ignore": [ "node_modules/**", "!**/dist/**" // this is now accepted and allow files inside the `dist` folder ] } } ``` ##### Editors ##### New features - The LSP registers formatting without the need of using dynamic capabilities from the client. This brings formatting services to the editors that don't support or have limited support for dynamic capabilities. ##### Formatter ##### Bug fixes - Fix [#​1169](https://togithub.com/biomejs/biome/issues/1169). Account for escaped strings when computing layout for assignments. Contributed by [@​kalleep](https://togithub.com/kalleep) - Fix [#​851](https://togithub.com/biomejs/biome/issues/851). Allow regular function expressions to group and break as call arguments, just like arrow function expressions. [#​1003](https://togithub.com/biomejs/biome/issues/1003) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix [#​914](https://togithub.com/biomejs/biome/issues/914). Only parenthesize type-casted function expressions as default exports. [#​1023](https://togithub.com/biomejs/biome/issues/1023) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix [#​1112](https://togithub.com/biomejs/biome/issues/1112). Break block bodies in case clauses onto their own lines and preserve trailing fallthrough comments. [#​1035](https://togithub.com/biomejs/biome/pull/1035) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix `RemoveSoftLinesBuffer` behavior to also removed conditional expanded content, ensuring no accidental, unused line breaks are included [#​1032](https://togithub.com/biomejs/biome/pull/1032) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix [#​1024](https://togithub.com/biomejs/biome/issues/1024). Allow JSX expressions to nestle in arrow chains [#​1033](https://togithub.com/biomejs/biome/pull/1033) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix incorrect breaking on the left side of assignments by always using fluid assignment. [#​1021](https://togithub.com/biomejs/biome/pull/1021) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix breaking strategy for nested object patterns in function parameters [#​1054](https://togithub.com/biomejs/biome/pull/1054) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix over-indention of arrow chain expressions by simplifying the way each chain is grouped [#​1036](https://togithub.com/biomejs/biome/pull/1036), [#​1136](https://togithub.com/biomejs/biome/pull/1136), and [#​1162](https://togithub.com/biomejs/biome/pull/1162) Contributed by [@​faultyserver](https://togithub.com/faultyserver). - Fix "simple" checks for calls and member expressions to correctly handle array accesses, complex arguments to single-argument function calls, and multiple-argument function calls. [#​1057](https://togithub.com/biomejs/biome/pull/1057) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix text wrapping and empty line handling for JSX Text elements to match Prettier's behavior. [#​1075](https://togithub.com/biomejs/biome/pull/1075) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix leading comments in concisely-printed arrays to prevent unwanted line breaks. [#​1135](https://togithub.com/biomejs/biome/pull/1135) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix `best_fitting` and interned elements preventing expansion propagation from sibling elements. [#​1141](https://togithub.com/biomejs/biome/pull/1141) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix heuristic for grouping function parameters when type parameters with constraints are present. [#​1153](https://togithub.com/biomejs/biome/pull/1153). Contributed by [@​faultyserver](https://togithub.com/faultyserver). - Fix binary-ish and type annotation handling for grouping call arguments in function expressions and call signatures. [#​1152](https://togithub.com/biomejs/biome/pull/1152) and [#​1160](https://togithub.com/biomejs/biome/pull/1160) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix handling of nestled JSDoc comments to preserve behavior for overloads. [#​1195](https://togithub.com/biomejs/biome/pull/1195) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix [#​1208](https://togithub.com/biomejs/biome/issues/1208). Fix extraction of inner types when checking for simple type annotations in call arguments. [#​1195](https://togithub.com/biomejs/biome/pull/1195) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix [#​1220](https://togithub.com/biomejs/biome/issues/1220). Avoid duplicating comments in type unions for mapped, empty object, and empty tuple types. [#​1240](https://togithub.com/biomejs/biome/pull/1240) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix [#​1356](https://togithub.com/biomejs/biome/issues/1356). Ensure `if_group_fits_on_line` content is always written in `RemoveSoftLinesBuffer`s. [#​1357](https://togithub.com/biomejs/biome/pull/1357) Contributed by [@​faultyserver](https://togithub.com/faultyserver) - Fix [#​1171](https://togithub.com/biomejs/biome/issues/1171). Correctly format empty statement with comment inside arrow body when used as single argument in call expression. Contributed by [@​kalleep](https://togithub.com/kalleep) - Fix [#​1106](https://togithub.com/biomejs/biome/issues/1106). Fix invalid formatting of single bindings when Arrow Parentheses is set to "AsNeeded" and the expression breaks over multiple lines. [#​1449](https://togithub.com/biomejs/biome/pull/1449) Contributed by [@​faultyserver](https://togithub.com/faultyserver) ##### JavaScript APIs ##### Linter ##### Promoted rules New rules are incubated in the nursery group. Once stable, we promote them to a stable group. The following rules are promoted: - [a11y/noAriaHiddenOnFocusable](https://www.biomejs.dev/linter/rules/no-aria-hidden-on-focusable) - [a11y/useValidAriaRole](https://www.biomejs.dev/linter/rules/use-valid-aria-role) - [complexity/useRegexLiterals](https://www.biomejs.dev/linter/rules/use-regex-literals) - [suspicious/noImplicitAnyLet](https://www.biomejs.dev/linter/rules/no-implicit-any-let) - [style/noDefaultExport](https://www.biomejs.dev/linter/rules/no-default-export) ##### New features - Add [useExportType](https://biomejs.dev/linter/rules/use-export-type) that enforces the use of type-only exports for types. Contributed by [@​Conaclos](https://togithub.com/Conaclos) ```diff interface A {} interface B {} class C {} - export type { A, C } + export { type A, C } - export { type B } + export type { B } ``` - Add [useImportType](https://biomejs.dev/linter/rules/use-import-type) that enforces the use of type-only imports for types. Contributed by [@​Conaclos](https://togithub.com/Conaclos) ```diff - import { A, B } from "./mod.js"; + import { type A, B } from "mod"; let a: A; const b: B = new B(); ``` Also, the rule groups type-only imports: ```diff - import { type A, type B } from "./mod.js"; + import type { A, B } from "./mod.js"; ``` - Add [useFilenamingConvention](https://biomejs.dev/linter/rules/use-filenaming-convention), that enforces naming conventions for JavaScript and TypeScript filenames. Contributed by [@​Conaclos](https://togithub.com/Conaclos) By default, the rule requires that a filename be in `camelCase`, `kebab-case`, `snake_case`, or matches the name of an `export` in the file. The rule provides options to restrict the allowed cases. - Add [useNodejsImportProtocol](https://biomejs.dev/linter/rules/use-nodejs-import-protocol) that enforces the use of the `node:` protocol when importing *Node.js* modules. Contributed by [@​2-NOW](https://togithub.com/2-NOW), [@​vasucp1207](https://togithub.com/vasucp1207), and [@​Conaclos](https://togithub.com/Conaclos) ```diff - import fs from "fs"; + import fs from "node:fs"; ``` - Add [useNumberNamespace](https://biomejs.dev/linter/rules/use-number-namespace) that enforces the use of the `Number` properties instead of the global ones. ```diff - parseInt; + Number.parseInt; - - Infinity; + Number.NEGATIVE_INFINITY; ``` - Add [useShorthandFunctionType](https://biomejs.dev/linter/rules/use-shorthand-function-type) that enforces using function types instead of object type with call signatures. Contributed by [@​emab](https://togithub.com/emab), [@​ImBIOS](https://togithub.com/ImBIOS), and [@​seitarof](https://togithub.com/seitarof) ```diff - interface Example { - (): string; - } + type Example = () => string ``` ```` - Add [noNodejsModules](https://biomejs.dev/linter/rules/no-nodejs-modules), that disallows the use of _Node.js_ modules. Contributed by @​anonrig, @​ematipico, and @​Conaclos - Add [noInvalidUseBeforeDeclaration](https://biomejs.dev/linter/rules/no-invalid-use-before-declaration) that reports variables and function parameters used before their declaration. Contributed by @​Conaclos ```js function f() { console.log(c); // Use of `c` before its declaration. const c = 0; } ```` - Add [useConsistentArrayType](https://biomejs.dev/linter/rules/use-consistent-array-type) that enforces the use of a consistent syntax for array types. Contributed by [@​eryue0220](https://togithub.com/eryue0220) This rule will replace [useShorthandArrayType](https://biomejs.dev/linter/rules/use-shorthand-array-type). It provides an option to choose between the shorthand or the generic syntax. - Add [noEmptyTypeParameters](https://biomejs.dev/linter/rules/no-empty-type-parameters) that ensures that any type parameter list has at least one type parameter. Contributed by [@​togami2864](https://togithub.com/togami2864) This will report the following empty type parameter lists: ```ts interface Foo<> {} // ^^ type Bar<> = {}; // ^^ ``` - Add [noGlobalEval](https://biomejs.dev/linter/rules/no-global-eval) that reports any use of the global `eval`. Contributed by [@​you-5805](https://togithub.com/you-5805) - Add [noGlobalAssign](https://biomejs.dev/linter/rules/no-global-assign) that reports assignment to global variables. Contributed by [@​chansuke](https://togithub.com/chansuke) ```js Object = {}; // report assignment to `Object`. ``` - Add [noMisleadingCharacterClass](https://biomejs.dev/linter/rules/no-misleading-character-class) that disallows characters made with multiple code points in character class. Contributed by [@​togami2864](https://togithub.com/togami2864) - Add [noThenProperty](https://biomejs.dev/linter/rules/no-then-property) that disallows the use of `then` as property name. Adding a `then` property makes an object *thenable* that can lead to errors with Promises. Contributed by [@​togami2864](https://togithub.com/togami2864) - Add [noUselessTernary](https://biomejs.dev/linter/rules/no-useless-ternary) that disallows conditional expressions (ternaries) when simpler alternatives exist. ```js var a = x ? true : true; // this could be simplified to `x` ``` ##### Enhancements - [noEmptyInterface](https://biomejs.dev/linter/rules/no-empty-interface) ignores empty interfaces that extend a type. Address [#​959](https://togithub.com/biomejs/biome/issues/959) and [#​1157](https://togithub.com/biomejs/biome/issues/1157). Contributed by [@​Conaclos](https://togithub.com/Conaclos) This allows supporting interface augmentation in external modules as demonstrated in the following example: ```ts interface Extension { metadata: unknown; } declare module "@​external/module" { // Empty interface that extends a type. export interface ExistingInterface extends Extension {} } ``` - Preserve more comments in the code fix of [useExponentiationOperator](https://biomejs.dev/linter/rules/use-exponentiation-operator). Contributed by [@​Conaclos](https://togithub.com/Conaclos) The rule now preserves comments that follow the (optional) trailing comma. For example, the rule now suggests the following code fix: ```diff - Math.pow( - a, // a - 2, // 2 - ); + + a ** // a + 2 // 2 + ``` - `` element is now considered as a non-interactive HTML element ([#​1095](https://togithub.com/biomejs/biome/issues/1095)). Contributed by [@​chansuke](https://togithub.com/chansuke) This affects the following rules: - [noAriaHiddenOnFocusable](https://biomejs.dev/linter/rules/no-aria-hidden-on-focusable) - [noInteractiveElementToNoninteractiveRole](https://biomejs.dev/linter/rules/no-interactive-element-to-noninteractive-role) - [noNoninteractiveElementToInteractiveRole](https://biomejs.dev/linter/rules/no-noninteractive-element-to-interactive-role) - [noNoninteractiveTabindex](https://biomejs.dev/linter/rules/no-noninteractive-tabindex) - [useAriaActivedescendantWithTabindex](https://biomejs.dev/linter/rules/use-aria-activedescendant-with-tabindex) - [noMultipleSpacesInRegularExpressionLiterals](https://biomejs.dev/linter/rules/no-multiple-spaces-in-regular-expression-literals/) has a safe code fix. Contributed by [@​Conaclos](https://togithub.com/Conaclos) - [useArrowFunction](https://biomejs.dev/linter/rules/use-arrow-function/) ignores expressions that use `new.target`. Contributed by [@​Conaclos](https://togithub.com/Conaclos) - [noForEach](https://biomejs.dev/linter/rules/no-for-each) now reports only calls that use a callback with `0` or `1` parameter. Address [#​547](https://togithub.com/biomejs/biome/issues/547). Contributed by [@​Conaclos](https://togithub.com/Conaclos) ##### Bug fixes - Fix [#​1061](https://togithub.com/biomejs/biome/issues/1061). [noRedeclare](https://biomejs.dev/linter/rules/no-redeclare) no longer reports overloads of `export default function`. Contributed by [@​Conaclos](https://togithub.com/Conaclos) The following code is no longer reported: ```ts export default function(a: boolean): boolean; export default function(a: number): number; export default function(a: number | boolean): number | boolean { return a; } ``` - Fix [#​651](https://togithub.com/biomejs/biome/issues/651), [useExhaustiveDependencies](https://biomejs.dev/linter/rules/use-exhaustive-dependencies) no longer reports out of scope dependencies. Contributed by [@​kalleep](https://togithub.com/kalleep) The following code is no longer reported: ```ts let outer = false; const Component = ({}) => { useEffect(() => { outer = true; }, []); } ``` - Fix [#​1191](https://togithub.com/biomejs/biome/issues/1191). [noUselessElse](https://biomejs.dev/linter/rules/no-useless-else) now preserve comments of the `else` clause. Contributed by [@​Conaclos](https://togithub.com/Conaclos) For example, the rule suggested the following fix: ```diff function f(x) { if (x <0) { return 0; } - // Comment - else { return x; - } } ``` Now the rule suggests a fix that preserves the comment of the `else` clause: ```diff function f(x) { if (x <0) { return 0; } // Comment - else { return x; - } } ``` - Fix [#​1383](https://togithub.com/biomejs/biome/issues/1383). [noConfusingVoidType](https://biomejs.dev/linter/rules/no-confusing-void-type) now accepts the `void` type in type parameter lists. The rule no longer reports the following code: ```ts f(); ``` - Fix [#​728](https://togithub.com/biomejs/biome/issues/728). [useSingleVarDeclarator](https://biomejs.dev/linter/rules/use-single-var-declarator) no longer outputs invalid code. Contributed by [@​Conaclos](https://togithub.com/Conaclos) - Fix [#​1167](https://togithub.com/biomejs/biome/issues/1167). [useValidAriaProps](https://biomejs.dev/linter/rules/use-valid-aria-props) no longer reports `aria-atomic` as invalid. Contributed by [@​unvalley](https://togithub.com/unvalley) - Fix [#​1192](https://togithub.com/biomejs/biome/issues/1192). [useTemplate](https://biomejs.dev/linter/rules/use-template/) now correctly handles parenthesized expressions and respects type coercions. Contributed by [@​n-gude](https://togithub.com/n-gude) These cases are now properly handled: ```js "a" + (1 + 2) // `a${1 + 2}` ``` ```js 1 + (2 + "a") // `${1}${2}a` ``` - Fix [#​1456](https://togithub.com/biomejs/biome/issues/1456). [useTemplate](https://biomejs.dev/linter/rules/use-template/) now reports expressions with an interpolated template literal and non-string expressions. Contributed by [@​n-gude](https://togithub.com/n-gude) The following code is now reported: ```js `a${1}` + 2; ``` - Fix [#​1436](https://togithub.com/biomejs/biome/issues/1436). [useArrowFunction](https://biomejs.dev/linter/rules/use-arrow-function/) now applies a correct fix when a function expression is used in a call expression or a member access. Contributed by [@​Conaclos](https://togithub.com/Conaclos) For example, the rule proposed the following fix: ```diff - const called = function() {}(); + const called = () => {}(); ``` It now proposes a fix that adds the needed parentheses: ```diff - const called = function() {}(); + const called = (() => {})(); ``` - Fix [#​696](https://togithub.com/biomejs/biome/issues/696). [useHookAtTopLevel](https://biomejs.dev/linter/rules/use-hook-at-top-level) now correctly detects early returns before the calls to the hook. - The code fix of [noUselessTypeCOnstraint](https://biomejs.dev/linter/rules/no-useless-type-constraint) now adds a trailing comma when needed to disambiguate a type parameter list from a JSX element. COntributed by [@​Conaclos](https://togithub.com/Conaclos) - Fix [#​578](https://togithub.com/biomejs/biome/issues/578). [useExhaustiveDependencies](https://biomejs.dev/linter/rules/use-exhaustive-dependencies) now correctly recognizes hooks namespaced under the `React` namespace. Contributed by [@​XiNiHa](https://togithub.com/XiNiHa) - Fix [#​910](https://togithub.com/biomejs/biome/issues/910). [noSvgWithoutTitle](https://biomejs.dev/linter/rules/no-svg-without-title) now ignores `` element with `aria-hidden="true"`. COntributed by [@​vasucp1207](https://togithub.com/vasucp1207) ##### Parser ##### BREAKING CHANGES - The representation of imports has been simplified. Contributed by [@​Conaclos](https://togithub.com/Conaclos) The new representation is closer to the ECMAScript standard. It provides a single way of representing a namespace import such as `import * as ns from ""`. It rules out some invalid states that was previously representable. For example, it is no longer possible to represent a combined import with a `type` qualifier such as `import type D, { N } from ""`. See [#​1163](https://togithub.com/biomejs/biome/pull/1163) for more details. ##### New features - Imports and exports with both an *import attribute* and a `type` qualifier are now reported as parse errors. ```ts import type A from "mod" with { type: "json" }; // ^^^^ ^^^^^^^^^^^^^^^^^^^^^ // parse error ``` ##### Bug fixes - Fix [#​1077](https://togithub.com/biomejs/biome/issues/1077) where parenthesized identifiers in conditional expression were being parsed as arrow expressions. Contributed by [@​kalleep](https://togithub.com/kalleep) These cases are now properly parsed: *JavaScript*: ```javascript a ? (b) : a => {}; ``` *TypeScript*: ```ts a ? (b) : a => {}; ``` *JSX*: ```jsx bar ? (foo) : ({() => {}}); ``` - Allow empty type parameter lists for interfaces and type aliases ([#​1237](https://togithub.com/biomejs/biome/issues/1237)). COntributed by [@​togami2864](https://togithub.com/togami2864) *TypeScript* allows interface declarations and type aliases to have empty type parameter lists. Previously Biome didn't handle this edge case. Now, it correctly parse this syntax: ```ts interface Foo<> {} type Bar<> = {}; ``` ##### Crates ##### BREAKING CHANGES - Rename the `biome_js_unicode_table` crate to `biome_unicode_table` ([#​1302](https://togithub.com/biomejs/biome/issues/1302)). COntributed by [@​chansuke](https://togithub.com/chansuke)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • [ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.