-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.stylelintrc.js
85 lines (84 loc) · 3.33 KB
/
.stylelintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
const projectName = "stacss";
module.exports = {
plugins: ["stylelint-scss"],
extends: "stylelint-config-recess-order",
// Most projects will have ignores for libraries, plugins
// These are the standard locations on an October CMS project
// ignoreFiles: [
// `themes/${stacss}/assets/style/stylesheets/lib/*`,
// "plugins/**/*"
// ],
defaultSeverity: "warning",
rules: {
"function-calc-no-unspaced-operator": true,
"shorthand-property-no-redundant-values": true,
"declaration-block-no-redundant-longhand-properties": true,
// SCSS compiler shouldn't allow this
// 'block-no-empty': true,
"comment-no-empty": true,
"max-nesting-depth": 5,
// SCSS compiler shouldn't allow this
// 'no-extra-semicolons': true,
"number-max-precision": 3,
"property-no-vendor-prefix": true,
// OK, sometimes you need to use important, but
// it should be explicitly called out/disabled if/when used.
"declaration-no-important": true,
"declaration-block-single-line-max-declarations": 1,
"selector-class-pattern": "[a-z][a-z0-9-]*",
// No id's allowed!! Unless accounted for
"selector-max-id": 0,
// Tentative rule:
// This will need testing with recent styles
"selector-no-vendor-prefix": true,
"function-name-case": "lower",
"number-leading-zero": "always",
"number-no-trailing-zeros": true,
"string-quotes": "single",
"length-zero-no-unit": true,
"unit-case": "lower",
"value-keyword-case": "lower",
"value-list-comma-space-after": "always-single-line",
"property-case": "lower",
"declaration-bang-space-before": "always",
"declaration-block-semicolon-newline-after": "always",
"declaration-block-trailing-semicolon": "always",
"block-closing-brace-newline-before": "always",
"block-opening-brace-newline-after": "always",
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-quotes": "always",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "double",
"selector-type-case": "lower",
"selector-list-comma-space-after": "always-single-line",
"selector-list-comma-space-before": "never",
"rule-empty-line-before": [
"always",
{
except: ["first-nested"],
ignore: ["after-comment"]
}
],
"media-feature-name-case": "lower",
indentation: 2,
"max-empty-lines": 3,
"no-eol-whitespace": true,
// SCSS rules
"scss/at-else-closing-brace-newline-after": "always-last-in-chain",
"scss/at-function-pattern": "([a-z]+[0-9]*)([A-Z][a-z0-9]+)?",
"scss/at-if-closing-brace-newline-after": "always-last-in-chain",
"scss/at-mixin-argumentless-call-parentheses": "never",
"scss/at-mixin-pattern": "([a-z]+[0-9]*)([A-Z][a-z0-9]+)?",
"scss/dollar-variable-colon-space-after": "always",
"scss/dollar-variable-colon-space-before": "never",
"scss/percent-placeholder-pattern": "[a-z][a-z0-9-]*",
// Arbitrary media values can be used, but explicitly
"scss/media-feature-value-dollar-variable": "always",
"scss/operator-no-unspaced": true,
"scss/selector-no-redundant-nesting-selector": true
}
};