Skip to content

Commit 6015c70

Browse files
committed
chore(lint): migrate CSS linting to Biome v2.3 (Tailwind v4) and remove stylelint
upgrade @biomejs/biome to ^2.3.2 and migrate biome.json to v2 schema enable css.parser.tailwindDirectives; ignore .min.css and vendor CSS remove stylelint deps and .stylelintrc.yaml; switch lint scripts to Biome update workspace to use Biome for CSS; drop stylelint settings
1 parent 8a7ce24 commit 6015c70

File tree

7 files changed

+90
-1039
lines changed

7 files changed

+90
-1039
lines changed

.github/workflows/ci-build-starters-matrix.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ on:
1515
- "package.json"
1616
- "pnpm-lock.yaml"
1717
- "biome.json"
18-
- ".stylelintrc.yaml"
1918
- "vite.config.js"
2019
pull_request:
2120
types:
@@ -31,7 +30,6 @@ on:
3130
- "package.json"
3231
- "pnpm-lock.yaml"
3332
- "biome.json"
34-
- ".stylelintrc.yaml"
3533
- "vite.config.js"
3634

3735
permissions:

.github/workflows/ci-lint.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111
- "package.json"
1212
- "pnpm-lock.yaml"
1313
- "biome.json"
14-
- ".stylelintrc.yaml"
1514
- "vite.config.js"
1615
pull_request:
1716
branches: [main]
@@ -22,7 +21,6 @@ on:
2221
- "package.json"
2322
- "pnpm-lock.yaml"
2423
- "biome.json"
25-
- ".stylelintrc.yaml"
2624
- "vite.config.js"
2725

2826
permissions:

.stylelintrc.yaml

Lines changed: 0 additions & 39 deletions
This file was deleted.

biome.json

