diff --git a/.husky/pre-commit b/.husky/pre-commit index 7806eb63..4bbf162b 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -26,4 +26,7 @@ PATH="/usr/local/bin:$PATH" # Format and submit code according to lintstagedrc configuration +npm run lint +npm run lint:prettier +npm run lint:stylelint npm run lint:lint-staged diff --git a/package-lock.json b/package-lock.json index a07d25b4..b0092be4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -50,7 +50,7 @@ "lint-staged": "^12.1.3", "node-sass": "^8.0.0", "npm-run-all": "^4.1.5", - "postcss-html": "^1.3.0", + "postcss-html": "^1.5.0", "postcss-scss": "^4.0.2", "prettier": "^2.7.1", "sass": "^1.56.1", diff --git a/package.json b/package.json index e3149262..979273b9 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "lint-staged": "^12.1.3", "node-sass": "^8.0.0", "npm-run-all": "^4.1.5", - "postcss-html": "^1.3.0", + "postcss-html": "^1.5.0", "postcss-scss": "^4.0.2", "prettier": "^2.7.1", "sass": "^1.56.1", diff --git a/src/styles/reset.scss b/src/styles/reset.scss index 2c3f224f..7d62b6a5 100644 --- a/src/styles/reset.scss +++ b/src/styles/reset.scss @@ -20,9 +20,8 @@ body { line-height: 1.5; font-size: 14px; color: #3d444f; - font-family: Helvetica, Arial, "Source Han Sans CN", "Microsoft YaHei", - sans-serif; - text-rendering: optimizeLegibility; + font-family: Helvetica, Arial, "Source Han Sans CN", "Microsoft YaHei", sans-serif; + text-rendering: optimizelegibility; text-size-adjust: 100%; } diff --git a/stylelint.config.js b/stylelint.config.js index 9ea2e815..81d9f128 100644 --- a/stylelint.config.js +++ b/stylelint.config.js @@ -14,13 +14,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - module.exports = { root: true, + customSyntax: "postcss-html", plugins: ["stylelint-order"], - customSyntax: "postcss-scss", extends: ["stylelint-config-standard", "stylelint-config-prettier"], rules: { + "function-no-unknown": null, "selector-class-pattern": null, "selector-pseudo-class-no-unknown": [ true, @@ -52,6 +52,7 @@ module.exports = { }, ], "no-empty-source": null, + "string-quotes": null, "named-grid-areas-no-invalid": null, "unicode-bom": "never", "no-descending-specificity": null, @@ -89,7 +90,7 @@ module.exports = { overrides: [ { files: ["*.vue", "**/*.vue", "*.html", "**/*.html"], - extends: ["stylelint-config-recommended", "stylelint-config-html"], + extends: ["stylelint-config-recommended"], rules: { "keyframes-name-pattern": null, "selector-pseudo-class-no-unknown": [ @@ -106,5 +107,10 @@ module.exports = { ], }, }, + { + files: ["*.less", "**/*.less"], + customSyntax: "postcss-less", + extends: ["stylelint-config-standard", "stylelint-config-recommended-vue"], + }, ], };