forked from rhertzog/tuleap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.stylelintrc.js
More file actions
73 lines (71 loc) · 2.22 KB
/
.stylelintrc.js
File metadata and controls
73 lines (71 loc) · 2.22 KB
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
const fs = require('fs')
const prettier_config = JSON.parse(fs.readFileSync("./.prettierrc", "utf-8"));
module.exports = {
extends: ["stylelint-config-sass-guidelines", "stylelint-config-property-sort-order-smacss", "stylelint-prettier/recommended"],
syntax: "scss",
reportNeedlessDisables: true,
reportInvalidScopeDisables: true,
rules: {
indentation: [4],
"comment-word-disallowed-list": [
[/^!/],
{
message: `Never use the "/*!" style of comments. Those comments are output in compressed CSS. (comment-word-disallowed-list)`
}
],
"color-hex-length": ["long"],
"color-named": [
"never",
{
message: "Colors should be written in hexadecimal format (color-named)"
}
],
"declaration-block-no-duplicate-properties": true,
"function-calc-no-unspaced-operator": true,
"max-nesting-depth": [4],
"no-duplicate-selectors": true,
"no-eol-whitespace": true,
"number-leading-zero": ["always"],
"selector-id-pattern": [
"^[a-z0-9\\-]+$",
{
message:
"Selector should be written in lowercase with hyphens (selector-id-pattern)"
}
],
"selector-max-compound-selectors": [5],
"selector-max-id": null,
"selector-no-qualifying-type": [
true,
{
ignore: ["attribute"]
}
],
"unit-allowed-list": [
"em",
"rem",
"px",
"vh",
"vw",
"vmin",
"vmax",
"deg",
"grad",
"rad",
"turn",
"ms",
"s",
"%",
"fr"
],
// Plugins
"order/properties-alphabetical-order": null,
"scss/at-else-empty-line-before": ["never"],
"scss/dollar-variable-colon-space-before": null,
"scss/operator-no-unspaced": true,
"prettier/prettier": [
true,
{...prettier_config, "printWidth": 9999} // Override printWidth to play nice with existing .scss files
]
}
};