@alexlit/config-stylelint 47.1.1 → 48.0.0
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/index.js +2 -52
- package/package.json +5 -4
- package/plugins/a11y.js +1 -1
- package/plugins/color-format.js +1 -1
- package/plugins/declaration-block-no-ignored-properties.js +1 -1
- package/plugins/gamut.js +1 -1
- package/plugins/high-performance-animation.js +1 -1
- package/plugins/logical-css.js +1 -2
- package/plugins/no-indistinguishable-colors.js +1 -1
- package/plugins/no-nested-media.js +1 -1
- package/plugins/no-unresolved-module.js +1 -2
- package/plugins/no-unsupported-browser-features.js +1 -1
- package/plugins/order.js +1 -2
- package/plugins/prettier.js +1 -1
- package/plugins/scss.js +2 -4
- package/plugins/selector-no-empty.js +1 -1
- package/plugins/use-nesting.js +1 -1
- package/plugins/vue.js +1 -0
package/index.js
CHANGED
|
@@ -1,56 +1,27 @@
|
|
|
1
1
|
/* eslint-disable unicorn/no-null */
|
|
2
2
|
|
|
3
3
|
const ADDITIONAL_PLUGINS = {
|
|
4
|
-
/** @see [stylelint-a11y](https://github.com/double-great/stylelint-a11y) */
|
|
5
|
-
a11y: true,
|
|
6
|
-
|
|
7
|
-
/** @see [stylelint-color-format](https://github.com/filipekiss/stylelint-color-format) */
|
|
8
4
|
'color-format': true,
|
|
9
|
-
|
|
10
|
-
/** @see [stylelint-declaration-block-no-ignored-properties](https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties) */
|
|
11
5
|
'declaration-block-no-ignored-properties': true,
|
|
12
|
-
|
|
13
|
-
/** @see [stylelint-high-performance-animation](https://github.com/kristerkari/stylelint-high-performance-animation) */
|
|
14
6
|
'high-performance-animation': true,
|
|
15
|
-
|
|
16
|
-
/** @see [stylelint-no-nested-media](https://github.com/dkrnl/stylelint-no-nested-media) */
|
|
17
7
|
'no-nested-media': true,
|
|
18
|
-
|
|
19
|
-
/** @see [stylelint-no-unresolved-module](https://github.com/niksy/stylelint-no-unresolved-module) */
|
|
20
8
|
'no-unresolved-module': true,
|
|
21
|
-
|
|
22
|
-
/** @see [stylelint-order](https://github.com/hudochenkov/stylelint-order) */
|
|
23
9
|
order: true,
|
|
24
|
-
|
|
25
|
-
/** @see [stylelint-scss](https://github.com/kristerkari/stylelint-scss) */
|
|
26
10
|
scss: true,
|
|
27
|
-
|
|
28
|
-
/** @see [stylelint-selector-no-empty](https://github.com/ssivanatarajan/stylelint-selector-no-empty) */
|
|
29
11
|
'selector-no-empty': true,
|
|
30
|
-
|
|
31
|
-
/** @see [stylelint-use-nesting](https://github.com/csstools/stylelint-use-nesting) */
|
|
32
12
|
'use-nesting': true,
|
|
33
|
-
|
|
34
|
-
/** @see [stylelint-config-recommended-vue](https://github.com/ota-meshi/stylelint-config-recommended-vue) */
|
|
35
13
|
vue: true,
|
|
36
14
|
};
|
|
37
15
|
|
|
38
16
|
const OPTIONAL_PLUGINS = {
|
|
39
|
-
|
|
17
|
+
a11y: false,
|
|
40
18
|
gamut: false,
|
|
41
|
-
|
|
42
|
-
/** @see [stylelint-plugin-logical-css](https://github.com/yuschick/stylelint-plugin-logical-css) */
|
|
43
19
|
'logical-css': false,
|
|
44
|
-
|
|
45
|
-
/** @see [stylelint-no-indistinguishable-colors](https://github.com/ierhyna/stylelint-no-indistinguishable-colors) */
|
|
46
20
|
'no-indistinguishable-colors': false,
|
|
47
|
-
|
|
48
|
-
/** @see [stylelint-no-unsupported-browser-features](https://github.com/ismay/stylelint-no-unsupported-browser-features) */
|
|
49
21
|
'no-unsupported-browser-features': false,
|
|
50
22
|
};
|
|
51
23
|
|
|
52
24
|
const CODESTYLE_PLUGINS = {
|
|
53
|
-
/** @see [stylelint-prettier](https://github.com/prettier/stylelint-prettier) */
|
|
54
25
|
prettier: true,
|
|
55
26
|
};
|
|
56
27
|
|
|
@@ -93,8 +64,8 @@ const createConfig = (plugins = {}, options = {}) => ({
|
|
|
93
64
|
|
|
94
65
|
...(options.extends ?? []),
|
|
95
66
|
],
|
|
96
|
-
|
|
97
67
|
ignoreFiles: [
|
|
68
|
+
'.*',
|
|
98
69
|
'.*/**',
|
|
99
70
|
'build/**',
|
|
100
71
|
'dist/**',
|
|
@@ -104,14 +75,11 @@ const createConfig = (plugins = {}, options = {}) => ({
|
|
|
104
75
|
|
|
105
76
|
...(options.ignoreFiles ?? []),
|
|
106
77
|
],
|
|
107
|
-
|
|
108
78
|
plugins: options.plugins ?? [],
|
|
109
|
-
|
|
110
79
|
rules: {
|
|
111
80
|
'alpha-value-notation': 'number',
|
|
112
81
|
'annotation-no-unknown': [true, { ignoreAnnotations: ['default'] }],
|
|
113
82
|
'at-rule-disallowed-list': ['debug'],
|
|
114
|
-
|
|
115
83
|
'at-rule-empty-line-before': [
|
|
116
84
|
'always',
|
|
117
85
|
{
|
|
@@ -119,7 +87,6 @@ const createConfig = (plugins = {}, options = {}) => ({
|
|
|
119
87
|
ignoreAtRules: ['else'],
|
|
120
88
|
},
|
|
121
89
|
],
|
|
122
|
-
|
|
123
90
|
'at-rule-no-unknown': null,
|
|
124
91
|
'at-rule-no-vendor-prefix': true,
|
|
125
92
|
'block-no-empty': null,
|
|
@@ -127,17 +94,14 @@ const createConfig = (plugins = {}, options = {}) => ({
|
|
|
127
94
|
'color-hex-length': 'short',
|
|
128
95
|
'color-no-hex': true,
|
|
129
96
|
'color-no-invalid-hex': true,
|
|
130
|
-
|
|
131
97
|
'custom-property-empty-line-before': [
|
|
132
98
|
'always',
|
|
133
99
|
{
|
|
134
100
|
except: ['after-comment', 'after-custom-property', 'first-nested'],
|
|
135
101
|
},
|
|
136
102
|
],
|
|
137
|
-
|
|
138
103
|
'custom-property-pattern': '^_?[a-z]+([a-z0-9-]+[a-z0-9]+)?$',
|
|
139
104
|
'declaration-block-no-redundant-longhand-properties': null,
|
|
140
|
-
|
|
141
105
|
'declaration-property-value-no-unknown': [
|
|
142
106
|
true,
|
|
143
107
|
{
|
|
@@ -146,32 +110,27 @@ const createConfig = (plugins = {}, options = {}) => ({
|
|
|
146
110
|
},
|
|
147
111
|
},
|
|
148
112
|
],
|
|
149
|
-
|
|
150
113
|
'font-family-name-quotes': 'always-unless-keyword',
|
|
151
114
|
'function-no-unknown': null, // delegate to scss/function-no-unknown
|
|
152
115
|
'function-url-quotes': 'always',
|
|
153
116
|
'function-url-scheme-disallowed-list': ['/^data/', 'ftp', '/^http/'],
|
|
154
117
|
'hue-degree-notation': 'angle',
|
|
155
118
|
'keyframes-name-pattern': '^[a-z]+(-[a-z]+)*$',
|
|
156
|
-
|
|
157
119
|
'max-nesting-depth': [
|
|
158
120
|
6,
|
|
159
121
|
{
|
|
160
122
|
ignoreAtRules: ['each', 'media', 'supports', 'include'],
|
|
161
123
|
},
|
|
162
124
|
],
|
|
163
|
-
|
|
164
125
|
'media-feature-name-no-unknown': [
|
|
165
126
|
true,
|
|
166
127
|
{ ignoreMediaFeatureNames: ['screen'] },
|
|
167
128
|
],
|
|
168
|
-
|
|
169
129
|
'media-feature-name-no-vendor-prefix': true,
|
|
170
130
|
'no-descending-specificity': null,
|
|
171
131
|
'no-empty-source': null,
|
|
172
132
|
'no-unknown-animations': true,
|
|
173
133
|
'number-max-precision': 3,
|
|
174
|
-
|
|
175
134
|
'property-no-unknown': [
|
|
176
135
|
true,
|
|
177
136
|
{
|
|
@@ -182,9 +141,7 @@ const createConfig = (plugins = {}, options = {}) => ({
|
|
|
182
141
|
],
|
|
183
142
|
},
|
|
184
143
|
],
|
|
185
|
-
|
|
186
144
|
'property-no-vendor-prefix': true,
|
|
187
|
-
|
|
188
145
|
'rule-empty-line-before': [
|
|
189
146
|
'always',
|
|
190
147
|
{
|
|
@@ -192,7 +149,6 @@ const createConfig = (plugins = {}, options = {}) => ({
|
|
|
192
149
|
ignore: [],
|
|
193
150
|
},
|
|
194
151
|
],
|
|
195
|
-
|
|
196
152
|
'selector-class-pattern': [
|
|
197
153
|
'^[a-z]([a-z0-9-]+)?(__([a-z0-9]+-?)+)?(--([a-z0-9]+-?)+){0,2}$',
|
|
198
154
|
{
|
|
@@ -200,30 +156,24 @@ const createConfig = (plugins = {}, options = {}) => ({
|
|
|
200
156
|
'Selector should be written as BEM "block__element--modifier--value" (selector-class-pattern)',
|
|
201
157
|
},
|
|
202
158
|
],
|
|
203
|
-
|
|
204
159
|
'selector-combinator-disallowed-list': ['>>>', '/deep/'],
|
|
205
|
-
|
|
206
160
|
'selector-max-compound-selectors': 6,
|
|
207
161
|
'selector-max-id': 0,
|
|
208
162
|
'selector-no-qualifying-type': null,
|
|
209
163
|
'selector-no-vendor-prefix': true,
|
|
210
164
|
'selector-pseudo-element-disallowed-list': ['shadow'],
|
|
211
|
-
|
|
212
165
|
'selector-pseudo-element-no-unknown': [
|
|
213
166
|
true,
|
|
214
167
|
{ ignorePseudoElements: ['v-deep', 'file-selector-button'] },
|
|
215
168
|
],
|
|
216
|
-
|
|
217
169
|
'selector-type-no-unknown': [true, { ignoreTypes: ['ymaps'] }],
|
|
218
170
|
'shorthand-property-no-redundant-values': true,
|
|
219
171
|
'string-no-newline': null,
|
|
220
172
|
'time-min-milliseconds': 16,
|
|
221
|
-
|
|
222
173
|
'value-keyword-case': [
|
|
223
174
|
'lower',
|
|
224
175
|
{ camelCaseSvgKeywords: true, ignoreFunctions: ['v-bind'] },
|
|
225
176
|
],
|
|
226
|
-
|
|
227
177
|
'value-no-vendor-prefix': true,
|
|
228
178
|
|
|
229
179
|
...options.rules,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alexlit/config-stylelint",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "48.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Stylelint config",
|
|
6
6
|
"keywords": [
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"postcss": "^8.4.49",
|
|
34
34
|
"postcss-html": "^1.7.0",
|
|
35
35
|
"prettier": "^3.4.2",
|
|
36
|
-
"stylelint": "16.
|
|
36
|
+
"stylelint": "16.13.0",
|
|
37
37
|
"stylelint-color-format": "^1.1.0",
|
|
38
38
|
"stylelint-config-recommended-vue": "^1.5.0",
|
|
39
|
-
"stylelint-config-standard": "^
|
|
39
|
+
"stylelint-config-standard": "^37.0.0",
|
|
40
40
|
"stylelint-config-standard-scss": "^14.0.0",
|
|
41
41
|
"stylelint-declaration-block-no-ignored-properties": "^2.8.0",
|
|
42
42
|
"stylelint-gamut": "^1.3.4",
|
|
@@ -57,8 +57,9 @@
|
|
|
57
57
|
},
|
|
58
58
|
"scripts": {
|
|
59
59
|
"lint": "cd ../../ && ./scripts/lint.stylelint.sh",
|
|
60
|
+
"ou": "../../scripts/ou.sh --local",
|
|
60
61
|
"release": "../../scripts/release.sh",
|
|
61
62
|
"semver": "../../scripts/semver.sh",
|
|
62
|
-
"up": "../../scripts/up.sh"
|
|
63
|
+
"up": "../../scripts/up.sh --local"
|
|
63
64
|
}
|
|
64
65
|
}
|
package/plugins/a11y.js
CHANGED
package/plugins/color-format.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
/** @see [stylelint-declaration-block-no-ignored-properties](https://github.com/kristerkari/stylelint-declaration-block-no-ignored-properties) */
|
|
1
2
|
export default {
|
|
2
3
|
plugins: ['stylelint-declaration-block-no-ignored-properties'],
|
|
3
|
-
|
|
4
4
|
rules: {
|
|
5
5
|
'plugin/declaration-block-no-ignored-properties': true,
|
|
6
6
|
},
|
package/plugins/gamut.js
CHANGED
package/plugins/logical-css.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
/** @see [stylelint-plugin-logical-css](https://github.com/yuschick/stylelint-plugin-logical-css) */
|
|
1
2
|
export default {
|
|
2
3
|
plugins: ['stylelint-plugin-logical-css'],
|
|
3
|
-
|
|
4
4
|
rules: {
|
|
5
5
|
'plugin/use-logical-properties-and-values': [
|
|
6
6
|
true,
|
|
@@ -9,7 +9,6 @@ export default {
|
|
|
9
9
|
severity: 'warning',
|
|
10
10
|
},
|
|
11
11
|
],
|
|
12
|
-
|
|
13
12
|
'plugin/use-logical-units': [true, { severity: 'warning' }],
|
|
14
13
|
},
|
|
15
14
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
/** @see [stylelint-no-unresolved-module](https://github.com/niksy/stylelint-no-unresolved-module) */
|
|
1
2
|
export default {
|
|
2
3
|
plugins: ['stylelint-no-unresolved-module'],
|
|
3
|
-
|
|
4
4
|
rules: {
|
|
5
5
|
'plugin/no-unresolved-module': {
|
|
6
6
|
alias: {
|
|
@@ -8,7 +8,6 @@ export default {
|
|
|
8
8
|
'~public': 'public',
|
|
9
9
|
'~static': 'static',
|
|
10
10
|
},
|
|
11
|
-
|
|
12
11
|
modules: [
|
|
13
12
|
'assets',
|
|
14
13
|
'node_modules',
|
package/plugins/order.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
/** @see [stylelint-order](https://github.com/hudochenkov/stylelint-order) */
|
|
1
2
|
export default {
|
|
2
3
|
plugins: ['stylelint-order'],
|
|
3
|
-
|
|
4
4
|
rules: {
|
|
5
5
|
'order/order': [
|
|
6
6
|
// SASS variables
|
|
@@ -479,7 +479,6 @@ export default {
|
|
|
479
479
|
{ selector: /__z/, type: 'rule' },
|
|
480
480
|
{ selector: /__/, type: 'rule' },
|
|
481
481
|
],
|
|
482
|
-
|
|
483
482
|
'order/properties-alphabetical-order': true,
|
|
484
483
|
},
|
|
485
484
|
};
|
package/plugins/prettier.js
CHANGED
package/plugins/scss.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* eslint-disable unicorn/no-null */
|
|
2
|
+
|
|
2
3
|
const KEBAB_CASE_PATTERN = '^[a-z]+([a-z0-9-]+[a-z0-9]+)?$';
|
|
3
4
|
|
|
5
|
+
/** @see [stylelint-scss](https://github.com/kristerkari/stylelint-scss) */
|
|
4
6
|
export default {
|
|
5
7
|
extends: ['stylelint-config-standard-scss'],
|
|
6
|
-
|
|
7
8
|
plugins: ['stylelint-scss'],
|
|
8
|
-
|
|
9
9
|
rules: {
|
|
10
10
|
'scss/at-each-key-value-single-line': true,
|
|
11
11
|
'scss/at-else-if-parentheses-space-before': 'always',
|
|
@@ -53,7 +53,6 @@ export default {
|
|
|
53
53
|
ignore: ['comments', 'imports'],
|
|
54
54
|
},
|
|
55
55
|
],
|
|
56
|
-
|
|
57
56
|
'scss/dollar-variable-no-missing-interpolation': true,
|
|
58
57
|
'scss/dollar-variable-no-namespaced-assignment': true,
|
|
59
58
|
'scss/dollar-variable-pattern': KEBAB_CASE_PATTERN,
|
|
@@ -84,7 +83,6 @@ export default {
|
|
|
84
83
|
'scss/operator-no-unspaced': true,
|
|
85
84
|
'scss/percent-placeholder-pattern': KEBAB_CASE_PATTERN,
|
|
86
85
|
'scss/selector-nest-combinators': 'always',
|
|
87
|
-
|
|
88
86
|
'scss/selector-no-redundant-nesting-selector': [
|
|
89
87
|
true,
|
|
90
88
|
{ ignoreKeywords: [] },
|
package/plugins/use-nesting.js
CHANGED
package/plugins/vue.js
CHANGED