Skip to content

Commit 4b8f59e

Browse files
Upgrade Biome to 2.2 and use multiple configs
1 parent 046a72e commit 4b8f59e

File tree

5 files changed

+72
-56
lines changed

5 files changed

+72
-56
lines changed

biome.jsonc

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
"actions": {
1212
"source": {
1313
"organizeImports": "on",
14-
"useSortedAttributes": "on",
15-
"useSortedProperties": "on"
14+
"useSortedAttributes": "on"
1615
}
1716
}
1817
},
@@ -37,7 +36,8 @@
3736
},
3837
"suspicious": {
3938
"noExplicitAny": "off",
40-
"noArrayIndexKey": "off"
39+
"noArrayIndexKey": "off",
40+
"noUnassignedVariables": "on"
4141
},
4242
"style": {
4343
"noNonNullAssertion": "off",
@@ -50,24 +50,9 @@
5050
"a11y": {
5151
"useSemanticElements": "off",
5252
"noAutofocus": "off"
53-
},
54-
"nursery": {
55-
"noUnassignedVariables": "on",
56-
"useSortedClasses": {
57-
"fix": "safe",
58-
"level": "on",
59-
"options": {
60-
"functions": ["classNames", "clsx", "cn"]
61-
}
62-
}
6353
}
6454
}
6555
},
66-
"css": {
67-
"parser": {
68-
"cssModules": true
69-
}
70-
},
7156
"vcs": {
7257
"enabled": true,
7358
"clientKind": "git",

package-lock.json

Lines changed: 36 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
},
5656
"devDependencies": {
5757
"@arethetypeswrong/cli": "^0.17.4",
58-
"@biomejs/biome": "^2.1.3",
58+
"@biomejs/biome": "^2.2.0",
5959
"@release-it/keep-a-changelog": "^6.0.0",
6060
"@testing-library/jest-dom": "^6.6.3",
6161
"@testing-library/react": "^16.2.0",

site/biome.jsonc

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
3+
"root": false,
4+
"extends": "//",
5+
"assist": {
6+
"actions": {
7+
"source": {
8+
"useSortedProperties": "on"
9+
}
10+
}
11+
},
12+
"linter": {
13+
"rules": {
14+
"nursery": {
15+
"useSortedClasses": {
16+
"fix": "safe",
17+
"level": "on",
18+
"options": {
19+
"functions": ["classNames", "clsx", "cn"]
20+
}
21+
}
22+
}
23+
}
24+
},
25+
"css": {
26+
"parser": {
27+
"cssModules": true
28+
}
29+
}
30+
}

site/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"start": "next start",
99
"test": "vitest run --silent",
1010
"test:watch": "vitest watch --silent",
11-
"format": "biome check --write --assists-enabled=true",
11+
"format": "biome check --write",
12+
"lint": "turbo run lint:tsc lint:biome",
1213
"lint:tsc": "tsc --noEmit",
1314
"lint:biome": "biome lint"
1415
},

0 commit comments

Comments
 (0)