@onefinity/stylelint-config 2.2.1 → 3.0.1

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 +7 -9
  2. package/index.js +171 -210
  3. package/package.json +22 -8
package/README.md CHANGED
@@ -18,19 +18,17 @@ project-specific Stylelint configuration.
18
18
  Install the package using the following command.
19
19
 
20
20
  ```shell
21
- $ npm install --save-dev @onefinity/stylelint-config
21
+ npm install --save-dev @onefinity/stylelint-config
22
22
  ```
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,175 @@
1
- module.exports = {
2
- extends: 'stylelint-config-standard-scss',
1
+ export default {
2
+ extends: [
3
+ '@stylistic/stylelint-config',
4
+ 'stylelint-config-standard-scss'
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
- },
171
- {
172
- 'order': 'flexible',
173
- 'properties': [
174
- 'overflow',
175
- 'overflow-x',
176
- 'overflow-y'
177
- ]
178
- },
179
- 'transform'
180
- ],
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
- }
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
+ order: 'flexible',
74
+ properties: [
75
+ 'flex',
76
+ 'flex-grow',
77
+ 'flex-shrink',
78
+ 'flex-basis',
79
+ 'flex-flow',
80
+ 'flex-direction',
81
+ 'flex-wrap',
82
+ 'order',
83
+ 'justify-items',
84
+ 'justify-content',
85
+ 'justify-self',
86
+ 'align-items',
87
+ 'align-content',
88
+ 'align-self'
89
+ ]
90
+ }, {
91
+ order: 'flexible',
92
+ properties: [
93
+ 'table-layout',
94
+ 'vertical-align'
95
+ ]
96
+ },
97
+ 'width',
98
+ 'min-width',
99
+ 'max-width',
100
+ 'height',
101
+ 'min-height',
102
+ 'max-height',
103
+ {
104
+ order: 'flexible',
105
+ properties: [
106
+ 'padding',
107
+ 'padding-top',
108
+ 'padding-right',
109
+ 'padding-bottom',
110
+ 'padding-left',
111
+ 'margin',
112
+ 'margin-top',
113
+ 'margin-right',
114
+ 'margin-bottom',
115
+ 'margin-left'
116
+ ]
117
+ }, {
118
+ order: 'flexible',
119
+ properties: [
120
+ 'border',
121
+ 'border-width',
122
+ 'border-style',
123
+ 'border-color',
124
+ 'border-top',
125
+ 'border-top-width',
126
+ 'border-top-style',
127
+ 'border-top-color',
128
+ 'border-right',
129
+ 'border-right-width',
130
+ 'border-right-style',
131
+ 'border-right-color',
132
+ 'border-bottom',
133
+ 'border-bottom-width',
134
+ 'border-bottom-style',
135
+ 'border-bottom-color',
136
+ 'border-left',
137
+ 'border-left-width',
138
+ 'border-left-style',
139
+ 'border-left-color',
140
+ 'border-radius',
141
+ 'border-top-left-radius',
142
+ 'border-top-right-radius',
143
+ 'border-bottom-right-radius',
144
+ 'border-bottom-left-radius'
145
+ ]
146
+ }, {
147
+ order: 'flexible',
148
+ properties: [
149
+ 'outline',
150
+ 'outline-width',
151
+ 'outline-style',
152
+ 'outline-color'
153
+ ]
154
+ }, {
155
+ order: 'flexible',
156
+ properties: [
157
+ 'overflow',
158
+ 'overflow-x',
159
+ 'overflow-y'
160
+ ]
161
+ },
162
+ 'transform'
163
+ ], {
164
+ unspecified: 'bottom'
165
+ }],
166
+ 'selector-class-pattern': ['^[a-z][a-zA-Z0-9]*$', {
167
+ resolveNestedSelectors: true
168
+ }],
169
+ 'selector-pseudo-class-no-unknown': [true, {
170
+ ignorePseudoClasses: ['global', 'local', 'export']
171
+ }],
172
+ 'selector-pseudo-element-colon-notation': 'single'
173
+ }
174
+ }]
214
175
  };
package/package.json CHANGED
@@ -1,24 +1,38 @@
1
1
  {
2
2
  "name": "@onefinity/stylelint-config",
3
- "version": "2.2.1",
3
+ "version": "3.0.1",
4
4
  "homepage": "https://gitlab.com/onefinity/stylelint-config",
5
+ "type": "module",
6
+ "main": "index.js",
7
+ "license": "MIT",
8
+ "scripts": {
9
+ "lint": "eslint",
10
+ "test": "node --test"
11
+ },
5
12
  "repository": {
6
13
  "type": "git",
7
14
  "url": "git+https://gitlab.com/onefinity/stylelint-config.git"
8
15
  },
16
+ "engines": {
17
+ "node": ">=16.0.0",
18
+ "npm": ">=7.0.0"
19
+ },
9
20
  "author": {
10
21
  "name": "Cas Cornelissen",
11
22
  "email": "cas.cornelissen@onefinity.io",
12
23
  "url": "https://www.onefinity.io/"
13
24
  },
14
- "license": "MIT",
15
25
  "files": [
16
- "*.js"
26
+ "index.js"
17
27
  ],
18
- "main": "index.js",
19
- "dependencies": {
20
- "stylelint": "^14.13.0",
21
- "stylelint-config-standard-scss": "^5.0.0",
22
- "stylelint-order": "^5.0.0"
28
+ "devDependencies": {
29
+ "@onefinity/eslint-config": "^3.0.0",
30
+ "expect": "^29.7.0"
31
+ },
32
+ "peerDependencies": {
33
+ "@stylistic/stylelint-config": ">=2.0.0 <3.0.0",
34
+ "stylelint": ">=16.0.0 <17.0.0",
35
+ "stylelint-config-standard-scss": ">=14.0.0 <15.0.0",
36
+ "stylelint-order": ">=6.0.0 <7.0.0"
23
37
  }
24
38
  }