@d-zero/stylelint-config 5.0.0-dev.90 → 5.0.0-dev.91
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.js +184 -0
- package/index.js +27 -0
- package/package.json +10 -8
- package/.stylelintrc.json +0 -23
package/base.js
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
extends: ['stylelint-config-standard', 'stylelint-config-recess-order'],
|
|
3
|
+
plugins: ['stylelint-scss', 'stylelint-order'],
|
|
4
|
+
rules: {
|
|
5
|
+
'order/order': [
|
|
6
|
+
'dollar-variables',
|
|
7
|
+
'custom-properties',
|
|
8
|
+
{
|
|
9
|
+
type: 'at-rule',
|
|
10
|
+
name: 'custom-media',
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: 'at-rule',
|
|
14
|
+
name: 'extend',
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
type: 'at-rule',
|
|
18
|
+
name: 'mixin',
|
|
19
|
+
},
|
|
20
|
+
'declarations',
|
|
21
|
+
{
|
|
22
|
+
type: 'at-rule',
|
|
23
|
+
name: 'supports',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: 'at-rule',
|
|
27
|
+
name: 'media',
|
|
28
|
+
hasBlock: true,
|
|
29
|
+
},
|
|
30
|
+
'rules',
|
|
31
|
+
],
|
|
32
|
+
'at-rule-disallowed-list': null,
|
|
33
|
+
'at-rule-empty-line-before': [
|
|
34
|
+
'always',
|
|
35
|
+
{
|
|
36
|
+
except: ['blockless-after-same-name-blockless', 'first-nested'],
|
|
37
|
+
ignore: ['after-comment'],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
'at-rule-no-vendor-prefix': true,
|
|
41
|
+
'at-rule-no-unknown': [
|
|
42
|
+
true,
|
|
43
|
+
{
|
|
44
|
+
ignoreAtRules: ['mixin', 'extend', 'for', 'if', 'include', 'use', 'forward'],
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
'color-hex-length': 'short',
|
|
48
|
+
'color-named': 'never',
|
|
49
|
+
'color-no-invalid-hex': true,
|
|
50
|
+
'comment-empty-line-before': [
|
|
51
|
+
'always',
|
|
52
|
+
{
|
|
53
|
+
ignore: ['stylelint-commands'],
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
'comment-no-empty': true,
|
|
57
|
+
'comment-whitespace-inside': 'always',
|
|
58
|
+
'comment-word-disallowed-list': ['/^TODO:/'],
|
|
59
|
+
'custom-property-empty-line-before': 'never',
|
|
60
|
+
'declaration-block-no-duplicate-properties': true,
|
|
61
|
+
'declaration-block-no-redundant-longhand-properties': [
|
|
62
|
+
true,
|
|
63
|
+
{
|
|
64
|
+
ignoreShorthands: ['flex', 'grid-template'],
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
'declaration-block-no-shorthand-property-overrides': true,
|
|
68
|
+
'declaration-block-single-line-max-declarations': 80,
|
|
69
|
+
'declaration-empty-line-before': 'never',
|
|
70
|
+
'declaration-no-important': true,
|
|
71
|
+
'declaration-property-value-disallowed-list': {
|
|
72
|
+
'/^(?:color|background|background-color|border|border-color|outline|outline-color)$/':
|
|
73
|
+
['/#[0-9a-f]{3}/', '/(?:rgb|hsl)a?\\(.+?\\)/'],
|
|
74
|
+
content: ['/^\\"\\\\[0-9a-fA-F]{1,6}\\"$/'],
|
|
75
|
+
flex: ['/calc/'],
|
|
76
|
+
'/^(?:max-|min-)?(?:width|height)|^flex/': [
|
|
77
|
+
'/[1-9]*\\.[0-9]+(?:%|vw|vh)/',
|
|
78
|
+
'/(?:^|[^0-9])[0-9](?:%|vw|vh)/',
|
|
79
|
+
'/(?:^|[^0-9])[0-9]{2}(?:%|vw|vh)/',
|
|
80
|
+
'/1[0-9][1-9](?:%|vw|vh)/',
|
|
81
|
+
'/1[1-9][0-9](?:%|vw|vh)/',
|
|
82
|
+
'/[2-9][0-9][0-9](?:%|vw|vh)/',
|
|
83
|
+
'/[0-9]{4,}(?:%|vw|vh)/',
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
'declaration-property-value-allowed-list': {
|
|
87
|
+
'font-size': [
|
|
88
|
+
'inherit',
|
|
89
|
+
'$root-font-size',
|
|
90
|
+
'$base-font-size',
|
|
91
|
+
'1em',
|
|
92
|
+
'/^calc\\((?:\\$[a-z_][a-z0-9_-]*|(?:[0-9]*\\.)?[0-9]+) \\/ (?:\\$[a-z_][a-z0-9_-]*|(?:[0-9]*\\.)?[0-9]+) \\* (?:1em|100vw)\\)$/',
|
|
93
|
+
'/^(?:[0-9]*\\.)?[0-9]+rem/',
|
|
94
|
+
'/^clamp\\(/',
|
|
95
|
+
],
|
|
96
|
+
},
|
|
97
|
+
'font-family-name-quotes': 'always-where-required',
|
|
98
|
+
'font-family-no-duplicate-names': true,
|
|
99
|
+
'font-weight-notation': 'named-where-possible',
|
|
100
|
+
'function-disallowed-list': null,
|
|
101
|
+
'function-calc-no-unspaced-operator': true,
|
|
102
|
+
'function-linear-gradient-no-nonstandard-direction': true,
|
|
103
|
+
'function-name-case': 'lower',
|
|
104
|
+
'function-no-unknown': [
|
|
105
|
+
true,
|
|
106
|
+
{
|
|
107
|
+
ignoreFunctions: ['a', 'lighten', 'darken', 'resolve'],
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
'function-url-scheme-allowed-list': null,
|
|
111
|
+
'function-url-no-scheme-relative': true,
|
|
112
|
+
'function-url-quotes': 'always',
|
|
113
|
+
'keyframe-declaration-no-important': true,
|
|
114
|
+
'length-zero-no-unit': true,
|
|
115
|
+
'max-nesting-depth': 8,
|
|
116
|
+
'media-feature-name-no-unknown': true,
|
|
117
|
+
'media-feature-name-no-vendor-prefix': true,
|
|
118
|
+
'no-duplicate-selectors': true,
|
|
119
|
+
'no-descending-specificity': null,
|
|
120
|
+
'no-empty-source': true,
|
|
121
|
+
'no-invalid-double-slash-comments': true,
|
|
122
|
+
'no-unknown-animations': true,
|
|
123
|
+
'number-max-precision': 4,
|
|
124
|
+
'property-disallowed-list': null,
|
|
125
|
+
'property-no-unknown': true,
|
|
126
|
+
'property-no-vendor-prefix': [
|
|
127
|
+
true,
|
|
128
|
+
{
|
|
129
|
+
severity: 'warning',
|
|
130
|
+
message: 'Autoprefixerを利用するのでベンダープレフィックスは不要です',
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
'rule-empty-line-before': [
|
|
134
|
+
'always-multi-line',
|
|
135
|
+
{
|
|
136
|
+
except: ['after-single-line-comment', 'first-nested'],
|
|
137
|
+
ignore: ['after-comment'],
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
'selector-attribute-operator-disallowed-list': null,
|
|
141
|
+
'selector-attribute-quotes': 'always',
|
|
142
|
+
'selector-max-compound-selectors': 8,
|
|
143
|
+
'selector-max-specificity': '0,10,10',
|
|
144
|
+
'selector-max-id': 0,
|
|
145
|
+
'selector-max-universal': 1,
|
|
146
|
+
'selector-no-vendor-prefix': true,
|
|
147
|
+
'selector-pseudo-class-disallowed-list': ['link'],
|
|
148
|
+
'selector-pseudo-element-colon-notation': 'double',
|
|
149
|
+
'selector-type-case': 'lower',
|
|
150
|
+
'selector-type-no-unknown': true,
|
|
151
|
+
'shorthand-property-no-redundant-values': null,
|
|
152
|
+
'string-no-newline': true,
|
|
153
|
+
'time-min-milliseconds': 100,
|
|
154
|
+
'unit-disallowed-list': [
|
|
155
|
+
'ex',
|
|
156
|
+
'ch',
|
|
157
|
+
'mm',
|
|
158
|
+
'q',
|
|
159
|
+
'cm',
|
|
160
|
+
'in',
|
|
161
|
+
'pt',
|
|
162
|
+
'pc',
|
|
163
|
+
'vm',
|
|
164
|
+
's',
|
|
165
|
+
'grad',
|
|
166
|
+
'rad',
|
|
167
|
+
'turn',
|
|
168
|
+
],
|
|
169
|
+
'unit-no-unknown': true,
|
|
170
|
+
'value-keyword-case': [
|
|
171
|
+
'lower',
|
|
172
|
+
{
|
|
173
|
+
ignoreProperties: ['/^\\$font-family-/'],
|
|
174
|
+
},
|
|
175
|
+
],
|
|
176
|
+
'value-no-vendor-prefix': true,
|
|
177
|
+
},
|
|
178
|
+
overrides: [
|
|
179
|
+
{
|
|
180
|
+
files: ['__assets/**/*.scss'],
|
|
181
|
+
customSyntax: 'postcss-scss',
|
|
182
|
+
},
|
|
183
|
+
],
|
|
184
|
+
};
|
package/index.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const base = require('./base');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
...base,
|
|
5
|
+
ignoreFiles: [
|
|
6
|
+
'__assets/**/*.{js,jsx,ts,tsx,html,pug}',
|
|
7
|
+
'__assets/css/_syntax-rules.scss',
|
|
8
|
+
'htdocs/**/*',
|
|
9
|
+
'docs/**/*.md',
|
|
10
|
+
],
|
|
11
|
+
rules: {
|
|
12
|
+
...base.rules,
|
|
13
|
+
'scss/dollar-variable-pattern':
|
|
14
|
+
'^(?:[a-z]{2,}-[a-z0-9-]+|_[a-z][a-z0-9]*(?:-[a-z0-9]+)*)$',
|
|
15
|
+
'scss/percent-placeholder-pattern': '^[a-z]{2,}(-[a-z0-9-]+)?$',
|
|
16
|
+
'custom-media-pattern': '[a-z][a-z-]*',
|
|
17
|
+
'custom-property-pattern': '[a-z][a-z-]*',
|
|
18
|
+
'selector-class-pattern': [
|
|
19
|
+
'^c-[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)?$',
|
|
20
|
+
{
|
|
21
|
+
resolveNestedSelectors: true,
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
'selector-id-pattern': '^$',
|
|
25
|
+
'selector-nested-pattern': '^[^.]+.*',
|
|
26
|
+
},
|
|
27
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@d-zero/stylelint-config",
|
|
3
|
-
"version": "5.0.0-dev.
|
|
3
|
+
"version": "5.0.0-dev.91+8b15f42",
|
|
4
4
|
"description": "Configurations of Stylelint",
|
|
5
5
|
"repository": "https://github.com/d-zero-dev/node-dev-env.git",
|
|
6
6
|
"author": "D-ZERO Co., Ltd.",
|
|
@@ -9,14 +9,16 @@
|
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
13
|
-
".stylelintrc.json"
|
|
14
|
-
],
|
|
12
|
+
"type": "commonjs",
|
|
15
13
|
"exports": {
|
|
16
|
-
".": "
|
|
17
|
-
"./base": "
|
|
14
|
+
".": "./index.js",
|
|
15
|
+
"./base": "./base.js"
|
|
18
16
|
},
|
|
19
|
-
"
|
|
17
|
+
"files": [
|
|
18
|
+
"base.js",
|
|
19
|
+
"index.js"
|
|
20
|
+
],
|
|
21
|
+
"main": "index.js",
|
|
20
22
|
"dependencies": {
|
|
21
23
|
"stylelint": "16.1.0",
|
|
22
24
|
"stylelint-config-recess-order": "4.4.0",
|
|
@@ -24,5 +26,5 @@
|
|
|
24
26
|
"stylelint-order": "6.0.4",
|
|
25
27
|
"stylelint-scss": "6.0.0"
|
|
26
28
|
},
|
|
27
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "8b15f4231cde1c9049f5ab3a01e41f4f522c6687"
|
|
28
30
|
}
|
package/.stylelintrc.json
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": ["./stylelintrc.base.json"],
|
|
3
|
-
"ignoreFiles": [
|
|
4
|
-
"__assets/**/*.{js,jsx,ts,tsx,html,pug}",
|
|
5
|
-
"__assets/css/_syntax-rules.scss",
|
|
6
|
-
"htdocs/**/*",
|
|
7
|
-
"docs/**/*.md"
|
|
8
|
-
],
|
|
9
|
-
"rules": {
|
|
10
|
-
"scss/dollar-variable-pattern": "^(?:[a-z]{2,}-[a-z0-9-]+|_[a-z][a-z0-9]*(?:-[a-z0-9]+)*)$",
|
|
11
|
-
"scss/percent-placeholder-pattern": "^[a-z]{2,}(-[a-z0-9-]+)?$",
|
|
12
|
-
"custom-media-pattern": "[a-z][a-z-]*",
|
|
13
|
-
"custom-property-pattern": "[a-z][a-z-]*",
|
|
14
|
-
"selector-class-pattern": [
|
|
15
|
-
"^c-[a-z][a-z0-9]*(?:-[a-z0-9]+)*(?:__[a-z0-9]+(?:-[a-z0-9]+)*)?$",
|
|
16
|
-
{
|
|
17
|
-
"resolveNestedSelectors": true
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"selector-id-pattern": "^$",
|
|
21
|
-
"selector-nested-pattern": "^[^.]+.*"
|
|
22
|
-
}
|
|
23
|
-
}
|