diff --git a/.stylelintignore b/.stylelintignore new file mode 100644 index 00000000..d00d567c --- /dev/null +++ b/.stylelintignore @@ -0,0 +1 @@ +src/assets diff --git a/.stylelintrc b/.stylelintrc new file mode 100644 index 00000000..bf3fe7b9 --- /dev/null +++ b/.stylelintrc @@ -0,0 +1,27 @@ +{ + "extends": "stylelint-config-sass-guidelines", + "plugins": [ + "stylelint-order" + ], + "rules": { + "property-no-vendor-prefix": null, + "declaration-block-semicolon-newline-after": "always-multi-line", + "declaration-property-value-blacklist": null, + "selector-no-qualifying-type": null, + "selector-pseudo-element-no-unknown": null, + "selector-no-vendor-prefix": null, + "media-feature-name-no-vendor-prefix": null, + "scss/at-import-partial-extension-blacklist": null, + "scss/selector-no-redundant-nesting-selector": null, + "scss/at-mixin-pattern": null, + "scss/dollar-variable-pattern": null, + "order/properties-alphabetical-order": null, + "selector-max-id": null, + "property-no-unknown": null, + "color-named": null, + "value-no-vendor-prefix": null, + "selector-class-pattern": null, + "max-nesting-depth": 10, + "selector-max-compound-selectors": 10 + } +} diff --git a/package.json b/package.json index f82df424..ed9a4427 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", "lint": "eslint --ext .js,.vue src", + "lint:css": "stylelint --aei .vue,.html src", "test:unit": "jest --clearCache && vue-cli-service test:unit", "test:ci": "npm run lint && npm run test:unit", "svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml", @@ -97,7 +98,10 @@ "runjs": "4.3.2", "sass-loader": "7.3.1", "script-ext-html-webpack-plugin": "2.1.3", - "serve-static": "1.13.2", + "serve-static": "^1.13.2", + "stylelint": "13.5.0", + "stylelint-config-sass-guidelines": "7.0.0", + "stylelint-order": "4.0.0", "svg-sprite-loader": "4.1.3", "svgo": "1.2.0", "vue-template-compiler": "2.6.10", diff --git a/src/components/BackToTop/index.vue b/src/components/BackToTop/index.vue index 36522f4a..a2061ff3 100644 --- a/src/components/BackToTop/index.vue +++ b/src/components/BackToTop/index.vue @@ -1,7 +1,7 @@ @@ -96,15 +96,15 @@ export default { .fade-enter-active, .fade-leave-active { - transition: opacity .5s; + transition: opacity 0.5s; } .fade-enter, .fade-leave-to { - opacity: 0 + opacity: 0; } -.back-to-ceiling .Icon { +.back-to-ceiling .back-to-icon { fill: #9aaabf; background: none; } diff --git a/src/components/DndList/index.vue b/src/components/DndList/index.vue index 23ca006e..2862d52a 100644 --- a/src/components/DndList/index.vue +++ b/src/components/DndList/index.vue @@ -1,23 +1,23 @@