Skip to content

Commit 838d02e

Browse files
committed
chore: update stylelint configuration and dependencies for improved SCSS and Vue support
1 parent 11494af commit 838d02e

File tree

3 files changed

+177
-10
lines changed

3 files changed

+177
-10
lines changed

.stylelintrc.json

Lines changed: 68 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,69 @@
11
{
2-
"extends": [
3-
"stylelint-config-standard",
4-
"stylelint-config-prettier"
5-
]
6-
}
2+
"extends": ["stylelint-config-standard-scss", "stylelint-config-recommended-vue/scss"],
3+
"plugins": ["stylelint-scss"],
4+
"overrides": [
5+
{
6+
"files": ["*.vue", "**/*.vue"],
7+
"customSyntax": "postcss-html"
8+
},
9+
{
10+
"files": ["*.scss", "**/*.scss"],
11+
"customSyntax": "postcss-scss"
12+
}
13+
],
14+
"rules": {
15+
"scss/at-rule-no-unknown": [
16+
true,
17+
{
18+
"ignoreAtRules": ["tailwind", "apply", "variants", "responsive", "screen"]
19+
}
20+
],
21+
"scss/dollar-variable-pattern": "^[a-z][a-zA-Z0-9-]*$",
22+
"scss/selector-no-redundant-nesting-selector": true,
23+
"selector-pseudo-class-no-unknown": [
24+
true,
25+
{
26+
"ignorePseudoClasses": ["deep", "global"]
27+
}
28+
],
29+
"selector-pseudo-element-no-unknown": [
30+
true,
31+
{
32+
"ignorePseudoElements": ["v-deep", "v-global", "v-slotted"]
33+
}
34+
],
35+
"at-rule-no-unknown": [
36+
true,
37+
{
38+
"ignoreAtRules": [
39+
"tailwind",
40+
"apply",
41+
"variants",
42+
"responsive",
43+
"screen",
44+
"function",
45+
"if",
46+
"each",
47+
"include",
48+
"mixin",
49+
"for",
50+
"while",
51+
"return",
52+
"use",
53+
"forward"
54+
]
55+
}
56+
],
57+
"function-no-unknown": [
58+
true,
59+
{
60+
"ignoreFunctions": ["rgba", "darken", "lighten", "saturate", "desaturate"]
61+
}
62+
],
63+
"import-notation": null,
64+
"alpha-value-notation": null,
65+
"color-function-notation": null,
66+
"color-function-alias-notation": null,
67+
"comment-empty-line-before": null
68+
}
69+
}

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
"lint:fix": "eslint . --fix",
3030
"lint:js": "eslint --ext .js,.ts .",
3131
"lint:js:fix": "eslint --ext .js,.ts . --fix",
32-
"lint:css": "stylelint \"src/**/*.{vue,scss}\" --custom-syntax postcss-scss",
33-
"lint:css:fix": "stylelint \"src/**/*.{vue,scss}\" --custom-syntax postcss-scss --fix",
32+
"lint:css": "stylelint \"src/**/*.{vue,scss,css}\"",
33+
"lint:css:fix": "stylelint \"src/**/*.{vue,scss,css}\" --fix",
3434
"lint:all": "pnpm lint && pnpm lint:css && pnpm type-check",
3535
"lint:fix:all": "pnpm lint:fix && pnpm lint:css:fix",
3636
"prepare": "husky install",
@@ -49,11 +49,11 @@
4949
],
5050
"*.vue": [
5151
"eslint --fix",
52-
"stylelint --custom-syntax postcss-html --fix",
52+
"stylelint --fix",
5353
"prettier --write"
5454
],
55-
"*.scss": [
56-
"stylelint --custom-syntax postcss-scss --fix",
55+
"*.{scss,css}": [
56+
"stylelint --fix",
5757
"prettier --write"
5858
]
5959
},
@@ -98,7 +98,10 @@
9898
"sass": "^1.89.0",
9999
"stylelint": "^16.19.1",
100100
"stylelint-config-prettier": "^9.0.5",
101+
"stylelint-config-recommended-vue": "^1.6.0",
101102
"stylelint-config-standard": "^38.0.0",
103+
"stylelint-config-standard-scss": "^15.0.1",
104+
"stylelint-scss": "^6.12.0",
102105
"tslib": "^2.8.1",
103106
"typescript": "^5.8.3",
104107
"typescript-eslint": "^8.32.1",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)