Skip to content

Commit c2b207d

Browse files
committed
fix: Fix stylelint does not support html files
1 parent 8392128 commit c2b207d

File tree

5 files changed

+41
-25
lines changed

5 files changed

+41
-25
lines changed

.gitpod.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ ports:
33
onOpen: open-preview
44
tasks:
55
- init: pnpm install
6-
command: pnpm dev
6+
command: pnpm run dev

.husky/lintstagedrc.js

-8
This file was deleted.

index.html

+13-14
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
name="viewport"
99
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0"
1010
/>
11-
1211
<title><%= title %></title>
1312
<link rel="icon" href="/favicon.ico" />
1413
</head>
@@ -30,7 +29,7 @@
3029
}
3130

3231
html[data-theme='dark'] .app-loading .app-loading-title {
33-
color: rgba(255, 255, 255, 0.85);
32+
color: rgb(255 255 255 / 85%);
3433
}
3534

3635
.app-loading {
@@ -48,7 +47,7 @@
4847
top: 50%;
4948
left: 50%;
5049
display: flex;
51-
-webkit-transform: translate3d(-50%, -50%, 0);
50+
transform: translate3d(-50%, -50%, 0);
5251
transform: translate3d(-50%, -50%, 0);
5352
justify-content: center;
5453
align-items: center;
@@ -66,7 +65,7 @@
6665
display: flex;
6766
margin-top: 30px;
6867
font-size: 30px;
69-
color: rgba(0, 0, 0, 0.85);
68+
color: rgb(0 0 0 / 85%);
7069
justify-content: center;
7170
align-items: center;
7271
}
@@ -97,7 +96,7 @@
9796
height: 20px;
9897
background-color: #0065cc;
9998
border-radius: 100%;
100-
opacity: 0.3;
99+
opacity: 30%;
101100
transform: scale(0.75);
102101
animation: antSpinMove 1s infinite linear alternate;
103102
transform-origin: 50% 50%;
@@ -111,43 +110,43 @@
111110
.dot i:nth-child(2) {
112111
top: 0;
113112
right: 0;
114-
-webkit-animation-delay: 0.4s;
113+
animation-delay: 0.4s;
115114
animation-delay: 0.4s;
116115
}
117116

118117
.dot i:nth-child(3) {
119118
right: 0;
120119
bottom: 0;
121-
-webkit-animation-delay: 0.8s;
120+
animation-delay: 0.8s;
122121
animation-delay: 0.8s;
123122
}
124123

125124
.dot i:nth-child(4) {
126125
bottom: 0;
127126
left: 0;
128-
-webkit-animation-delay: 1.2s;
127+
animation-delay: 1.2s;
129128
animation-delay: 1.2s;
130129
}
131130
@keyframes antRotate {
132131
to {
133-
-webkit-transform: rotate(405deg);
132+
transform: rotate(405deg);
134133
transform: rotate(405deg);
135134
}
136135
}
137-
@-webkit-keyframes antRotate {
136+
@keyframes antRotate {
138137
to {
139-
-webkit-transform: rotate(405deg);
138+
transform: rotate(405deg);
140139
transform: rotate(405deg);
141140
}
142141
}
143142
@keyframes antSpinMove {
144143
to {
145-
opacity: 1;
144+
opacity: 100%;
146145
}
147146
}
148-
@-webkit-keyframes antSpinMove {
147+
@keyframes antSpinMove {
149148
to {
150-
opacity: 1;
149+
opacity: 100%;
151150
}
152151
}
153152
</style>

package.json

+25-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix",
2424
"lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"",
2525
"lint:stylelint": "stylelint --cache --fix \"**/*.{vue,less,postcss,css,scss}\" --cache --cache-location node_modules/.cache/stylelint/",
26-
"lint:lint-staged": "lint-staged -c ./.husky/lintstagedrc.js",
26+
"lint:lint-staged": "lint-staged",
2727
"test:unit": "jest",
2828
"test:unit-coverage": "jest --coverage",
2929
"test:gzip": "npx http-server dist --cors --gzip -c-1",
@@ -159,5 +159,29 @@
159159
"homepage": "https://github.com/anncwb/vue-vben-admin",
160160
"engines": {
161161
"node": "^12 || >=14"
162+
},
163+
"lint-staged": {
164+
"*.{js,jsx,ts,tsx}": [
165+
"eslint --fix",
166+
"prettier --write"
167+
],
168+
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": [
169+
"prettier --write--parser json"
170+
],
171+
"package.json": [
172+
"prettier --write"
173+
],
174+
"*.vue": [
175+
"eslint --fix",
176+
"prettier --write",
177+
"stylelint --fix"
178+
],
179+
"*.{scss,less,styl,html}": [
180+
"stylelint --fix",
181+
"prettier --write"
182+
],
183+
"*.md": [
184+
"prettier --write"
185+
]
162186
}
163187
}

stylelint.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ module.exports = {
7171
ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'],
7272
overrides: [
7373
{
74-
files: ['*.vue', '**/*.vue'],
74+
files: ['*.vue', '**/*.vue', '*.html', '**/*.html'],
7575
extends: ['stylelint-config-recommended', 'stylelint-config-html'],
7676
rules: {
77+
'keyframes-name-pattern': null,
7778
'selector-pseudo-class-no-unknown': [
7879
true,
7980
{

0 commit comments

Comments
 (0)