@davidsneighbour/stylelint-config 3.5.14
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/LICENSE.md +9 -0
- package/README.md +97 -0
- package/index.js +323 -0
- package/package.json +33 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Patrick Kollitsch / David's Neighbour
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
## @davidsneighbour/stylelint-config
|
|
2
|
+
|
|
3
|
+
[Stylelint](https://github.com/stylelint/stylelint) configuration for [davidsneighbour](https://github.com/davidsneighbour) projects.
|
|
4
|
+
|
|
5
|
+
### Installation
|
|
6
|
+
|
|
7
|
+
Use npm to install this package as development dependency:
|
|
8
|
+
|
|
9
|
+
```shell
|
|
10
|
+
npm install --save-dev @davidsneighbour/stylelint-config
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Configuration
|
|
14
|
+
|
|
15
|
+
Add the configuration to your repository (for instance in `.stylelintrc` or `.stylelintrc.json` or the `stylelint` parameter in package.json):
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"extends": "@davidsneighbour/stylelint-config"
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
To change parts of the configuration use the `rules` parameter.
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"extends": "@davidsneighbour/stylelint-config",
|
|
28
|
+
"rules": {
|
|
29
|
+
"max-nesting-depth": null
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Add scripts to your package.json:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"scripts": {
|
|
39
|
+
"stylelint": "stylelint assets/scss/",
|
|
40
|
+
"stylelint:fix": "stylelint assets/scss/ --fix",
|
|
41
|
+
"stylelint:config": "stylelint --print-config index.js"
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Exchange the `assets/scss/` with your own styles folder.
|
|
47
|
+
|
|
48
|
+
### Usage
|
|
49
|
+
|
|
50
|
+
Run stylelint and show errors and warnings:
|
|
51
|
+
|
|
52
|
+
```shell
|
|
53
|
+
npm run stylelint
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Run stylelint and fix automatically fixable issues:
|
|
57
|
+
|
|
58
|
+
```shell
|
|
59
|
+
npm run stylelint:fix
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Print the current stylelint configuration:
|
|
63
|
+
|
|
64
|
+
```shell
|
|
65
|
+
npm run stylelint:config
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Configuration rules in this package
|
|
69
|
+
|
|
70
|
+
To be written ...
|
|
71
|
+
|
|
72
|
+
<!--- CONFIGURATIONS BEGIN --->
|
|
73
|
+
|
|
74
|
+
## davidsneighbour/Configurations
|
|
75
|
+
|
|
76
|
+
A collection of configurations for website development at DNB Org.
|
|
77
|
+
|
|
78
|
+
<!-- prettier-ignore -->
|
|
79
|
+
| Package | Description |
|
|
80
|
+
| --- | ---- |
|
|
81
|
+
| [babel-config](https://github.com/davidsneighbour/configurations/tree/main/packages/babel-config) | [Babel](https://babeljs.io/) configuration |
|
|
82
|
+
| [bootstrap-config](https://github.com/davidsneighbour/configurations/tree/main/packages/bootstrap-config) | [Bootstrap](https://getbootstrap.com/) configuration |
|
|
83
|
+
| [browserslist-config](https://github.com/davidsneighbour/configurations/tree/main/packages/browserslist-config) | [Browserslist](https://github.com/browserslist/browserslist) configuration |
|
|
84
|
+
| [commitlint-config](https://github.com/davidsneighbour/configurations/tree/main/packages/commitlint-config) | [Commitlint](https://github.com/conventional-changelog/commitlint) configuration |
|
|
85
|
+
| [cssnano-config](https://github.com/davidsneighbour/configurations/tree/main/packages/cssnano-config) | [CSSnano](https://cssnano.co/) configuration |
|
|
86
|
+
| [cypress-config](https://github.com/davidsneighbour/configurations/tree/main/packages/cypress-config) | [Cypress](https://www.cypress.io/) configuration |
|
|
87
|
+
| [eslint-config](https://github.com/davidsneighbour/configurations/tree/main/packages/eslint-config) | [ESLint](https://github.com/eslint/eslint) configuration |
|
|
88
|
+
| [postcss-config](https://github.com/davidsneighbour/configurations/tree/main/packages/postcss-config) | [PostCSS](https://postcss.org/) configuration |
|
|
89
|
+
| [prettier-config](https://github.com/davidsneighbour/configurations/tree/main/packages/prettier-config) | [Prettier](https://prettier.io/) configuration |
|
|
90
|
+
| [remark-config](https://github.com/davidsneighbour/configurations/tree/main/packages/remark-config) | [ReMark](https://github.com/remarkjs/remark-lint) configuration |
|
|
91
|
+
| [standard-version-config](https://github.com/davidsneighbour/configurations/tree/main/packages/standard-version-config) | [Standard Version](https://github.com/conventional-changelog/standard-version) configuration |
|
|
92
|
+
| [stylelint-config](https://github.com/davidsneighbour/configurations/tree/main/packages/stylelint-config) | [StyleLint](https://github.com/stylelint/stylelint) configuration |
|
|
93
|
+
| [textlint-config](https://github.com/davidsneighbour/configurations/tree/main/packages/textlint-config) | [TextLint](https://github.com/textlint/textlint) configuration |
|
|
94
|
+
| [webpack-config](https://github.com/davidsneighbour/configurations/tree/main/packages/webpack-config) | [Webpack](https://webpack.js.org/) configuration |
|
|
95
|
+
| [tools](https://github.com/davidsneighbour/configurations/tree/main/packages/tools) | Tools |
|
|
96
|
+
|
|
97
|
+
<!--- CONFIGURATIONS END --->
|
package/index.js
ADDED
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* see https://stylelint.io/user-guide/rules/list/
|
|
3
|
+
* see https://stylelint.io/user-guide/rules/regex
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
module.exports = {
|
|
7
|
+
extends: ["stylelint-config-sass-guidelines"],
|
|
8
|
+
plugins: ["stylelint-order", "stylelint-no-unsupported-browser-features"],
|
|
9
|
+
rules: {
|
|
10
|
+
"max-empty-lines": [
|
|
11
|
+
1,
|
|
12
|
+
{
|
|
13
|
+
ignore: ["comments"],
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
"color-no-invalid-hex": true,
|
|
17
|
+
"indentation": 2,
|
|
18
|
+
"max-nesting-depth": 3,
|
|
19
|
+
"selector-max-id": 1,
|
|
20
|
+
"string-quotes": "single",
|
|
21
|
+
"no-duplicate-selectors": true,
|
|
22
|
+
"color-hex-case": "lower",
|
|
23
|
+
"color-hex-length": "long",
|
|
24
|
+
"color-named": "never",
|
|
25
|
+
"selector-attribute-quotes": "always",
|
|
26
|
+
"declaration-block-trailing-semicolon": "always",
|
|
27
|
+
"declaration-colon-space-before": "never",
|
|
28
|
+
"declaration-colon-space-after": "always",
|
|
29
|
+
"number-leading-zero": "always",
|
|
30
|
+
"function-url-quotes": "always",
|
|
31
|
+
"font-weight-notation": "numeric",
|
|
32
|
+
"font-family-name-quotes": "always-where-recommended",
|
|
33
|
+
"comment-empty-line-before": "always",
|
|
34
|
+
"selector-no-qualifying-type": [
|
|
35
|
+
true,
|
|
36
|
+
{
|
|
37
|
+
ignore: ["attribute", "class"],
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
"plugin/no-unsupported-browser-features": [
|
|
41
|
+
true,
|
|
42
|
+
{
|
|
43
|
+
severity: "warning",
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
// scss rules
|
|
47
|
+
"scss/at-extend-no-missing-placeholder": null,
|
|
48
|
+
// order rules:
|
|
49
|
+
"order/order": [
|
|
50
|
+
"custom-properties",
|
|
51
|
+
"dollar-variables",
|
|
52
|
+
"declarations",
|
|
53
|
+
"rules",
|
|
54
|
+
"at-rules",
|
|
55
|
+
],
|
|
56
|
+
"order/properties-alphabetical-order": null,
|
|
57
|
+
"order/properties-order": [
|
|
58
|
+
{
|
|
59
|
+
groupName: "special",
|
|
60
|
+
emptyLineBefore: "always",
|
|
61
|
+
properties: ["composes", "@import", "@extend", "@mixin", "@at-root"],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
groupName: "position",
|
|
65
|
+
emptyLineBefore: "always",
|
|
66
|
+
properties: ["position", "top", "right", "bottom", "left", "z-index"],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
groupName: "boxmodel",
|
|
70
|
+
emptyLineBefore: "always",
|
|
71
|
+
properties: [
|
|
72
|
+
"display",
|
|
73
|
+
"flex",
|
|
74
|
+
"flex-basis",
|
|
75
|
+
"flex-direction",
|
|
76
|
+
"flex-flow",
|
|
77
|
+
"flex-grow",
|
|
78
|
+
"flex-shrink",
|
|
79
|
+
"flex-wrap",
|
|
80
|
+
"grid",
|
|
81
|
+
"grid-area",
|
|
82
|
+
"grid-auto-rows",
|
|
83
|
+
"grid-auto-columns",
|
|
84
|
+
"grid-auto-flow",
|
|
85
|
+
"grid-gap",
|
|
86
|
+
"grid-row",
|
|
87
|
+
"grid-row-start",
|
|
88
|
+
"grid-row-end",
|
|
89
|
+
"grid-row-gap",
|
|
90
|
+
"grid-column",
|
|
91
|
+
"grid-column-start",
|
|
92
|
+
"grid-column-end",
|
|
93
|
+
"grid-column-gap",
|
|
94
|
+
"grid-template",
|
|
95
|
+
"grid-template-areas",
|
|
96
|
+
"grid-template-rows",
|
|
97
|
+
"grid-template-columns",
|
|
98
|
+
"gap",
|
|
99
|
+
"align-content",
|
|
100
|
+
"align-items",
|
|
101
|
+
"align-self",
|
|
102
|
+
"justify-content",
|
|
103
|
+
"justify-items",
|
|
104
|
+
"justify-self",
|
|
105
|
+
"order",
|
|
106
|
+
"float",
|
|
107
|
+
"clear",
|
|
108
|
+
"box-sizing",
|
|
109
|
+
"width",
|
|
110
|
+
"min-width",
|
|
111
|
+
"max-width",
|
|
112
|
+
"height",
|
|
113
|
+
"min-height",
|
|
114
|
+
"max-height",
|
|
115
|
+
"margin",
|
|
116
|
+
"margin-top",
|
|
117
|
+
"margin-right",
|
|
118
|
+
"margin-bottom",
|
|
119
|
+
"margin-left",
|
|
120
|
+
"padding",
|
|
121
|
+
"padding-top",
|
|
122
|
+
"padding-right",
|
|
123
|
+
"padding-bottom",
|
|
124
|
+
"padding-left",
|
|
125
|
+
"border",
|
|
126
|
+
"border-color",
|
|
127
|
+
"border-style",
|
|
128
|
+
"border-width",
|
|
129
|
+
"border-top",
|
|
130
|
+
"border-top-color",
|
|
131
|
+
"border-top-width",
|
|
132
|
+
"border-top-style",
|
|
133
|
+
"border-right",
|
|
134
|
+
"border-right-color",
|
|
135
|
+
"border-right-width",
|
|
136
|
+
"border-right-style",
|
|
137
|
+
"border-bottom",
|
|
138
|
+
"border-bottom-color",
|
|
139
|
+
"border-bottom-width",
|
|
140
|
+
"border-bottom-style",
|
|
141
|
+
"border-left",
|
|
142
|
+
"border-left-color",
|
|
143
|
+
"border-left-width",
|
|
144
|
+
"border-left-style",
|
|
145
|
+
"border-radius",
|
|
146
|
+
"border-top-left-radius",
|
|
147
|
+
"border-top-right-radius",
|
|
148
|
+
"border-bottom-right-radius",
|
|
149
|
+
"border-bottom-left-radius",
|
|
150
|
+
"border-image",
|
|
151
|
+
"border-image-source",
|
|
152
|
+
"border-image-slice",
|
|
153
|
+
"border-image-width",
|
|
154
|
+
"border-image-outset",
|
|
155
|
+
"border-image-repeat",
|
|
156
|
+
"border-collapse",
|
|
157
|
+
"border-spacing",
|
|
158
|
+
"object-fit",
|
|
159
|
+
"object-position",
|
|
160
|
+
"overflow",
|
|
161
|
+
"overflow-x",
|
|
162
|
+
"overflow-y",
|
|
163
|
+
],
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
groupName: "typography",
|
|
167
|
+
emptyLineBefore: "always",
|
|
168
|
+
properties: [
|
|
169
|
+
"color",
|
|
170
|
+
"font",
|
|
171
|
+
"font-weight",
|
|
172
|
+
"font-size",
|
|
173
|
+
"font-family",
|
|
174
|
+
"font-style",
|
|
175
|
+
"font-variant",
|
|
176
|
+
"font-size-adjust",
|
|
177
|
+
"font-stretch",
|
|
178
|
+
"font-effect",
|
|
179
|
+
"font-emphasize",
|
|
180
|
+
"font-emphasize-position",
|
|
181
|
+
"font-emphasize-style",
|
|
182
|
+
"font-smooth",
|
|
183
|
+
"line-height",
|
|
184
|
+
"direction",
|
|
185
|
+
"letter-spacing",
|
|
186
|
+
"white-space",
|
|
187
|
+
"text-align",
|
|
188
|
+
"text-align-last",
|
|
189
|
+
"text-transform",
|
|
190
|
+
"text-decoration",
|
|
191
|
+
"text-emphasis",
|
|
192
|
+
"text-emphasis-color",
|
|
193
|
+
"text-emphasis-style",
|
|
194
|
+
"text-emphasis-position",
|
|
195
|
+
"text-indent",
|
|
196
|
+
"text-justify",
|
|
197
|
+
"text-outline",
|
|
198
|
+
"text-wrap",
|
|
199
|
+
"text-overflow",
|
|
200
|
+
"text-overflow-ellipsis",
|
|
201
|
+
"text-overflow-mode",
|
|
202
|
+
"text-orientation",
|
|
203
|
+
"text-shadow",
|
|
204
|
+
"vertical-align",
|
|
205
|
+
"word-wrap",
|
|
206
|
+
"word-break",
|
|
207
|
+
"word-spacing",
|
|
208
|
+
"overflow-wrap",
|
|
209
|
+
"tab-size",
|
|
210
|
+
"hyphens",
|
|
211
|
+
"unicode-bidi",
|
|
212
|
+
"columns",
|
|
213
|
+
"column-count",
|
|
214
|
+
"column-fill",
|
|
215
|
+
"column-gap",
|
|
216
|
+
"column-rule",
|
|
217
|
+
"column-rule-color",
|
|
218
|
+
"column-rule-style",
|
|
219
|
+
"column-rule-width",
|
|
220
|
+
"column-span",
|
|
221
|
+
"column-width",
|
|
222
|
+
"page-break-after",
|
|
223
|
+
"page-break-before",
|
|
224
|
+
"page-break-inside",
|
|
225
|
+
"src",
|
|
226
|
+
],
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
groupName: "visual",
|
|
230
|
+
emptyLineBefore: "always",
|
|
231
|
+
properties: [
|
|
232
|
+
"list-style",
|
|
233
|
+
"list-style-position",
|
|
234
|
+
"list-style-type",
|
|
235
|
+
"list-style-image",
|
|
236
|
+
"table-layout",
|
|
237
|
+
"empty-cells",
|
|
238
|
+
"caption-side",
|
|
239
|
+
"background",
|
|
240
|
+
"background-color",
|
|
241
|
+
"background-image",
|
|
242
|
+
"background-repeat",
|
|
243
|
+
"background-position",
|
|
244
|
+
"background-position-x",
|
|
245
|
+
"background-position-y",
|
|
246
|
+
"background-size",
|
|
247
|
+
"background-clip",
|
|
248
|
+
"background-origin",
|
|
249
|
+
"background-attachment",
|
|
250
|
+
"background-blend-mode",
|
|
251
|
+
"outline",
|
|
252
|
+
"outline-width",
|
|
253
|
+
"outline-style",
|
|
254
|
+
"outline-color",
|
|
255
|
+
"outline-offset",
|
|
256
|
+
"box-shadow",
|
|
257
|
+
"box-decoration-break",
|
|
258
|
+
"transform",
|
|
259
|
+
"transform-origin",
|
|
260
|
+
"transform-style",
|
|
261
|
+
"backface-visibility",
|
|
262
|
+
"perspective",
|
|
263
|
+
"perspective-origin",
|
|
264
|
+
"visibility",
|
|
265
|
+
"cursor",
|
|
266
|
+
"opacity",
|
|
267
|
+
"filter",
|
|
268
|
+
"isolation",
|
|
269
|
+
"backdrop-filter",
|
|
270
|
+
"mix-blend-mode",
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
groupName: "animation",
|
|
275
|
+
emptyLineBefore: "always",
|
|
276
|
+
properties: [
|
|
277
|
+
"transition",
|
|
278
|
+
"transition-delay",
|
|
279
|
+
"transition-timing-function",
|
|
280
|
+
"transition-duration",
|
|
281
|
+
"transition-property",
|
|
282
|
+
"animation",
|
|
283
|
+
"animation-name",
|
|
284
|
+
"animation-duration",
|
|
285
|
+
"animation-play-state",
|
|
286
|
+
"animation-timing-function",
|
|
287
|
+
"animation-delay",
|
|
288
|
+
"animation-iteration-count",
|
|
289
|
+
"animation-direction",
|
|
290
|
+
"animation-fill-mode",
|
|
291
|
+
],
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
groupName: "misc",
|
|
295
|
+
emptyLineBefore: "always",
|
|
296
|
+
properties: [
|
|
297
|
+
"appearance",
|
|
298
|
+
"content",
|
|
299
|
+
"clip",
|
|
300
|
+
"clip-path",
|
|
301
|
+
"counter-reset",
|
|
302
|
+
"counter-increment",
|
|
303
|
+
"resize",
|
|
304
|
+
"user-select",
|
|
305
|
+
"nav-index",
|
|
306
|
+
"nav-up",
|
|
307
|
+
"nav-right",
|
|
308
|
+
"nav-down",
|
|
309
|
+
"nav-left",
|
|
310
|
+
"pointer-events",
|
|
311
|
+
"quotes",
|
|
312
|
+
"touch-action",
|
|
313
|
+
"will-change",
|
|
314
|
+
"zoom",
|
|
315
|
+
"fill",
|
|
316
|
+
"fill-rule",
|
|
317
|
+
"clip-rule",
|
|
318
|
+
"stroke",
|
|
319
|
+
],
|
|
320
|
+
},
|
|
321
|
+
],
|
|
322
|
+
},
|
|
323
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@davidsneighbour/stylelint-config",
|
|
3
|
+
"version": "3.5.14",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"description": "Stylelint configuration for use in davidsneighbour projects.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Patrick Kollitsch",
|
|
8
|
+
"email": "patrick@davids-neighbour.com",
|
|
9
|
+
"web": "https://davids-neighbour.com"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/davidsneighbour/stylelint-config#readme",
|
|
12
|
+
"repository": "git+https://github.com/davidsneighbour/configurations/",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/davidsneighbour/configurations/issues"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"stylelint": "^14.6.1",
|
|
18
|
+
"stylelint-config-sass-guidelines": "^9.0.1",
|
|
19
|
+
"stylelint-config-standard": "^25.0.0",
|
|
20
|
+
"stylelint-no-unsupported-browser-features": "^5.0.3",
|
|
21
|
+
"stylelint-order": "^5.0.0"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=16",
|
|
25
|
+
"npm": ">=7"
|
|
26
|
+
},
|
|
27
|
+
"gitHead": "55c20949cd12651b0dfc600b5b316c8a42776506",
|
|
28
|
+
"keywords": [
|
|
29
|
+
"stylelint",
|
|
30
|
+
"stylelint-config"
|
|
31
|
+
],
|
|
32
|
+
"main": "index.js"
|
|
33
|
+
}
|