Last active
June 26, 2018 08:55
-
-
Save harapeko/8e6b22ed3a02eca4e6c6f38ef88d874b to your computer and use it in GitHub Desktop.
suitcss用stylelint設定(sass記法)。cssクラス名(stylelint-selector-bem-pattern)+細かいルール(stylelint-config-suitcss)のlint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# エントリ系、設定系、プラグイン系などのcssを追記する |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"extends": "stylelint-config-suitcss", | |
"plugins": ["stylelint-selector-bem-pattern"], | |
"rules": { | |
# sass記法のコメントで発生するTypeError回避(20180626) | |
"indentation": null, | |
"declaration-block-trailing-semicolon": null, | |
"max-line-length": [ 120, { | |
ignore: "non-comments", | |
} ], | |
"rule-empty-line-before": [ "always-multi-line", { | |
ignore: ["after-comment"], | |
} ], | |
"order/properties-alphabetical-order": null, | |
"number-leading-zero": "never", | |
"block-opening-brace-space-before": null, | |
"block-closing-brace-newline-before": null, | |
"comment-empty-line-before": null, | |
"plugin/selector-bem-pattern": { | |
"implicitComponents": true, | |
"componentName": "[A-Z]+", | |
"componentSelectors": { | |
"initial": "^\\.{componentName}(?:-[a-z]+)?$", | |
"combined": "^\\.combined-{componentName}-[a-z]+$" | |
}, | |
"utilitySelectors": "^\\.util-[a-z]+$" | |
}, | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts": { | |
"lint": "stylelint resources/assets/sass/*.sass --syntax sass" | |
}, | |
"devDependencies": { | |
"stylelint": "^9.3.0", | |
"stylelint-config-suitcss": "^14.0.0", | |
"stylelint-selector-bem-pattern": "^2.0.0" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment