diff --git a/.stylelintrc.yaml b/.stylelintrc.yaml new file mode 100644 index 0000000..fc2cc23 --- /dev/null +++ b/.stylelintrc.yaml @@ -0,0 +1,65 @@ +extends: + - stylelint-prettier/recommended + - stylelint-config-recommended + - stylelint-config-recommended-scss + +ignoreFiles: + - indico/web/static/dist/**/*.css + +rules: + # this rule is too noisy + no-descending-specificity: null + + # complains about css rules after `@include` without an empty line + declaration-empty-line-before: null + + # `:global()` has special meaning in css modules + selector-pseudo-class-no-unknown: + - true + - ignorePseudoClasses: [global] + + selector-pseudo-element-colon-notation: double + + font-family-no-missing-generic-family-keyword: + - true + - ignoreFontFamilies: [icomoon-ultimate] + + at-rule-empty-line-before: + - always + - except: + - first-nested + ignore: + - blockless-after-same-name-blockless + - after-comment + - inside-block + + color-hex-length: short + length-zero-no-unit: true + + rule-empty-line-before: + - always + - except: [first-nested] + ignore: [after-comment] + + value-keyword-case: lower + + scss/at-import-no-partial-leading-underscore: true + scss/at-import-partial-extension: never + scss/at-function-pattern: ^([a-z][a-z0-9]*)(-[a-z0-9]+)*$ + scss/at-mixin-argumentless-call-parentheses: always + scss/at-mixin-pattern: ^_?([a-z][a-z0-9]*)(-[a-z0-9]+)*$ + scss/at-rule-conditional-no-parentheses: true + scss/dollar-variable-pattern: ^([a-z][a-z0-9]*)(-[a-z0-9]+)*$ + scss/percent-placeholder-pattern: ^([a-z][a-z0-9]*)(-[a-z0-9]+)*$ + scss/double-slash-comment-whitespace-inside: always + scss/declaration-nested-properties: never + scss/dimension-no-non-numeric-values: true + scss/media-feature-value-dollar-variable: + - always + - ignore: [keywords] + severity: warning + scss/no-duplicate-dollar-variables: + - true + - ignoreInside: [at-rule, nested-at-rule] + ignoreInsideAtRules: [if, else, function, each] + scss/no-duplicate-mixins: true diff --git a/package.json b/package.json index cad7414..2f93636 100644 --- a/package.json +++ b/package.json @@ -13,10 +13,16 @@ "eslint-import-resolver-alias": "^1.1.2", "eslint-plugin-babel": "^5.3.0", "eslint-plugin-import": "^2.18.0", + "eslint-plugin-jest": "^23.0.4", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-react": "^7.14.2", "eslint-plugin-react-hooks": "^1.6.1", "lodash": "^4.17.14", - "prettier": "^1.18.2" + "prettier": "~1.18.2", + "stylelint": "~13.6.1", + "stylelint-config-prettier": "^8.0.2", + "stylelint-config-recommended-scss": "^4.2.0", + "stylelint-prettier": "^1.1.2", + "stylelint-scss": "^3.18.0" } }