Skip to content

Commit 2229b7a

Browse files
committed
minor #2856 Upgrade Biome.js to ^2 (Kocal)
This PR was squashed before being merged into the 2.x branch. Discussion ---------- Upgrade Biome.js to ^2 | Q | A | ------------- | --- | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Docs? | no <!-- required for new features --> | Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT <!-- Replace this notice by a description of your feature/bugfix. This will help reviewers and should be a good start for the documentation. Additionally (see https://symfony.com/releases): - Always add tests and ensure they pass. - For new features, provide some code snippets to help understand usage. - Features and deprecations must be submitted against branch main. - Update/add documentation as required (we can help!) - Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry - Never break backward compatibility (see https://symfony.com/bc). --> Commits ------- f60f7e1 Run Biome.js, configure `lineWidth` to `160` for `src/Map/**/*map_controllers.ts` d64a8cd Upgrade Biome.js to ^2
2 parents 919f896 + f60f7e1 commit 2229b7a

File tree

27 files changed

+1089
-1184
lines changed

27 files changed

+1089
-1184
lines changed

biome.json

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
11
{
22
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
33
"files": {
4-
"include": [
5-
"*.json",
6-
"*.md",
7-
"bin/*.js",
8-
"test/*.js",
9-
"src/*/*.json",
10-
"src/*/*/md",
11-
"src/*/assets/src/**",
12-
"src/*/assets/test/**",
13-
"src/*/src/Bridge/*.json",
14-
"src/*/src/Bridge/*.md",
15-
"src/*/src/Bridge/*/assets/src/**",
16-
"src/*/src/Bridge/*/assets/test/**"
17-
],
18-
"ignore": ["**/composer.json", "**/vendor", "**/package.json", "**/node_modules", "**/var"]
4+
"includes": [
5+
"**/*.json",
6+
"**/*.md",
7+
"**/bin/**/*.js",
8+
"**/src/**/assets/src/**",
9+
"**/src/**/assets/test/**",
10+
"!**/composer.json",
11+
"!**/vendor",
12+
"!**/package.json",
13+
"!**/node_modules",
14+
"!**/var",
15+
"!**/dist"
16+
]
1917
},
2018
"linter": {
2119
"rules": {
@@ -28,7 +26,16 @@
2826
"noForEach": "off"
2927
},
3028
"style": {
31-
"noParameterAssign": "off"
29+
"noParameterAssign": "off",
30+
"useAsConstAssertion": "error",
31+
"useDefaultParameterLast": "error",
32+
"useEnumInitializers": "error",
33+
"useSelfClosingElements": "error",
34+
"useSingleVarDeclarator": "error",
35+
"noUnusedTemplateLiteral": "error",
36+
"useNumberNamespace": "error",
37+
"noInferrableTypes": "error",
38+
"noUselessElse": "error"
3239
},
3340
"performance": {
3441
"noDelete": "off"
@@ -49,14 +56,20 @@
4956
},
5057
"overrides": [
5158
{
52-
"include": ["*.svelte"],
59+
"includes": ["**/*.svelte"],
5360
"linter": {
5461
"rules": {
5562
"style": {
5663
"useConst": "off"
5764
}
5865
}
5966
}
67+
},
68+
{
69+
"includes": ["src/Map/**/*map_controller.ts"],
70+
"formatter": {
71+
"lineWidth": 160
72+
}
6073
}
6174
]
6275
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"@babel/preset-env": "^7.25.3",
1717
"@babel/preset-react": "^7.24.7",
1818
"@babel/preset-typescript": "^7.24.7",
19-
"@biomejs/biome": "^1.8.3",
19+
"@biomejs/biome": "^2.0.4",
2020
"@rollup/plugin-commonjs": "^28.0.0",
2121
"@rollup/plugin-node-resolve": "^15.3.0",
2222
"@rollup/plugin-typescript": "^11.1.6",

src/Cropperjs/assets/src/controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
import { Controller } from '@hotwired/stimulus';
1111
import Cropper from 'cropperjs';
12+
1213
import CropEvent = Cropper.CropEvent;
1314

1415
export default class CropperController extends Controller {

src/Dropzone/assets/src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
}
6161

6262
.dropzone-preview-button::before {
63-
content: '×';
63+
content: "×";
6464
padding: 3px 7px;
6565
cursor: pointer;
6666
}

src/LiveComponent/assets/dist/Component/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { BackendInterface } from '../Backend/Backend';
22
import type BackendRequest from '../Backend/BackendRequest';
33
import BackendResponse from '../Backend/BackendResponse';
44
import type { ElementDriver } from './ElementDriver';
5-
import ValueStore from './ValueStore';
65
import type { PluginInterface } from './plugins/PluginInterface';
6+
import ValueStore from './ValueStore';
77
type MaybePromise<T = void> = T | Promise<T>;
88
export type ComponentHooks = {
99
connect: (component: Component) => MaybePromise;

0 commit comments

Comments
 (0)