chore(deps): update dependency @biomejs/biome to v1.6.2#7
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
|
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@biomejs/biome@1.4.1 |
|
🚀 Expo preview is ready!
|
fe7a294 to
8b3da6b
Compare
8b3da6b to
25b3682
Compare
|
Deployment failed with the following error: |
25b3682 to
0277af8
Compare
0277af8 to
9170d15
Compare
9170d15 to
6c58ac2
Compare
6c58ac2 to
6df474d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.4.1->1.6.2Release Notes
biomejs/biome (@biomejs/biome)
v1.6.2Compare Source
Analyzer
Bug fixes
The
noSuperWithoutExtendsrule 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
.ctsfiles (#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
allandrecommendpresets 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
lintContentmethod of theBiomeclass (#1956). Contributed by @mnahkiesLinter
Bug fixes
Rule
noUndeclaredDependenciesnow also validatespeerDependenciesandoptionalDependencies(#2122). Contributed by @Sec-antRule
noUndeclaredDependencieswon't checkdeclare modulestatements anymore (#2123). Contributed by @Sec-antFix #1925. The fix for
useOptionalChainwould 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
noUndeclaredVariablesnow also checks for worker globals (#2121). Contributed by @Sec-antLSP
Bug fixes
Correctly parse
.jsoncfiles. Contributed by @Sec-antCorrectly resolve external
extendsconfigs. Contributed by @Sec-antv1.6.1Compare Source
CLI
Bug fixes
biome.jsonc(#2008). Contributed by @Sec-antConfiguration
Bug fixes
json.formatter.trailingCommasoption 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/materialandtailwindcssare 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.0Compare Source
Analyzer
New features
.astrofiles. Biome is able to sort imports inside the frontmatter of the Astro files. Contributedby @ematipico
v1.5.3Compare 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
overridesunless told to do so.Contributed by @Conaclos
Don't format ignored files that are well-known JSONC files when
files.ignoreUnknownis enabled (#1607).Previously, Biome always formatted files that are known to be JSONC files (e.g.
.eslintrc) whenfiles.ignoreUnknownwas 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
constmodifier 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.2Compare Source
CLI
Bug fixes
Fix #1512 by skipping verbose diagnostics from the count. Contributed by @ematipico
Correctly handle cascading
includeandignore.Previously Biome incorrectly included files that were included at tool level and ignored at global level.
In the following example,
file.jswas formatted when it should have been ignored.Now, Biome correctly ignores the directory
./src/sub/.❯ tree src src └── sub └── file.js ❯ cat biome.json { "files": { "ignore": ["./src/sub/"] }, "formatter": { "include": ["./src"] } }Contributed by @Conaclos
Don't emit verbose warnings when a protected file is ignored.
Some files, such as
package.jsonandtsconfig.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
overridesno longer affect which files are ignored. Contributed by @ConaclosThe file
biome.jsoncan'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
extendsandoverridesweren't correctly emitting the final configuration. Contributed by @arendjrCorrectly handle
includewhenignoreis set (#1468). Contributed by @ConaclosPreviously, Biome ignored
includeifignorewas set.Now, Biome check both
includeandignore.A file is processed if it is included and not ignored.
If
includeis 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
asynckeyword 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
extendsclauses or in anewexpression. 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 @togami2864v1.5.1Compare Source
CLI
Bug fixes
files/missingHandlerare now shown only when the option--verboseis passed. Contributed by @ematipico--verboseis passed. Contributed by @ematipicoFormatter
Bug fixes
Linter
Bug fixes
Fix #1335. noUselessFragments now ignores code action on component props when the fragment is empty. Contributed by @vasucp1207
useConsistentArrayType was accidentally placed in the
stylerule group instead of thenurserygroup. It is now correctly placed undernursery.Fix #1483. useConsistentArrayType now correctly handles its option. Contributed by @Conaclos
Fix #1502. useArrowFunction now correctly handle functions that return a (comma) sequence expression. Contributed by @Conaclos
Previously the rule made an erroneous suggestion:
Now, the rule wraps any comma sequence between parentheses:
Fix #1473: useHookAtTopLevel now correctly handles React components and hooks that are nested inside other functions. Contributed by @arendjr
v1.5.0Compare Source
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
The command
biome migratenow updates the$schemaif there's an outdated version.The CLI now takes in consideration the
.gitignorein the home directory of the user, if it exists. Contributed by @ematipicoThe
biome cicommand is now able to print GitHub Workflow Commands when there are diagnostics in our code. Contributed by @nikeeeThis might require setting the proper permissions on your GitHub action:
The commands
format,lint,checkandcinow accept two new arguments:--changedand--since. Use these options with the VCS integrationis enabled to process only the files that were changed. Contributed by @simonxabris
Introduced a new command called
biome explain, which has the capability to display documentation for lint rules. Contributed by @kalleepYou can use the command
biome explainto print the documentation of lint rules. Contributed by @kalleepYou can use the command
biome explainto print the directory where daemon logs are stored. Contributed by @ematipicoRemoved the hard coded limit of 200 printable diagnostics. Contributed by @ematipico
Bug fixes
Fix #1247, Biome now prints a warning diagnostic if it encounters files that can't handle. Contributed by @ematipico
You can ignore unknown file types using the
files.ignoreUnknownconfiguration inbiome.json:{ "files": { "ignoreUnknown": true } }Or the
--files-ignore-unknownCLI option:biome format --files-ignore-unknown=true --write .Fix #709 and #805 by correctly parsing
.gitignorefiles. Contributed by @ematipicoFix #1117 by correctly respecting the matching. Contributed by @ematipico
Fix #691 and #1190, by correctly apply the configuration when computing
overridesconfiguration. Contributed by @ematipicoConfiguration
New features
Users can specify git ignore patterns inside
ignoreandincludeproperties, for example it's possible to allow list globs of files using the!character:{ "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. Account for escaped strings when computing layout for assignments. Contributed by @kalleep
Fix #851. Allow regular function expressions to group and break as call arguments, just like arrow function expressions. #1003 Contributed by @faultyserver
Fix #914. Only parenthesize type-casted function expressions as default exports. #1023 Contributed by @faultyserver
Fix #1112. Break block bodies in case clauses onto their own lines and preserve trailing fallthrough comments. #1035 Contributed by @faultyserver
Fix
RemoveSoftLinesBufferbehavior to also removed conditional expanded content, ensuring no accidental, unused line breaks are included #1032 Contributed by @faultyserverFix #1024. Allow JSX expressions to nestle in arrow chains #1033 Contributed by @faultyserver
Fix incorrect breaking on the left side of assignments by always using fluid assignment. #1021 Contributed by @faultyserver
Fix breaking strategy for nested object patterns in function parameters #1054 Contributed by @faultyserver
Fix over-indention of arrow chain expressions by simplifying the way each chain is grouped #1036, #1136, and #1162 Contributed by @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 Contributed by @faultyserver
Fix text wrapping and empty line handling for JSX Text elements to match Prettier's behavior. #1075 Contributed by @faultyserver
Fix leading comments in concisely-printed arrays to prevent unwanted line breaks. #1135 Contributed by @faultyserver
Fix
best_fittingand interned elements preventing expansion propagation from sibling elements. #1141 Contributed by @faultyserverFix heuristic for grouping function parameters when type parameters with constraints are present. #1153. Contributed by @faultyserver.
Fix binary-ish and type annotation handling for grouping call arguments in function expressions and call signatures. #1152 and #1160 Contributed by @faultyserver
Fix handling of nestled JSDoc comments to preserve behavior for overloads. #1195 Contributed by @faultyserver
Fix #1208. Fix extraction of inner types when checking for simple type annotations in call arguments. #1195 Contributed by @faultyserver
Fix #1220. Avoid duplicating comments in type unions for mapped, empty object, and empty tuple types. #1240 Contributed by @faultyserver
Fix #1356. Ensure
if_group_fits_on_linecontent is always written inRemoveSoftLinesBuffers. #1357 Contributed by @faultyserverFix #1171. Correctly format empty statement with comment inside arrow body when used as single argument in call expression. Contributed by @kalleep
Fix #1106. Fix invalid formatting of single bindings when Arrow Parentheses is set to "AsNeeded" and the expression breaks over multiple lines. #1449 Contributed by @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:
New features
Add useExportType that enforces the use of type-only exports for types. Contributed by @Conaclos
interface A {} interface B {} class C {} - export type { A, C } + export { type A, C } - export { type B } + export type { B }Add useImportType that enforces the use of type-only imports for types. Contributed by @Conaclos
Also, the rule groups type-only imports:
Add useFilenamingConvention, that enforces naming conventions for JavaScript and TypeScript filenames. Contributed by @Conaclos
By default, the rule requires that a filename be in
camelCase,kebab-case,snake_case, or matches the name of anexportin the file.The rule provides options to restrict the allowed cases.
Add useNodejsImportProtocol that enforces the use of the
node:protocol when importing Node.js modules. Contributed by @2-NOW, @vasucp1207, and @ConaclosAdd useNumberNamespace that enforces the use of the
Numberproperties instead of the global ones.Add useShorthandFunctionType that enforces using function types instead of object type with call signatures. Contributed by @emab, @ImBIOS, and @seitarof
Add useConsistentArrayType that enforces the use of a consistent syntax for array types. Contributed by @eryue0220
This rule will replace useShorthandArrayType.
It provides an option to choose between the shorthand or the generic syntax.
Add noEmptyTypeParameters that ensures that any type parameter list has at least one type parameter. Contributed by @togami2864
This will report the following empty type parameter lists:
Add noGlobalEval that reports any use of the global
eval.Contributed by @you-5805
Add noGlobalAssign that reports assignment to global variables. Contributed by @chansuke
Add noMisleadingCharacterClass that disallows characters made with multiple code points in character class. Contributed by @togami2864
Add noThenProperty that disallows the use of
thenas property name. Adding athenproperty makes an object thenable that can lead to errors with Promises. Contributed by @togami2864Add noUselessTernary that disallows conditional expressions (ternaries) when simpler alternatives exist.
Enhancements
noEmptyInterface ignores empty interfaces that extend a type. Address #959 and #1157. Contributed by @Conaclos
This allows supporting interface augmentation in external modules as demonstrated in the following example:
Preserve more comments in the code fix of useExponentiationOperator. Contributed by @Conaclos
The rule now preserves comments that follow the (optional) trailing comma.
For example, the rule now suggests the following code fix:
<svg>element is now considered as a non-interactive HTML element (#1095). Contributed by @chansukeThis affects the following rules:
noMultipleSpacesInRegularExpressionLiterals has a safe code fix. Contributed by @Conaclos
useArrowFunction ignores expressions that use
new.target. Contributed by @ConaclosnoForEach now reports only calls that use a callback with
0or1parameter. Address #547. Contributed by @ConaclosBug fixes
Fix #1061. noRedeclare no longer reports overloads of
export default function. Contributed by @ConaclosThe following code is no longer reported:
Fix #651, useExhaustiveDependencies no longer reports out of scope dependencies. Contributed by @kalleep
The following code is no longer reported:
Fix #1191. noUselessElse now preserve comments of the
elseclause. Contributed by @ConaclosFor example, the rule suggested the following fix:
function f(x) { if (x <0) { return 0; } - // Comment - else { return x; - } }Now the rule suggests a fix that preserves the comment of the
elseclause:function f(x) { if (x <0) { return 0; } // Comment - else { return x; - } }Fix #1383. noConfusingVoidType now accepts the
voidtype in type parameter lists.The rule no longer reports the following code:
Fix #728. useSingleVarDeclarator no longer outputs invalid code. Contributed by @Conaclos
Fix #1167. useValidAriaProps no longer reports
aria-atomicas invalid. Contributed by @unvalleyFix #1192. useTemplate now correctly handles parenthesized expressions and respects type coercions. Contributed by @n-gude
These cases are now properly handled:
Fix #1456. useTemplate now reports expressions with an interpolated template literal and non-string expressions. Contributed by @n-gude
The following code is now reported:
Fix #1436. useArrowFunction now applies a correct fix when a function expression is used in a call expression or a member access. Contributed by @Conaclos
For example, the rule proposed the following fix:
It now proposes a fix that adds the needed parentheses:
Fix #696. useHookAtTopLevel now correctly detects early returns before the calls to the hook.
The code fix of noUselessTypeCOnstraint now adds a trailing comma when needed to disambiguate a type parameter list from a JSX element. COntributed by @Conaclos
Fix #578. useExhaustiveDependencies now correctly recognizes hooks namespaced under the
Reactnamespace. Contributed by @XiNiHaFix #910. noSvgWithoutTitle now ignores
<svg>element witharia-hidden="true". COntributed by @vasucp1207Parser
BREAKING CHANGES
The representation of imports has been simplified. Contributed by @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
typequalifier such asimport type D, { N } from "".See #1163 for more details.
New features
Imports and exports with both an import attribute and a
typequalifier are now reported as parse errors.Bug fixes
Fix #1077 where parenthesized identifiers in conditional expression were being parsed as arrow expressions. Contributed by @kalleep
These cases are now properly parsed:
JavaScript:
TypeScript:
JSX:
Allow empty type parameter lists for interfaces and type aliases (#1237). COntributed by @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:
Crates
BREAKING CHANGES
biome_js_unicode_tablecrate tobiome_unicode_table(#1302). COntributed by @chansukeConfiguration
📅 Schedule: Branch creation - At any time (no schedule defined), 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.