@itcase/lint 1.0.5 → 1.0.7

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 (2) hide show
  1. package/eslint/index.js +24 -2
  2. package/package.json +2 -2
package/eslint/index.js CHANGED
@@ -164,10 +164,32 @@ const eslintConfig = [
164
164
  },
165
165
  ],
166
166
 
167
- // Maps, Enum, Union types, Intersection types
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
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/lint",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "author": "ITCase",
5
5
  "description": "Code style linter configuration presets",
6
6
  "engines": {
@@ -38,7 +38,7 @@
38
38
  "eslint-plugin-mobx": "^0.0.11",
39
39
  "eslint-plugin-n": "17.10.0",
40
40
  "eslint-plugin-node": "11.1.0",
41
- "eslint-plugin-perfectionist": "^3.0.0",
41
+ "eslint-plugin-perfectionist": "^3.1.2",
42
42
  "eslint-plugin-prettier": "5.2.1",
43
43
  "eslint-plugin-promise": "7.0.0",
44
44
  "eslint-plugin-react": "^7.35.0",