@taiga-ui/stylelint-config 0.140.0 → 0.141.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.
Files changed (3) hide show
  1. package/index.js +381 -0
  2. package/package.json +4 -3
  3. package/index.json +0 -345
package/index.js ADDED
@@ -0,0 +1,381 @@
1
+ module.exports = {
2
+ $schema:
3
+ 'https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/stylelintrc.json',
4
+ plugins: ['stylelint-order', 'stylelint-no-px', 'stylelint-use-logical'],
5
+ allowEmptyInput: true,
6
+ customSyntax: 'postcss-less',
7
+ defaultSeverity: 'error',
8
+ rules: {
9
+ 'alpha-value-notation': 'number',
10
+ 'annotation-no-unknown': [
11
+ true,
12
+ {
13
+ severity: 'error',
14
+ },
15
+ ],
16
+ 'at-rule-empty-line-before': [
17
+ 'always',
18
+ {
19
+ except: ['first-nested'],
20
+ ignore: ['after-comment', 'blockless-after-same-name-blockless'],
21
+ severity: 'error',
22
+ },
23
+ ],
24
+ 'at-rule-no-unknown': [
25
+ true,
26
+ {
27
+ severity: 'error',
28
+ },
29
+ ],
30
+ 'at-rule-no-vendor-prefix': [
31
+ true,
32
+ {
33
+ severity: 'error',
34
+ },
35
+ ],
36
+ 'block-no-empty': [
37
+ true,
38
+ {
39
+ severity: 'error',
40
+ },
41
+ ],
42
+ 'color-function-notation': 'legacy',
43
+ 'color-hex-length': [
44
+ 'short',
45
+ {
46
+ severity: 'error',
47
+ },
48
+ ],
49
+ 'color-no-invalid-hex': [
50
+ true,
51
+ {
52
+ severity: 'error',
53
+ },
54
+ ],
55
+ 'comment-no-empty': [
56
+ true,
57
+ {
58
+ severity: 'error',
59
+ },
60
+ ],
61
+ 'comment-whitespace-inside': [
62
+ 'always',
63
+ {
64
+ severity: 'error',
65
+ },
66
+ ],
67
+ 'csstools/use-logical': [
68
+ 'always',
69
+ {
70
+ direction: 'ltr',
71
+ except: [
72
+ /^margin/i,
73
+ /^padding/i,
74
+ /^border-/i,
75
+ 'top',
76
+ 'right',
77
+ 'bottom',
78
+ 'left',
79
+ 'width',
80
+ 'min-width',
81
+ 'max-width',
82
+ 'height',
83
+ 'min-height',
84
+ 'max-height',
85
+ ],
86
+ },
87
+ ],
88
+ 'custom-property-empty-line-before': [
89
+ 'always',
90
+ {
91
+ except: ['after-custom-property', 'first-nested'],
92
+ ignore: ['after-comment'],
93
+ severity: 'error',
94
+ },
95
+ ],
96
+ 'custom-property-no-missing-var-function': [
97
+ true,
98
+ {
99
+ severity: 'error',
100
+ },
101
+ ],
102
+ 'declaration-block-no-duplicate-custom-properties': [
103
+ true,
104
+ {
105
+ severity: 'error',
106
+ },
107
+ ],
108
+ 'declaration-block-no-duplicate-properties': [
109
+ true,
110
+ {
111
+ ignore: ['consecutive-duplicates'],
112
+ severity: 'error',
113
+ },
114
+ ],
115
+ 'declaration-block-no-redundant-longhand-properties': null,
116
+ 'declaration-block-no-shorthand-property-overrides': [
117
+ true,
118
+ {
119
+ severity: 'error',
120
+ },
121
+ ],
122
+ 'declaration-empty-line-before': [
123
+ 'always',
124
+ {
125
+ except: ['first-nested', 'after-declaration'],
126
+ ignore: ['after-comment'],
127
+ severity: 'error',
128
+ },
129
+ ],
130
+ 'declaration-no-important': null,
131
+ 'declaration-property-value-disallowed-list': null,
132
+ 'font-family-name-quotes': null,
133
+ 'font-family-no-duplicate-names': [
134
+ true,
135
+ {
136
+ severity: 'error',
137
+ },
138
+ ],
139
+ 'font-family-no-missing-generic-family-keyword': [
140
+ true,
141
+ {
142
+ severity: 'error',
143
+ },
144
+ ],
145
+ 'function-calc-no-unspaced-operator': [
146
+ true,
147
+ {
148
+ severity: 'error',
149
+ },
150
+ ],
151
+ 'function-linear-gradient-no-nonstandard-direction': [
152
+ true,
153
+ {
154
+ severity: 'error',
155
+ },
156
+ ],
157
+ 'function-name-case': [
158
+ 'lower',
159
+ {
160
+ severity: 'error',
161
+ },
162
+ ],
163
+ 'function-no-unknown': null,
164
+ 'function-url-no-scheme-relative': [
165
+ true,
166
+ {
167
+ severity: 'error',
168
+ },
169
+ ],
170
+ 'function-url-quotes': null,
171
+ 'keyframe-block-no-duplicate-selectors': [
172
+ true,
173
+ {
174
+ severity: 'error',
175
+ },
176
+ ],
177
+ 'keyframe-declaration-no-important': [
178
+ true,
179
+ {
180
+ severity: 'error',
181
+ },
182
+ ],
183
+ 'length-zero-no-unit': [
184
+ true,
185
+ {
186
+ ignore: ['custom-properties'],
187
+ severity: 'error',
188
+ },
189
+ ],
190
+ 'media-feature-name-no-unknown': [
191
+ true,
192
+ {
193
+ severity: 'error',
194
+ },
195
+ ],
196
+ 'media-feature-name-no-vendor-prefix': null,
197
+ 'meowtec/no-px': [
198
+ true,
199
+ {
200
+ ignore: [
201
+ '-5px',
202
+ '-4px',
203
+ '-3px',
204
+ '-2px',
205
+ '-1px',
206
+ '0px',
207
+ '1px',
208
+ '2px',
209
+ '3px',
210
+ '4px',
211
+ '5px',
212
+ '16px',
213
+ '0.1px',
214
+ '0.2px',
215
+ '0.3px',
216
+ '0.4px',
217
+ '0.5px',
218
+ '0.6px',
219
+ '0.7px',
220
+ '0.8px',
221
+ '0.9px',
222
+ ],
223
+ },
224
+ ],
225
+ 'named-grid-areas-no-invalid': [
226
+ true,
227
+ {
228
+ severity: 'error',
229
+ },
230
+ ],
231
+ 'no-descending-specificity': null,
232
+ 'no-duplicate-at-import-rules': [
233
+ true,
234
+ {
235
+ severity: 'error',
236
+ },
237
+ ],
238
+ 'no-duplicate-selectors': null,
239
+ 'no-empty-source': [
240
+ true,
241
+ {
242
+ severity: 'error',
243
+ },
244
+ ],
245
+ 'no-invalid-position-at-import-rule': null,
246
+ 'no-irregular-whitespace': [
247
+ true,
248
+ {
249
+ severity: 'error',
250
+ },
251
+ ],
252
+ 'no-unknown-animations': null,
253
+ 'order/properties-order': [
254
+ [
255
+ 'all',
256
+ 'content',
257
+ 'position',
258
+ {
259
+ order: 'flexible',
260
+ properties: ['top', 'left', 'right', 'bottom'],
261
+ },
262
+ 'z-index',
263
+ 'display',
264
+ ],
265
+ {
266
+ unspecified: 'bottom',
267
+ },
268
+ ],
269
+ 'property-disallowed-list': ['border-inline', 'padding-inline', 'margin-inline'],
270
+ 'property-no-unknown': [
271
+ true,
272
+ {
273
+ severity: 'error',
274
+ },
275
+ ],
276
+ 'property-no-vendor-prefix': null,
277
+ 'rule-empty-line-before': [
278
+ 'always',
279
+ {
280
+ except: ['first-nested'],
281
+ ignore: ['after-comment'],
282
+ severity: 'error',
283
+ },
284
+ ],
285
+ 'selector-attribute-quotes': [
286
+ 'always',
287
+ {
288
+ severity: 'error',
289
+ },
290
+ ],
291
+ 'selector-max-id': null,
292
+ 'selector-max-specificity': null,
293
+ 'selector-max-type': null,
294
+ 'selector-no-qualifying-type': null,
295
+ 'selector-no-vendor-prefix': [
296
+ true,
297
+ {
298
+ severity: 'error',
299
+ },
300
+ ],
301
+ 'selector-pseudo-class-no-unknown': [
302
+ true,
303
+ {
304
+ severity: 'error',
305
+ },
306
+ ],
307
+ 'selector-pseudo-element-colon-notation': [
308
+ 'double',
309
+ {
310
+ severity: 'error',
311
+ },
312
+ ],
313
+ 'selector-pseudo-element-no-unknown': [
314
+ true,
315
+ {
316
+ ignorePseudoElements: ['ng-deep'],
317
+ },
318
+ ],
319
+ 'selector-type-case': [
320
+ 'lower',
321
+ {
322
+ severity: 'error',
323
+ },
324
+ ],
325
+ 'selector-type-no-unknown': [
326
+ true,
327
+ {
328
+ ignore: ['custom-elements'],
329
+ ignoreTypes: ['/^/deep/'],
330
+ },
331
+ ],
332
+ 'shorthand-property-no-redundant-values': [
333
+ true,
334
+ {
335
+ severity: 'error',
336
+ },
337
+ ],
338
+ 'string-no-newline': [
339
+ true,
340
+ {
341
+ severity: 'error',
342
+ },
343
+ ],
344
+ 'time-min-milliseconds': null,
345
+ 'unit-allowed-list': [
346
+ 'px',
347
+ 'rem',
348
+ 'em',
349
+ 'deg',
350
+ 's',
351
+ 'ms',
352
+ 'dpcm',
353
+ 'turn',
354
+ 'ch',
355
+ '%',
356
+ 'vh',
357
+ 'vw',
358
+ 'fr',
359
+ ],
360
+ 'unit-no-unknown': [
361
+ true,
362
+ {
363
+ severity: 'error',
364
+ },
365
+ ],
366
+ 'value-keyword-case': [
367
+ 'lower',
368
+ {
369
+ ignoreKeywords: ['currentColor', 'backgroundColor', 'optimizeLegibility'],
370
+ ignoreProperties: ['/^--/', String.raw`/^\$/`],
371
+ severity: 'error',
372
+ },
373
+ ],
374
+ 'value-no-vendor-prefix': [
375
+ true,
376
+ {
377
+ severity: 'error',
378
+ },
379
+ ],
380
+ },
381
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/stylelint-config",
3
- "version": "0.140.0",
3
+ "version": "0.141.0",
4
4
  "description": "Taiga UI stylelint config",
5
5
  "keywords": [
6
6
  "stylelint",
@@ -11,14 +11,15 @@
11
11
  "url": "https://github.com/taiga-family/linters.git"
12
12
  },
13
13
  "license": "Apache-2.0",
14
- "main": "index.json",
14
+ "main": "index.js",
15
15
  "peerDependencies": {
16
16
  "postcss": "^8.4.41",
17
17
  "postcss-less": "^6.0.0",
18
18
  "stylelint": "^16.8.2",
19
19
  "stylelint-config-standard": "^36.0.1",
20
20
  "stylelint-no-px": "^2.0.0",
21
- "stylelint-order": "^6.0.4"
21
+ "stylelint-order": "^6.0.4",
22
+ "stylelint-use-logical": "^2.1.2"
22
23
  },
23
24
  "publishConfig": {
24
25
  "access": "public"
package/index.json DELETED
@@ -1,345 +0,0 @@
1
- {
2
- "$schema": "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/stylelintrc.json",
3
- "allowEmptyInput": true,
4
- "customSyntax": "postcss-less",
5
- "defaultSeverity": "error",
6
- "plugins": ["stylelint-order", "stylelint-no-px"],
7
- "rules": {
8
- "function-url-quotes": null,
9
- "selector-max-specificity": null,
10
- "function-no-unknown": null,
11
- "no-duplicate-selectors": null,
12
- "no-descending-specificity": null,
13
- "no-invalid-position-at-import-rule": null,
14
- "property-no-vendor-prefix": null,
15
- "declaration-no-important": null,
16
- "no-unknown-animations": null,
17
- "time-min-milliseconds": null,
18
- "selector-max-type": null,
19
- "selector-max-id": null,
20
- "declaration-block-no-redundant-longhand-properties": null,
21
- "selector-no-qualifying-type": null,
22
- "media-feature-name-no-vendor-prefix": null,
23
- "declaration-property-value-disallowed-list": null,
24
- "font-family-name-quotes": null,
25
- "alpha-value-notation": "number",
26
- "color-function-notation": "legacy",
27
- "meowtec/no-px": [
28
- true,
29
- {
30
- "ignore": [
31
- "-5px",
32
- "-4px",
33
- "-3px",
34
- "-2px",
35
- "-1px",
36
- "0px",
37
- "1px",
38
- "2px",
39
- "3px",
40
- "4px",
41
- "5px",
42
- "16px",
43
- "0.1px",
44
- "0.2px",
45
- "0.3px",
46
- "0.4px",
47
- "0.5px",
48
- "0.6px",
49
- "0.7px",
50
- "0.8px",
51
- "0.9px"
52
- ]
53
- }
54
- ],
55
- "order/properties-order": [
56
- [
57
- "all",
58
- "content",
59
- "position",
60
- {
61
- "order": "flexible",
62
- "properties": ["top", "left", "right", "bottom"]
63
- },
64
- "z-index",
65
- "display"
66
- ],
67
- {
68
- "unspecified": "bottom"
69
- }
70
- ],
71
- "selector-pseudo-element-no-unknown": [
72
- true,
73
- {
74
- "ignorePseudoElements": ["ng-deep"]
75
- }
76
- ],
77
- "selector-type-no-unknown": [
78
- true,
79
- {
80
- "ignore": ["custom-elements"],
81
- "ignoreTypes": ["/^/deep/"]
82
- }
83
- ],
84
- "unit-allowed-list": ["px", "rem", "em", "deg", "s", "ms", "dpcm", "turn", "ch", "%", "vh", "vw", "fr"],
85
- "color-no-invalid-hex": [
86
- true,
87
- {
88
- "severity": "error"
89
- }
90
- ],
91
- "property-disallowed-list": ["border-inline", "padding-inline", "margin-inline"],
92
- "function-calc-no-unspaced-operator": [
93
- true,
94
- {
95
- "severity": "error"
96
- }
97
- ],
98
- "function-linear-gradient-no-nonstandard-direction": [
99
- true,
100
- {
101
- "severity": "error"
102
- }
103
- ],
104
- "string-no-newline": [
105
- true,
106
- {
107
- "severity": "error"
108
- }
109
- ],
110
- "unit-no-unknown": [
111
- true,
112
- {
113
- "severity": "error"
114
- }
115
- ],
116
- "keyframe-declaration-no-important": [
117
- true,
118
- {
119
- "severity": "error"
120
- }
121
- ],
122
- "declaration-block-no-duplicate-properties": [
123
- true,
124
- {
125
- "ignore": ["consecutive-duplicates"],
126
- "severity": "error"
127
- }
128
- ],
129
- "declaration-block-no-shorthand-property-overrides": [
130
- true,
131
- {
132
- "severity": "error"
133
- }
134
- ],
135
- "selector-pseudo-class-no-unknown": [
136
- true,
137
- {
138
- "severity": "error"
139
- }
140
- ],
141
- "keyframe-block-no-duplicate-selectors": [
142
- true,
143
- {
144
- "severity": "error"
145
- }
146
- ],
147
- "font-family-no-duplicate-names": [
148
- true,
149
- {
150
- "severity": "error"
151
- }
152
- ],
153
- "font-family-no-missing-generic-family-keyword": [
154
- true,
155
- {
156
- "severity": "error"
157
- }
158
- ],
159
- "property-no-unknown": [
160
- true,
161
- {
162
- "severity": "error"
163
- }
164
- ],
165
- "block-no-empty": [
166
- true,
167
- {
168
- "severity": "error"
169
- }
170
- ],
171
- "media-feature-name-no-unknown": [
172
- true,
173
- {
174
- "severity": "error"
175
- }
176
- ],
177
- "at-rule-no-unknown": [
178
- true,
179
- {
180
- "severity": "error"
181
- }
182
- ],
183
- "comment-no-empty": [
184
- true,
185
- {
186
- "severity": "error"
187
- }
188
- ],
189
- "no-duplicate-at-import-rules": [
190
- true,
191
- {
192
- "severity": "error"
193
- }
194
- ],
195
- "no-empty-source": [
196
- true,
197
- {
198
- "severity": "error"
199
- }
200
- ],
201
- "declaration-block-no-duplicate-custom-properties": [
202
- true,
203
- {
204
- "severity": "error"
205
- }
206
- ],
207
- "named-grid-areas-no-invalid": [
208
- true,
209
- {
210
- "severity": "error"
211
- }
212
- ],
213
- "custom-property-no-missing-var-function": [
214
- true,
215
- {
216
- "severity": "error"
217
- }
218
- ],
219
- "annotation-no-unknown": [
220
- true,
221
- {
222
- "severity": "error"
223
- }
224
- ],
225
- "at-rule-empty-line-before": [
226
- "always",
227
- {
228
- "except": ["first-nested"],
229
- "ignore": ["after-comment", "blockless-after-same-name-blockless"],
230
- "severity": "error"
231
- }
232
- ],
233
- "color-hex-length": [
234
- "short",
235
- {
236
- "severity": "error"
237
- }
238
- ],
239
- "comment-whitespace-inside": [
240
- "always",
241
- {
242
- "severity": "error"
243
- }
244
- ],
245
- "function-name-case": [
246
- "lower",
247
- {
248
- "severity": "error"
249
- }
250
- ],
251
- "length-zero-no-unit": [
252
- true,
253
- {
254
- "ignore": ["custom-properties"],
255
- "severity": "error"
256
- }
257
- ],
258
- "no-irregular-whitespace": [
259
- true,
260
- {
261
- "severity": "error"
262
- }
263
- ],
264
- "rule-empty-line-before": [
265
- "always",
266
- {
267
- "except": ["first-nested"],
268
- "ignore": ["after-comment"],
269
- "severity": "error"
270
- }
271
- ],
272
- "selector-attribute-quotes": [
273
- "always",
274
- {
275
- "severity": "error"
276
- }
277
- ],
278
- "selector-pseudo-element-colon-notation": [
279
- "double",
280
- {
281
- "severity": "error"
282
- }
283
- ],
284
- "selector-type-case": [
285
- "lower",
286
- {
287
- "severity": "error"
288
- }
289
- ],
290
- "value-keyword-case": [
291
- "lower",
292
- {
293
- "severity": "error",
294
- "ignoreKeywords": ["currentColor", "backgroundColor", "optimizeLegibility"],
295
- "ignoreProperties": ["/^--/", "/^\\$/"]
296
- }
297
- ],
298
- "function-url-no-scheme-relative": [
299
- true,
300
- {
301
- "severity": "error"
302
- }
303
- ],
304
- "shorthand-property-no-redundant-values": [
305
- true,
306
- {
307
- "severity": "error"
308
- }
309
- ],
310
- "value-no-vendor-prefix": [
311
- true,
312
- {
313
- "severity": "error"
314
- }
315
- ],
316
- "selector-no-vendor-prefix": [
317
- true,
318
- {
319
- "severity": "error"
320
- }
321
- ],
322
- "at-rule-no-vendor-prefix": [
323
- true,
324
- {
325
- "severity": "error"
326
- }
327
- ],
328
- "custom-property-empty-line-before": [
329
- "always",
330
- {
331
- "except": ["after-custom-property", "first-nested"],
332
- "ignore": ["after-comment"],
333
- "severity": "error"
334
- }
335
- ],
336
- "declaration-empty-line-before": [
337
- "always",
338
- {
339
- "except": ["first-nested", "after-declaration"],
340
- "ignore": ["after-comment"],
341
- "severity": "error"
342
- }
343
- ]
344
- }
345
- }