@itcase/lint 1.1.37 → 1.1.39
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 +21 -14
- package/eslint/perfectionist/sort/props.js +9 -0
- package/eslint/perfectionist/sortExports.js +18 -0
- package/eslint/perfectionist/sortNamedExports.js +19 -0
- package/package.json +10 -10
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'
|
|
@@ -9,32 +9,39 @@ const customGroups = {
|
|
|
9
9
|
fill: '^fill.*',
|
|
10
10
|
fillHover: '^fillHover.*',
|
|
11
11
|
fillActive: '^fillActive.*',
|
|
12
|
+
fillActiveHover: '^fillActiveHover.*',
|
|
12
13
|
fillDisabled: '^fillDisabled.*',
|
|
13
14
|
textColor: '^TextColor.*',
|
|
14
15
|
textColorHover: '^TextColorHover.*',
|
|
15
16
|
textColorActive: '^TextColorActive.*',
|
|
17
|
+
textColorActiveHover: '^TextColorActiveHover.*',
|
|
16
18
|
textColorDisabled: '^TextColorDisabled.*',
|
|
17
19
|
border: '^border.*',
|
|
20
|
+
borderColor: '^BorderColor.*',
|
|
21
|
+
borderColorHover: '^BorderColorHover.*',
|
|
22
|
+
borderColorActive: '^BorderColorActive.*',
|
|
23
|
+
borderColorActiveHover: '^BorderColorActive.*',
|
|
24
|
+
borderColorDisabled: '^BorderColorDisabled.*',
|
|
18
25
|
shadow: '^shadow.*',
|
|
19
26
|
template: '^template.*',
|
|
20
27
|
path: '^path.*',
|
|
21
28
|
font: '^font.*',
|
|
22
29
|
text: '^text.*',
|
|
23
30
|
|
|
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: '
|
|
31
|
+
hasAccent: '^.(?!is|on)*(A|a)ccent.*',
|
|
32
|
+
hasPrimary: '^.(?!is|on)*(P|p)rimary.*',
|
|
33
|
+
hasSecondary: '^(?!is|on).*(S|s)econdary.*',
|
|
34
|
+
hasTertiary: '^(?!is|on).*(T|t)ertiary.*',
|
|
35
|
+
hasQuaternary: '^(?!is|on).*(Q|q)uaternary.*',
|
|
36
|
+
hasSurface: '^(?!is|on).*(S|s)urface.*',
|
|
37
|
+
hasDefault: '^(?!is|on).*(A|a)ccent.*',
|
|
38
|
+
hasError: '^(?!is|on)(?!on).*(E|e)rror.*',
|
|
39
|
+
hasWarning: '^(?!is|on).*(W|w)arning.*',
|
|
40
|
+
hasRequire: '^(?!is|on).*(T|t)ertiary.*',
|
|
41
|
+
hasSuccess: '^(?!is|on)(?!on).*(S|s)uccess.*',
|
|
42
|
+
hasDanger: '^(?!is|on).*(D|d)anger.*',
|
|
43
|
+
hasInfo: '^(?!is|on).*(I|i)nfo.*',
|
|
44
|
+
hasDisabled: '^(?!is|on).*(D|d)isabled.*',
|
|
38
45
|
|
|
39
46
|
hasAccentMuted: '^.*AccentMuted.*',
|
|
40
47
|
hasPrimaryMuted: '^.*PrimaryMuted.*',
|
|
@@ -50,11 +50,19 @@ const props = [
|
|
|
50
50
|
'fill',
|
|
51
51
|
'fillHover',
|
|
52
52
|
'fillActive',
|
|
53
|
+
'fillActiveHover',
|
|
53
54
|
'fillDisabled',
|
|
54
55
|
'textColor',
|
|
55
56
|
'textColorHover',
|
|
56
57
|
'textColorActive',
|
|
58
|
+
'textColorActiveHover',
|
|
57
59
|
'textColorDisabled',
|
|
60
|
+
'border',
|
|
61
|
+
'borderColor',
|
|
62
|
+
'borderColorHover',
|
|
63
|
+
'borderColorActive',
|
|
64
|
+
'borderColorActiveHover',
|
|
65
|
+
'borderColorDisabled',
|
|
58
66
|
|
|
59
67
|
'circular',
|
|
60
68
|
'rounded',
|
|
@@ -292,6 +300,7 @@ const props = [
|
|
|
292
300
|
'email',
|
|
293
301
|
'phone',
|
|
294
302
|
'component',
|
|
303
|
+
'tags',
|
|
295
304
|
'args',
|
|
296
305
|
'globals',
|
|
297
306
|
'loaders',
|
|
@@ -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.39",
|
|
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.
|
|
42
|
-
"@ianvs/prettier-plugin-sort-imports": "^4.6.
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
44
|
-
"@typescript-eslint/parser": "^8.
|
|
45
|
-
"eslint": "^9.
|
|
40
|
+
"@eslint/js": "^9.34.0",
|
|
41
|
+
"@eslint/markdown": "^7.2.0",
|
|
42
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.6.3",
|
|
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",
|