Lines changed: 43 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
11
{
2-
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
2+
"$schema": "https://biomejs.dev/schemas/2.3.2/schema.json",
33
"files": {
4-
"ignore": [
5-
"node_modules/**",
6-
"public/**",
7-
"resources/**",
8-
"**/_gen/**",
9-
"**/assets/dist/**",
10-
"**/*.min.js",
11-
"**/pagefind/**",
12-
"**/_vendor/**",
13-
"**/vendor/**",
14-
"**/*.html",
15-
"**/layouts/**/*.html",
16-
"**/layouts/**/*.htm",
17-
"**/*.webmanifest",
18-
"**/*.backlinks.json",
19-
"**/hugo_stats.json",
20-
"**/*.code-workspace",
21-
"modules/blox-tailwind/data/icons/devicon.json",
22-
"templates/**",
23-
"test/**",
24-
"modules/**/package.json",
25-
"**/assets/jsconfig.json",
26-
"docs-local",
27-
"backups/**"
4+
"includes": [
5+
"**",
6+
"!**/node_modules/**",
7+
"!**/public/**",
8+
"!**/resources/**",
9+
"!**/_gen/**",
10+
"!**/assets/dist/**",
11+
"!**/*.min.js",
12+
"!**/*.min.css",
13+
"!**/pagefind/**",
14+
"!**/_vendor/**",
15+
"!**/vendor/**",
16+
"!**/*.html",
17+
"!**/layouts/**/*.html",
18+
"!**/layouts/**/*.htm",
19+
"!**/*.webmanifest",
20+
"!**/*.backlinks.json",
21+
"!**/hugo_stats.json",
22+
"!**/*.code-workspace",
23+
"!**/modules/blox-tailwind/data/icons/devicon.json",
24+
"!**/templates/**",
25+
"!**/test/**",
26+
"!**/modules/**/package.json",
27+
"!**/assets/jsconfig.json",
28+
"!**/docs-local",
29+
"!**/backups/**"
2830
]
2931
},
3032
"formatter": {
@@ -50,8 +52,8 @@
5052
"enabled": true,
5153
"rules": {
5254
"recommended": true,
53-
"style": { "all": false },
54-
"complexity": { "all": false },
55+
"style": {},
56+
"complexity": {},
5557
"suspicious": {
5658
"noEmptyBlock": "off"
5759
},
@@ -60,7 +62,19 @@
6062
}
6163
}
6264
},
63-
"organizeImports": {
64-
"enabled": true
65+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
66+
"css": {
67+
"parser": {
68+
"tailwindDirectives": true
69+
},
70+
"formatter": {
71+
"enabled": true,
72+
"indentStyle": "space",
73+
"indentWidth": 2,
74+
"lineWidth": 150
75+
},
76+
"linter": {
77+
"enabled": true
78+
}
6579
}
6680
}

hugo-blox-builder.code-workspace

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@
3131
"editor.formatOnSave": true,
3232
"editor.defaultFormatter": "esbenp.prettier-vscode",
3333
"editor.codeActionsOnSave": {
34-
"source.fixAll.stylelint": "explicit"
34+
"source.fixAll.biome": "explicit"
3535
},
3636

3737
"[javascript]": { "editor.defaultFormatter": "biomejs.biome" },
3838
"[typescript]": { "editor.defaultFormatter": "biomejs.biome" },
3939
"[json]": { "editor.defaultFormatter": "biomejs.biome" },
40-
"[css]": { "editor.defaultFormatter": "esbenp.prettier-vscode" },
40+
"[css]": { "editor.defaultFormatter": "biomejs.biome" },
4141
"[html]": {
4242
"editor.defaultFormatter": "esbenp.prettier-vscode",
4343
"editor.formatOnSave": true
@@ -65,7 +65,6 @@
6565
"typescriptreact"
6666
],
6767

68-
"stylelint.validate": ["css"],
6968

7069
"tailwindCSS.emmetCompletions": true,
7170

@@ -76,7 +75,6 @@
7675
"recommendations": [
7776
"dbaeumer.vscode-eslint",
7877
"esbenp.prettier-vscode",
79-
"stylelint.vscode-stylelint",
8078
"bradlc.vscode-tailwindcss",
8179
"redhat.vscode-yaml",
8280
"tamasfe.even-better-toml",

package.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,18 @@
2727
"vite-plugin-static-copy": "^3.1.1"
2828
},
2929
"devDependencies": {
30-
"@biomejs/biome": "^1.9.4",
31-
"stylelint": "14.8.2",
32-
"stylelint-config-standard": "~25.0.0",
33-
"stylelint-scss": "~4.2.0"
30+
"@biomejs/biome": "^2.3.2"
3431
},
3532
"scripts": {
3633
"prod": "scripts/view-starter-prod.sh",
3734
"dev": "scripts/view-starter-dev.sh",
3835
"test": "scripts/view-test.sh",
39-
"lint": "pnpm run lint:code && pnpm run lint:style",
40-
"lint:code": "biome check --reporter=summary .",
41-
"lint:code:fix": "biome check --write .",
42-
"lint:style": "stylelint '**/*.css'",
43-
"lint:style:fix": "stylelint '**/*.css' --fix",
44-
"format": "pnpm run lint:code:fix && pnpm run lint:style:fix",
36+
"lint": "biome check --reporter=summary .",
37+
"lint:code": "biome check --reporter=summary . --linter-enabled=true --formatter-enabled=false",
38+
"lint:code:fix": "biome check --write . --linter-enabled=true --formatter-enabled=false",
39+
"lint:style": "biome check --reporter=summary modules/blox-tailwind/assets/css/ modules/blox-plugin-reveal/assets/css/ --linter-enabled=true --formatter-enabled=false",
40+
"lint:style:fix": "biome check --write modules/blox-tailwind/assets/css/ modules/blox-plugin-reveal/assets/css/ --linter-enabled=true --formatter-enabled=false",
41+
"format": "biome check --write .",
4542
"update:starters": "poetry run python ./scripts/update.py",
4643
"vendor:libs": "vite build --config vite.config.js",
4744
"vendor:libs:watch": "vite build --config vite.config.js --watch",

0 commit comments

Comments
 (0)