@itcase/lint 1.1.75 → 1.1.78
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/eslint/customPlugins/dataTestIdPlugin/constants.d.ts +33 -0
- package/dist/eslint/customPlugins/dataTestIdPlugin/example.d.ts +1 -0
- package/dist/eslint/customPlugins/dataTestIdPlugin/extra.d.ts +12 -0
- package/dist/eslint/customPlugins/dataTestIdPlugin/plugin.d.ts +40 -0
- package/dist/eslint/customPlugins/dataTestIdPlugin/rule.d.ts +5 -0
- package/dist/eslint/customPlugins/dataTestIdPlugin/rule.test.d.ts +1 -0
- package/dist/eslint/customPlugins/dataTestIdPlugin/ruleVisitors.d.ts +3 -0
- package/dist/eslint/customPlugins/dataTestIdPlugin/utils.d.ts +18 -0
- package/dist/eslint/index.d.ts +2 -0
- package/dist/eslint/mobx/index.d.ts +16 -0
- package/dist/eslint/mobx.js +20 -0
- package/dist/eslint/perfectionist/index.d.ts +11 -0
- package/dist/eslint/perfectionist/sort/customGroup.d.ts +105 -0
- package/dist/eslint/perfectionist/sort/props.d.ts +2 -0
- package/dist/eslint/perfectionist/sortClasses.d.ts +10 -0
- package/dist/eslint/perfectionist/sortEnums.d.ts +5 -0
- package/dist/eslint/perfectionist/sortExports.d.ts +15 -0
- package/dist/eslint/perfectionist/sortInterfaces.d.ts +10 -0
- package/dist/eslint/perfectionist/sortIntersectionTypes.d.ts +5 -0
- package/dist/eslint/perfectionist/sortJSXProps.d.ts +10 -0
- package/dist/eslint/perfectionist/sortMaps.d.ts +5 -0
- package/dist/eslint/perfectionist/sortNamedExports.d.ts +16 -0
- package/dist/eslint/perfectionist/sortObjectTypes.d.ts +10 -0
- package/dist/eslint/perfectionist/sortObjects.d.ts +23 -0
- package/dist/eslint/perfectionist/sortUnionTypes.d.ts +6 -0
- package/dist/eslint/perfectionist.js +30 -0
- package/dist/eslint/react-native.js +22 -0
- package/dist/eslint/storybook/index.d.ts +408 -0
- package/dist/eslint/storybook.js +10 -0
- package/dist/eslint/utils.d.ts +3 -0
- package/dist/eslint.js +342 -0
- package/dist/prettier/index.d.ts +15 -0
- package/dist/prettier/react-native/index.d.ts +9 -0
- package/dist/prettier/react-native.js +68 -0
- package/dist/prettier.js +34 -0
- package/dist/sortUnionTypes_rTLrktP3.js +619 -0
- package/dist/stylelint/index.d.ts +85 -0
- package/dist/stylelint.js +249 -0
- package/package.json +40 -14
- package/eslint/index.js +0 -108
- package/eslint/mobx/index.js +0 -18
- package/eslint/perfectionist/index.js +0 -11
- package/eslint/perfectionist/sort/customGroup.js +0 -118
- package/eslint/perfectionist/sort/props.js +0 -355
- package/eslint/perfectionist/sortClasses.js +0 -28
- package/eslint/perfectionist/sortEnums.js +0 -3
- package/eslint/perfectionist/sortExports.js +0 -17
- package/eslint/perfectionist/sortInterfaces.js +0 -38
- package/eslint/perfectionist/sortIntersectionTypes.js +0 -3
- package/eslint/perfectionist/sortJSXProps.js +0 -30
- package/eslint/perfectionist/sortMaps.js +0 -3
- package/eslint/perfectionist/sortNamedExports.js +0 -18
- package/eslint/perfectionist/sortObjectTypes.js +0 -32
- package/eslint/perfectionist/sortObjects.js +0 -44
- package/eslint/perfectionist/sortUnionTypes.js +0 -22
- package/eslint/react-native/index.js +0 -20
- package/eslint/storybook/index.js +0 -8
- package/eslint/utils.js +0 -25
- package/prettier/index.js +0 -32
- package/prettier/react-native/index.js +0 -66
- package/stylelint/index.js +0 -248
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
const props = [
|
|
2
|
-
'id',
|
|
3
|
-
'appearance',
|
|
4
|
-
'className',
|
|
5
|
-
'dataTestId',
|
|
6
|
-
'dataTour',
|
|
7
|
-
'key',
|
|
8
|
-
'type',
|
|
9
|
-
'name',
|
|
10
|
-
'ref',
|
|
11
|
-
|
|
12
|
-
'PageLayout',
|
|
13
|
-
|
|
14
|
-
// Size and positioning
|
|
15
|
-
'width',
|
|
16
|
-
'height',
|
|
17
|
-
'widthMobile',
|
|
18
|
-
'heightMobile',
|
|
19
|
-
'widthTablet',
|
|
20
|
-
'heightTablet',
|
|
21
|
-
'widthDesktop',
|
|
22
|
-
'heightDesktop',
|
|
23
|
-
'minWidth',
|
|
24
|
-
'maxWidth',
|
|
25
|
-
'minHeight',
|
|
26
|
-
'maxHeight',
|
|
27
|
-
'direction',
|
|
28
|
-
'flex',
|
|
29
|
-
'justify',
|
|
30
|
-
'align',
|
|
31
|
-
|
|
32
|
-
'min',
|
|
33
|
-
'max',
|
|
34
|
-
|
|
35
|
-
'size',
|
|
36
|
-
'sizeXXL',
|
|
37
|
-
'sizeXL',
|
|
38
|
-
'sizeL',
|
|
39
|
-
'sizeM',
|
|
40
|
-
'sizeS',
|
|
41
|
-
'sizeXS',
|
|
42
|
-
'sizeXXS',
|
|
43
|
-
|
|
44
|
-
'xxl',
|
|
45
|
-
'xl',
|
|
46
|
-
'l',
|
|
47
|
-
'm',
|
|
48
|
-
's',
|
|
49
|
-
'xs',
|
|
50
|
-
'xxs',
|
|
51
|
-
|
|
52
|
-
'fill',
|
|
53
|
-
'fillHover',
|
|
54
|
-
'fillActive',
|
|
55
|
-
'fillActiveHover',
|
|
56
|
-
'fillDisabled',
|
|
57
|
-
|
|
58
|
-
'textColor',
|
|
59
|
-
'textColorHover',
|
|
60
|
-
'textColorActive',
|
|
61
|
-
'textColorActiveHover',
|
|
62
|
-
'textColorDisabled',
|
|
63
|
-
|
|
64
|
-
'circular',
|
|
65
|
-
'rounded',
|
|
66
|
-
'roundedXXL',
|
|
67
|
-
'roundedXL',
|
|
68
|
-
'roundedL',
|
|
69
|
-
'roundedM',
|
|
70
|
-
'roundedS',
|
|
71
|
-
'roundedXS',
|
|
72
|
-
'roundedXXS',
|
|
73
|
-
|
|
74
|
-
'position',
|
|
75
|
-
'top',
|
|
76
|
-
'right',
|
|
77
|
-
'bottom',
|
|
78
|
-
'left',
|
|
79
|
-
'zIndex',
|
|
80
|
-
'aspectRatio',
|
|
81
|
-
|
|
82
|
-
'initial',
|
|
83
|
-
'isMobile',
|
|
84
|
-
'isTablet',
|
|
85
|
-
'isDesktop',
|
|
86
|
-
|
|
87
|
-
'config',
|
|
88
|
-
'validationSchema',
|
|
89
|
-
|
|
90
|
-
'dir',
|
|
91
|
-
'src',
|
|
92
|
-
'path',
|
|
93
|
-
'dest',
|
|
94
|
-
'destination',
|
|
95
|
-
'template',
|
|
96
|
-
|
|
97
|
-
'findIn',
|
|
98
|
-
'findBy',
|
|
99
|
-
|
|
100
|
-
'title',
|
|
101
|
-
'headTitle',
|
|
102
|
-
'headerTitle',
|
|
103
|
-
'subtitle',
|
|
104
|
-
'label',
|
|
105
|
-
'message',
|
|
106
|
-
'desc',
|
|
107
|
-
'description',
|
|
108
|
-
'prompts',
|
|
109
|
-
|
|
110
|
-
'actions',
|
|
111
|
-
'status',
|
|
112
|
-
|
|
113
|
-
'border',
|
|
114
|
-
'borderColor',
|
|
115
|
-
'borderColorHover',
|
|
116
|
-
'borderColorActive',
|
|
117
|
-
'borderColorActiveHover',
|
|
118
|
-
'borderColorDisabled',
|
|
119
|
-
|
|
120
|
-
// Appearance
|
|
121
|
-
'hasPrimaryAppearance',
|
|
122
|
-
'hasSecondaryAppearance',
|
|
123
|
-
'hasTertiaryAppearance',
|
|
124
|
-
'hasQuaternaryAppearance',
|
|
125
|
-
'hasMutedPrimaryAppearance',
|
|
126
|
-
'hasMutedSecondaryAppearance',
|
|
127
|
-
'hasMutedTertiaryAppearance',
|
|
128
|
-
'hasMutedQuaternaryAppearance',
|
|
129
|
-
|
|
130
|
-
// Colors
|
|
131
|
-
'hasAccent',
|
|
132
|
-
'hasPrimary',
|
|
133
|
-
'hasSecondary',
|
|
134
|
-
'hasTertiary',
|
|
135
|
-
'hasQuaternary',
|
|
136
|
-
'hasSurface',
|
|
137
|
-
'hasError',
|
|
138
|
-
'error',
|
|
139
|
-
'errorAccessDenied',
|
|
140
|
-
'errorNetwork',
|
|
141
|
-
'hasWarning',
|
|
142
|
-
|
|
143
|
-
'hasDefault',
|
|
144
|
-
|
|
145
|
-
'hasRequire',
|
|
146
|
-
'hasSuccess',
|
|
147
|
-
'successCreate',
|
|
148
|
-
'successUpdate',
|
|
149
|
-
'hasDanger',
|
|
150
|
-
'hasInfo',
|
|
151
|
-
'hasDisabled',
|
|
152
|
-
|
|
153
|
-
'hasAccentMuted',
|
|
154
|
-
'hasPrimaryMuted',
|
|
155
|
-
'hasSecondaryMuted',
|
|
156
|
-
'hasTertiaryMuted',
|
|
157
|
-
'hasQuaternaryMuted',
|
|
158
|
-
'hasSurfaceMuted',
|
|
159
|
-
'hasErrorMuted',
|
|
160
|
-
'hasWarningMuted',
|
|
161
|
-
'hasSuccessMuted',
|
|
162
|
-
'hasDangerMuted',
|
|
163
|
-
'hasInfoMuted',
|
|
164
|
-
'hasDisabledMuted',
|
|
165
|
-
|
|
166
|
-
'hasValidation',
|
|
167
|
-
'hasFilled',
|
|
168
|
-
'hasLoading',
|
|
169
|
-
'hasServerError',
|
|
170
|
-
'hasServerErrorData',
|
|
171
|
-
'hasInitialValues',
|
|
172
|
-
|
|
173
|
-
// State
|
|
174
|
-
'custom',
|
|
175
|
-
'fail',
|
|
176
|
-
'nothingFound',
|
|
177
|
-
'unableLoadData',
|
|
178
|
-
'refresh',
|
|
179
|
-
'confirm',
|
|
180
|
-
|
|
181
|
-
'url',
|
|
182
|
-
'method',
|
|
183
|
-
'data',
|
|
184
|
-
'signal',
|
|
185
|
-
'timeout',
|
|
186
|
-
'username',
|
|
187
|
-
'password',
|
|
188
|
-
'credentials',
|
|
189
|
-
'params',
|
|
190
|
-
'code',
|
|
191
|
-
'errors',
|
|
192
|
-
|
|
193
|
-
// Indents and margins
|
|
194
|
-
'margin',
|
|
195
|
-
'marginMobile',
|
|
196
|
-
'marginTablet',
|
|
197
|
-
'marginDesktop',
|
|
198
|
-
'marginVertical',
|
|
199
|
-
'marginHorizontal',
|
|
200
|
-
'marginVerticalMobile',
|
|
201
|
-
'marginHorizontalMobile',
|
|
202
|
-
'marginVerticalTablet',
|
|
203
|
-
'marginHorizontalTablet',
|
|
204
|
-
'marginVerticalDesktop',
|
|
205
|
-
'marginHorizontalDesktop',
|
|
206
|
-
'marginTop',
|
|
207
|
-
'marginRight',
|
|
208
|
-
'marginBottom',
|
|
209
|
-
'marginLeft',
|
|
210
|
-
'marginTopMobile',
|
|
211
|
-
'marginRightMobile',
|
|
212
|
-
'marginBottomMobile',
|
|
213
|
-
'marginLeftMobile',
|
|
214
|
-
'marginTopTablet',
|
|
215
|
-
'marginRightTablet',
|
|
216
|
-
'marginBottomTablet',
|
|
217
|
-
'marginLeftTablet',
|
|
218
|
-
'marginTopDesktop',
|
|
219
|
-
'marginRightDesktop',
|
|
220
|
-
'marginBottomDesktop',
|
|
221
|
-
'marginLeftDesktop',
|
|
222
|
-
'padding',
|
|
223
|
-
'paddingMobile',
|
|
224
|
-
'paddingTablet',
|
|
225
|
-
'paddingDesktop',
|
|
226
|
-
'paddingVertical',
|
|
227
|
-
'paddingHorizontal',
|
|
228
|
-
'paddingVerticalMobile',
|
|
229
|
-
'paddingHorizontalMobile',
|
|
230
|
-
'paddingVerticalTablet',
|
|
231
|
-
'paddingHorizontalTablet',
|
|
232
|
-
'paddingVerticalDesktop',
|
|
233
|
-
'paddingHorizontalDesktop',
|
|
234
|
-
'paddingTop',
|
|
235
|
-
'paddingRight',
|
|
236
|
-
'paddingBottom',
|
|
237
|
-
'paddingLeft',
|
|
238
|
-
'paddingTopMobile',
|
|
239
|
-
'paddingRightMobile',
|
|
240
|
-
'paddingBottomMobile',
|
|
241
|
-
'paddingLeftMobile',
|
|
242
|
-
'paddingTopTablet',
|
|
243
|
-
'paddingRightTablet',
|
|
244
|
-
'paddingBottomTablet',
|
|
245
|
-
'paddingLeftTablet',
|
|
246
|
-
'paddingTopDesktop',
|
|
247
|
-
'paddingRightDesktop',
|
|
248
|
-
'paddingBottomDesktop',
|
|
249
|
-
'paddingLeftDesktop',
|
|
250
|
-
'gap',
|
|
251
|
-
'gapMobile',
|
|
252
|
-
'gapTablet',
|
|
253
|
-
'gapDesktop',
|
|
254
|
-
|
|
255
|
-
'buttonGap',
|
|
256
|
-
|
|
257
|
-
'columns',
|
|
258
|
-
'columnsMobile',
|
|
259
|
-
'columnsTablet',
|
|
260
|
-
'columnsDesktop',
|
|
261
|
-
|
|
262
|
-
'shadow',
|
|
263
|
-
'elevation',
|
|
264
|
-
|
|
265
|
-
// Color and background
|
|
266
|
-
'backgroundColor',
|
|
267
|
-
'opacity',
|
|
268
|
-
|
|
269
|
-
// Fonts and text
|
|
270
|
-
'color',
|
|
271
|
-
'font',
|
|
272
|
-
'lineHeight',
|
|
273
|
-
'letterSpacing',
|
|
274
|
-
'text',
|
|
275
|
-
'includeFontPadding',
|
|
276
|
-
'writingDirection',
|
|
277
|
-
|
|
278
|
-
// Style
|
|
279
|
-
'solid',
|
|
280
|
-
'outlined',
|
|
281
|
-
'full',
|
|
282
|
-
'ghost',
|
|
283
|
-
|
|
284
|
-
'hasHighest',
|
|
285
|
-
'hasHigh',
|
|
286
|
-
'hasMedium',
|
|
287
|
-
'hasLow',
|
|
288
|
-
'hasLowest',
|
|
289
|
-
|
|
290
|
-
// Other
|
|
291
|
-
'overflow',
|
|
292
|
-
'display',
|
|
293
|
-
'resizeMode',
|
|
294
|
-
'backfaceVisibility',
|
|
295
|
-
'tintColor',
|
|
296
|
-
'overlayColor',
|
|
297
|
-
'end',
|
|
298
|
-
'start',
|
|
299
|
-
'transform',
|
|
300
|
-
'transformOrigin',
|
|
301
|
-
'translateX',
|
|
302
|
-
'translateY',
|
|
303
|
-
'scale',
|
|
304
|
-
'rotate',
|
|
305
|
-
'rotateX',
|
|
306
|
-
'rotateY',
|
|
307
|
-
'perspective',
|
|
308
|
-
'cursor',
|
|
309
|
-
'firstName',
|
|
310
|
-
'secondName',
|
|
311
|
-
'lastName',
|
|
312
|
-
'email',
|
|
313
|
-
'phone',
|
|
314
|
-
'component',
|
|
315
|
-
'args',
|
|
316
|
-
'globals',
|
|
317
|
-
'loaders',
|
|
318
|
-
'parameters',
|
|
319
|
-
'page',
|
|
320
|
-
'layout',
|
|
321
|
-
'sourceLink',
|
|
322
|
-
'tags',
|
|
323
|
-
'render',
|
|
324
|
-
'device',
|
|
325
|
-
'design',
|
|
326
|
-
'unknown',
|
|
327
|
-
'before',
|
|
328
|
-
'after',
|
|
329
|
-
'open',
|
|
330
|
-
'close',
|
|
331
|
-
'isActive',
|
|
332
|
-
'isChecked',
|
|
333
|
-
'isDisabled',
|
|
334
|
-
'isError',
|
|
335
|
-
'isSkeleton',
|
|
336
|
-
'hasIs',
|
|
337
|
-
'hasSet',
|
|
338
|
-
'hasGet',
|
|
339
|
-
'use',
|
|
340
|
-
'onClick',
|
|
341
|
-
'onError',
|
|
342
|
-
'onSuccess',
|
|
343
|
-
'on',
|
|
344
|
-
'children',
|
|
345
|
-
|
|
346
|
-
// Mock
|
|
347
|
-
'DefaultMock',
|
|
348
|
-
'LoadingMock',
|
|
349
|
-
'ErrorMock',
|
|
350
|
-
'ErrorNetwork',
|
|
351
|
-
'ErrorAccessDeniedMock',
|
|
352
|
-
'SuccessMock',
|
|
353
|
-
]
|
|
354
|
-
|
|
355
|
-
export { props }
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const sortClasses = [
|
|
2
|
-
'error',
|
|
3
|
-
{
|
|
4
|
-
type: 'natural',
|
|
5
|
-
order: 'asc',
|
|
6
|
-
groups: [
|
|
7
|
-
'top',
|
|
8
|
-
'index-signature',
|
|
9
|
-
'static-property',
|
|
10
|
-
'private-property',
|
|
11
|
-
'property',
|
|
12
|
-
'constructor',
|
|
13
|
-
'static-method',
|
|
14
|
-
'private-method',
|
|
15
|
-
'get-method',
|
|
16
|
-
'set-method',
|
|
17
|
-
'method',
|
|
18
|
-
],
|
|
19
|
-
customGroups: [
|
|
20
|
-
{
|
|
21
|
-
groupName: 'top',
|
|
22
|
-
elementNamePattern: 'id',
|
|
23
|
-
},
|
|
24
|
-
],
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
export { sortClasses }
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
groups: [],
|
|
13
|
-
customGroups: [],
|
|
14
|
-
},
|
|
15
|
-
]
|
|
16
|
-
|
|
17
|
-
export { sortExports }
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
// In what order they are written, that's how they will be sorted
|
|
2
|
-
// В каком порядке они записаны, так они и будут отсортированы
|
|
3
|
-
const groups = ['id', 'unknown', 'is', 'callback', 'set']
|
|
4
|
-
|
|
5
|
-
const customGroups = [
|
|
6
|
-
{
|
|
7
|
-
groupName: 'id',
|
|
8
|
-
elementNamePattern: '^id$',
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
groupName: 'unknown',
|
|
12
|
-
elementNamePattern: '^unknown$',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
groupName: 'is',
|
|
16
|
-
elementNamePattern: '^is.*',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
groupName: 'callback',
|
|
20
|
-
elementNamePattern: '^on.*',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
groupName: 'set',
|
|
24
|
-
elementNamePattern: '^set.*',
|
|
25
|
-
},
|
|
26
|
-
]
|
|
27
|
-
|
|
28
|
-
const sortInterfaces = [
|
|
29
|
-
'error',
|
|
30
|
-
{
|
|
31
|
-
type: 'natural',
|
|
32
|
-
order: 'asc',
|
|
33
|
-
groups: groups,
|
|
34
|
-
customGroups: customGroups,
|
|
35
|
-
},
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
export { sortInterfaces }
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { wrapArrayWithCaretAndDollarAnchors } from '../utils.js'
|
|
2
|
-
import { customGroups } from './sort/customGroup.js'
|
|
3
|
-
import { props } from './sort/props.js'
|
|
4
|
-
|
|
5
|
-
const groups = [...props]
|
|
6
|
-
|
|
7
|
-
// Convert object to array of objects format
|
|
8
|
-
const convertCustomGroupsToArray = (groupsObj) => {
|
|
9
|
-
return Object.entries(groupsObj).map(([groupName, elementNamePattern]) => ({
|
|
10
|
-
groupName,
|
|
11
|
-
elementNamePattern,
|
|
12
|
-
}))
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const allCustomGroups = {
|
|
16
|
-
...wrapArrayWithCaretAndDollarAnchors(groups),
|
|
17
|
-
...customGroups,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const sortJSXProps = [
|
|
21
|
-
'error',
|
|
22
|
-
{
|
|
23
|
-
type: 'natural',
|
|
24
|
-
order: 'asc',
|
|
25
|
-
groups: groups,
|
|
26
|
-
customGroups: convertCustomGroupsToArray(allCustomGroups),
|
|
27
|
-
},
|
|
28
|
-
]
|
|
29
|
-
|
|
30
|
-
export { sortJSXProps }
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
partitionByNewLine: false,
|
|
11
|
-
partitionByComment: false,
|
|
12
|
-
newlinesBetween: 'ignore',
|
|
13
|
-
groups: [],
|
|
14
|
-
customGroups: [],
|
|
15
|
-
},
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
export { sortNamedExports }
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { wrapArrayWithCaretAndDollarAnchors } from '../utils.js'
|
|
2
|
-
|
|
3
|
-
// In what order they are written, that's how they will be sorted
|
|
4
|
-
// В каком порядке они записаны, так они и будут отсортированы
|
|
5
|
-
const groups = ['id']
|
|
6
|
-
|
|
7
|
-
const customRulesForGroups = {}
|
|
8
|
-
|
|
9
|
-
// Convert object to array of objects format
|
|
10
|
-
const convertCustomGroupsToArray = (groupsObj) => {
|
|
11
|
-
return Object.entries(groupsObj).map(([groupName, elementNamePattern]) => ({
|
|
12
|
-
groupName,
|
|
13
|
-
elementNamePattern,
|
|
14
|
-
}))
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const allCustomGroups = {
|
|
18
|
-
...wrapArrayWithCaretAndDollarAnchors(groups),
|
|
19
|
-
...customRulesForGroups,
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const sortObjectTypes = [
|
|
23
|
-
'error',
|
|
24
|
-
{
|
|
25
|
-
type: 'natural',
|
|
26
|
-
order: 'asc',
|
|
27
|
-
groups: groups,
|
|
28
|
-
customGroups: convertCustomGroupsToArray(allCustomGroups),
|
|
29
|
-
},
|
|
30
|
-
]
|
|
31
|
-
|
|
32
|
-
export { sortObjectTypes }
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { wrapArrayWithCaretAndDollarAnchors } from '../utils.js'
|
|
2
|
-
import { customGroups } from './sort/customGroup.js'
|
|
3
|
-
import { props } from './sort/props.js'
|
|
4
|
-
|
|
5
|
-
const groups = [...props]
|
|
6
|
-
|
|
7
|
-
// Convert object to array of objects format
|
|
8
|
-
const convertCustomGroupsToArray = (groupsObj) => {
|
|
9
|
-
return Object.entries(groupsObj).map(([groupName, elementNamePattern]) => ({
|
|
10
|
-
groupName,
|
|
11
|
-
elementNamePattern,
|
|
12
|
-
}))
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const allCustomGroups = {
|
|
16
|
-
...wrapArrayWithCaretAndDollarAnchors(groups),
|
|
17
|
-
...customGroups,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
const sortObjects = [
|
|
21
|
-
'error',
|
|
22
|
-
{
|
|
23
|
-
type: 'unsorted', // Don't sort objects passed to constructor
|
|
24
|
-
groups: ['MESSAGES_FIELDS'],
|
|
25
|
-
customGroups: [
|
|
26
|
-
{
|
|
27
|
-
groupName: 'formConfig',
|
|
28
|
-
elementNamePattern: '.*(?<!FormConfig)$',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
useConfigurationIf: {
|
|
32
|
-
allNamesMatchPattern: 'MESSAGES_FIELDS',
|
|
33
|
-
callingFunctionNamePattern: '^.*',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
type: 'natural',
|
|
38
|
-
order: 'asc',
|
|
39
|
-
groups: groups,
|
|
40
|
-
customGroups: convertCustomGroupsToArray(allCustomGroups),
|
|
41
|
-
},
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
export { sortObjects }
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
const sortUnionTypes = [
|
|
2
|
-
'error',
|
|
3
|
-
{
|
|
4
|
-
type: 'natural',
|
|
5
|
-
order: 'asc',
|
|
6
|
-
groups: [
|
|
7
|
-
'conditional',
|
|
8
|
-
'function',
|
|
9
|
-
'import',
|
|
10
|
-
'keyword',
|
|
11
|
-
'literal',
|
|
12
|
-
'named',
|
|
13
|
-
'object',
|
|
14
|
-
'operator',
|
|
15
|
-
'tuple',
|
|
16
|
-
'union',
|
|
17
|
-
'nullish',
|
|
18
|
-
'unknown',
|
|
19
|
-
],
|
|
20
|
-
},
|
|
21
|
-
]
|
|
22
|
-
export { sortUnionTypes }
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { fixupPluginRules } from '@eslint/compat'
|
|
2
|
-
import eslintReactNative from 'eslint-plugin-react-native'
|
|
3
|
-
|
|
4
|
-
export default [
|
|
5
|
-
{
|
|
6
|
-
plugins: {
|
|
7
|
-
'react-native': fixupPluginRules(eslintReactNative),
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
rules: {
|
|
12
|
-
'react-native/no-unused-styles': 'error',
|
|
13
|
-
'react-native/split-platform-components': 'off',
|
|
14
|
-
'react-native/no-inline-styles': 'warn',
|
|
15
|
-
'react-native/no-color-literals': 'warn',
|
|
16
|
-
'react-native/no-raw-text': 'off',
|
|
17
|
-
'react-native/no-single-element-style-arrays': 'error',
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
]
|
package/eslint/utils.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
const validateArray = (arr) => {
|
|
2
|
-
if (!Array.isArray(arr) || !arr.every((str) => typeof str === 'string')) {
|
|
3
|
-
throw new Error('Input must be an array of strings')
|
|
4
|
-
}
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
const wrapArrayWithCaretAndDollarAnchors = (arr) => {
|
|
8
|
-
validateArray(arr)
|
|
9
|
-
|
|
10
|
-
return arr.reduce((acc, str) => {
|
|
11
|
-
acc[str] = `^${str}$`
|
|
12
|
-
return acc
|
|
13
|
-
}, {})
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
const wrapArrayWithCaretAndWildcard = (arr) => {
|
|
17
|
-
validateArray(arr)
|
|
18
|
-
|
|
19
|
-
return arr.reduce((acc, str) => {
|
|
20
|
-
acc[str] = `^${str}.*`
|
|
21
|
-
return acc
|
|
22
|
-
}, {})
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export { wrapArrayWithCaretAndDollarAnchors, wrapArrayWithCaretAndWildcard }
|
package/prettier/index.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @see https://prettier.io/docs/configuration.html
|
|
3
|
-
* @type {import("prettier").Config}
|
|
4
|
-
*/
|
|
5
|
-
export default {
|
|
6
|
-
arrowParens: 'always',
|
|
7
|
-
importOrder: [
|
|
8
|
-
'^react$',
|
|
9
|
-
'^react-native$',
|
|
10
|
-
'^prop-types$',
|
|
11
|
-
'',
|
|
12
|
-
'<THIRD_PARTY_MODULES>',
|
|
13
|
-
'',
|
|
14
|
-
'^@itcase/(.*)$',
|
|
15
|
-
'',
|
|
16
|
-
'^(?!.*[.]css)src/(?!icons)(?!stores)(.*)$',
|
|
17
|
-
'^src/stores/(.*)$',
|
|
18
|
-
'^src/stores$',
|
|
19
|
-
'^(?!.*[.]css)[.]',
|
|
20
|
-
'',
|
|
21
|
-
'^src/icons$',
|
|
22
|
-
'^src/icons/(.*)$',
|
|
23
|
-
'(.*).css$',
|
|
24
|
-
'',
|
|
25
|
-
],
|
|
26
|
-
importOrderSortSpecifiers: true,
|
|
27
|
-
plugins: ['@ianvs/prettier-plugin-sort-imports'],
|
|
28
|
-
printWidth: 80,
|
|
29
|
-
semi: false,
|
|
30
|
-
singleQuote: true,
|
|
31
|
-
tabWidth: 2,
|
|
32
|
-
}
|