eslint-plugin-perfectionist 5.9.0 → 5.9.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.
- package/dist/package.json.js +1 -1
- package/dist/rules/sort-array-includes.js +2 -2
- package/dist/rules/sort-arrays.js +2 -2
- package/dist/rules/sort-classes.js +2 -2
- package/dist/rules/sort-decorators.js +2 -2
- package/dist/rules/sort-enums.js +2 -2
- package/dist/rules/sort-exports.js +2 -2
- package/dist/rules/sort-heritage-clauses.js +2 -2
- package/dist/rules/sort-import-attributes.js +2 -2
- package/dist/rules/sort-imports/types.d.ts +1 -1
- package/dist/rules/sort-imports.js +2 -2
- package/dist/rules/sort-jsx-props.js +2 -2
- package/dist/rules/sort-maps.js +2 -2
- package/dist/rules/sort-modules/build-comparator-by-options-computer.js +0 -1
- package/dist/rules/sort-modules/build-usage-comparator.d.ts +1 -4
- package/dist/rules/sort-modules/build-usage-comparator.js +3 -11
- package/dist/rules/sort-modules.js +2 -2
- package/dist/rules/sort-named-exports.js +2 -2
- package/dist/rules/sort-named-imports.js +2 -2
- package/dist/rules/sort-object-types.js +2 -2
- package/dist/rules/sort-objects.js +2 -2
- package/dist/rules/sort-union-types.js +2 -2
- package/dist/rules/sort-variable-declarations.js +2 -2
- package/dist/utils/get-decorator-name.js +1 -1
- package/dist/utils/json-schemas/common-partition-json-schemas.d.ts +1 -1
- package/dist/utils/json-schemas/common-partition-json-schemas.js +2 -2
- package/package.json +2 -2
- package/readme.md +0 -1
package/dist/package.json.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../utils/report-errors.js'
|
|
13
13
|
import {
|
|
14
14
|
partitionByCommentJsonSchema,
|
|
15
|
-
|
|
15
|
+
partitionByNewlineJsonSchema,
|
|
16
16
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
17
17
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
18
18
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -57,7 +57,7 @@ var jsonSchema = {
|
|
|
57
57
|
},
|
|
58
58
|
}),
|
|
59
59
|
partitionByComment: partitionByCommentJsonSchema,
|
|
60
|
-
partitionByNewLine:
|
|
60
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
61
61
|
},
|
|
62
62
|
additionalProperties: false,
|
|
63
63
|
type: 'object',
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../utils/report-errors.js'
|
|
13
13
|
import {
|
|
14
14
|
partitionByCommentJsonSchema,
|
|
15
|
-
|
|
15
|
+
partitionByNewlineJsonSchema,
|
|
16
16
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
17
17
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
18
18
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -57,7 +57,7 @@ var jsonSchema = {
|
|
|
57
57
|
},
|
|
58
58
|
}),
|
|
59
59
|
partitionByComment: partitionByCommentJsonSchema,
|
|
60
|
-
partitionByNewLine:
|
|
60
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
61
61
|
},
|
|
62
62
|
required: ['useConfigurationIf'],
|
|
63
63
|
additionalProperties: false,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from '../utils/report-errors.js'
|
|
19
19
|
import {
|
|
20
20
|
partitionByCommentJsonSchema,
|
|
21
|
-
|
|
21
|
+
partitionByNewlineJsonSchema,
|
|
22
22
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
23
23
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
24
24
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -52,7 +52,7 @@ var sort_classes_default = createEslintRule({
|
|
|
52
52
|
newlinesBetweenOverloadSignatures: newlinesBetweenJsonSchema,
|
|
53
53
|
ignoreCallbackDependenciesPatterns: buildRegexJsonSchema(),
|
|
54
54
|
partitionByComment: partitionByCommentJsonSchema,
|
|
55
|
-
partitionByNewLine:
|
|
55
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
56
56
|
},
|
|
57
57
|
additionalProperties: false,
|
|
58
58
|
type: 'object',
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from '../utils/report-errors.js'
|
|
9
9
|
import {
|
|
10
10
|
partitionByCommentJsonSchema,
|
|
11
|
-
|
|
11
|
+
partitionByNewlineJsonSchema,
|
|
12
12
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
13
13
|
import { validateNewlinesAndPartitionConfiguration } from '../utils/validate-newlines-and-partition-configuration.js'
|
|
14
14
|
import { defaultComparatorByOptionsComputer } from '../utils/compare/default-comparator-by-options-computer.js'
|
|
@@ -87,7 +87,7 @@ var sort_decorators_default = createEslintRule({
|
|
|
87
87
|
type: 'boolean',
|
|
88
88
|
},
|
|
89
89
|
partitionByComment: partitionByCommentJsonSchema,
|
|
90
|
-
partitionByNewLine:
|
|
90
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
91
91
|
},
|
|
92
92
|
additionalProperties: false,
|
|
93
93
|
type: 'object',
|
package/dist/rules/sort-enums.js
CHANGED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../utils/report-errors.js'
|
|
15
15
|
import {
|
|
16
16
|
partitionByCommentJsonSchema,
|
|
17
|
-
|
|
17
|
+
partitionByNewlineJsonSchema,
|
|
18
18
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
19
19
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
20
20
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -51,7 +51,7 @@ var sort_enums_default = createEslintRule({
|
|
|
51
51
|
useExperimentalDependencyDetection:
|
|
52
52
|
useExperimentalDependencyDetectionJsonSchema,
|
|
53
53
|
partitionByComment: partitionByCommentJsonSchema,
|
|
54
|
-
partitionByNewLine:
|
|
54
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
55
55
|
},
|
|
56
56
|
additionalProperties: false,
|
|
57
57
|
type: 'object',
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from '../utils/report-errors.js'
|
|
11
11
|
import {
|
|
12
12
|
partitionByCommentJsonSchema,
|
|
13
|
-
|
|
13
|
+
partitionByNewlineJsonSchema,
|
|
14
14
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
15
15
|
import { validateNewlinesAndPartitionConfiguration } from '../utils/validate-newlines-and-partition-configuration.js'
|
|
16
16
|
import { defaultComparatorByOptionsComputer } from '../utils/compare/default-comparator-by-options-computer.js'
|
|
@@ -149,7 +149,7 @@ var sort_exports_default = createEslintRule({
|
|
|
149
149
|
additionalCustomGroupMatchOptionsJsonSchema,
|
|
150
150
|
}),
|
|
151
151
|
partitionByComment: partitionByCommentJsonSchema,
|
|
152
|
-
partitionByNewLine:
|
|
152
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
153
153
|
},
|
|
154
154
|
additionalProperties: false,
|
|
155
155
|
type: 'object',
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../utils/report-errors.js'
|
|
13
13
|
import {
|
|
14
14
|
partitionByCommentJsonSchema,
|
|
15
|
-
|
|
15
|
+
partitionByNewlineJsonSchema,
|
|
16
16
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
17
17
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
18
18
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -39,7 +39,7 @@ var sort_heritage_clauses_default = createEslintRule({
|
|
|
39
39
|
matchesAstSelector: matchesAstSelectorJsonSchema,
|
|
40
40
|
},
|
|
41
41
|
}),
|
|
42
|
-
partitionByNewLine:
|
|
42
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
43
43
|
partitionByComment: partitionByCommentJsonSchema,
|
|
44
44
|
},
|
|
45
45
|
additionalProperties: false,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../utils/report-errors.js'
|
|
13
13
|
import {
|
|
14
14
|
partitionByCommentJsonSchema,
|
|
15
|
-
|
|
15
|
+
partitionByNewlineJsonSchema,
|
|
16
16
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
17
17
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
18
18
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -49,7 +49,7 @@ var jsonSchema = {
|
|
|
49
49
|
},
|
|
50
50
|
}),
|
|
51
51
|
partitionByComment: partitionByCommentJsonSchema,
|
|
52
|
-
partitionByNewLine:
|
|
52
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
53
53
|
},
|
|
54
54
|
additionalProperties: false,
|
|
55
55
|
type: 'object',
|
|
@@ -83,7 +83,6 @@ export type SortImportsNode =
|
|
|
83
83
|
| TSESTree.TSImportEqualsDeclaration
|
|
84
84
|
| TSESTree.VariableDeclaration
|
|
85
85
|
| TSESTree.ImportDeclaration
|
|
86
|
-
export type CustomTypeOption = 'type-import-first' | TypeOption
|
|
87
86
|
/**
|
|
88
87
|
* Union type of all available import selectors. Used to categorize different
|
|
89
88
|
* types of import statements.
|
|
@@ -119,6 +118,7 @@ interface CustomGroupMatchOptions {
|
|
|
119
118
|
interface AdditionalSortOptions {
|
|
120
119
|
sortBy: SortByOption
|
|
121
120
|
}
|
|
121
|
+
type CustomTypeOption = 'type-import-first' | TypeOption
|
|
122
122
|
/**
|
|
123
123
|
* Complete list of available active import selectors. Used for validation and
|
|
124
124
|
* JSON schema generation.
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../utils/report-errors.js'
|
|
15
15
|
import {
|
|
16
16
|
partitionByCommentJsonSchema,
|
|
17
|
-
|
|
17
|
+
partitionByNewlineJsonSchema,
|
|
18
18
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
19
19
|
import { computeDependenciesBySortingNode } from '../utils/compute-dependencies-by-sorting-node.js'
|
|
20
20
|
import { populateSortingNodeGroupsWithDependencies } from '../utils/populate-sorting-node-groups-with-dependencies.js'
|
|
@@ -302,7 +302,7 @@ var sort_imports_default = createEslintRule({
|
|
|
302
302
|
useExperimentalDependencyDetection:
|
|
303
303
|
useExperimentalDependencyDetectionJsonSchema,
|
|
304
304
|
partitionByComment: partitionByCommentJsonSchema,
|
|
305
|
-
partitionByNewLine:
|
|
305
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
306
306
|
internalPattern: buildRegexJsonSchema(),
|
|
307
307
|
},
|
|
308
308
|
additionalProperties: false,
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
MISSED_SPACING_ERROR,
|
|
12
12
|
ORDER_ERROR,
|
|
13
13
|
} from '../utils/report-errors.js'
|
|
14
|
-
import {
|
|
14
|
+
import { partitionByNewlineJsonSchema } from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
15
15
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
16
16
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
17
17
|
import {
|
|
@@ -42,7 +42,7 @@ var sort_jsx_props_default = createEslintRule({
|
|
|
42
42
|
tagMatchesPattern: buildRegexJsonSchema(),
|
|
43
43
|
},
|
|
44
44
|
}),
|
|
45
|
-
partitionByNewLine:
|
|
45
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
46
46
|
},
|
|
47
47
|
additionalProperties: false,
|
|
48
48
|
type: 'object',
|
package/dist/rules/sort-maps.js
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../utils/report-errors.js'
|
|
13
13
|
import {
|
|
14
14
|
partitionByCommentJsonSchema,
|
|
15
|
-
|
|
15
|
+
partitionByNewlineJsonSchema,
|
|
16
16
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
17
17
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
18
18
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -40,7 +40,7 @@ var sort_maps_default = createEslintRule({
|
|
|
40
40
|
},
|
|
41
41
|
}),
|
|
42
42
|
partitionByComment: partitionByCommentJsonSchema,
|
|
43
|
-
partitionByNewLine:
|
|
43
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
44
44
|
},
|
|
45
45
|
additionalProperties: false,
|
|
46
46
|
type: 'object',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TSESLint } from '@typescript-eslint/utils'
|
|
2
2
|
import { Comparator } from '../../utils/compare/default-comparator-by-options-computer.js'
|
|
3
|
-
import { SortModulesSortingNode
|
|
3
|
+
import { SortModulesSortingNode } from './types.js'
|
|
4
4
|
/**
|
|
5
5
|
* Builds a comparator function for sorting module nodes based on their usage.
|
|
6
6
|
*
|
|
@@ -11,7 +11,6 @@ import { SortModulesSortingNode, Options } from './types.js'
|
|
|
11
11
|
* @param params.useExperimentalDependencyDetection - Whether to use
|
|
12
12
|
* experimental dependency detection.
|
|
13
13
|
* @param params.sourceCode - The source code object.
|
|
14
|
-
* @param params.options - The sorting options.
|
|
15
14
|
* @returns A comparator function for sorting module nodes by usage.
|
|
16
15
|
*/
|
|
17
16
|
export declare function buildUsageComparator({
|
|
@@ -19,11 +18,9 @@ export declare function buildUsageComparator({
|
|
|
19
18
|
ignoreEslintDisabledNodes,
|
|
20
19
|
sortingNodes,
|
|
21
20
|
sourceCode,
|
|
22
|
-
options,
|
|
23
21
|
}: {
|
|
24
22
|
useExperimentalDependencyDetection: boolean
|
|
25
23
|
sortingNodes: SortModulesSortingNode[]
|
|
26
|
-
options: Required<Options[number]>
|
|
27
24
|
ignoreEslintDisabledNodes: boolean
|
|
28
25
|
sourceCode: TSESLint.SourceCode
|
|
29
26
|
}): Comparator<SortModulesSortingNode>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { populateSortingNodeGroupsWithDependencies } from '../../utils/populate-sorting-node-groups-with-dependencies.js'
|
|
2
|
-
import { computeOrderedValue } from '../../utils/compare/compute-ordered-value.js'
|
|
3
2
|
import { isNodeDependentOnOtherNode } from '../../utils/is-node-dependent-on-other-node.js'
|
|
4
3
|
import { sortNodesByDependencies } from '../../utils/sort-nodes-by-dependencies.js'
|
|
5
4
|
import { buildSortingNodeByNodeMap } from '../../utils/build-sorting-node-by-node-map.js'
|
|
@@ -15,7 +14,6 @@ import { computeDependencies } from './compute-dependencies.js'
|
|
|
15
14
|
* @param params.useExperimentalDependencyDetection - Whether to use
|
|
16
15
|
* experimental dependency detection.
|
|
17
16
|
* @param params.sourceCode - The source code object.
|
|
18
|
-
* @param params.options - The sorting options.
|
|
19
17
|
* @returns A comparator function for sorting module nodes by usage.
|
|
20
18
|
*/
|
|
21
19
|
function buildUsageComparator({
|
|
@@ -23,7 +21,6 @@ function buildUsageComparator({
|
|
|
23
21
|
ignoreEslintDisabledNodes,
|
|
24
22
|
sortingNodes,
|
|
25
23
|
sourceCode,
|
|
26
|
-
options,
|
|
27
24
|
}) {
|
|
28
25
|
let { updatedSortingNodeByNode, orderByUnsortedNode, orderBySortedNode } =
|
|
29
26
|
buildOrderByNodeMaps({
|
|
@@ -39,14 +36,9 @@ function buildUsageComparator({
|
|
|
39
36
|
let unsortedOrderA = orderByUnsortedNode.get(nodeA)
|
|
40
37
|
let sortedOrderB = orderBySortedNode.get(nodeB)
|
|
41
38
|
let unsortedOrderB = orderByUnsortedNode.get(nodeB)
|
|
42
|
-
let sortedOrderedValue =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
)
|
|
46
|
-
if (
|
|
47
|
-
sortedOrderedValue !==
|
|
48
|
-
computeOrderedValue(unsortedOrderA - unsortedOrderB, options.order)
|
|
49
|
-
) {
|
|
39
|
+
let sortedOrderedValue = sortedOrderA - sortedOrderB
|
|
40
|
+
let unsortedOrderedValue = unsortedOrderA - unsortedOrderB
|
|
41
|
+
if (Math.sign(sortedOrderedValue) !== Math.sign(unsortedOrderedValue)) {
|
|
50
42
|
return sortedOrderedValue
|
|
51
43
|
}
|
|
52
44
|
let aWithUpdatedDependencies = updatedSortingNodeByNode.get(nodeA)
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
} from '../utils/report-errors.js'
|
|
17
17
|
import {
|
|
18
18
|
partitionByCommentJsonSchema,
|
|
19
|
-
|
|
19
|
+
partitionByNewlineJsonSchema,
|
|
20
20
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
21
21
|
import { populateSortingNodeGroupsWithDependencies } from '../utils/populate-sorting-node-groups-with-dependencies.js'
|
|
22
22
|
import { validateNewlinesAndPartitionConfiguration } from '../utils/validate-newlines-and-partition-configuration.js'
|
|
@@ -106,7 +106,7 @@ var sort_modules_default = createEslintRule({
|
|
|
106
106
|
useExperimentalDependencyDetectionJsonSchema,
|
|
107
107
|
newlinesBetweenOverloadSignatures: newlinesBetweenJsonSchema,
|
|
108
108
|
partitionByComment: partitionByCommentJsonSchema,
|
|
109
|
-
partitionByNewLine:
|
|
109
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
110
110
|
},
|
|
111
111
|
additionalProperties: false,
|
|
112
112
|
type: 'object',
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../utils/report-errors.js'
|
|
13
13
|
import {
|
|
14
14
|
partitionByCommentJsonSchema,
|
|
15
|
-
|
|
15
|
+
partitionByNewlineJsonSchema,
|
|
16
16
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
17
17
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
18
18
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -48,7 +48,7 @@ var sort_named_exports_default = createEslintRule({
|
|
|
48
48
|
type: 'boolean',
|
|
49
49
|
},
|
|
50
50
|
partitionByComment: partitionByCommentJsonSchema,
|
|
51
|
-
partitionByNewLine:
|
|
51
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
52
52
|
},
|
|
53
53
|
additionalProperties: false,
|
|
54
54
|
type: 'object',
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../utils/report-errors.js'
|
|
13
13
|
import {
|
|
14
14
|
partitionByCommentJsonSchema,
|
|
15
|
-
|
|
15
|
+
partitionByNewlineJsonSchema,
|
|
16
16
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
17
17
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
18
18
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -48,7 +48,7 @@ var sort_named_imports_default = createEslintRule({
|
|
|
48
48
|
type: 'boolean',
|
|
49
49
|
},
|
|
50
50
|
partitionByComment: partitionByCommentJsonSchema,
|
|
51
|
-
partitionByNewLine:
|
|
51
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
52
52
|
},
|
|
53
53
|
additionalProperties: false,
|
|
54
54
|
type: 'object',
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../utils/report-errors.js'
|
|
13
13
|
import {
|
|
14
14
|
partitionByCommentJsonSchema,
|
|
15
|
-
|
|
15
|
+
partitionByNewlineJsonSchema,
|
|
16
16
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
17
17
|
import { computeParentNodesWithTypes } from '../utils/compute-parent-nodes-with-types.js'
|
|
18
18
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
@@ -73,7 +73,7 @@ var jsonSchema = {
|
|
|
73
73
|
},
|
|
74
74
|
}),
|
|
75
75
|
partitionByComment: partitionByCommentJsonSchema,
|
|
76
|
-
partitionByNewLine:
|
|
76
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
77
77
|
},
|
|
78
78
|
additionalProperties: false,
|
|
79
79
|
type: 'object',
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from '../utils/report-errors.js'
|
|
15
15
|
import {
|
|
16
16
|
partitionByCommentJsonSchema,
|
|
17
|
-
|
|
17
|
+
partitionByNewlineJsonSchema,
|
|
18
18
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
19
19
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
20
20
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -74,7 +74,7 @@ var sort_objects_default = createEslintRule({
|
|
|
74
74
|
useExperimentalDependencyDetection:
|
|
75
75
|
useExperimentalDependencyDetectionJsonSchema,
|
|
76
76
|
partitionByComment: partitionByCommentJsonSchema,
|
|
77
|
-
partitionByNewLine:
|
|
77
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
78
78
|
},
|
|
79
79
|
additionalProperties: false,
|
|
80
80
|
type: 'object',
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from '../utils/report-errors.js'
|
|
13
13
|
import {
|
|
14
14
|
partitionByCommentJsonSchema,
|
|
15
|
-
|
|
15
|
+
partitionByNewlineJsonSchema,
|
|
16
16
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
17
17
|
import { buildAstListeners } from '../utils/build-ast-listeners.js'
|
|
18
18
|
import { createEslintRule } from '../utils/create-eslint-rule.js'
|
|
@@ -57,7 +57,7 @@ var jsonSchema = {
|
|
|
57
57
|
},
|
|
58
58
|
}),
|
|
59
59
|
partitionByComment: partitionByCommentJsonSchema,
|
|
60
|
-
partitionByNewLine:
|
|
60
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
61
61
|
},
|
|
62
62
|
additionalProperties: false,
|
|
63
63
|
type: 'object',
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
} from '../utils/report-errors.js'
|
|
23
23
|
import {
|
|
24
24
|
partitionByCommentJsonSchema,
|
|
25
|
-
|
|
25
|
+
partitionByNewlineJsonSchema,
|
|
26
26
|
} from '../utils/json-schemas/common-partition-json-schemas.js'
|
|
27
27
|
import {
|
|
28
28
|
defaultOptions,
|
|
@@ -49,7 +49,7 @@ var sort_variable_declarations_default = createEslintRule({
|
|
|
49
49
|
useExperimentalDependencyDetection:
|
|
50
50
|
useExperimentalDependencyDetectionJsonSchema,
|
|
51
51
|
partitionByComment: partitionByCommentJsonSchema,
|
|
52
|
-
partitionByNewLine:
|
|
52
|
+
partitionByNewLine: partitionByNewlineJsonSchema,
|
|
53
53
|
},
|
|
54
54
|
additionalProperties: false,
|
|
55
55
|
type: 'object',
|
|
@@ -8,4 +8,4 @@ export declare let partitionByCommentJsonSchema: JSONSchema4
|
|
|
8
8
|
* JSON schema for the partition by new line option. Controls whether to create
|
|
9
9
|
* separate partitions when newlines are encountered.
|
|
10
10
|
*/
|
|
11
|
-
export declare let
|
|
11
|
+
export declare let partitionByNewlineJsonSchema: JSONSchema4
|
|
@@ -33,9 +33,9 @@ var partitionByCommentJsonSchema = {
|
|
|
33
33
|
* JSON schema for the partition by new line option. Controls whether to create
|
|
34
34
|
* separate partitions when newlines are encountered.
|
|
35
35
|
*/
|
|
36
|
-
var
|
|
36
|
+
var partitionByNewlineJsonSchema = {
|
|
37
37
|
description:
|
|
38
38
|
'Enables the use of newlines to separate the nodes into logical groups.',
|
|
39
39
|
type: 'boolean',
|
|
40
40
|
}
|
|
41
|
-
export { partitionByCommentJsonSchema,
|
|
41
|
+
export { partitionByCommentJsonSchema, partitionByNewlineJsonSchema }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-perfectionist",
|
|
3
|
-
"version": "5.9.
|
|
3
|
+
"version": "5.9.1",
|
|
4
4
|
"description": "ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"eslint",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"./dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@typescript-eslint/utils": "^8.
|
|
32
|
+
"@typescript-eslint/utils": "^8.61.0",
|
|
33
33
|
"natural-orderby": "^5.0.0"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
package/readme.md
CHANGED