@onefinity/stylelint-config 2.2.0 → 3.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.
Files changed (3) hide show
  1. package/README.md +6 -8
  2. package/index.js +176 -208
  3. package/package.json +10 -6
package/README.md CHANGED
@@ -23,14 +23,12 @@ $ npm install --save-dev @onefinity/stylelint-config
23
23
 
24
24
  ### Extending
25
25
  Use the [`extends`][stylelint-extends] feature provided by Stylelint in the
26
- project-specific `.stylelintrc` configuration file.
26
+ project-specific `stylelint.config.mjs` configuration file.
27
27
 
28
- ```json
29
- {
30
- "extends": [
31
- "@onefinity/stylelint-config"
32
- ]
33
- }
28
+ ```js
29
+ export default {
30
+ extends: '@onefinity/stylelint-config'
31
+ };
34
32
  ```
35
33
 
36
34
  ### Scripts
@@ -49,7 +47,7 @@ the linter.
49
47
 
50
48
 
51
49
  [stylelint]: https://stylelint.io/
52
- [stylelint-extends]: https://stylelint.io/user-guide/configuration#extends
50
+ [stylelint-extends]: https://stylelint.io/user-guide/configure/#extends
53
51
  [sass]: https://sass-lang.com/
54
52
  [css-modules]: https://github.com/css-modules/css-modules
55
53
  [onefinity-eslint-config]: http://npmjs.com/package/@onefinity/eslint-config
package/index.js CHANGED
@@ -1,214 +1,182 @@
1
- module.exports = {
2
- extends: 'stylelint-config-standard-scss',
1
+ export default {
2
+ extends: [
3
+ 'stylelint-config-standard-scss',
4
+ '@stylistic/stylelint-config'
5
+ ],
3
6
  plugins: [
4
7
  'stylelint-order'
5
8
  ],
6
- rules: {
7
- 'alpha-value-notation': 'number',
8
- 'at-rule-empty-line-before': ['always', {
9
- 'except': ['first-nested', 'blockless-after-blockless'],
10
- 'ignore': ['after-comment'],
11
- 'ignoreAtRules': ['if', 'else']
12
- }],
13
- 'at-rule-name-space-after': 'always',
14
- 'at-rule-no-unknown': null,
15
- 'block-closing-brace-newline-before': 'always',
16
- 'block-closing-brace-newline-after': ['always', {
17
- 'ignoreAtRules': ['if', 'else']
18
- }],
19
- 'block-no-empty': true,
20
- 'block-opening-brace-newline-after': 'always',
21
- 'block-opening-brace-newline-before': 'always-single-line',
22
- 'color-function-notation': 'legacy',
23
- 'color-hex-case': 'lower',
24
- 'color-named': 'never',
25
- 'custom-property-empty-line-before': 'never',
26
- 'declaration-block-no-duplicate-properties': [true, {
27
- 'ignore': ['consecutive-duplicates-with-different-values']
28
- }],
29
- 'declaration-block-semicolon-newline-after': 'always',
30
- 'declaration-block-semicolon-newline-before': 'never-multi-line',
31
- 'declaration-colon-newline-after': null,
32
- 'declaration-colon-space-after': 'always',
33
- 'declaration-empty-line-before': 'never',
34
- 'font-family-name-quotes': 'always-unless-keyword',
35
- 'function-parentheses-newline-inside': 'never-multi-line',
36
- 'function-url-quotes': 'always',
37
- 'indentation': 4,
38
- 'max-nesting-depth': 4,
39
- 'media-query-list-comma-newline-after': 'never-multi-line',
40
- 'media-query-list-comma-newline-before': 'never-multi-line',
41
- 'media-query-list-comma-space-after': 'always',
42
- 'no-descending-specificity': null,
43
- 'number-max-precision': 3,
44
- 'order/properties-order': [
45
- [
46
- 'content',
47
- 'position',
48
- 'z-index',
49
- {
50
- 'order': 'flexible',
51
- 'properties': [
52
- 'top',
53
- 'right',
54
- 'bottom',
55
- 'left'
56
- ]
57
- },
58
- 'display',
59
- 'float',
60
- 'clear',
61
- 'box-sizing',
62
- {
63
- 'order': 'flexible',
64
- 'properties': [
65
- 'grid',
66
- 'grid-template',
67
- 'grid-template-rows',
68
- 'grid-template-columns',
69
- 'grid-template-areas',
70
- 'grid-auto-columns',
71
- 'grid-auto-rows',
72
- 'grid-auto-flow',
73
- 'grid-row',
74
- 'grid-column',
75
- 'grid-area',
76
- 'grid-gap',
77
- 'grid-row-gap',
78
- 'grid-column-gap',
79
- 'grid-row-start',
80
- 'grid-row-end',
81
- 'grid-column-start',
82
- 'grid-column-end'
83
- ]
84
- },
85
- {
86
- 'order': 'flexible',
87
- 'properties': [
88
- 'flex',
89
- 'flex-grow',
90
- 'flex-shrink',
91
- 'flex-basis',
92
- 'flex-flow',
93
- 'flex-direction',
94
- 'flex-wrap',
95
- 'order',
96
- 'justify-items',
97
- 'justify-content',
98
- 'justify-self',
99
- 'align-items',
100
- 'align-content',
101
- 'align-self'
102
- ]
103
- },
104
- {
105
- 'order': 'flexible',
106
- 'properties': [
107
- 'table-layout',
108
- 'vertical-align'
109
- ]
110
- },
111
- 'width',
112
- 'min-width',
113
- 'max-width',
114
- 'height',
115
- 'min-height',
116
- 'max-height',
117
- {
118
- 'order': 'flexible',
119
- 'properties': [
120
- 'padding',
121
- 'padding-top',
122
- 'padding-right',
123
- 'padding-bottom',
124
- 'padding-left',
125
- 'margin',
126
- 'margin-top',
127
- 'margin-right',
128
- 'margin-bottom',
129
- 'margin-left'
130
- ]
131
- },
132
- {
133
- 'order': 'flexible',
134
- 'properties': [
135
- 'border',
136
- 'border-width',
137
- 'border-style',
138
- 'border-color',
139
- 'border-top',
140
- 'border-top-width',
141
- 'border-top-style',
142
- 'border-top-color',
143
- 'border-right',
144
- 'border-right-width',
145
- 'border-right-style',
146
- 'border-right-color',
147
- 'border-bottom',
148
- 'border-bottom-width',
149
- 'border-bottom-style',
150
- 'border-bottom-color',
151
- 'border-left',
152
- 'border-left-width',
153
- 'border-left-style',
154
- 'border-left-color',
155
- 'border-radius',
156
- 'border-top-left-radius',
157
- 'border-top-right-radius',
158
- 'border-bottom-right-radius',
159
- 'border-bottom-left-radius'
160
- ]
161
- },
162
- {
163
- 'order': 'flexible',
164
- 'properties': [
165
- 'outline',
166
- 'outline-width',
167
- 'outline-style',
168
- 'outline-color'
169
- ]
170
- },
9
+ reportDescriptionlessDisables: true,
10
+ reportInvalidScopeDisables: true,
11
+ reportNeedlessDisables: true,
12
+ reportUnscopedDisables: true,
13
+ overrides: [{
14
+ files: ['*.scss', '**/*.scss'],
15
+ customSyntax: 'postcss-scss',
16
+ rules: {
17
+ '@stylistic/block-closing-brace-newline-after': ['always', {
18
+ ignoreAtRules: ['if', 'else']
19
+ }],
20
+ '@stylistic/indentation': 4,
21
+ '@stylistic/max-line-length': null,
22
+ '@stylistic/string-quotes': 'single',
23
+ 'alpha-value-notation': 'number',
24
+ 'at-rule-empty-line-before': ['always', {
25
+ except: ['first-nested', 'blockless-after-blockless'],
26
+ ignore: ['after-comment'],
27
+ ignoreAtRules: ['if', 'else']
28
+ }],
29
+ 'no-descending-specificity': null,
30
+ 'no-duplicate-selectors': null,
31
+ 'order/properties-order': [
32
+ [
33
+ 'content',
34
+ 'position',
35
+ 'z-index',
36
+ 'inset',
37
+ {
38
+ order: 'flexible',
39
+ properties: [
40
+ 'top',
41
+ 'right',
42
+ 'bottom',
43
+ 'left'
44
+ ]
45
+ },
46
+ 'display',
47
+ 'float',
48
+ 'clear',
49
+ 'box-sizing',
50
+ {
51
+ order: 'flexible',
52
+ properties: [
53
+ 'grid',
54
+ 'grid-template',
55
+ 'grid-template-rows',
56
+ 'grid-template-columns',
57
+ 'grid-template-areas',
58
+ 'grid-auto-columns',
59
+ 'grid-auto-rows',
60
+ 'grid-auto-flow',
61
+ 'grid-row',
62
+ 'grid-column',
63
+ 'grid-area',
64
+ 'grid-gap',
65
+ 'grid-row-gap',
66
+ 'grid-column-gap',
67
+ 'grid-row-start',
68
+ 'grid-row-end',
69
+ 'grid-column-start',
70
+ 'grid-column-end'
71
+ ]
72
+ },
73
+ {
74
+ order: 'flexible',
75
+ properties: [
76
+ 'flex',
77
+ 'flex-grow',
78
+ 'flex-shrink',
79
+ 'flex-basis',
80
+ 'flex-flow',
81
+ 'flex-direction',
82
+ 'flex-wrap',
83
+ 'order',
84
+ 'justify-items',
85
+ 'justify-content',
86
+ 'justify-self',
87
+ 'align-items',
88
+ 'align-content',
89
+ 'align-self'
90
+ ]
91
+ },
92
+ {
93
+ order: 'flexible',
94
+ properties: [
95
+ 'table-layout',
96
+ 'vertical-align'
97
+ ]
98
+ },
99
+ 'width',
100
+ 'min-width',
101
+ 'max-width',
102
+ 'height',
103
+ 'min-height',
104
+ 'max-height',
105
+ {
106
+ order: 'flexible',
107
+ properties: [
108
+ 'padding',
109
+ 'padding-top',
110
+ 'padding-right',
111
+ 'padding-bottom',
112
+ 'padding-left',
113
+ 'margin',
114
+ 'margin-top',
115
+ 'margin-right',
116
+ 'margin-bottom',
117
+ 'margin-left'
118
+ ]
119
+ },
120
+ {
121
+ order: 'flexible',
122
+ properties: [
123
+ 'border',
124
+ 'border-width',
125
+ 'border-style',
126
+ 'border-color',
127
+ 'border-top',
128
+ 'border-top-width',
129
+ 'border-top-style',
130
+ 'border-top-color',
131
+ 'border-right',
132
+ 'border-right-width',
133
+ 'border-right-style',
134
+ 'border-right-color',
135
+ 'border-bottom',
136
+ 'border-bottom-width',
137
+ 'border-bottom-style',
138
+ 'border-bottom-color',
139
+ 'border-left',
140
+ 'border-left-width',
141
+ 'border-left-style',
142
+ 'border-left-color',
143
+ 'border-radius',
144
+ 'border-top-left-radius',
145
+ 'border-top-right-radius',
146
+ 'border-bottom-right-radius',
147
+ 'border-bottom-left-radius'
148
+ ]
149
+ },
150
+ {
151
+ order: 'flexible',
152
+ properties: [
153
+ 'outline',
154
+ 'outline-width',
155
+ 'outline-style',
156
+ 'outline-color'
157
+ ]
158
+ },
159
+ {
160
+ order: 'flexible',
161
+ properties: [
162
+ 'overflow',
163
+ 'overflow-x',
164
+ 'overflow-y'
165
+ ]
166
+ },
167
+ 'transform'
168
+ ],
171
169
  {
172
- 'order': 'flexible',
173
- 'properties': [
174
- 'overflow',
175
- 'overflow-x',
176
- 'overflow-y'
177
- ]
178
- },
179
- 'transform'
170
+ unspecified: 'bottom'
171
+ }
180
172
  ],
181
- {
182
- 'unspecified': 'bottom'
183
- }
184
- ],
185
- 'property-no-unknown': [true, {
186
- 'ignoreProperties': ['container']
187
- }],
188
- 'rule-empty-line-before': ['always', {
189
- 'except': ['first-nested'],
190
- 'ignore': ['after-comment']
191
- }],
192
- 'scss/at-rule-no-unknown': [true, {
193
- 'ignoreAtRules': ['container', 'content', 'each', 'else', 'error', 'extend', 'for', 'function', 'if', 'include', 'mixin', 'return', 'warn']
194
- }],
195
- 'selector-attribute-quotes': 'always',
196
- 'selector-class-pattern': ['^[a-z][a-zA-Z0-9]*$', {
197
- 'resolveNestedSelectors': true
198
- }],
199
- 'selector-list-comma-newline-before': 'never-multi-line',
200
- 'selector-list-comma-space-after': 'always-single-line',
201
- 'selector-max-compound-selectors': 4,
202
- 'selector-max-specificity': '0,4,2',
203
- 'selector-pseudo-class-no-unknown': [true, {
204
- 'ignorePseudoClasses': ['global', 'local', 'export']
205
- }],
206
- 'selector-pseudo-element-colon-notation': 'single',
207
- 'string-quotes': 'single',
208
- 'value-keyword-case': ['lower', {
209
- 'ignoreKeywords': ['/(rotate|scale|skew|translate)(X|Y|Z)(.*)/']
210
- }],
211
- 'value-list-comma-newline-after': 'always-multi-line',
212
- 'value-list-comma-newline-before': 'never-multi-line'
213
- }
173
+ 'selector-class-pattern': ['^[a-z][a-zA-Z0-9]*$', {
174
+ resolveNestedSelectors: true
175
+ }],
176
+ 'selector-pseudo-class-no-unknown': [true, {
177
+ ignorePseudoClasses: ['global', 'local', 'export']
178
+ }],
179
+ 'selector-pseudo-element-colon-notation': 'single'
180
+ }
181
+ }]
214
182
  };
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "@onefinity/stylelint-config",
3
- "version": "2.2.0",
3
+ "version": "3.0.0",
4
4
  "homepage": "https://gitlab.com/onefinity/stylelint-config",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://gitlab.com/onefinity/stylelint-config.git"
8
8
  },
9
+ "engines": {
10
+ "node": ">=16.0.0",
11
+ "npm": ">=7.0.0"
12
+ },
9
13
  "author": {
10
14
  "name": "Cas Cornelissen",
11
15
  "email": "cas.cornelissen@onefinity.io",
@@ -15,10 +19,10 @@
15
19
  "files": [
16
20
  "*.js"
17
21
  ],
18
- "main": "index.js",
19
- "dependencies": {
20
- "stylelint": "^14.5.3",
21
- "stylelint-config-standard-scss": "^3.0.0",
22
- "stylelint-order": "^5.0.0"
22
+ "peerDependencies": {
23
+ "@stylistic/stylelint-config": ">=2.0.0 <3.0.0",
24
+ "stylelint": ">=16.0.0 <17.0.0",
25
+ "stylelint-config-standard-scss": ">=14.0.0 <15.0.0",
26
+ "stylelint-order": ">=6.0.0 <7.0.0"
23
27
  }
24
28
  }