Skip to content

Commit 4e38380

Browse files
authored
Add Stylelint check and autofix styles (#989)
* Update .prettierignore * Update .stylelintrc * Update dependencies Update package.json Update package.json * Autofix issues
1 parent 78b9f11 commit 4e38380

39 files changed

+2042
-4866
lines changed

.stylelintrc

+22-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
{
2-
"extends": ["stylelint-config-recommended"],
2+
"extends": ["stylelint-config-standard", "stylelint-config-prettier"],
33
"processors": [],
4+
"customSyntax": "postcss-html",
5+
"ignoreFiles": [
6+
"node_modules/*",
7+
"src/assets/**",
8+
"build/**",
9+
"src/lib/vendor/css/normalize.css",
10+
"src/lib/vendor/prism/prism.css"
11+
],
412
"rules": {
513
"at-rule-no-unknown": [
614
true,
@@ -20,14 +28,21 @@
2028
]
2129
}
2230
],
31+
"custom-property-pattern": null,
2332
"declaration-block-trailing-semicolon": null,
24-
"no-descending-specificity": [
33+
"declaration-block-no-redundant-longhand-properties": [
2534
true,
26-
{
27-
"ignore": ["selectors-within-list"]
28-
}
35+
{ "ignoreShorthands": ["border-radius"] }
36+
],
37+
"function-linear-gradient-no-nonstandard-direction": null,
38+
"keyframes-name-pattern": null,
39+
"max-line-length": null,
40+
"no-descending-specificity": null,
41+
"selector-class-pattern": null,
42+
"selector-pseudo-class-no-unknown": [
43+
true,
44+
{ "ignorePseudoClasses": ["global"] }
2945
],
30-
"no-invalid-double-slash-comments": true,
31-
"block-no-empty": null
46+
"value-keyword-case": null
3247
}
3348
}

package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
"check:local:watch": "VITE_TEMPORAL_UI_BUILD_TARGET=local svelte-check --tsconfig ./tsconfig.json --watch",
2626
"check:cloud": "VITE_TEMPORAL_UI_BUILD_TARGET=local svelte-check --tsconfig ./tsconfig.json",
2727
"check:cloud:watch": "VITE_TEMPORAL_UI_BUILD_TARGET=local svelte-check --tsconfig ./tsconfig.json --watch",
28-
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore .",
29-
"format": "prettier --write --plugin-search-dir=. .",
28+
"lint": "prettier --check --plugin-search-dir=. . && eslint --ignore-path .gitignore . && stylelint \"src/**/*.{css,postcss,svelte}\"",
29+
"format": "prettier --write --plugin-search-dir=. . && stylelint \"src/**/*.{css,postcss,svelte}\" --fix",
3030
"cypress": "concurrently \"pnpm run dev:test\" \"cypress open\"",
3131
"cypress:run": "cypress run",
3232
"package": "svelte-kit package && rsync -r ./package/lib/ ./package/ && rm -rf ./package/lib",
@@ -95,12 +95,15 @@
9595
"mock-socket": "^9.1.0",
9696
"postcss": "^8.4.5",
9797
"postcss-cli": "^9.1.0",
98+
"postcss-html": "^1.5.0",
9899
"postcss-import": "^14.1.0",
99100
"postcss-load-config": "^3.1.0",
100101
"prettier": "^2.7.1",
101102
"prettier-plugin-tailwindcss": "^0.1.11",
102-
"stylelint": "^14.6.1",
103+
"stylelint": "^14.16.0",
104+
"stylelint-config-prettier": "^9.0.4",
103105
"stylelint-config-recommended": "^7.0.0",
106+
"stylelint-config-standard": "^29.0.0",
104107
"svelte": "^3.52.0",
105108
"svelte-check": "^2.4.5",
106109
"svelte-highlight": "^3.4.0",

0 commit comments

Comments
 (0)