CLI
Bug fixes
-
Don't process files under an ignored directory.
Previously, Biome processed all files in the traversed hierarchy,
even the files under an ignored directory.
Now, it completly skip the content of ignored directories. -
Fix #1508 by excluding deleted files from being processed. Contributed by @ematipico
-
Fix #1173. Fix the formatting of a single instruction with commented in a control flow body to ensure consistency. Contributed by @mdm317
-
Fix overriding of
javascript.globals
. Contributed by @arendjr
Editors
Bug fixes
- Fix a regression where ignored files where formatted in the editor. Contributed by @ematipico
Formatter
New features
- Biome now allows to format the
package.json
file. This is now the default behaviour and users can remove their workarounds.
If you rely on other tools to formatpackage.json
, you'll have to ignore it via configuration. Contributed by @pattrickrice
Bug fixes
-
Fix #1039. Check unicode width instead of number of bytes when checking if regex expression is a simple argument. Contributed by @kalleep
This no longer breaks.
s(/🚀🚀/).s().s();
-
Fix #1218, by correctly preserving empty lines in member chains. Contributed by @ah-yu
JavaScript APIs
Linter
New features
-
Add the rule noSkippedTests, to disallow skipped tests:
describe.skip("test", () => {}); it.skip("test", () => {});
Contributed by @ematipico
-
Add the rule noFocusedTests, to disallow skipped tests:
describe.only("test", () => {}); it.only("test", () => {});
Contributed by @ematipico
-
Add rule useSortedClasses, to sort CSS utility classes:
- <div class="px-2 foo p-4 bar" /> + <div class="foo·bar·p-4·px-2" />
Contributed by @DaniGuardiola
Enhancements
-
noUselessTernary now provides unsafe code fixes. Contributed by @vasucp1207
-
noApproximativeNumericConstant now provides unsafe code fixes and handle numbers without leading zero and numbers with digit separators.
The following numbers are now reported as approximated constants.
3.14_15; // PI .4342; // LOG10E
Contributed by @Conaclos
-
noPrecisionLoss no longer reports number with extra zeros.
The following numbers are now valid.
.1230000000000000000000000; 1230000000000000000000000.0;
Contributed by @Conaclos
Bug fixes
-
Fix #1651. noVar now ignores TsGlobalDeclaration. Contributed by @vasucp1207
-
Fix #1640. useEnumInitializers code action now generates valid code when last member has a comment but no comma. Contributed by @kalleep
-
Fix #1653. Handle a shorthand value in
useForOf
to avoid the false-positive case. Contributed by @togami2864 -
Fix #1656. useOptionalChain code action now correctly handles logical and chains where methods with the same name are invoked with different arguments:
- tags·&&·tags.includes('a')·&&·tags.includes('b') + tags?.includes('a') && tags.includes('b')
Contributed by @lucasweng
-
Fix #1704. Convert
/
to escaped slash\/
to avoid parsing error in the result of autofix. Contributed by @togami2864
Other changes
- chore: extract intellij plugin to new repo by @nhedger in #1214
- fix(website): json option key typo by @Sec-ant in #1657
- chore(linter): reduce string allocations by @ematipico in #1658
- docs(website): add third-party tool in continuous integration section by @mongolyy in #1585
- chore(linter): simplify visitor logic of
useSortedClasses
by @ematipico in #1667 - docs(website): update third-party tool version in continuous integration section by @mongolyy in #1670
- fix(lint/useExhaustiveDependencies): handle dynamic computed property access correctly by @XiNiHa in #1671
- fix(cli): use biome instead of rome on pipe by @Levieber in #1673
- refactor(rowan): use niching for Checkpoint by @Conaclos in #1675
- docs(internal): fix typos and reword some sentences by @nhedger in #1676
- refactor(website): remove underused glob pattern docs by @Conaclos in #1683
- chore(project): partial config macro by @arendjr in #1690
- docs(website): fix formatter configuration to website page by @po4tion in #1699
- refactor(backend-jsonrpc): remove unused types by @po4tion in #1705
- feat(formatter): Format package.json #1668 by @pattrickrice in #1694
- refactor(js-api): improve readability and reusability by @po4tion in #1708
- feat(cli): migrate
.prettierignore
file by @ematipico in #1576 - chore: change link to discussions on contributing guide by @kitcat-dev in #1711
- feat(js_analyzer): recognize the
NoInfer
utility type by @ah-yu in #1715 - Swap order of words in "has implicitly" -> "implicitly has" by @tylerlaprade in #1710
- docs: change 'ecnontrar' to 'encontrar' word in pt-br lang by @juliosouzam in #1720
New Contributors
- @mongolyy made their first contribution in #1585
- @mdm317 made their first contribution in #1655
- @ipanasenko made their first contribution in #1681
- @po4tion made their first contribution in #1699
- @pattrickrice made their first contribution in #1694
- @kitcat-dev made their first contribution in #1711
- @tylerlaprade made their first contribution in #1710
- @juliosouzam made their first contribution in #1720
Full Changelog: cli/v1.5.3-nightly.24fcf19...cli/v1.5.3-nightly.6cbf1c7