refactor(css): track use of undeclared CSS variables
This commit is contained in:
@@ -59,8 +59,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: 25
|
node-version: 25
|
||||||
|
|
||||||
|
# because we are not using package.json
|
||||||
|
- name: Install Stylelint and plugins
|
||||||
|
run: |
|
||||||
|
npm install --global \
|
||||||
|
stylelint@17 \
|
||||||
|
postcss@8 \
|
||||||
|
stylelint-value-no-unknown-custom-properties@6
|
||||||
|
|
||||||
- name: Run Stylelint
|
- name: Run Stylelint
|
||||||
run: npx stylelint "**/*.{css,scss}"
|
run: npx stylelint "static/css/**/*.{css,scss}"
|
||||||
|
|
||||||
rust-fmt:
|
rust-fmt:
|
||||||
name: Rustfmt
|
name: Rustfmt
|
||||||
|
|||||||
+12
-3
@@ -1,13 +1,22 @@
|
|||||||
{
|
{
|
||||||
|
"files": ["statc/css/**/*.css"],
|
||||||
|
"plugins": [
|
||||||
|
"stylelint-value-no-unknown-custom-properties"
|
||||||
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"color-no-hex": true,
|
"color-no-hex": true,
|
||||||
"color-named": "never",
|
"color-named": "never",
|
||||||
"function-disallowed-list": ["rgb", "rgba", "hsl", "hsla", "hwb", "oklch", "oklab"],
|
"function-disallowed-list": ["rgb", "rgba", "hsl", "hsla", "hwb", "oklch", "oklab"],
|
||||||
"selector-disallowed-list": ["/\\[data-theme/"]
|
"selector-disallowed-list": ["/\\[data-theme/"],
|
||||||
|
"csstools/value-no-unknown-custom-properties": [true, {
|
||||||
|
"importFrom": [
|
||||||
|
"static/css/base/variables.css"
|
||||||
|
]
|
||||||
|
}]
|
||||||
},
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": ["**/variables.css"],
|
"files": ["static/css/base/variables.css"],
|
||||||
"rules": {
|
"rules": {
|
||||||
"color-no-hex": null,
|
"color-no-hex": null,
|
||||||
"color-named": null,
|
"color-named": null,
|
||||||
@@ -15,7 +24,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"files": ["**/themes/dark.css"],
|
"files": ["static/css/themes/*"],
|
||||||
"rules": {
|
"rules": {
|
||||||
"color-no-hex": null,
|
"color-no-hex": null,
|
||||||
"color-named": null,
|
"color-named": null,
|
||||||
|
|||||||
Reference in New Issue
Block a user