Commit c2b207dd5172519a87cb23e34114e5d104ce56a1
1 parent
83921284
fix: Fix stylelint does not support html files
Showing
5 changed files
with
41 additions
and
25 deletions
.gitpod.yml
.husky/lintstagedrc.js deleted
100644 → 0
1 | -module.exports = { | |
2 | - '*.{js,jsx,ts,tsx}': ['eslint --fix', 'prettier --write'], | |
3 | - '{!(package)*.json,*.code-snippets,.!(browserslist)*rc}': ['prettier --write--parser json'], | |
4 | - 'package.json': ['prettier --write'], | |
5 | - '*.vue': ['eslint --fix', 'prettier --write', 'stylelint --fix'], | |
6 | - '*.{scss,less,styl,html}': ['stylelint --fix', 'prettier --write'], | |
7 | - '*.md': ['prettier --write'], | |
8 | -}; |
index.html
... | ... | @@ -8,7 +8,6 @@ |
8 | 8 | name="viewport" |
9 | 9 | content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=0" |
10 | 10 | /> |
11 | - | |
12 | 11 | <title><%= title %></title> |
13 | 12 | <link rel="icon" href="/favicon.ico" /> |
14 | 13 | </head> |
... | ... | @@ -30,7 +29,7 @@ |
30 | 29 | } |
31 | 30 | |
32 | 31 | html[data-theme='dark'] .app-loading .app-loading-title { |
33 | - color: rgba(255, 255, 255, 0.85); | |
32 | + color: rgb(255 255 255 / 85%); | |
34 | 33 | } |
35 | 34 | |
36 | 35 | .app-loading { |
... | ... | @@ -48,7 +47,7 @@ |
48 | 47 | top: 50%; |
49 | 48 | left: 50%; |
50 | 49 | display: flex; |
51 | - -webkit-transform: translate3d(-50%, -50%, 0); | |
50 | + transform: translate3d(-50%, -50%, 0); | |
52 | 51 | transform: translate3d(-50%, -50%, 0); |
53 | 52 | justify-content: center; |
54 | 53 | align-items: center; |
... | ... | @@ -66,7 +65,7 @@ |
66 | 65 | display: flex; |
67 | 66 | margin-top: 30px; |
68 | 67 | font-size: 30px; |
69 | - color: rgba(0, 0, 0, 0.85); | |
68 | + color: rgb(0 0 0 / 85%); | |
70 | 69 | justify-content: center; |
71 | 70 | align-items: center; |
72 | 71 | } |
... | ... | @@ -97,7 +96,7 @@ |
97 | 96 | height: 20px; |
98 | 97 | background-color: #0065cc; |
99 | 98 | border-radius: 100%; |
100 | - opacity: 0.3; | |
99 | + opacity: 30%; | |
101 | 100 | transform: scale(0.75); |
102 | 101 | animation: antSpinMove 1s infinite linear alternate; |
103 | 102 | transform-origin: 50% 50%; |
... | ... | @@ -111,43 +110,43 @@ |
111 | 110 | .dot i:nth-child(2) { |
112 | 111 | top: 0; |
113 | 112 | right: 0; |
114 | - -webkit-animation-delay: 0.4s; | |
113 | + animation-delay: 0.4s; | |
115 | 114 | animation-delay: 0.4s; |
116 | 115 | } |
117 | 116 | |
118 | 117 | .dot i:nth-child(3) { |
119 | 118 | right: 0; |
120 | 119 | bottom: 0; |
121 | - -webkit-animation-delay: 0.8s; | |
120 | + animation-delay: 0.8s; | |
122 | 121 | animation-delay: 0.8s; |
123 | 122 | } |
124 | 123 | |
125 | 124 | .dot i:nth-child(4) { |
126 | 125 | bottom: 0; |
127 | 126 | left: 0; |
128 | - -webkit-animation-delay: 1.2s; | |
127 | + animation-delay: 1.2s; | |
129 | 128 | animation-delay: 1.2s; |
130 | 129 | } |
131 | 130 | @keyframes antRotate { |
132 | 131 | to { |
133 | - -webkit-transform: rotate(405deg); | |
132 | + transform: rotate(405deg); | |
134 | 133 | transform: rotate(405deg); |
135 | 134 | } |
136 | 135 | } |
137 | - @-webkit-keyframes antRotate { | |
136 | + @keyframes antRotate { | |
138 | 137 | to { |
139 | - -webkit-transform: rotate(405deg); | |
138 | + transform: rotate(405deg); | |
140 | 139 | transform: rotate(405deg); |
141 | 140 | } |
142 | 141 | } |
143 | 142 | @keyframes antSpinMove { |
144 | 143 | to { |
145 | - opacity: 1; | |
144 | + opacity: 100%; | |
146 | 145 | } |
147 | 146 | } |
148 | - @-webkit-keyframes antSpinMove { | |
147 | + @keyframes antSpinMove { | |
149 | 148 | to { |
150 | - opacity: 1; | |
149 | + opacity: 100%; | |
151 | 150 | } |
152 | 151 | } |
153 | 152 | </style> | ... | ... |
package.json
... | ... | @@ -23,7 +23,7 @@ |
23 | 23 | "lint:eslint": "eslint --cache --max-warnings 0 \"{src,mock}/**/*.{vue,ts,tsx}\" --fix", |
24 | 24 | "lint:prettier": "prettier --write \"src/**/*.{js,json,tsx,css,less,scss,vue,html,md}\"", |
25 | 25 | "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", | |
27 | 27 | "test:unit": "jest", |
28 | 28 | "test:unit-coverage": "jest --coverage", |
29 | 29 | "test:gzip": "npx http-server dist --cors --gzip -c-1", |
... | ... | @@ -159,5 +159,29 @@ |
159 | 159 | "homepage": "https://github.com/anncwb/vue-vben-admin", |
160 | 160 | "engines": { |
161 | 161 | "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 | + ] | |
162 | 186 | } |
163 | 187 | } | ... | ... |
stylelint.config.js
... | ... | @@ -71,9 +71,10 @@ module.exports = { |
71 | 71 | ignoreFiles: ['**/*.js', '**/*.jsx', '**/*.tsx', '**/*.ts'], |
72 | 72 | overrides: [ |
73 | 73 | { |
74 | - files: ['*.vue', '**/*.vue'], | |
74 | + files: ['*.vue', '**/*.vue', '*.html', '**/*.html'], | |
75 | 75 | extends: ['stylelint-config-recommended', 'stylelint-config-html'], |
76 | 76 | rules: { |
77 | + 'keyframes-name-pattern': null, | |
77 | 78 | 'selector-pseudo-class-no-unknown': [ |
78 | 79 | true, |
79 | 80 | { | ... | ... |