Skip to content

Commit 7066c91

Browse files
committed
Stylelint config + BEM linter
1 parent b561276 commit 7066c91

File tree

3 files changed

+77
-2
lines changed

3 files changed

+77
-2
lines changed

.stylelintrc

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"plugins": [
3+
"stylelint-selector-bem-pattern"
4+
],
5+
"extends": "stylelint-config-standard",
6+
"rules": {
7+
"at-rule-empty-line-before": null,
8+
"at-rule-no-unknown": [
9+
true, {
10+
"ignoreAtRules": ["if", "else", "mixin", "include", "content", "for"]
11+
}
12+
],
13+
"block-closing-brace-empty-line-before": null,
14+
"block-closing-brace-newline-after": null,
15+
"color-hex-case": "lower",
16+
"declaration-colon-newline-after": "always-multi-line",
17+
"declaration-empty-line-before": "never",
18+
"declaration-no-important": null,
19+
"font-family-name-quotes": "always-where-recommended",
20+
"function-comma-newline-after": null,
21+
"function-parentheses-space-inside": null,
22+
"function-url-quotes": "never",
23+
"max-empty-lines": 2,
24+
"max-nesting-depth": 3,
25+
"media-feature-name-no-vendor-prefix": true,
26+
"no-descending-specificity": null,
27+
"no-duplicate-selectors": null,
28+
"no-extra-semicolons": true,
29+
"number-leading-zero": "never",
30+
"property-no-vendor-prefix": true,
31+
"rule-empty-line-before": null,
32+
"selector-attribute-quotes": "always",
33+
"selector-list-comma-newline-after": null,
34+
"selector-max-compound-selectors": 3,
35+
"selector-max-id": 0,
36+
"selector-max-specificity": "0,4,0",
37+
"selector-max-universal": 1,
38+
"selector-no-vendor-prefix": true,
39+
"selector-pseudo-element-colon-notation": "single",
40+
"unit-whitelist": [ "px", "em", "rem", "%", "s", "deg" ],
41+
"value-no-vendor-prefix": true,
42+
"plugin/selector-bem-pattern": {
43+
"componentName": "(([a-z0-9]+(?!-$)-?)+)",
44+
"componentSelectors": {
45+
"initial": "\\.{componentName}(((__|--)(([a-z0-9\\[\\]'=]+(?!-$)-?)+))+)?$"
46+
},
47+
}
48+
}
49+
}

package-lock.json

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
"grunt": "^1.0.0",
88
"grunt-browser-sync": "^2.1.0",
99
"grunt-contrib-copy": "^1.0.0",
10+
"grunt-contrib-less": "^1.4.1",
1011
"grunt-contrib-watch": "^1.1.0",
1112
"grunt-postcss": "^0.9.0",
12-
"grunt-contrib-less": "^1.4.1",
1313
"grunt-stylelint": "^0.9.0",
1414
"jit-grunt": "^0.10.0",
1515
"load-grunt-config": "^0.19.2",
1616
"stylelint": "^9.2.0",
1717
"stylelint-config-standard": "^18.0.0",
18+
"stylelint-selector-bem-pattern": "^2.0.0",
1819
"time-grunt": "^1.2.1"
1920
},
20-
"browserslist": ["last 2 versions"]
21+
"browserslist": [
22+
"last 2 versions"
23+
]
2124
}

0 commit comments

Comments
 (0)