chore(deps): update dependency @biomejs/biome to v1.6.2 #220
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
1.5.1
->1.6.2
Release Notes
biomejs/biome (@biomejs/biome)
v1.6.2
Compare Source
Analyzer
Bug fixes
The
noSuperWithoutExtends
rule now allows for callingsuper()
in derived class constructors of class expressions (#2108). Contributed by @Sec-antFix discrepancies on file source detection. Allow module syntax in
.cts
files (#2114). Contributed by @Sec-antCLI
Bug fixes
Fixes #2131, where folders were incorrectly ignored when running the command
check
. Now folders are correctly ignored based on their command. Contributed by @ematipicoSmoother handling of
"endOfLine": "auto"
in prettier migration: falling back to"lf"
(#2145). Contributed by @eMerzhConfiguration
Bug fixes
all
andrecommend
presets in top-level and group-level configs is now correctly respected. More details can be seen in (#2072) (#2028). Contributed by @Sec-antFormatter
Bug fixes
JavaScript APIs
Enhancements
lintContent
method of theBiome
class (#1956). Contributed by @mnahkiesLinter
Bug fixes
Rule
noUndeclaredDependencies
now also validatespeerDependencies
andoptionalDependencies
(#2122). Contributed by @Sec-antRule
noUndeclaredDependencies
won't checkdeclare module
statements anymore (#2123). Contributed by @Sec-antFix #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 @arendjrRule
noUndeclaredVariables
now also checks for worker globals (#2121). Contributed by @Sec-antLSP
Bug fixes
Correctly parse
.jsonc
files. Contributed by @Sec-antCorrectly resolve external
extends
configs. Contributed by @Sec-antv1.6.1
Compare Source
CLI
Bug fixes
biome.jsonc
(#2008). Contributed by @Sec-antConfiguration
Bug fixes
json.formatter.trailingCommas
option now works inoverrides
(#2009). Contributed by @Sec-antLinter
New features
Add rule noDoneCallback, this rule checks the function parameter of hooks & tests
for use of the done argument, suggesting you return a promise instead. Contributed by @vasucp1207
Bug fixes
useJsxKeyInIterable now recognizes function bodies wrapped in parentheses (#2011). Contributed by @Sec-ant
useShorthandFunctionType now preserves type parameters of generic interfaces when applying fixes (#2015). Contributed by @Sec-ant
Code fixes of useImportType and useExportType now handle multiline statements (#2041). Contributed by @Conaclos
noRedeclare no longer reports type parameter and parameter with identical names (#1992).
The following code is no longer reported:
Contributed by @Conaclos
noRedeclare now reports duplicate type parameters in a same declaration.
The following type parameters are now reported as a redeclaraion:
Contributed by @Conaclos
noUndeclaredDependencies now recognizes imports of subpath exports.
E.g., the following import statements no longer report errors if
@mui/material
andtailwindcss
are installed as dependencies:Contributed by @Sec-ant
Parser
Bug fixes
JavaScript lexer is now able to lex regular expression literals with escaped non-ascii chars (#1941).
Contributed by @Sec-ant
v1.6.0
Compare Source
Analyzer
New features
.astro
files. Biome is able to sort imports inside the frontmatter of the Astro files. Contributedby @ematipico
v1.5.3
Compare Source
LSP
Bug fixes
Fix #1584. Ensure the LSP only registers the formatter once. Contributed by @nhedger
Fix #1589. Fix invalid formatting of own line comments when they were at the end of an import/export list. Contributed by @spanishpear
Configuration
Bug fixes
Override correctly the recommended preset (#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
Don't format ignored files that are well-known JSONC files when
files.ignoreUnknown
is enabled (#1607).Previously, Biome always formatted files that are known to be JSONC files (e.g.
.eslintrc
) whenfiles.ignoreUnknown
was enabled.Contributed by @Conaclos
Formatter
Bug fixes
Linter
Bug fixes
Fix #1575. noArrayIndexKey now captures array index value inside template literals and with string concatination. Contributed by @vasucp1207
Linter rules that inspect regexes now handle multibyte characters correctly (#1522).
Previously, noMisleadingCharacterClass, noMultipleSpacesInRegularExpressionLiterals, and noEmptyCharacterClassInRegex made Biome errors on multi-bytes characters.
Multibyte characters are now handled correctly.
The following code no longer raises an internal error:
Contributed by @Conaclos
useExhaustiveDependencies no longer made Biome errors in code TypeScript import equal declarations (#1194). Contributed by @Conaclos
Fix typo in the diagnostic of noNodejsModules. Contributed by @huseeiin
Parser
Bug fixes
Accept the
const
modifier for type parameter in method type signature (#1624).The following code is now correctly parsed:
Contributed by @magic-akari
Correctly parse type arguments in expression(#1184).
The following code is now correctly parsed in typescript:
Contributed by @ah-yu
Website
New
Fixes
Generate Open Graph images based on the linked page. Contributed by @ematipico
Fix examples of the git hook page. Contributed by @9renpoto, @lmauromb, and @Conaclos
Fix dead and erroneous hyperlinks. Contributed by @Sec-ant and Conaclos
v1.5.2
Compare Source
CLI
Bug fixes
Fix #1512 by skipping verbose diagnostics from the count. Contributed by @ematipico
Correctly handle cascading
include
andignore
.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/
.Contributed by @Conaclos
Don't emit verbose warnings when a protected file is ignored.
Some files, such as
package.json
andtsconfig.json
, are protected.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
overrides
no longer affect which files are ignored. Contributed by @ConaclosThe file
biome.json
can't be ignored anymore. Contributed by @ematipicoFix #1541 where the content of protected files wasn't returned to
stdout
. Contributed by @ematipicoDon't handle CSS files, the formatter isn't ready yet. Contributed by @ematipico
Configuration
Bug fixes
Fix 1440, a case where
extends
andoverrides
weren't correctly emitting the final configuration. Contributed by @arendjrCorrectly handle
include
whenignore
is set (#1468). Contributed by @ConaclosPreviously, Biome ignored
include
ifignore
was set.Now, Biome check both
include
andignore
.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 Contributed by @ah-yuFix #1406. Ensure comments before the
async
keyword are placed before it. Contributed by @ah-yuFix #1172. Fix placement of line comment after function expression parentheses, they are now attached to first statement in body. Contributed by @kalleep
Fix #1511 that made the JavaScript formatter crash. Contributed @Conaclos
Linter
Enhancements
Add an unsafe code fix for noConsoleLog. Contributed by @vasucp1207
useArrowFunction no longer reports function in
extends
clauses or in anew
expression. Contributed by @ConaclosThese cases require the presence of a prototype.
Add dependency variable names on error message when useExhaustiveDependencies rule shows errors. Contributed by @mehm8128
Bug fixes
The fix of useArrowFunction now adds parentheses around the arrow function in more cases where it is needed (#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:
Now:
Contributed by @Conaclos
Fix #1514. Fix autofix suggestion to avoid the syntax error in
no_useless_fragments
. Contributed by @togami2864Configuration
📅 Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ 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.
This PR has been generated by Mend Renovate. View repository job log here.