-
Notifications
You must be signed in to change notification settings - Fork 8
/
.stylelintrc.js
72 lines (65 loc) · 1.91 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
/**
* React Starter Kit (https://www.reactstarterkit.com/)
*
* Copyright © 2014-present Kriasoft, LLC. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE.txt file in the root directory of this source tree.
*/
const lowerKebabCase = /^[a-z][a-zA-Z0-9]+$/;
// stylelint configuration
// https://stylelint.io/user-guide/configuration/
module.exports = {
// The standard config based on a handful of CSS style guides
// https://github.com/stylelint/stylelint-config-standard
extends: "stylelint-config-standard-scss",
plugins: [
// stylelint plugin to sort CSS rules content with specified order
// https://github.com/hudochenkov/stylelint-order
"stylelint-order",
],
rules: {
"at-rule-no-unknown": null,
"scss/at-rule-no-unknown": true,
"declaration-empty-line-before": null,
"keyframes-name-pattern": lowerKebabCase,
"number-leading-zero": "never",
"property-no-unknown": [
true,
{
ignoreProperties: [
// CSS Modules composition
// https://github.com/css-modules/css-modules#composition
"composes",
"overflow-anchor",
],
},
],
"selector-class-pattern": lowerKebabCase,
"selector-pseudo-class-no-unknown": [
true,
{
ignorePseudoClasses: [
// CSS Modules :global scope
// https://github.com/css-modules/css-modules#exceptions
"global",
"local",
],
},
],
// https://github.com/hudochenkov/stylelint-order/blob/master/rules/order/README.md
"order/order": [
"custom-properties",
"dollar-variables",
{
type: "at-rule",
name: "include",
},
"declarations",
"at-rules",
"rules",
],
// https://github.com/hudochenkov/stylelint-order/blob/master/rules/properties-order/README.md
"order/properties-order": [],
},
};