@niondigital/stylelint-config 1.9.2 → 2.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/README.md +21 -18
- package/config.js +16 -294
- package/package.json +14 -32
- package/.eslintrc +0 -3
package/README.md
CHANGED
|
@@ -1,31 +1,34 @@
|
|
|
1
1
|
# `@niondigital/stylelint-config`
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Shared Stylelint config for HTML, HTML-like (e.g. Astro and Svelte), and CSS files by [nion digital](https://www.nion-digital.com).
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
npm install @niondigital/stylelint-config --save-dev
|
|
9
|
-
```
|
|
7
|
+
1. Install package as a dev dependency:
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
```bash
|
|
10
|
+
npx install-peerdeps --dev @niondigital/stylelint-config
|
|
11
|
+
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
2. Update `package.json`:
|
|
14
14
|
|
|
15
|
-
```
|
|
15
|
+
```js
|
|
16
16
|
{
|
|
17
|
-
|
|
17
|
+
// ...
|
|
18
|
+
"stylelint": {
|
|
19
|
+
"extends": "@niondigital/stylelint-config"
|
|
20
|
+
}
|
|
18
21
|
}
|
|
19
22
|
```
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
The MIT License (MIT)
|
|
24
|
-
|
|
25
|
-
Copyright (c) 2024 nion digital GmbH, Germany
|
|
24
|
+
3. Add the following script in `package.json`:
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
```js
|
|
27
|
+
{
|
|
28
|
+
// ...
|
|
29
|
+
"scripts": {
|
|
30
|
+
// ...
|
|
31
|
+
"stylelint": "stylelint --fix \"src/**/*.{astro,css,svelte}\""
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
package/config.js
CHANGED
|
@@ -1,300 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { propertyGroups } from 'stylelint-config-clean-order';
|
|
2
|
+
|
|
3
|
+
const propertiesOrder = propertyGroups.map((properties) => ({
|
|
4
|
+
emptyLineBefore: 'never',
|
|
5
|
+
properties,
|
|
6
|
+
}));
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
extends: ['stylelint-config-standard', 'stylelint-config-html', 'stylelint-config-clean-order'],
|
|
10
|
+
plugins: ['stylelint-use-logical'],
|
|
4
11
|
rules: {
|
|
5
|
-
'
|
|
6
|
-
'
|
|
7
|
-
'
|
|
8
|
-
'
|
|
9
|
-
'unit-no-unknown': true,
|
|
10
|
-
'value-keyword-case': [
|
|
11
|
-
'lower',
|
|
12
|
-
{
|
|
13
|
-
ignoreKeywords: ['/-?\\$\\w+/']
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
'value-no-vendor-prefix': true,
|
|
17
|
-
'property-no-unknown': [
|
|
18
|
-
true,
|
|
19
|
-
{
|
|
20
|
-
checkPrefixed: true
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
'declaration-block-no-duplicate-properties': [
|
|
24
|
-
true,
|
|
25
|
-
{
|
|
26
|
-
ignore: ['consecutive-duplicates-with-different-values']
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
'declaration-block-no-shorthand-property-overrides': true,
|
|
30
|
-
'selector-class-pattern': null,
|
|
31
|
-
'block-no-empty': true,
|
|
32
|
-
'selector-max-id': 0,
|
|
33
|
-
'selector-max-type': [
|
|
34
|
-
0,
|
|
35
|
-
{
|
|
36
|
-
ignore: ['compounded', 'descendant']
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
'selector-no-vendor-prefix': true,
|
|
40
|
-
'selector-pseudo-class-no-unknown': true,
|
|
41
|
-
'selector-pseudo-element-colon-notation': 'double',
|
|
42
|
-
'selector-pseudo-element-no-unknown': [
|
|
12
|
+
'no-descending-specificity': null,
|
|
13
|
+
'csstools/use-logical': true,
|
|
14
|
+
'order/properties-order': [propertiesOrder],
|
|
15
|
+
'selector-pseudo-class-no-unknown': [
|
|
43
16
|
true,
|
|
44
17
|
{
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
'selector-type-case': 'lower',
|
|
49
|
-
'selector-type-no-unknown': true,
|
|
50
|
-
'media-feature-name-no-unknown': true,
|
|
51
|
-
'media-feature-name-no-vendor-prefix': true,
|
|
52
|
-
'at-rule-no-vendor-prefix': true,
|
|
53
|
-
'comment-empty-line-before': [
|
|
54
|
-
'always',
|
|
55
|
-
{
|
|
56
|
-
except: ['first-nested'],
|
|
57
|
-
ignore: ['after-comment', 'stylelint-commands']
|
|
58
|
-
}
|
|
59
|
-
],
|
|
60
|
-
'comment-no-empty': true,
|
|
61
|
-
'max-nesting-depth': [
|
|
62
|
-
6,
|
|
63
|
-
{
|
|
64
|
-
ignore: ['blockless-at-rules']
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
'no-duplicate-selectors': true,
|
|
68
|
-
'no-empty-source': true,
|
|
69
|
-
'no-unknown-animations': true,
|
|
70
|
-
'scss/at-mixin-argumentless-call-parentheses': 'always',
|
|
71
|
-
'scss/dollar-variable-colon-space-after': 'always-single-line',
|
|
72
|
-
'scss/dollar-variable-colon-space-before': 'never',
|
|
73
|
-
'scss/dollar-variable-no-missing-interpolation': true,
|
|
74
|
-
'scss/selector-no-redundant-nesting-selector': true,
|
|
75
|
-
'scss/at-else-empty-line-before': 'never',
|
|
76
|
-
'order/order': [
|
|
77
|
-
'dollar-variables',
|
|
78
|
-
'custom-properties',
|
|
79
|
-
'declarations',
|
|
80
|
-
{
|
|
81
|
-
type: 'at-rule',
|
|
82
|
-
name: 'media',
|
|
83
|
-
hasBlock: true
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
type: 'at-rule',
|
|
87
|
-
name: 'include',
|
|
88
|
-
parameter: 'mq',
|
|
89
|
-
hasBlock: true
|
|
18
|
+
ignorePseudoClasses: ['global'],
|
|
90
19
|
},
|
|
91
|
-
'rules'
|
|
92
20
|
],
|
|
93
|
-
|
|
94
|
-
'quotes',
|
|
95
|
-
'counter-reset',
|
|
96
|
-
'counter-increment',
|
|
97
|
-
'content',
|
|
98
|
-
'box-sizing',
|
|
99
|
-
'display',
|
|
100
|
-
'grid',
|
|
101
|
-
'grid-template',
|
|
102
|
-
'grid-template-columns',
|
|
103
|
-
'grid-template-rows',
|
|
104
|
-
'grid-template-areas',
|
|
105
|
-
'grid-gap',
|
|
106
|
-
'grid-column-gap',
|
|
107
|
-
'grid-row-gap',
|
|
108
|
-
'justify-items',
|
|
109
|
-
'align-items',
|
|
110
|
-
'justify-content',
|
|
111
|
-
'align-content',
|
|
112
|
-
'grid-auto-columns',
|
|
113
|
-
'grid-auto-rows',
|
|
114
|
-
'grid-auto-flow',
|
|
115
|
-
'grid-area',
|
|
116
|
-
'grid-column',
|
|
117
|
-
'grid-row',
|
|
118
|
-
'grid-column-start',
|
|
119
|
-
'grid-column-end',
|
|
120
|
-
'grid-row-start',
|
|
121
|
-
'grid-row-end',
|
|
122
|
-
'justify-self',
|
|
123
|
-
'align-self',
|
|
124
|
-
'flex-flow',
|
|
125
|
-
'flex-direction',
|
|
126
|
-
'flex-wrap',
|
|
127
|
-
'align-items',
|
|
128
|
-
'align-content',
|
|
129
|
-
'justify-content',
|
|
130
|
-
'order',
|
|
131
|
-
'flex',
|
|
132
|
-
'flex-basis',
|
|
133
|
-
'flex-grow',
|
|
134
|
-
'flex-shrink',
|
|
135
|
-
'align-self',
|
|
136
|
-
'width',
|
|
137
|
-
'min-width',
|
|
138
|
-
'max-width',
|
|
139
|
-
'height',
|
|
140
|
-
'min-height',
|
|
141
|
-
'max-height',
|
|
142
|
-
'padding',
|
|
143
|
-
'padding-top',
|
|
144
|
-
'padding-bottom',
|
|
145
|
-
'padding-left',
|
|
146
|
-
'padding-right',
|
|
147
|
-
'table-layout',
|
|
148
|
-
'empty-cells',
|
|
149
|
-
'caption-side',
|
|
150
|
-
'border-spacing',
|
|
151
|
-
'border-collapse',
|
|
152
|
-
'nav-index',
|
|
153
|
-
'nav-up',
|
|
154
|
-
'nav-right',
|
|
155
|
-
'nav-down',
|
|
156
|
-
'nav-left',
|
|
157
|
-
'object-fit',
|
|
158
|
-
'fill',
|
|
159
|
-
'overflow',
|
|
160
|
-
'overflow-x',
|
|
161
|
-
'overflow-y',
|
|
162
|
-
'overflow-scrolling',
|
|
163
|
-
'background',
|
|
164
|
-
'filter:progid:DXImageTransform.Microsoft.AlphaImageLoader',
|
|
165
|
-
'background-color',
|
|
166
|
-
'background-image',
|
|
167
|
-
'background-repeat',
|
|
168
|
-
'background-attachment',
|
|
169
|
-
'background-position',
|
|
170
|
-
'background-position-x',
|
|
171
|
-
'background-position-y',
|
|
172
|
-
'background-clip',
|
|
173
|
-
'background-origin',
|
|
174
|
-
'background-size',
|
|
175
|
-
'border',
|
|
176
|
-
'border-width',
|
|
177
|
-
'border-style',
|
|
178
|
-
'border-color',
|
|
179
|
-
'border-top',
|
|
180
|
-
'border-top-width',
|
|
181
|
-
'border-top-style',
|
|
182
|
-
'border-top-color',
|
|
183
|
-
'border-bottom',
|
|
184
|
-
'border-bottom-width',
|
|
185
|
-
'border-bottom-style',
|
|
186
|
-
'border-bottom-color',
|
|
187
|
-
'border-left',
|
|
188
|
-
'border-left-width',
|
|
189
|
-
'border-left-style',
|
|
190
|
-
'border-left-color',
|
|
191
|
-
'border-right',
|
|
192
|
-
'border-right-width',
|
|
193
|
-
'border-right-style',
|
|
194
|
-
'border-right-color',
|
|
195
|
-
'border-radius',
|
|
196
|
-
'border-top-left-radius',
|
|
197
|
-
'border-top-right-radius',
|
|
198
|
-
'border-bottom-right-radius',
|
|
199
|
-
'border-bottom-left-radius',
|
|
200
|
-
'border-image',
|
|
201
|
-
'border-image-source',
|
|
202
|
-
'border-image-slice',
|
|
203
|
-
'border-image-width',
|
|
204
|
-
'border-image-outset',
|
|
205
|
-
'border-image-repeat',
|
|
206
|
-
'outline',
|
|
207
|
-
'outline-width',
|
|
208
|
-
'outline-style',
|
|
209
|
-
'outline-color',
|
|
210
|
-
'outline-offset',
|
|
211
|
-
'box-decoration-break',
|
|
212
|
-
'box-shadow',
|
|
213
|
-
'filter:progid:DXImageTransform.Microsoft.gradient',
|
|
214
|
-
"-ms-filter:\\'progid:DXImageTransform.Microsoft.gradient",
|
|
215
|
-
'visibility',
|
|
216
|
-
'opacity',
|
|
217
|
-
'filter:progid:DXImageTransform.Microsoft.Alpha(Opacity',
|
|
218
|
-
"-ms-filter:\\'progid:DXImageTransform.Microsoft.Alpha",
|
|
219
|
-
'-ms-interpolation-mode',
|
|
220
|
-
'resize',
|
|
221
|
-
'clip',
|
|
222
|
-
'zoom',
|
|
223
|
-
'list-style',
|
|
224
|
-
'list-style-position',
|
|
225
|
-
'list-style-type',
|
|
226
|
-
'list-style-image',
|
|
227
|
-
'color',
|
|
228
|
-
'text-shadow',
|
|
229
|
-
'font',
|
|
230
|
-
'font-family',
|
|
231
|
-
'font-size',
|
|
232
|
-
'line-height',
|
|
233
|
-
'font-weight',
|
|
234
|
-
'font-style',
|
|
235
|
-
'font-variant',
|
|
236
|
-
'font-size-adjust',
|
|
237
|
-
'font-stretch',
|
|
238
|
-
'font-effect',
|
|
239
|
-
'font-emphasize',
|
|
240
|
-
'font-emphasize-position',
|
|
241
|
-
'font-emphasize-style',
|
|
242
|
-
'font-smooth',
|
|
243
|
-
'text-align',
|
|
244
|
-
'text-align-last',
|
|
245
|
-
'white-space',
|
|
246
|
-
'text-decoration',
|
|
247
|
-
'text-emphasis',
|
|
248
|
-
'text-emphasis-color',
|
|
249
|
-
'text-emphasis-style',
|
|
250
|
-
'text-emphasis-position',
|
|
251
|
-
'text-indent',
|
|
252
|
-
'text-justify',
|
|
253
|
-
'letter-spacing',
|
|
254
|
-
'word-spacing',
|
|
255
|
-
'writing-mode',
|
|
256
|
-
'text-outline',
|
|
257
|
-
'text-transform',
|
|
258
|
-
'text-wrap',
|
|
259
|
-
'text-overflow',
|
|
260
|
-
'text-overflow-ellipsis',
|
|
261
|
-
'text-overflow-mode',
|
|
262
|
-
'word-wrap',
|
|
263
|
-
'word-break',
|
|
264
|
-
'tab-size',
|
|
265
|
-
'hyphens',
|
|
266
|
-
'vertical-align',
|
|
267
|
-
'float',
|
|
268
|
-
'clear',
|
|
269
|
-
'position',
|
|
270
|
-
'top',
|
|
271
|
-
'bottom',
|
|
272
|
-
'left',
|
|
273
|
-
'right',
|
|
274
|
-
'z-index',
|
|
275
|
-
'margin',
|
|
276
|
-
'margin-top',
|
|
277
|
-
'margin-bottom',
|
|
278
|
-
'margin-left',
|
|
279
|
-
'margin-right',
|
|
280
|
-
'transform',
|
|
281
|
-
'transform-origin',
|
|
282
|
-
'cursor',
|
|
283
|
-
'user-select',
|
|
284
|
-
'pointer-events',
|
|
285
|
-
'transition',
|
|
286
|
-
'transition-delay',
|
|
287
|
-
'transition-timing-function',
|
|
288
|
-
'transition-duration',
|
|
289
|
-
'transition-property',
|
|
290
|
-
'animation',
|
|
291
|
-
'animation-name',
|
|
292
|
-
'animation-duration',
|
|
293
|
-
'animation-play-state',
|
|
294
|
-
'animation-timing-function',
|
|
295
|
-
'animation-delay',
|
|
296
|
-
'animation-iteration-count',
|
|
297
|
-
'animation-direction'
|
|
298
|
-
]
|
|
299
|
-
}
|
|
21
|
+
},
|
|
300
22
|
};
|
package/package.json
CHANGED
|
@@ -1,40 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@niondigital/stylelint-config",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"author": "Dominik Gallitzendörfer <dominik.gallitzendoerfer@nion-digital.com>",
|
|
6
|
+
"main": "./config.js",
|
|
7
|
+
"repository": "https://github.com/niondigital/javascript-style",
|
|
8
|
+
"license": "MIT",
|
|
5
9
|
"keywords": [
|
|
6
10
|
"stylelint",
|
|
7
|
-
"config"
|
|
8
|
-
"stylelintconfig",
|
|
9
|
-
"niondigital"
|
|
11
|
+
"stylelint-config"
|
|
10
12
|
],
|
|
11
|
-
"author": "David Seibert <david.seibert@nion-digital.com>",
|
|
12
|
-
"homepage": "https://github.com/niondigital/javascript-style",
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"main": "config.js",
|
|
15
|
-
"publishConfig": {
|
|
16
|
-
"access": "public"
|
|
17
|
-
},
|
|
18
|
-
"repository": {
|
|
19
|
-
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/niondigital/javascript-style.git"
|
|
21
|
-
},
|
|
22
|
-
"scripts": {
|
|
23
|
-
"lint": "eslint .",
|
|
24
|
-
"lint:fix": "eslint . --fix"
|
|
25
|
-
},
|
|
26
|
-
"bugs": {
|
|
27
|
-
"url": "https://github.com/niondigital/javascript-style/issues"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"stylelint": "^16.8.2",
|
|
31
|
-
"stylelint-order": "^6.0.4",
|
|
32
|
-
"stylelint-scss": "^6.5.0"
|
|
33
|
-
},
|
|
34
13
|
"peerDependencies": {
|
|
35
|
-
"
|
|
36
|
-
"stylelint
|
|
37
|
-
"stylelint-
|
|
14
|
+
"postcss-html": "^1.8.0",
|
|
15
|
+
"stylelint": "^16.25.0",
|
|
16
|
+
"stylelint-config-clean-order": "^7.0.0",
|
|
17
|
+
"stylelint-config-html": "^1.1.0",
|
|
18
|
+
"stylelint-config-standard": "^39.0.1",
|
|
19
|
+
"stylelint-use-logical": "^2.1.2"
|
|
38
20
|
},
|
|
39
|
-
"gitHead": "
|
|
21
|
+
"gitHead": "977a04e3db155a623b3242fbe1d076be4ed2063e"
|
|
40
22
|
}
|
package/.eslintrc
DELETED