switch to stylelint

This commit is contained in:
Matthias Kretschmann 2017-05-30 18:25:40 +02:00
parent ba91f5a5f0
commit b417c3d25c
Signed by: m
GPG Key ID: BD3C1F3EDD7831FC
3 changed files with 41 additions and 46 deletions

View File

@ -1,45 +0,0 @@
#
# https://github.com/airbnb/css/blob/master/.scss-lint.yml
#
severity: error
linters:
BorderZero:
enabled: true
convention: zero
BemDepth:
enabled: true
DeclarationOrder:
enabled: false
ExtendDirective:
enabled: true
LeadingZero:
enabled: false
NameFormat:
enabled: true
PrivateNamingConvention:
enabled: true
prefix: _
PropertySortOrder:
enabled: false
QualifyingElement:
enabled: false
SelectorFormat:
enabled: true
convention: hyphenated_BEM
class_convention: ^(?!js-).*
class_convention_explanation: should not be written in the form js-*
Indentation:
enabled: true
width: 4

37
.stylelintrc Normal file
View File

@ -0,0 +1,37 @@
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 4,
"string-quotes": "single",
"no-duplicate-selectors": true,
"color-hex-case": "lower",
"color-hex-length": "short",
"color-named": "never",
"selector-no-qualifying-type": true,
"selector-no-id": true,
"selector-combinator-space-after": "always",
"selector-attribute-quotes": "always",
"selector-attribute-operator-space-before": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-brackets-space-inside": "never",
"declaration-block-trailing-semicolon": "always",
"declaration-no-important": true,
"declaration-colon-space-before": "never",
"declaration-colon-space-after": "always",
"number-leading-zero": "never",
"function-url-quotes": "always",
"font-weight-notation": "numeric",
"font-family-name-quotes": "always-where-recommended",
"comment-whitespace-inside": "always",
"comment-empty-line-before": "always",
"rule-empty-line-before": "always-multi-line",
"selector-pseudo-element-colon-notation": "single",
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-no-type": true,
"media-feature-range-operator-space-before": "always",
"media-feature-range-operator-space-after": "always",
"media-feature-parentheses-space-inside": "never",
"media-feature-colon-space-before": "never",
"media-feature-colon-space-after": "always"
}
}

View File

@ -11,7 +11,8 @@
"main": "gulpfile.babel.js",
"scripts": {
"start": "gulp",
"build": "gulp build --production"
"build": "gulp build --production",
"test": "stylelint _src/_assets/styles/**/*.scss"
},
"browserslist": [
"last 2 versions",
@ -67,6 +68,8 @@
"gulp-util": "^3.0.6",
"js-yaml": "^3.8.3",
"request": "^2.81.0",
"stylelint": "^7.10.1",
"stylelint-config-standard": "^16.0.0",
"uglify-es": "^3.0.13"
},
"engines": {