Skip to content

Commit 3ea8cbd

Browse files
authored
Merge pull request #7708 from biomejs/next
2 parents 59ecfb4 + 27a5838 commit 3ea8cbd

File tree

661 files changed

+45763
-7975
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

661 files changed

+45763
-7975
lines changed

.changeset/based-bears-brawl.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
Biome's resolver now supports `baseUrl` if specified in `tsconfig.json`.
6+
7+
#### Example
8+
9+
Given the following file structure:
10+
11+
**`tsconfig.json`**
12+
```json
13+
{
14+
"compilerOptions": {
15+
"baseUrl": "./src",
16+
}
17+
}
18+
```
19+
20+
**`src/foo.ts`**
21+
```ts
22+
export function foo() {}
23+
```
24+
25+
In this scenario, `import { foo } from "foo";` should work regardless of the
26+
location of the file containing the `import` statement.
27+
28+
Fixes [#6432](https://github.com/biomejs/biome/issues/6432).

.changeset/breezy-suns-leave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
Added `ignore` option to `noUnknownAtRules`. If an unknown at-rule matches any of the items provided in `ignore`, a diagnostic won't be emitted.

.changeset/busy-pens-send.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
Enhanced the `init` command. The `init` command now checks if the existing project contains known ignore files and known generated folders.
6+
7+
If Biome finds `.gitignore` or `.ignore` files, it will add the following configuration to `biome.json`:
8+
```diff
9+
{
10+
+ "vcs": {
11+
+ "enabled": true,
12+
+ "clientKind": "git",
13+
+ "useIgnoreFile": true
14+
+ }
15+
}
16+
```
17+
18+
If Biome finds a `dist/` folder, it will exclude it automatically using the double-exclude syntax:
19+
20+
```diff
21+
{
22+
+ "files": {
23+
+ "includes": ["**", "!!**/dist"]
24+
+ }
25+
}
26+
```

.changeset/crazy-steaks-mix.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
The rules in a domain are no longer enabled automatically by the installed dependencies unless the rule is recommended.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
Added `--css-parse-css-modules` CLI flag to control whether CSS Modules syntax is enabled.
6+
7+
You can now enable or disable CSS Modules parsing directly from the command line:
8+
9+
```shell
10+
biome check --css-parse-css-modules=true file.module.css
11+
biome format --css-parse-css-modules=true file.module.css
12+
biome lint --css-parse-css-modules=true file.module.css
13+
biome ci --css-parse-css-modules=true file.module.css
14+
```
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
Added `--css-parse-tailwind-directives` CLI flag to control whether Tailwind CSS 4.0 directives and functions are enabled.
6+
7+
You can now enable or disable Tailwind CSS 4.0 directive parsing directly from the command line:
8+
9+
```shell
10+
biome check --css-parse-tailwind-directives=true file.css
11+
biome format --css-parse-tailwind-directives=true file.css
12+
biome lint --css-parse-tailwind-directives=true file.css
13+
biome ci --css-parse-tailwind-directives=true file.css
14+
```

.changeset/dull-drinks-switch.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
Updated the formatting of `.svelte` and `.vue` files. Now the indentation of the JavaScript blocks matches Prettier's:
6+
7+
```diff
8+
<script>
9+
- import Component from "./Component"
10+
+ import Component from "./Component"
11+
</script>
12+
```

.changeset/eager-suns-smoke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@biomejs/biome": patch
3+
---
4+
5+
Fixed an issue where the JUnit reporter returned a zero-based location. Now the location returned is one-based.

.changeset/few-bees-reply.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
Implemented the `indentScriptAndStyle` option for vue and svelte files, with the default set to `false` to match [Prettier's `vueIndentScriptAndStyle` option](https://prettier.io/docs/options#vue-files-script-and-style-tags-indentation). When enabled, this option indents the content within `<script>` and `<style>` tags to align with the surrounding HTML structure.
6+
7+
It can be enabled with this configuration:
8+
9+
```json
10+
{
11+
"html": {
12+
"formatter": {
13+
"indentScriptAndStyle": true
14+
}
15+
}
16+
}
17+
```
18+
19+
Which will format this code to:
20+
```vue
21+
<script>
22+
import Component from "./Component.vue";
23+
</script>
24+
```

.changeset/forced-files-forget.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
"@biomejs/biome": minor
3+
---
4+
5+
Deprecated the option `files.experimentalScannerIgnores` in favour of **force-ignore** syntax in `files.includes`.
6+
7+
`files.includes` supports ignoring files by prefixing globs with an exclamation mark (`!`). With this change, it also supports _force_-ignoring globs by prefixing them with a double exclamation mark (`!!`).
8+
9+
The effect of force-ignoring is that the scanner will not index files matching the glob, even in project mode, even if those files are imported by other files, and even if they are files that receive special treatment by Biome, such as nested `biome.json` files.
10+
11+
#### Example
12+
13+
Let's take the following configuration:
14+
15+
```json
16+
{
17+
"files": {
18+
"includes": [
19+
"**",
20+
"!**/generated",
21+
"!!**/dist",
22+
"fixtures/example/dist/*.js"
23+
]
24+
},
25+
"linter": {
26+
"domains": {
27+
"project": "all"
28+
}
29+
}
30+
}
31+
```
32+
33+
This configuration achieves the following:
34+
35+
- Because the [project domain](https://biomejs.dev/linter/domains/#project) is enabled, all supported files in the project are indexed _and_ processed by the linter, _except_:
36+
- Files inside a `generated` folder are not processed by the linter, but they will get indexed _if_ a file outside a `generated` folder imports them.
37+
- Files inside a `dist` folder are never indexed nor processed, not even if they are imported for any purpose, _except_:
38+
- When the `dist` folder is inside `fixtures/example/`, its `.js` files _do_ get both indexed and processed.
39+
40+
In general, we now recommend using the force-ignore syntax for any folders that contain _output_ files, such as `build/` and `dist/`. For such folders, it is highly unlikely that indexing has any useful benefits. For folders containing generated files, you may wish to use the regular ignore syntax so that type information can still be extracted from the files.
41+
42+
`experimentalScannerIgnores` will continue to work for now, but you'll see a deprecation warning if you still use it.
43+
44+
Run the `biome migrate --write` command to automatically update the configuration file.

0 commit comments

Comments
 (0)