forked from palantir/stylelint-config-palantir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstylelint.config.js
96 lines (90 loc) · 2.81 KB
/
stylelint.config.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
86
87
88
89
90
91
92
93
94
95
96
/**
* Copyright 2017-present Palantir Technologies
* @license Apache-2.0
*/
"use strict";
// lowercase-single-dashed-names-only-0
const namingPattern = /^-?[a-z0-9]+(-[a-z0-9]+)*$/;
module.exports = {
extends: "stylelint-config-standard",
// export namingPattern so it can be used in your own rules
namingPattern,
plugins: [
"stylelint-order",
],
rules: {
"at-rule-no-unknown": true,
"at-rule-no-vendor-prefix": true,
"block-opening-brace-space-before": "always-multi-line",
"color-hex-length": "long",
"color-named": "never",
"declaration-block-no-duplicate-properties": true,
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-colon-newline-after": null,
"declaration-colon-space-after": "always-single-line",
"declaration-empty-line-before": ["never", {
ignore: ["after-declaration"],
}],
"declaration-no-important": true,
"font-family-name-quotes": "always-unless-keyword",
"font-weight-notation": "numeric",
"function-max-empty-lines": 1,
"function-url-quotes": "always",
"indentation": [4, {
// align multiline property values
ignore: ["value"],
}],
"length-zero-no-unit": true,
"max-empty-lines": 3,
"max-line-length": 100,
"max-nesting-depth": 4,
"media-feature-name-no-vendor-prefix": true,
"no-descending-specificity": null,
"no-duplicate-selectors": true,
"no-unknown-animations": true,
"number-max-precision": 8,
"number-no-trailing-zeros": true,
"property-no-unknown": true,
"property-no-vendor-prefix": true,
"rule-empty-line-before": ["always-multi-line", {
except: ["first-nested"],
ignore: ["after-comment"],
}],
"selector-attribute-quotes": "always",
"selector-class-pattern": namingPattern,
"selector-id-pattern": namingPattern,
"selector-max-compound-selectors": 4,
// "id,class,type"
"selector-max-specificity": "1,3,3",
"selector-max-id": 0,
"selector-max-universal": 0,
"selector-no-vendor-prefix": true,
"selector-pseudo-class-no-unknown": [true, {
// :global and :export are used by css modules
"ignorePseudoClasses": ["global", "export"]
}],
"string-quotes": "double",
"time-min-milliseconds": 100,
"unit-disallowed-list": ["pt"],
"value-keyword-case": "lower",
"value-list-comma-newline-before": "never-multi-line",
"value-no-vendor-prefix": true,
"order/order": [
[
"custom-properties",
"at-variables",
"dollar-variables",
"less-mixins",
{
"type": "at-rule",
"name": "include"
},
"declarations",
"rules",
],
{ unspecified: "ignore" }
],
"order/properties-alphabetical-order": true,
},
};