@itcase/lint 1.1.37 → 1.1.38
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 +5 -9
- package/eslint/perfectionist/index.js +2 -0
- package/eslint/perfectionist/sort/customGroup.js +14 -14
- package/eslint/perfectionist/sort/props.js +1 -0
- package/eslint/perfectionist/sortExports.js +18 -0
- package/eslint/perfectionist/sortNamedExports.js +19 -0
- package/package.json +9 -9
package/eslint/index.js
CHANGED
|
@@ -13,10 +13,12 @@ import eslintTypeScript from 'typescript-eslint'
|
|
|
13
13
|
|
|
14
14
|
import {
|
|
15
15
|
sortEnums,
|
|
16
|
+
sortExports,
|
|
16
17
|
sortInterfaces,
|
|
17
18
|
sortIntersectionTypes,
|
|
18
19
|
sortJSXProps,
|
|
19
20
|
sortMaps,
|
|
21
|
+
sortNamedExports,
|
|
20
22
|
sortObjects,
|
|
21
23
|
sortObjectTypes,
|
|
22
24
|
sortUnionTypes,
|
|
@@ -87,23 +89,17 @@ const eslintConfig = [
|
|
|
87
89
|
// shorthand for methods and properties of objects
|
|
88
90
|
'object-shorthand': ['warn', 'consistent'],
|
|
89
91
|
|
|
90
|
-
//
|
|
92
|
+
// Perfectionist
|
|
91
93
|
'perfectionist/sort-classes': 'off',
|
|
92
|
-
// Enum
|
|
93
94
|
'perfectionist/sort-enums': sortEnums,
|
|
94
|
-
// Interfaces
|
|
95
95
|
'perfectionist/sort-interfaces': sortInterfaces,
|
|
96
|
-
// Intersection types
|
|
97
96
|
'perfectionist/sort-intersection-types': sortIntersectionTypes,
|
|
98
|
-
// JSX props
|
|
99
97
|
'perfectionist/sort-jsx-props': sortJSXProps,
|
|
100
|
-
// Maps
|
|
101
98
|
'perfectionist/sort-maps': sortMaps,
|
|
102
|
-
|
|
99
|
+
'perfectionist/sort-named-exports': sortNamedExports,
|
|
100
|
+
'perfectionist/sort-exports': sortExports,
|
|
103
101
|
'perfectionist/sort-objects': sortObjects,
|
|
104
|
-
// Objects-types
|
|
105
102
|
'perfectionist/sort-object-types': sortObjectTypes,
|
|
106
|
-
// Union types
|
|
107
103
|
'perfectionist/sort-union-types': sortUnionTypes,
|
|
108
104
|
},
|
|
109
105
|
},
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export { sortClasses } from './sortClasses.js'
|
|
2
2
|
export { sortEnums } from './sortEnums.js'
|
|
3
|
+
export { sortExports } from './sortExports.js'
|
|
4
|
+
export { sortNamedExports } from './sortNamedExports.js'
|
|
3
5
|
export { sortInterfaces } from './sortInterfaces.js'
|
|
4
6
|
export { sortIntersectionTypes } from './sortIntersectionTypes.js'
|
|
5
7
|
export { sortJSXProps } from './sortJSXProps.js'
|
|
@@ -21,20 +21,20 @@ const customGroups = {
|
|
|
21
21
|
font: '^font.*',
|
|
22
22
|
text: '^text.*',
|
|
23
23
|
|
|
24
|
-
hasAccent: '
|
|
25
|
-
hasPrimary: '
|
|
26
|
-
hasSecondary: '
|
|
27
|
-
hasTertiary: '
|
|
28
|
-
hasQuaternary: '
|
|
29
|
-
hasSurface: '
|
|
30
|
-
hasDefault: '
|
|
31
|
-
hasError: '^(?!on).*(E|e)rror.*',
|
|
32
|
-
hasWarning: '
|
|
33
|
-
hasRequire: '
|
|
34
|
-
hasSuccess: '^(?!on).*(S|s)uccess.*',
|
|
35
|
-
hasDanger: '
|
|
36
|
-
hasInfo: '
|
|
37
|
-
hasDisabled: '
|
|
24
|
+
hasAccent: '^.(?!is|on)*(A|a)ccent.*',
|
|
25
|
+
hasPrimary: '^.(?!is|on)*(P|p)rimary.*',
|
|
26
|
+
hasSecondary: '^(?!is|on).*(S|s)econdary.*',
|
|
27
|
+
hasTertiary: '^(?!is|on).*(T|t)ertiary.*',
|
|
28
|
+
hasQuaternary: '^(?!is|on).*(Q|q)uaternary.*',
|
|
29
|
+
hasSurface: '^(?!is|on).*(S|s)urface.*',
|
|
30
|
+
hasDefault: '^(?!is|on).*(A|a)ccent.*',
|
|
31
|
+
hasError: '^(?!is|on)(?!on).*(E|e)rror.*',
|
|
32
|
+
hasWarning: '^(?!is|on).*(W|w)arning.*',
|
|
33
|
+
hasRequire: '^(?!is|on).*(T|t)ertiary.*',
|
|
34
|
+
hasSuccess: '^(?!is|on)(?!on).*(S|s)uccess.*',
|
|
35
|
+
hasDanger: '^(?!is|on).*(D|d)anger.*',
|
|
36
|
+
hasInfo: '^(?!is|on).*(I|i)nfo.*',
|
|
37
|
+
hasDisabled: '^(?!is|on).*(D|d)isabled.*',
|
|
38
38
|
|
|
39
39
|
hasAccentMuted: '^.*AccentMuted.*',
|
|
40
40
|
hasPrimaryMuted: '^.*PrimaryMuted.*',
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const sortExports = [
|
|
2
|
+
'error',
|
|
3
|
+
{
|
|
4
|
+
type: 'alphabetical',
|
|
5
|
+
order: 'asc',
|
|
6
|
+
fallbackSort: { type: 'unsorted' },
|
|
7
|
+
ignoreCase: true,
|
|
8
|
+
specialCharacters: 'keep',
|
|
9
|
+
partitionByComment: false,
|
|
10
|
+
partitionByNewLine: false,
|
|
11
|
+
newlinesBetween: 'ignore',
|
|
12
|
+
groupKind: 'mixed',
|
|
13
|
+
groups: [],
|
|
14
|
+
customGroups: [],
|
|
15
|
+
},
|
|
16
|
+
]
|
|
17
|
+
|
|
18
|
+
export { sortExports }
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const sortNamedExports = [
|
|
2
|
+
'error',
|
|
3
|
+
{
|
|
4
|
+
type: 'alphabetical',
|
|
5
|
+
order: 'asc',
|
|
6
|
+
fallbackSort: { type: 'unsorted' },
|
|
7
|
+
ignoreAlias: false,
|
|
8
|
+
ignoreCase: true,
|
|
9
|
+
specialCharacters: 'keep',
|
|
10
|
+
groupKind: 'mixed',
|
|
11
|
+
partitionByNewLine: false,
|
|
12
|
+
partitionByComment: false,
|
|
13
|
+
newlinesBetween: 'ignore',
|
|
14
|
+
groups: [],
|
|
15
|
+
customGroups: [],
|
|
16
|
+
},
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
export { sortNamedExports }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/lint",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.38",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Code style linter configuration presets",
|
|
6
6
|
"engines": {
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
"@babel/eslint-parser": "^7.28.0",
|
|
38
38
|
"@babel/eslint-plugin": "^7.27.1",
|
|
39
39
|
"@eslint/compat": "^1.3.2",
|
|
40
|
-
"@eslint/js": "^9.
|
|
41
|
-
"@eslint/markdown": "^7.
|
|
40
|
+
"@eslint/js": "^9.34.0",
|
|
41
|
+
"@eslint/markdown": "^7.2.0",
|
|
42
42
|
"@ianvs/prettier-plugin-sort-imports": "^4.6.2",
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
44
|
-
"@typescript-eslint/parser": "^8.
|
|
45
|
-
"eslint": "^9.
|
|
43
|
+
"@typescript-eslint/eslint-plugin": "^8.41.0",
|
|
44
|
+
"@typescript-eslint/parser": "^8.41.0",
|
|
45
|
+
"eslint": "^9.34.0",
|
|
46
46
|
"eslint-import-resolver-alias": "^1.1.2",
|
|
47
47
|
"eslint-plugin-import": "^2.32.0",
|
|
48
48
|
"eslint-config-prettier": "^10.1.8",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
59
59
|
"eslint-plugin-react-native": "^5.0.0",
|
|
60
60
|
"eslint-plugin-react-refresh": "^0.4.20",
|
|
61
|
-
"eslint-plugin-storybook": "^9.1.
|
|
61
|
+
"eslint-plugin-storybook": "^9.1.3",
|
|
62
62
|
"expo-modules-autolinking": "^2.1.14",
|
|
63
63
|
"globals": "^16.3.0",
|
|
64
64
|
"prettier": "^3.6.2",
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"stylelint-no-unsupported-browser-features": "^8.0.4",
|
|
67
67
|
"stylelint-order": "^7.0.0",
|
|
68
68
|
"stylelint-prettier": "^5.0.3",
|
|
69
|
-
"typescript-eslint": "^8.
|
|
69
|
+
"typescript-eslint": "^8.41.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@commitlint/cli": "^19.8.1",
|
|
73
73
|
"@commitlint/config-conventional": "^19.8.1",
|
|
74
|
-
"@itcase/config": "^1.0.
|
|
74
|
+
"@itcase/config": "^1.0.56",
|
|
75
75
|
"@semantic-release/changelog": "^6.0.3",
|
|
76
76
|
"@semantic-release/git": "^10.0.1",
|
|
77
77
|
"@semantic-release/release-notes-generator": "14.0.3",
|