Skip to content

Commit ca25dfa

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

File tree

6 files changed

+77
-57
lines changed

6 files changed

+77
-57
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"editor.defaultFormatter": "biomejs.biome",
33
"editor.formatOnSave": true,
44
"editor.codeActionsOnSave": {
5-
"quickfix.biome": "explicit",
5+
"source.biome": "explicit",
66
"source.fixAll.biome": "explicit",
77
"source.organizeImports.biome": "explicit"
88
}

biome.jsonc

Lines changed: 4 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
},
@@ -21,6 +20,7 @@
2120
"rules": {
2221
"recommended": true,
2322
"correctness": {
23+
"noNestedComponentDefinitions": "off",
2424
"noUnusedFunctionParameters": "on",
2525
"noUnusedVariables": "on",
2626
"noUnusedImports": "on",
@@ -37,7 +37,8 @@
3737
},
3838
"suspicious": {
3939
"noExplicitAny": "off",
40-
"noArrayIndexKey": "off"
40+
"noArrayIndexKey": "off",
41+
"noUnassignedVariables": "on"
4142
},
4243
"style": {
4344
"noNonNullAssertion": "off",
@@ -50,24 +51,9 @@
5051
"a11y": {
5152
"useSemanticElements": "off",
5253
"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-
}
6354
}
6455
}
6556
},
66-
"css": {
67-
"parser": {
68-
"cssModules": true
69-
}
70-
},
7157
"vcs": {
7258
"enabled": true,
7359
"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: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
"suspicious": {
15+
"noUnknownAtRules": "off"
16+
},
17+
"nursery": {
18+
"useSortedClasses": {
19+
"fix": "safe",
20+
"level": "on",
21+
"options": {
22+
"functions": ["classNames", "clsx", "cn"]
23+
}
24+
}
25+
}
26+
}
27+
},
28+
"css": {
29+
"parser": {
30+
"cssModules": true
31+
}
32+
}
33+
}

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)