summaryrefslogtreecommitdiff
path: root/.stylelintrc
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2019-02-25 20:03:21 +0100
committerTim Zallmann <tzallmann@gitlab.com>2019-02-25 20:03:33 +0100
commit46a1ca2889e6428c860fc610a18bb16bb6d68e11 (patch)
treea652b963c1043a4fa33623e43b6a49239e344a2e /.stylelintrc
parent09adc0f69bcd96d74e18d000c63d40715be7b657 (diff)
downloadgitlab-ce-46a1ca2889e6428c860fc610a18bb16bb6d68e11.tar.gz
Added Stylelint Setup
Added stylelint to static-analysis Updated yarn dependencies CSS Fixes and rule adoptions of stylelint Added stylelint-scss Deduplicated yarn.lock to clear dependencies First round of advanced stylelint rules Mainly Vendor prefix updates related to flex Updates to more webkit specific vendor prefixes Finished all vendor specific fixes Moved now 4 rules to warning Fixed the new scss lint problems More stylelint adaptions after rebase
Diffstat (limited to '.stylelintrc')
-rw-r--r--.stylelintrc133
1 files changed, 105 insertions, 28 deletions
diff --git a/.stylelintrc b/.stylelintrc
index 69de9a5dd13..04784a0a11a 100644
--- a/.stylelintrc
+++ b/.stylelintrc
@@ -1,30 +1,107 @@
{
- "extends": "stylelint-config-recommended",
- "plugins": [
- "stylelint-scss"
- ],
- "rules": {
- "no-descending-specificity": null,
- "font-family-no-missing-generic-family-keyword": null,
- "at-rule-no-unknown": [ true, {
- ignoreAtRules: ["include", "each", "mixin", "extend", "if", "function", "for", "else", "return"]
- }],
- "selector-type-no-unknown": [true, {
- "ignoreTypes": ["gl-emoji"]
- }],
- "unit-no-unknown" : [true, {
- "ignoreFunctions": ["-webkit-image-set"]
- }],
- "scss/at-extend-no-missing-placeholder": null,
- "scss/at-function-pattern": "^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
- "scss/at-import-no-partial-leading-underscore": true,
- "scss/at-import-partial-extension-blacklist": ["scss"],
- "scss/at-mixin-pattern": "^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
- "scss/at-rule-no-unknown": true,
- "scss/dollar-variable-colon-space-after": "always",
- "scss/dollar-variable-colon-space-before": "never",
- "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/selector-no-redundant-nesting-selector": true,
- }
+ "plugins":[
+ "stylelint-scss"
+ ],
+ "rules":{
+ "at-rule-blacklist":[
+ "debug"
+ ],
+ "at-rule-no-unknown":null,
+ "at-rule-no-vendor-prefix":true,
+ "block-no-empty":true,
+ "block-opening-brace-space-before":"always",
+ "color-hex-case":"lower",
+ "color-hex-length":"short",
+ "color-named":"never",
+ "color-no-invalid-hex":true,
+ "declaration-bang-space-after":"never",
+ "declaration-bang-space-before":"always",
+ "declaration-block-semicolon-newline-after":"always",
+ "declaration-block-semicolon-space-before":"never",
+ "declaration-block-single-line-max-declarations":1,
+ "declaration-block-trailing-semicolon":"always",
+ "declaration-colon-space-after":"always-single-line",
+ "declaration-colon-space-before":"never",
+ "declaration-property-value-blacklist":{
+ "border":[
+ "none"
+ ],
+ "border-top":[
+ "none"
+ ],
+ "border-right":[
+ "none"
+ ],
+ "border-bottom":[
+ "none"
+ ],
+ "border-left":[
+ "none"
+ ]
+ },
+ "function-comma-space-after":"always-single-line",
+ "function-parentheses-space-inside":"never",
+ "function-url-quotes":"always",
+ "indentation":2,
+ "length-zero-no-unit":true,
+ "max-nesting-depth":[
+ 3,
+ {
+ "ignoreAtRules":[
+ "each",
+ "media",
+ "supports",
+ "include"
+ ],
+ "severity":"warning"
+ }
+ ],
+ "media-feature-name-no-vendor-prefix":true,
+ "media-feature-parentheses-space-inside":"never",
+ "no-missing-end-of-source-newline":true,
+ "number-leading-zero":"always",
+ "number-no-trailing-zeros":true,
+ "property-no-unknown":true,
+ "property-no-vendor-prefix":true,
+ "rule-empty-line-before":[
+ "always-multi-line",
+ {
+ "except":[
+ "first-nested"
+ ],
+ "ignore":[
+ "after-comment"
+ ]
+ }
+ ],
+ "scss/at-extend-no-missing-placeholder":[true,{ "severity": "warning" }],
+ "scss/at-function-pattern":"^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
+ "scss/at-import-no-partial-leading-underscore":true,
+ "scss/at-import-partial-extension-blacklist":[
+ "scss"
+ ],
+ "scss/at-mixin-pattern":"^[a-z]+([a-z0-9-]+[a-z0-9]+)?$",
+ "scss/at-rule-no-unknown":true,
+ "scss/dollar-variable-colon-space-after":"always",
+ "scss/dollar-variable-colon-space-before":"never",
+ "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/selector-no-redundant-nesting-selector":true,
+ "selector-class-pattern":[
+ "^[a-z0-9\\-]+$",
+ {
+ "message":"Selector should be written in lowercase with hyphens (selector-class-pattern)",
+ "severity": "warning"
+ },
+ ],
+ "selector-list-comma-newline-after":"always",
+ "selector-max-compound-selectors":[5, { "severity": "warning" }],
+ "selector-max-id":1,
+ "selector-no-vendor-prefix":true,
+ "selector-pseudo-element-colon-notation":"double",
+ "selector-pseudo-element-no-unknown":true,
+ "shorthand-property-no-redundant-values":true,
+ "string-quotes":"single",
+ "value-no-vendor-prefix":true
+ }
}