@itcase/lint 1.0.5 → 1.0.6
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/eslint/index.js +24 -2
- package/package.json +1 -1
package/eslint/index.js
CHANGED
|
@@ -164,10 +164,32 @@ const eslintConfig = [
|
|
|
164
164
|
},
|
|
165
165
|
],
|
|
166
166
|
|
|
167
|
-
//
|
|
167
|
+
// Union types
|
|
168
|
+
'perfectionist/sort-union-types': [
|
|
169
|
+
'error',
|
|
170
|
+
{
|
|
171
|
+
type: 'natural',
|
|
172
|
+
order: 'asc',
|
|
173
|
+
groups: [
|
|
174
|
+
'conditional',
|
|
175
|
+
'function',
|
|
176
|
+
'import',
|
|
177
|
+
'keyword',
|
|
178
|
+
'literal',
|
|
179
|
+
'named',
|
|
180
|
+
'object',
|
|
181
|
+
'operator',
|
|
182
|
+
'tuple',
|
|
183
|
+
'union',
|
|
184
|
+
'nullish',
|
|
185
|
+
'unknown',
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
|
|
190
|
+
// Maps, Enum, Intersection types
|
|
168
191
|
'perfectionist/sort-maps': ['error', { type: 'natural', order: 'asc' }],
|
|
169
192
|
'perfectionist/sort-enums': ['error', { type: 'natural', order: 'asc' }],
|
|
170
|
-
'perfectionist/sort-union-types': ['error', { type: 'natural', order: 'asc' }],
|
|
171
193
|
'perfectionist/sort-intersection-types': ['error', { type: 'natural', order: 'asc' }],
|
|
172
194
|
},
|
|
173
195
|
},
|