Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d6a05b5
feat(cli): enhanced summary reporter (#6731)
ematipico Jul 9, 2025
d1a315d
feat(biome_js_analyze): allow specifying stable object keys in `useEx…
josh- Jul 9, 2025
0d91423
Merge branch 'main' into next
ematipico Jul 16, 2025
1f8755b
feat(noRestrictedImports): add the patterns option (#5506)
sakai-ast Jul 22, 2025
90c5d6b
feat: support configureable sorting mode for imports, keys and attrib…
nazarhussain Jul 22, 2025
5f96cd7
Merge branch 'main' into next
arendjr Jul 23, 2025
527db7f
feat(wasm): expose new functions (#6896)
ematipico Jul 24, 2025
65a5f34
ci: sync `next` branch to the website repo (#7011)
siketyan Jul 26, 2025
b510e6f
feat(wasm): expose Workspace::scan_project_folder (#7005)
siketyan Jul 26, 2025
f02a296
feat(formatter): add option to split binary expressions before operat…
bavalpey Jul 26, 2025
0589f08
feat(qwik): add domain setup and enable some pre-existing rules (#6923)
ptkagori Jul 28, 2025
d6e68b0
Merge branch 'main' into next
siketyan Aug 5, 2025
85b1128
feat(core): scanner v2 (#6989)
arendjr Aug 5, 2025
76df523
chore: tweak CodeRabbit (#7132)
arendjr Aug 6, 2025
d4e0e64
perf: minor performance tweaks (#7122)
siketyan Aug 6, 2025
f0e9439
fix: revive wasm build (#7136)
siketyan Aug 6, 2025
9844eda
feat(lint): add `ignoreTypes` option to the `noImportCycles` rule (#7…
siketyan Aug 7, 2025
a53d075
Merge branch 'main' into next
siketyan Aug 7, 2025
c292458
Merge branch 'main' into next
siketyan Aug 7, 2025
3e4cc2d
Merge remote-tracking branch 'origin/main' into next
ematipico Aug 9, 2025
7331bb9
feat(parser/html): text expressions in attributes (#6907)
ematipico Aug 9, 2025
a653a0f
feat: promote rules (#7137)
ematipico Aug 9, 2025
df3afdf
feat(lint): add `useBiomeIgnoreFolder` and `noBiomeFirstException` (#…
ematipico Aug 11, 2025
257498a
Merge remote-tracking branch 'origin/main' into next
ematipico Aug 11, 2025
ebb1b46
merge main and update codegen
ematipico Aug 11, 2025
d405484
chore: address linting
ematipico Aug 11, 2025
363bea0
chore: skip rule when there's an `extends`
ematipico Aug 11, 2025
e16edad
fix linting and workspace methods
ematipico Aug 11, 2025
9121690
[autofix.ci] apply automated fixes
autofix-ci[bot] Aug 11, 2025
3426710
chore: document variants
ematipico Aug 12, 2025
7d00fdd
[autofix.ci] apply automated fixes
autofix-ci[bot] Aug 12, 2025
a78e878
feat(core): add support for `.graphqls` files (#7118)
avshalomt2 Aug 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
79 changes: 79 additions & 0 deletions .changeset/better-adults-roll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
"@biomejs/biome": minor
---

The `noRestrictedImports` rule has been enhanced with a new `patterns` option. This option allows for more flexible and powerful import restrictions using gitignore-style patterns.

You can now define patterns to restrict entire groups of modules. For example, you can disallow imports from any path under `import-foo/` except for `import-foo/baz`.

```json
{
"options": {
"patterns": [
{
"group": ["import-foo/*", "!import-foo/baz"],
"message": "import-foo is deprecated, except for modules in import-foo/baz."
}
]
}
}
```

**Invalid examples**
```js
import foo from 'import-foo/foo';
import bar from 'import-foo/bar';
```

**Valid examples**
```js
import baz from 'import-foo/baz';
```

Additionally, the `patterns` option introduces `importNamePattern` to restrict specific import names using regular expressions.
The following example restricts the import names that match `x` , `y` or `z` letters from modules under `import-foo/`.
```json
{
"options": {
"patterns": [
{
"group": ["import-foo/*"],
"importNamePattern": "[xyz]"
}
]
}
}
```
**Invalid examples**
```js
import { x } from 'import-foo/foo';
```

**Valid examples**
```js
import { foo } from 'import-foo/foo';
```

Furthermore, you can use the `invertImportNamePattern` boolean option to reverse this logic. When set to true, only the import names that match the `importNamePattern` will be allowed. The following configuration only allows the import names that match `x` , `y` or `z` letters from modules under `import-foo/`.
```json
{
"options": {
"patterns": [
{
"group": ["import-foo/*"],
"importNamePattern": "[xyz]",
"invertImportNamePattern": true
}
]
}
}
```
**Invalid examples**
```js
import { foo } from 'import-foo/foo';
```

**Valid examples**
```js
import { x } from 'import-foo/foo';
```
21 changes: 21 additions & 0 deletions .changeset/brave-trees-push.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@biomejs/biome": patch
---

Added a new **experimental option** that allows parsing of `.html` files that contain interpolation syntax.

```json5
// biome.json
{
"html": {
// This is the new, experimental option.
"parser": {
"interpolation": true
}
}
}
```

```html
<h1>{{ $title }}</h1>
```
14 changes: 14 additions & 0 deletions .changeset/fancy-trains-happen.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@biomejs/biome": minor
---

Allow customization of the sort order for different sorting actions. These actions now support a sort option:

- [`assist/source/useSortedKeys`](https://biomejs.dev/assist/actions/use-sorted-keys/) now has a `sortOrder` option
- [`assist/source/useSortedAttributes`](https://biomejs.dev/assist/actions/use-sorted-attributes/) now has a `sortOrder` option
- [`assist/source/organizeImports`](https://biomejs.dev/assist/actions/organize-imports/) now has an `identifierOrder` option

For each of these options, the supported values are the same:

1. **`natural`**. Compares two strings using a natural ASCII order. Uppercase letters come first (e.g. `A` < `a` < `B` < `b`) and number are compared in a human way (e.g. `9` < `10`). This is the default value.
2. **`lexicographic`**. Strings are ordered lexicographically by their byte values. This orders Unicode code points based on their positions in the code charts. This is not necessarily the same as “alphabetical” order, which varies by language and locale.
21 changes: 21 additions & 0 deletions .changeset/floppy-sloths-visit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
"@biomejs/biome": minor
---

Added the new rule `useBiomeIgnoreFolder`. Since v2.2, Biome correctly prevents the indexing and crawling of folders.

However, the correct pattern has changed. This rule attempts to detect incorrect usage, and promote the new pattern:

```diff
// biome.json
{
"files": {
"includes": [
- "!dist/**",
- "!**/fixtures/**",
+ "!dist",
+ "!**/fixtures",
]
}
}
```
9 changes: 9 additions & 0 deletions .changeset/ignored-iguanodon-ignites.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@biomejs/biome": minor
---

Fixed minor inconsistencies in how `files.includes` was being handled.

Previously, Biome sometimes failed to properly ignore the contents of a folder if you didn't specify the `/**` at the end of a glob pattern. This was unfortunate, because it meant we still had to traverse the folder and then apply the glob to every entry inside it.

This is no longer an issue and we now recommend to ignore folders without using the `/**` suffix.
5 changes: 5 additions & 0 deletions .changeset/legal-mugs-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@biomejs/biome": minor
---

Added support for `.graphqls` files. Biome can now format and lint GraphQL files that have the extension `.graphqls`
41 changes: 41 additions & 0 deletions .changeset/mighty-seals-dance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
"@biomejs/biome": minor
---

Added a new option to Biome's JavaScript formatter, `javascript.formatter.operatorLinebreak`, to configure whether long lines should be broken before or after binary operators.

For example, the following configuration:

```json
{
"formatter": {
"javascript": {
"operatorLinebreak": "before" // defaults to "after"
}
}
}
```

Will cause this JavaScript file:

```js
const VERY_LONG_CONDITION_1234123412341234123412341234 = false;

if (VERY_LONG_CONDITION_1234123412341234123412341234 && VERY_LONG_CONDITION_1234123412341234123412341234 && VERY_LONG_CONDITION_1234123412341234123412341234 && VERY_LONG_CONDITION_1234123412341234123412341234) {
console.log("DONE")
}
```

to be formatted like this:

```js
const VERY_LONG_CONDITION_1234123412341234123412341234 = false;
if (
VERY_LONG_CONDITION_1234123412341234123412341234
&& VERY_LONG_CONDITION_1234123412341234123412341234
&& VERY_LONG_CONDITION_1234123412341234123412341234
&& VERY_LONG_CONDITION_1234123412341234123412341234
) {
console.log("DONE")
}
```
80 changes: 80 additions & 0 deletions .changeset/promote-and-rename-rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
"@biomejs/biome": minor
---

Promoted multiple lint rules from nursery to stable groups and renamed several rules for consistency.

#### Promoted rules

The following rules have been promoted from nursery to stable groups:

##### CSS

- Promoted [`noImportantStyles`](https://biomejs.dev/linter/rules/no-important-styles) to the `complexity` group.
- Promoted [`noUnknownAtRules`](https://biomejs.dev/linter/rules/no-unknown-at-rules) to the `suspicious` group.
##### GraphQL

- Promoted [`useGraphqlNamedOperations`](https://biomejs.dev/linter/rules/use-graphql-named-operations) to the `correctness` group.
- Promoted [`useGraphqlNamingConvention`](https://biomejs.dev/linter/rules/use-graphql-naming-convention) to the `style` group.
##### JavaScript/TypeScript

- Promoted [`noExcessiveLinesPerFunction`](https://biomejs.dev/linter/rules/no-excessive-lines-per-function) to the `complexity` group.
- Promoted [`noImplicitCoercions`](https://biomejs.dev/linter/rules/no-implicit-coercions) to the `complexity` group.
- Promoted [`useIndexOf`](https://biomejs.dev/linter/rules/use-index-of) to the `complexity` group.
- Promoted [`noGlobalDirnameFilename`](https://biomejs.dev/linter/rules/no-global-dirname-filename) to the `correctness` group.
- Promoted [`noNestedComponentDefinitions`](https://biomejs.dev/linter/rules/no-nested-component-definitions) to the `correctness` group.
- Promoted [`noProcessGlobal`](https://biomejs.dev/linter/rules/no-process-global) to the `correctness` group.
- Promoted [`noReactPropAssignments`](https://biomejs.dev/linter/rules/no-react-prop-assignments) to the `correctness` group.
- Promoted [`noRestrictedElements`](https://biomejs.dev/linter/rules/no-restricted-elements) to the `correctness` group.
- Promoted [`noSolidDestructuredProps`](https://biomejs.dev/linter/rules/no-solid-destructured-props) to the `correctness` group.
- Promoted [`useJsonImportAttributes`](https://biomejs.dev/linter/rules/use-json-import-attributes) to the `correctness` group.
- Promoted [`useParseIntRadix`](https://biomejs.dev/linter/rules/use-parse-int-radix) to the `correctness` group.
- Promoted [`useSingleJsDocAsterisk`](https://biomejs.dev/linter/rules/use-single-js-doc-asterisk) to the `correctness` group.
- Promoted [`useUniqueElementIds`](https://biomejs.dev/linter/rules/use-unique-element-ids) to the `correctness` group.
- Promoted [`noAwaitInLoops`](https://biomejs.dev/linter/rules/no-await-in-loops) to the `performance` group.
- Promoted [`noUnwantedPolyfillio`](https://biomejs.dev/linter/rules/no-unwanted-polyfillio) to the `performance` group.
- Promoted [`useGoogleFontPreconnect`](https://biomejs.dev/linter/rules/use-google-font-preconnect) to the `performance` group.
- Promoted [`useSolidForComponent`](https://biomejs.dev/linter/rules/use-solid-for-component) to the `performance` group.
- Promoted [`noMagicNumbers`](https://biomejs.dev/linter/rules/no-magic-numbers) to the `style` group.
- Promoted [`useConsistentObjectDefinitions`](https://biomejs.dev/linter/rules/use-consistent-object-definitions) to the `style` group.
- Promoted [`useExportsLast`](https://biomejs.dev/linter/rules/use-exports-last) to the `style` group.
- Promoted [`useGroupedAccessorPairs`](https://biomejs.dev/linter/rules/use-grouped-accessor-pairs) to the `style` group.
- Promoted [`useNumericSeparators`](https://biomejs.dev/linter/rules/use-numeric-separators) to the `style` group.
- Promoted [`useObjectSpread`](https://biomejs.dev/linter/rules/use-object-spread) to the `style` group.
- Promoted [`useReadonlyClassProperties`](https://biomejs.dev/linter/rules/use-readonly-class-properties) to the `style` group.
- Promoted [`useSymbolDescription`](https://biomejs.dev/linter/rules/use-symbol-description) to the `style` group.
- Promoted [`useUnifiedTypeSignatures`](https://biomejs.dev/linter/rules/use-unified-type-signatures) to the `style` group.
- Promoted [`noBitwiseOperators`](https://biomejs.dev/linter/rules/no-bitwise-operators) to the `suspicious` group.
- Promoted [`noConstantBinaryExpressions`](https://biomejs.dev/linter/rules/no-constant-binary-expressions) to the `suspicious` group.
- Promoted [`noTsIgnore`](https://biomejs.dev/linter/rules/no-ts-ignore) to the `suspicious` group.
- Promoted [`noUnassignedVariables`](https://biomejs.dev/linter/rules/no-unassigned-variables) to the `suspicious` group.
- Promoted [`noUselessRegexBackrefs`](https://biomejs.dev/linter/rules/no-useless-regex-backrefs) to the `suspicious` group.
- Promoted [`noUselessStringEscapes`](https://biomejs.dev/linter/rules/no-useless-string-escapes) to the `suspicious` group.
- Promoted [`useConsistentIterableCallbackReturnValues`](https://biomejs.dev/linter/rules/use-consistent-iterable-callback-return-values) to the `suspicious` group.
- Promoted [`useStaticResponseMethods`](https://biomejs.dev/linter/rules/use-static-response-methods) to the `suspicious` group.

#### Renamed rules

The following rules have been renamed during promotion. The migration tool will automatically update your configuration:

- Renamed `noAwaitInLoop` to [`noAwaitInLoops`](https://biomejs.dev/linter/rules/no-await-in-loops).
- Renamed `noConstantBinaryExpression` to [`noConstantBinaryExpressions`](https://biomejs.dev/linter/rules/no-constant-binary-expressions).
- Renamed `noDestructuredProps` to [`noSolidDestructuredProps`](https://biomejs.dev/linter/rules/no-solid-destructured-props).
- Renamed `noImplicitCoercion` to [`noImplicitCoercions`](https://biomejs.dev/linter/rules/no-implicit-coercions).
- Renamed `noReactPropAssign` to [`noReactPropAssignments`](https://biomejs.dev/linter/rules/no-react-prop-assignments).
- Renamed `noUnknownAtRule` to [`noUnknownAtRules`](https://biomejs.dev/linter/rules/no-unknown-at-rules).
- Renamed `noUselessBackrefInRegex` to [`noUselessRegexBackrefs`](https://biomejs.dev/linter/rules/no-useless-regex-backrefs).
- Renamed `useAdjacentGetterSetter` to [`useGroupedAccessorPairs`](https://biomejs.dev/linter/rules/use-grouped-accessor-pairs).
- Renamed `useConsistentObjectDefinition` to [`useConsistentObjectDefinitions`](https://biomejs.dev/linter/rules/use-consistent-object-definitions).
- Renamed `useConsistentResponse` to [`useStaticResponseMethods`](https://biomejs.dev/linter/rules/use-static-response-methods).
- Renamed `useForComponent` to [`useSolidForComponent`](https://biomejs.dev/linter/rules/use-solid-for-component).
- Renamed `useJsonImportAttribute` to [`useJsonImportAttributes`](https://biomejs.dev/linter/rules/use-json-import-attributes).
- Renamed `useNamedOperation` to [`useGraphqlNamedOperations`](https://biomejs.dev/linter/rules/use-graphql-named-operations).
- Renamed `useNamingConvention` to [`useGraphqlNamingConvention`](https://biomejs.dev/linter/rules/use-graphql-naming-convention).
- Renamed `useUnifiedTypeSignature` to [`useUnifiedTypeSignatures`](https://biomejs.dev/linter/rules/use-unified-type-signatures).

Configuration files using the old rule names will need to be updated. Use the migration tool to automatically update your configuration:

```bash
biome migrate --write
```
16 changes: 16 additions & 0 deletions .changeset/proud-olives-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@biomejs/biome": minor
---

Added the new rule `noBiomeFirstException`. This rule prevents the incorrect usage of patterns inside `files.includes`.

This rule catches if the first element of the array contains `!`. This mistake will cause Biome to analyze no files:

```json5
// biome.json
{
"files": {
"includes": ["!dist/**"] // this is an error
}
}
```
12 changes: 12 additions & 0 deletions .changeset/ripe-eyes-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
"@biomejs/biome": minor
---

Added Qwik Domain to Biome

This release introduces **Qwik domain support** in Biome, enabling Qwik developers to use Biome as a linter and formatter for their projects.

- Added the Qwik domain infrastructure to Biome.
- Enabled the following rules for Qwik:
- [`useJsxKeyInIterable`](https://biomejs.dev/linter/rules/use-jsx-key-in-iterable)
- [`noReactSpecificProps`](https://biomejs.dev/linter/rules/no-react-specific-props)
18 changes: 18 additions & 0 deletions .changeset/sane-scanner-smiles.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
"@biomejs/biome": minor
---

Fixed [#6965](https://github.com/biomejs/biome/issues/6965): Implemented smarter scanner for project rules.

Previously, if project rules were enabled, Biome's scanner would scan all dependencies regardless of whether they were used by/reachable from source files or not. While this worked for a first version, it was far from optimal.

The new scanner first scans everything listed under the `files.includes` setting, and then descends into the dependencies that were discovered there, including transitive dependencies. This has three main advantages:
* Dependencies that are not reachable from your source files don't get indexed.
* Dependencies that have multiple type definitions, such as those with separate definitions for CommonJS and ESM imports, only have the relevant definitions indexed.
* If `vcs.useIgnoreFile` is enabled, `.gitignore` gets respected as well. Assuming you have folders such as `build/` or `dist/` configured there, those will be automatically ignored by the scanner.

The change in the scanner also has a more nuanced impact: Previously, if you used `files.includes` to ignore a file in an included folder, the scanner would still index this file. Now the file is fully ignored, _unless you import it_.

As a user you should notice better scanner performance (if you have project rules enabled), and hopefully you need to worry less about configuring [`files.experimentalScannerIgnores`](https://biomejs.dev/reference/configuration/#filesexperimentalscannerignores). Eventually our goal is still to deprecate that setting, so if you're using it today, we encourage you to see which ignores are still necessary there, and whether you can achieve the same effect by ignoring paths using `files.includes` instead.

None of these changes affect the scanner if no project rules are enabled.
37 changes: 37 additions & 0 deletions .changeset/seven-trains-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
"@biomejs/biome": minor
---

The `--reporter=summary` has been greatly enhanced. It now shows the list of files that contains violations, the files shown are clickable and can be opened from the editor.

Below an example of the new version:

```
reporter/parse ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i The following files have parsing errors.

- index.css

reporter/format ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i The following files needs to be formatted.

- index.css
- index.ts
- main.ts

reporter/violations ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i Some lint rules or assist actions reported some violations.

Rule Name Diagnostics

lint/correctness/noUnknownFunction 14 (2 error(s), 12 warning(s), 0 info(s))
lint/suspicious/noImplicitAnyLet 16 (12 error(s), 4 warning(s), 0 info(s))
lint/suspicious/noDoubleEquals 8 (8 error(s), 0 warning(s), 0 info(s))
assist/source/organizeImports 2 (2 error(s), 0 warning(s), 0 info(s))
lint/suspicious/noRedeclare 12 (12 error(s), 0 warning(s), 0 info(s))
lint/suspicious/noDebugger 8 (8 error(s), 0 warning(s), 0 info(s))

```
13 changes: 13 additions & 0 deletions .changeset/six-corners-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
"@biomejs/biome": minor
"@biomejs/wasm-bundler": minor
"@biomejs/wasm-nodejs": minor
"@biomejs/wasm-web": minor
---

Added new functions to the `@biomejs/wasm-*` packages:
- `fileExists`: returns whether the input file exists in the workspace.
- `isPathIgnored`: returns whether the input path is ignored.
- `updateModuleGraph`: updates the internal module graph of the input path.
- `getModuleGraph`: it returns a serialized version of the internal module graph.
- `scanProject`: scans the files and directories in the project to build the internal module graph.
Loading
Loading