eslint-plugin-perfectionist 4.12.1 → 4.12.3
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/dist/package.json.js
CHANGED
|
@@ -7,7 +7,6 @@ const validateSideEffectsConfiguration = require('./sort-imports/validate-side-e
|
|
|
7
7
|
const validateCustomSortConfiguration = require('../utils/validate-custom-sort-configuration.js')
|
|
8
8
|
const getCustomGroupsCompareOptions = require('../utils/get-custom-groups-compare-options.js')
|
|
9
9
|
const readClosestTsConfigByPath = require('./sort-imports/read-closest-ts-config-by-path.js')
|
|
10
|
-
const validateGroupsConfiguration = require('../utils/validate-groups-configuration.js')
|
|
11
10
|
const getOptionsWithCleanGroups = require('../utils/get-options-with-clean-groups.js')
|
|
12
11
|
const computeCommonSelectors = require('./sort-imports/compute-common-selectors.js')
|
|
13
12
|
const isSideEffectOnlyGroup = require('./sort-imports/is-side-effect-only-group.js')
|
|
@@ -60,36 +59,19 @@ const sortImports = createEslintRule.createEslintRule({
|
|
|
60
59
|
order: 'asc',
|
|
61
60
|
}),
|
|
62
61
|
)
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
cache: cachedGroupsByModifiersAndSelectors,
|
|
77
|
-
selectors: types.allSelectors,
|
|
78
|
-
modifiers: types.allModifiers,
|
|
79
|
-
})
|
|
80
|
-
validateGroupsConfiguration.validateGroupsConfiguration({
|
|
81
|
-
allowedCustomGroups: [
|
|
82
|
-
...Object.keys(options.customGroups.type ?? {}),
|
|
83
|
-
...Object.keys(options.customGroups.value ?? {}),
|
|
84
|
-
],
|
|
85
|
-
allowedPredefinedGroups: [
|
|
86
|
-
...generatedGroups,
|
|
87
|
-
...types.allDeprecatedSelectors,
|
|
88
|
-
'unknown',
|
|
89
|
-
],
|
|
90
|
-
options,
|
|
91
|
-
})
|
|
92
|
-
}
|
|
62
|
+
validateGeneratedGroupsConfiguration.validateGeneratedGroupsConfiguration({
|
|
63
|
+
options: {
|
|
64
|
+
...options,
|
|
65
|
+
customGroups: Array.isArray(options.customGroups)
|
|
66
|
+
? options.customGroups
|
|
67
|
+
: {
|
|
68
|
+
...options.customGroups.type,
|
|
69
|
+
...options.customGroups.value,
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
selectors: [...types.allSelectors, ...types.allDeprecatedSelectors],
|
|
73
|
+
modifiers: types.allModifiers,
|
|
74
|
+
})
|
|
93
75
|
validateCustomSortConfiguration.validateCustomSortConfiguration(options)
|
|
94
76
|
validateNewlinesAndPartitionConfiguration.validateNewlinesAndPartitionConfiguration(
|
|
95
77
|
options,
|
|
@@ -419,7 +401,6 @@ const sortImports = createEslintRule.createEslintRule({
|
|
|
419
401
|
maxLineLength: ['type'],
|
|
420
402
|
},
|
|
421
403
|
additionalProperties: false,
|
|
422
|
-
id: 'sort-imports',
|
|
423
404
|
type: 'object',
|
|
424
405
|
},
|
|
425
406
|
definitions: {
|
|
@@ -445,6 +426,7 @@ const sortImports = createEslintRule.createEslintRule({
|
|
|
445
426
|
type: 'object',
|
|
446
427
|
},
|
|
447
428
|
},
|
|
429
|
+
id: 'sort-imports',
|
|
448
430
|
uniqueItems: true,
|
|
449
431
|
type: 'array',
|
|
450
432
|
},
|
|
@@ -35,7 +35,6 @@ let isPartitionComment = ({ partitionByComment, comment }) => {
|
|
|
35
35
|
relevantPartitionByComment = partitionByComment.line
|
|
36
36
|
}
|
|
37
37
|
return (
|
|
38
|
-
// eslint-disable-next-line no-undefined
|
|
39
38
|
relevantPartitionByComment !== void 0 &&
|
|
40
39
|
isTrimmedCommentPartitionComment({
|
|
41
40
|
partitionByComment: relevantPartitionByComment,
|