@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
|
@@ -0,0 +1,619 @@
|
|
|
1
|
+
const sortEnums = ['error', { type: 'natural', order: 'asc' }];
|
|
2
|
+
|
|
3
|
+
const sortExports = [
|
|
4
|
+
'error',
|
|
5
|
+
{
|
|
6
|
+
type: 'alphabetical',
|
|
7
|
+
customGroups: [],
|
|
8
|
+
fallbackSort: { type: 'unsorted' },
|
|
9
|
+
groups: [],
|
|
10
|
+
ignoreCase: true,
|
|
11
|
+
newlinesBetween: 'ignore',
|
|
12
|
+
order: 'asc',
|
|
13
|
+
partitionByComment: false,
|
|
14
|
+
partitionByNewLine: false,
|
|
15
|
+
specialCharacters: 'keep',
|
|
16
|
+
},
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
// In what order they are written, that's how they will be sorted
|
|
20
|
+
// В каком порядке они записаны, так они и будут отсортированы
|
|
21
|
+
const groups$3 = ['id', 'unknown', 'is', 'callback', 'set'];
|
|
22
|
+
const customGroups$1 = [
|
|
23
|
+
{
|
|
24
|
+
elementNamePattern: '^id$',
|
|
25
|
+
groupName: 'id',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
elementNamePattern: '^unknown$',
|
|
29
|
+
groupName: 'unknown',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
elementNamePattern: '^is.*',
|
|
33
|
+
groupName: 'is',
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
elementNamePattern: '^on.*',
|
|
37
|
+
groupName: 'callback',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
elementNamePattern: '^set.*',
|
|
41
|
+
groupName: 'set',
|
|
42
|
+
},
|
|
43
|
+
];
|
|
44
|
+
const sortInterfaces = [
|
|
45
|
+
'error',
|
|
46
|
+
{
|
|
47
|
+
type: 'natural',
|
|
48
|
+
customGroups: customGroups$1,
|
|
49
|
+
groups: groups$3,
|
|
50
|
+
order: 'asc',
|
|
51
|
+
},
|
|
52
|
+
];
|
|
53
|
+
|
|
54
|
+
const sortIntersectionTypes = ['error', { type: 'natural', order: 'asc' }];
|
|
55
|
+
|
|
56
|
+
const validateArray = (arr) => {
|
|
57
|
+
if (!Array.isArray(arr) || !arr.every((str) => typeof str === 'string')) {
|
|
58
|
+
throw new Error('Input must be an array of strings');
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const wrapArrayWithCaretAndDollarAnchors = (arr) => {
|
|
62
|
+
validateArray(arr);
|
|
63
|
+
return arr.reduce((acc, str) => {
|
|
64
|
+
acc[str] = `^${str}$`;
|
|
65
|
+
return acc;
|
|
66
|
+
}, {});
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const customGroups = {
|
|
70
|
+
id: '^id$',
|
|
71
|
+
direction: '^direction.*',
|
|
72
|
+
flex: '^flex.*',
|
|
73
|
+
justify: '^justify.*',
|
|
74
|
+
align: '^align.*',
|
|
75
|
+
min: '^min.*',
|
|
76
|
+
max: '^max.*',
|
|
77
|
+
fill: '^fill.*',
|
|
78
|
+
fillActive: '^fillActive.*',
|
|
79
|
+
fillActiveHover: '^fillActiveHover.*',
|
|
80
|
+
fillDisabled: '^fillDisabled.*',
|
|
81
|
+
fillHover: '^fillHover.*',
|
|
82
|
+
initial: '^initial.*',
|
|
83
|
+
isMobile: '^isMobile.*',
|
|
84
|
+
isTablet: '^isTablet.*',
|
|
85
|
+
isDesktop: '^isDesktop.*',
|
|
86
|
+
path: '^path.*',
|
|
87
|
+
template: '^template.*',
|
|
88
|
+
findIn: '^findIn.*',
|
|
89
|
+
findBy: '^findBy.*',
|
|
90
|
+
title: '^title.*',
|
|
91
|
+
subtitle: '^subtitle.*',
|
|
92
|
+
label: '^label.*',
|
|
93
|
+
message: '^message.*',
|
|
94
|
+
desc: '^desc.*',
|
|
95
|
+
description: '^description.*',
|
|
96
|
+
status: '^status.*',
|
|
97
|
+
border: '^border.*',
|
|
98
|
+
borderColor: '^BorderColor.*',
|
|
99
|
+
borderColorActive: '^BorderColorActive.*',
|
|
100
|
+
borderColorActiveHover: '^BorderColorActive.*',
|
|
101
|
+
borderColorDisabled: '^BorderColorDisabled.*',
|
|
102
|
+
borderColorHover: '^BorderColorHover.*',
|
|
103
|
+
shadow: '^shadow.*',
|
|
104
|
+
font: '^font.*',
|
|
105
|
+
text: '^text.*',
|
|
106
|
+
textColor: '^TextColor.*',
|
|
107
|
+
textColorActive: '^TextColorActive.*',
|
|
108
|
+
textColorActiveHover: '^TextColorActiveHover.*',
|
|
109
|
+
textColorDisabled: '^TextColorDisabled.*',
|
|
110
|
+
textColorHover: '^TextColorHover.*',
|
|
111
|
+
background: '^background.*',
|
|
112
|
+
ErrorNetworkMock: 'ErrorNetwork$',
|
|
113
|
+
ErrorRequestMock: 'ErrorRequestMock$',
|
|
114
|
+
hasAccent: '^.(?!is|on).*(A|a)ccent.*\b',
|
|
115
|
+
hasAccentMuted: '^.*AccentMuted.*\b',
|
|
116
|
+
hasDanger: '^(?!is|on).*(D|d)anger.*\b',
|
|
117
|
+
hasDangerMuted: '^.*DangerMuted.*\b',
|
|
118
|
+
hasDefault: '^.(?!is|on).*(D|d)efault.*\b',
|
|
119
|
+
hasDisabled: '^(?!is|on).*(D|d)isabled.*\b',
|
|
120
|
+
hasDisabledMuted: '^.*DisabledMuted.*\b',
|
|
121
|
+
hasError: '^(?!is|on).*(E|e)rror.*\b',
|
|
122
|
+
hasErrorMuted: '^(?!on).*\bErrorMuted.*\b',
|
|
123
|
+
hasFilled: '^.(?!is|on).*(F|f)illed.*\b',
|
|
124
|
+
hasGet: '^get.*',
|
|
125
|
+
hasHigh: '^high.*',
|
|
126
|
+
hasHighest: '^highest.*',
|
|
127
|
+
hasInfo: '^(?!is|on).*(I|i)nfo.*\b',
|
|
128
|
+
hasInfoMuted: '^.*InfoMuted.*\b',
|
|
129
|
+
hasInitialValues: '^.(?!is|on).*(I|i)nitialValues.*\b',
|
|
130
|
+
hasIs: '^is.*',
|
|
131
|
+
hasLoading: '^.(?!is|on).*(L|l)oading.*\b',
|
|
132
|
+
hasLow: '^low.*',
|
|
133
|
+
hasLowest: 'lowest.*',
|
|
134
|
+
hasMedium: '^medium.*',
|
|
135
|
+
hasMutedPrimaryAppearance: '^.*MutedPrimary.*\b',
|
|
136
|
+
hasMutedQuaternaryAppearance: '^.*MutedQuaternary.*\b',
|
|
137
|
+
hasMutedSecondaryAppearance: '^.*MutedSecondary.*\b',
|
|
138
|
+
hasMutedTertiaryAppearance: '^.*MutedTertiary.*\b',
|
|
139
|
+
hasPrimary: '^.(?!is|on).*(P|p)rimary.*\b',
|
|
140
|
+
hasPrimaryAppearance: '^.*Primary.*\b',
|
|
141
|
+
hasPrimaryMuted: '^.*PrimaryMuted.*\b',
|
|
142
|
+
hasQuaternary: '^(?!is|on).*(Q|q)uaternary.*\b',
|
|
143
|
+
hasQuaternaryAppearance: '^.*Quaternary.*\b',
|
|
144
|
+
hasQuaternaryMuted: '^.*QuaternaryMuted.*\b',
|
|
145
|
+
hasRequire: '^(?!is|on).*(R|r)equire.*\b',
|
|
146
|
+
hasSecondary: '^(?!is|on).*(S|s)econdary.*\b',
|
|
147
|
+
hasSecondaryAppearance: '^.*Secondary.*\b',
|
|
148
|
+
hasSecondaryMuted: '^.*SecondaryMuted.*\b',
|
|
149
|
+
hasServerError: '^.(?!is|on).*(S|s)erverError.*\b',
|
|
150
|
+
hasServerErrorData: '^.(?!is|on).*(S|s)erverErrorData.*\b',
|
|
151
|
+
hasSet: '^set.*',
|
|
152
|
+
hasSuccess: '^(?!is|on)(?!on).*(S|s)uccess.*\b',
|
|
153
|
+
hasSuccessMuted: '^(?!on).*\bSuccessMuted.*\b',
|
|
154
|
+
hasSurface: '^(?!is|on).*(S|s)urface.*\b',
|
|
155
|
+
hasSurfaceMuted: '^.*SurfaceMuted.*\b',
|
|
156
|
+
hasTertiary: '^(?!is|on).*(T|t)ertiary.*\b',
|
|
157
|
+
hasTertiaryAppearance: '^.*Tertiary.*\b',
|
|
158
|
+
hasTertiaryMuted: '^.*TertiaryMuted.*\b',
|
|
159
|
+
hasValidation: '^.(?!is|on).*(V|v)alidation.*\b',
|
|
160
|
+
hasWarning: '^(?!is|on).*(W|w)arning.*\b',
|
|
161
|
+
hasWarningMuted: '^.*WarningMuted.*\b',
|
|
162
|
+
open: '^open.*',
|
|
163
|
+
close: '^close.*',
|
|
164
|
+
onClick: '^onClick.*',
|
|
165
|
+
onError: '^onError.*',
|
|
166
|
+
onSuccess: '^onSuccess.*',
|
|
167
|
+
on: '^on.*',
|
|
168
|
+
DefaultMock: 'DefaultMock$',
|
|
169
|
+
LoadingMock: 'LoadingMock$',
|
|
170
|
+
ErrorMock: 'ErrorMock$',
|
|
171
|
+
SuccessMock: 'SuccessMock$',
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
const props = [
|
|
175
|
+
'id',
|
|
176
|
+
'appearance',
|
|
177
|
+
'className',
|
|
178
|
+
'dataTestId',
|
|
179
|
+
'dataTour',
|
|
180
|
+
'key',
|
|
181
|
+
'type',
|
|
182
|
+
'name',
|
|
183
|
+
'ref',
|
|
184
|
+
'PageLayout',
|
|
185
|
+
// Size and positioning
|
|
186
|
+
'width',
|
|
187
|
+
'height',
|
|
188
|
+
'widthMobile',
|
|
189
|
+
'heightMobile',
|
|
190
|
+
'widthTablet',
|
|
191
|
+
'heightTablet',
|
|
192
|
+
'widthDesktop',
|
|
193
|
+
'heightDesktop',
|
|
194
|
+
'minWidth',
|
|
195
|
+
'maxWidth',
|
|
196
|
+
'minHeight',
|
|
197
|
+
'maxHeight',
|
|
198
|
+
'direction',
|
|
199
|
+
'flex',
|
|
200
|
+
'justify',
|
|
201
|
+
'align',
|
|
202
|
+
'min',
|
|
203
|
+
'max',
|
|
204
|
+
'size',
|
|
205
|
+
'sizeXXL',
|
|
206
|
+
'sizeXL',
|
|
207
|
+
'sizeL',
|
|
208
|
+
'sizeM',
|
|
209
|
+
'sizeS',
|
|
210
|
+
'sizeXS',
|
|
211
|
+
'sizeXXS',
|
|
212
|
+
'xxl',
|
|
213
|
+
'xl',
|
|
214
|
+
'l',
|
|
215
|
+
'm',
|
|
216
|
+
's',
|
|
217
|
+
'xs',
|
|
218
|
+
'xxs',
|
|
219
|
+
'fill',
|
|
220
|
+
'fillHover',
|
|
221
|
+
'fillActive',
|
|
222
|
+
'fillActiveHover',
|
|
223
|
+
'fillDisabled',
|
|
224
|
+
'textColor',
|
|
225
|
+
'textColorHover',
|
|
226
|
+
'textColorActive',
|
|
227
|
+
'textColorActiveHover',
|
|
228
|
+
'textColorDisabled',
|
|
229
|
+
'circular',
|
|
230
|
+
'rounded',
|
|
231
|
+
'roundedXXL',
|
|
232
|
+
'roundedXL',
|
|
233
|
+
'roundedL',
|
|
234
|
+
'roundedM',
|
|
235
|
+
'roundedS',
|
|
236
|
+
'roundedXS',
|
|
237
|
+
'roundedXXS',
|
|
238
|
+
'position',
|
|
239
|
+
'top',
|
|
240
|
+
'right',
|
|
241
|
+
'bottom',
|
|
242
|
+
'left',
|
|
243
|
+
'zIndex',
|
|
244
|
+
'aspectRatio',
|
|
245
|
+
'initial',
|
|
246
|
+
'isMobile',
|
|
247
|
+
'isTablet',
|
|
248
|
+
'isDesktop',
|
|
249
|
+
'config',
|
|
250
|
+
'validationSchema',
|
|
251
|
+
'dir',
|
|
252
|
+
'src',
|
|
253
|
+
'path',
|
|
254
|
+
'dest',
|
|
255
|
+
'destination',
|
|
256
|
+
'template',
|
|
257
|
+
'findIn',
|
|
258
|
+
'findBy',
|
|
259
|
+
'title',
|
|
260
|
+
'headTitle',
|
|
261
|
+
'headerTitle',
|
|
262
|
+
'subtitle',
|
|
263
|
+
'label',
|
|
264
|
+
'message',
|
|
265
|
+
'desc',
|
|
266
|
+
'description',
|
|
267
|
+
'prompts',
|
|
268
|
+
'actions',
|
|
269
|
+
'status',
|
|
270
|
+
'border',
|
|
271
|
+
'borderColor',
|
|
272
|
+
'borderColorHover',
|
|
273
|
+
'borderColorActive',
|
|
274
|
+
'borderColorActiveHover',
|
|
275
|
+
'borderColorDisabled',
|
|
276
|
+
// Appearance
|
|
277
|
+
'hasPrimaryAppearance',
|
|
278
|
+
'hasSecondaryAppearance',
|
|
279
|
+
'hasTertiaryAppearance',
|
|
280
|
+
'hasQuaternaryAppearance',
|
|
281
|
+
'hasMutedPrimaryAppearance',
|
|
282
|
+
'hasMutedSecondaryAppearance',
|
|
283
|
+
'hasMutedTertiaryAppearance',
|
|
284
|
+
'hasMutedQuaternaryAppearance',
|
|
285
|
+
// Colors
|
|
286
|
+
'hasAccent',
|
|
287
|
+
'hasPrimary',
|
|
288
|
+
'hasSecondary',
|
|
289
|
+
'hasTertiary',
|
|
290
|
+
'hasQuaternary',
|
|
291
|
+
'hasSurface',
|
|
292
|
+
'hasError',
|
|
293
|
+
'error',
|
|
294
|
+
'errorAccessDenied',
|
|
295
|
+
'errorNetwork',
|
|
296
|
+
'hasWarning',
|
|
297
|
+
'hasDefault',
|
|
298
|
+
'hasRequire',
|
|
299
|
+
'hasSuccess',
|
|
300
|
+
'successCreate',
|
|
301
|
+
'successUpdate',
|
|
302
|
+
'hasDanger',
|
|
303
|
+
'hasInfo',
|
|
304
|
+
'hasDisabled',
|
|
305
|
+
'hasAccentMuted',
|
|
306
|
+
'hasPrimaryMuted',
|
|
307
|
+
'hasSecondaryMuted',
|
|
308
|
+
'hasTertiaryMuted',
|
|
309
|
+
'hasQuaternaryMuted',
|
|
310
|
+
'hasSurfaceMuted',
|
|
311
|
+
'hasErrorMuted',
|
|
312
|
+
'hasWarningMuted',
|
|
313
|
+
'hasSuccessMuted',
|
|
314
|
+
'hasDangerMuted',
|
|
315
|
+
'hasInfoMuted',
|
|
316
|
+
'hasDisabledMuted',
|
|
317
|
+
'hasValidation',
|
|
318
|
+
'hasFilled',
|
|
319
|
+
'hasLoading',
|
|
320
|
+
'hasServerError',
|
|
321
|
+
'hasServerErrorData',
|
|
322
|
+
'hasInitialValues',
|
|
323
|
+
// State
|
|
324
|
+
'custom',
|
|
325
|
+
'fail',
|
|
326
|
+
'nothingFound',
|
|
327
|
+
'unableLoadData',
|
|
328
|
+
'refresh',
|
|
329
|
+
'confirm',
|
|
330
|
+
'url',
|
|
331
|
+
'method',
|
|
332
|
+
'data',
|
|
333
|
+
'signal',
|
|
334
|
+
'timeout',
|
|
335
|
+
'username',
|
|
336
|
+
'password',
|
|
337
|
+
'credentials',
|
|
338
|
+
'params',
|
|
339
|
+
'code',
|
|
340
|
+
'errors',
|
|
341
|
+
// Indents and margins
|
|
342
|
+
'margin',
|
|
343
|
+
'marginMobile',
|
|
344
|
+
'marginTablet',
|
|
345
|
+
'marginDesktop',
|
|
346
|
+
'marginVertical',
|
|
347
|
+
'marginHorizontal',
|
|
348
|
+
'marginVerticalMobile',
|
|
349
|
+
'marginHorizontalMobile',
|
|
350
|
+
'marginVerticalTablet',
|
|
351
|
+
'marginHorizontalTablet',
|
|
352
|
+
'marginVerticalDesktop',
|
|
353
|
+
'marginHorizontalDesktop',
|
|
354
|
+
'marginTop',
|
|
355
|
+
'marginRight',
|
|
356
|
+
'marginBottom',
|
|
357
|
+
'marginLeft',
|
|
358
|
+
'marginTopMobile',
|
|
359
|
+
'marginRightMobile',
|
|
360
|
+
'marginBottomMobile',
|
|
361
|
+
'marginLeftMobile',
|
|
362
|
+
'marginTopTablet',
|
|
363
|
+
'marginRightTablet',
|
|
364
|
+
'marginBottomTablet',
|
|
365
|
+
'marginLeftTablet',
|
|
366
|
+
'marginTopDesktop',
|
|
367
|
+
'marginRightDesktop',
|
|
368
|
+
'marginBottomDesktop',
|
|
369
|
+
'marginLeftDesktop',
|
|
370
|
+
'padding',
|
|
371
|
+
'paddingMobile',
|
|
372
|
+
'paddingTablet',
|
|
373
|
+
'paddingDesktop',
|
|
374
|
+
'paddingVertical',
|
|
375
|
+
'paddingHorizontal',
|
|
376
|
+
'paddingVerticalMobile',
|
|
377
|
+
'paddingHorizontalMobile',
|
|
378
|
+
'paddingVerticalTablet',
|
|
379
|
+
'paddingHorizontalTablet',
|
|
380
|
+
'paddingVerticalDesktop',
|
|
381
|
+
'paddingHorizontalDesktop',
|
|
382
|
+
'paddingTop',
|
|
383
|
+
'paddingRight',
|
|
384
|
+
'paddingBottom',
|
|
385
|
+
'paddingLeft',
|
|
386
|
+
'paddingTopMobile',
|
|
387
|
+
'paddingRightMobile',
|
|
388
|
+
'paddingBottomMobile',
|
|
389
|
+
'paddingLeftMobile',
|
|
390
|
+
'paddingTopTablet',
|
|
391
|
+
'paddingRightTablet',
|
|
392
|
+
'paddingBottomTablet',
|
|
393
|
+
'paddingLeftTablet',
|
|
394
|
+
'paddingTopDesktop',
|
|
395
|
+
'paddingRightDesktop',
|
|
396
|
+
'paddingBottomDesktop',
|
|
397
|
+
'paddingLeftDesktop',
|
|
398
|
+
'gap',
|
|
399
|
+
'gapMobile',
|
|
400
|
+
'gapTablet',
|
|
401
|
+
'gapDesktop',
|
|
402
|
+
'buttonGap',
|
|
403
|
+
'columns',
|
|
404
|
+
'columnsMobile',
|
|
405
|
+
'columnsTablet',
|
|
406
|
+
'columnsDesktop',
|
|
407
|
+
'shadow',
|
|
408
|
+
'elevation',
|
|
409
|
+
// Color and background
|
|
410
|
+
'backgroundColor',
|
|
411
|
+
'opacity',
|
|
412
|
+
// Fonts and text
|
|
413
|
+
'color',
|
|
414
|
+
'font',
|
|
415
|
+
'lineHeight',
|
|
416
|
+
'letterSpacing',
|
|
417
|
+
'text',
|
|
418
|
+
'includeFontPadding',
|
|
419
|
+
'writingDirection',
|
|
420
|
+
// Style
|
|
421
|
+
'solid',
|
|
422
|
+
'outlined',
|
|
423
|
+
'full',
|
|
424
|
+
'ghost',
|
|
425
|
+
'hasHighest',
|
|
426
|
+
'hasHigh',
|
|
427
|
+
'hasMedium',
|
|
428
|
+
'hasLow',
|
|
429
|
+
'hasLowest',
|
|
430
|
+
// Other
|
|
431
|
+
'overflow',
|
|
432
|
+
'display',
|
|
433
|
+
'resizeMode',
|
|
434
|
+
'backfaceVisibility',
|
|
435
|
+
'tintColor',
|
|
436
|
+
'overlayColor',
|
|
437
|
+
'end',
|
|
438
|
+
'start',
|
|
439
|
+
'transform',
|
|
440
|
+
'transformOrigin',
|
|
441
|
+
'translateX',
|
|
442
|
+
'translateY',
|
|
443
|
+
'scale',
|
|
444
|
+
'rotate',
|
|
445
|
+
'rotateX',
|
|
446
|
+
'rotateY',
|
|
447
|
+
'perspective',
|
|
448
|
+
'cursor',
|
|
449
|
+
'firstName',
|
|
450
|
+
'secondName',
|
|
451
|
+
'lastName',
|
|
452
|
+
'email',
|
|
453
|
+
'phone',
|
|
454
|
+
'component',
|
|
455
|
+
'args',
|
|
456
|
+
'globals',
|
|
457
|
+
'loaders',
|
|
458
|
+
'parameters',
|
|
459
|
+
'page',
|
|
460
|
+
'layout',
|
|
461
|
+
'sourceLink',
|
|
462
|
+
// 'tags', // duplicate
|
|
463
|
+
'render',
|
|
464
|
+
'device',
|
|
465
|
+
'design',
|
|
466
|
+
'unknown',
|
|
467
|
+
'before',
|
|
468
|
+
'after',
|
|
469
|
+
'open',
|
|
470
|
+
'close',
|
|
471
|
+
'isActive',
|
|
472
|
+
'isChecked',
|
|
473
|
+
'isDisabled',
|
|
474
|
+
'isError',
|
|
475
|
+
'isSkeleton',
|
|
476
|
+
'hasIs',
|
|
477
|
+
'hasSet',
|
|
478
|
+
'hasGet',
|
|
479
|
+
'use',
|
|
480
|
+
'onClick',
|
|
481
|
+
'onError',
|
|
482
|
+
'onSuccess',
|
|
483
|
+
'on',
|
|
484
|
+
'children',
|
|
485
|
+
// Mock
|
|
486
|
+
'DefaultMock',
|
|
487
|
+
'LoadingMock',
|
|
488
|
+
'ErrorMock',
|
|
489
|
+
'ErrorNetwork',
|
|
490
|
+
'ErrorAccessDeniedMock',
|
|
491
|
+
'SuccessMock',
|
|
492
|
+
];
|
|
493
|
+
|
|
494
|
+
const groups$2 = [...props];
|
|
495
|
+
// Convert object to array of objects format
|
|
496
|
+
const convertCustomGroupsToArray$2 = (groupsObj) => {
|
|
497
|
+
return Object.entries(groupsObj).map(([groupName, elementNamePattern]) => ({
|
|
498
|
+
elementNamePattern,
|
|
499
|
+
groupName,
|
|
500
|
+
}));
|
|
501
|
+
};
|
|
502
|
+
const allCustomGroups$2 = {
|
|
503
|
+
...wrapArrayWithCaretAndDollarAnchors(groups$2),
|
|
504
|
+
...customGroups,
|
|
505
|
+
};
|
|
506
|
+
const sortJSXProps = [
|
|
507
|
+
'error',
|
|
508
|
+
{
|
|
509
|
+
type: 'natural',
|
|
510
|
+
customGroups: convertCustomGroupsToArray$2(allCustomGroups$2),
|
|
511
|
+
groups: groups$2,
|
|
512
|
+
order: 'asc',
|
|
513
|
+
},
|
|
514
|
+
];
|
|
515
|
+
|
|
516
|
+
const sortMaps = ['error', { type: 'natural', order: 'asc' }];
|
|
517
|
+
|
|
518
|
+
const sortNamedExports = [
|
|
519
|
+
'error',
|
|
520
|
+
{
|
|
521
|
+
type: 'alphabetical',
|
|
522
|
+
customGroups: [],
|
|
523
|
+
fallbackSort: { type: 'unsorted' },
|
|
524
|
+
groups: [],
|
|
525
|
+
ignoreAlias: false,
|
|
526
|
+
ignoreCase: true,
|
|
527
|
+
newlinesBetween: 'ignore',
|
|
528
|
+
order: 'asc',
|
|
529
|
+
partitionByComment: false,
|
|
530
|
+
partitionByNewLine: false,
|
|
531
|
+
specialCharacters: 'keep',
|
|
532
|
+
},
|
|
533
|
+
];
|
|
534
|
+
|
|
535
|
+
/* eslint-disable perfectionist/sort-objects */
|
|
536
|
+
const groups$1 = [...props];
|
|
537
|
+
// Convert object to array of objects format
|
|
538
|
+
const convertCustomGroupsToArray$1 = (groupsObj) => {
|
|
539
|
+
return Object.entries(groupsObj).map(([groupName, elementNamePattern]) => ({
|
|
540
|
+
groupName,
|
|
541
|
+
elementNamePattern,
|
|
542
|
+
}));
|
|
543
|
+
};
|
|
544
|
+
const allCustomGroups$1 = {
|
|
545
|
+
...wrapArrayWithCaretAndDollarAnchors(groups$1),
|
|
546
|
+
...customGroups,
|
|
547
|
+
};
|
|
548
|
+
const sortObjects = [
|
|
549
|
+
'error',
|
|
550
|
+
{
|
|
551
|
+
type: 'unsorted', // Don't sort objects passed to constructor
|
|
552
|
+
groups: ['MESSAGES_FIELDS'],
|
|
553
|
+
customGroups: [
|
|
554
|
+
{
|
|
555
|
+
groupName: 'formConfig',
|
|
556
|
+
elementNamePattern: '.*(?<!FormConfig)$',
|
|
557
|
+
},
|
|
558
|
+
],
|
|
559
|
+
useConfigurationIf: {
|
|
560
|
+
allNamesMatchPattern: 'MESSAGES_FIELDS',
|
|
561
|
+
callingFunctionNamePattern: '^.*',
|
|
562
|
+
},
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
type: 'natural',
|
|
566
|
+
order: 'asc',
|
|
567
|
+
groups: groups$1,
|
|
568
|
+
customGroups: convertCustomGroupsToArray$1(allCustomGroups$1),
|
|
569
|
+
},
|
|
570
|
+
];
|
|
571
|
+
|
|
572
|
+
// In what order they are written, that's how they will be sorted
|
|
573
|
+
// В каком порядке они записаны, так они и будут отсортированы
|
|
574
|
+
const groups = ['id'];
|
|
575
|
+
const customRulesForGroups = {};
|
|
576
|
+
// Convert object to array of objects format
|
|
577
|
+
const convertCustomGroupsToArray = (groupsObj) => {
|
|
578
|
+
return Object.entries(groupsObj).map(([groupName, elementNamePattern]) => ({
|
|
579
|
+
elementNamePattern,
|
|
580
|
+
groupName,
|
|
581
|
+
}));
|
|
582
|
+
};
|
|
583
|
+
const allCustomGroups = {
|
|
584
|
+
...wrapArrayWithCaretAndDollarAnchors(groups),
|
|
585
|
+
...customRulesForGroups,
|
|
586
|
+
};
|
|
587
|
+
const sortObjectTypes = [
|
|
588
|
+
'error',
|
|
589
|
+
{
|
|
590
|
+
type: 'natural',
|
|
591
|
+
customGroups: convertCustomGroupsToArray(allCustomGroups),
|
|
592
|
+
groups: groups,
|
|
593
|
+
order: 'asc',
|
|
594
|
+
},
|
|
595
|
+
];
|
|
596
|
+
|
|
597
|
+
const sortUnionTypes = [
|
|
598
|
+
'error',
|
|
599
|
+
{
|
|
600
|
+
type: 'natural',
|
|
601
|
+
groups: [
|
|
602
|
+
'conditional',
|
|
603
|
+
'function',
|
|
604
|
+
'import',
|
|
605
|
+
'keyword',
|
|
606
|
+
'literal',
|
|
607
|
+
'named',
|
|
608
|
+
'object',
|
|
609
|
+
'operator',
|
|
610
|
+
'tuple',
|
|
611
|
+
'union',
|
|
612
|
+
'nullish',
|
|
613
|
+
'unknown',
|
|
614
|
+
],
|
|
615
|
+
order: 'asc',
|
|
616
|
+
},
|
|
617
|
+
];
|
|
618
|
+
|
|
619
|
+
export { sortObjectTypes as a, sortObjects as b, sortExports as c, sortNamedExports as d, sortMaps as e, sortJSXProps as f, sortIntersectionTypes as g, sortInterfaces as h, sortEnums as i, sortUnionTypes as s };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
extends: string[];
|
|
3
|
+
ignoreFiles: string[];
|
|
4
|
+
plugins: string[];
|
|
5
|
+
rules: {
|
|
6
|
+
'max-nesting-depth': number;
|
|
7
|
+
'alpha-value-notation': (string | {
|
|
8
|
+
exceptProperties: string[];
|
|
9
|
+
})[];
|
|
10
|
+
'at-rule-empty-line-before': (string | {
|
|
11
|
+
except: string[];
|
|
12
|
+
ignore: string[];
|
|
13
|
+
})[];
|
|
14
|
+
'at-rule-no-unknown': (boolean | {
|
|
15
|
+
ignoreAtRules: string[];
|
|
16
|
+
})[];
|
|
17
|
+
'block-no-empty': null;
|
|
18
|
+
'color-function-notation': string;
|
|
19
|
+
'comment-empty-line-before': (string | {
|
|
20
|
+
except: string[];
|
|
21
|
+
ignore: string[];
|
|
22
|
+
})[];
|
|
23
|
+
'custom-property-empty-line-before': null;
|
|
24
|
+
'custom-property-pattern': string;
|
|
25
|
+
'declaration-empty-line-before': string;
|
|
26
|
+
'declaration-property-value-no-unknown': (boolean | {
|
|
27
|
+
ignoreProperties: {
|
|
28
|
+
top: string;
|
|
29
|
+
right: string;
|
|
30
|
+
bottom: string;
|
|
31
|
+
left: string;
|
|
32
|
+
border: string;
|
|
33
|
+
margin: string;
|
|
34
|
+
padding: string;
|
|
35
|
+
gap: string;
|
|
36
|
+
'/-gap$/': string;
|
|
37
|
+
'/^border-/': string;
|
|
38
|
+
'/^margin-/': string;
|
|
39
|
+
'/^padding-/': string;
|
|
40
|
+
};
|
|
41
|
+
})[];
|
|
42
|
+
'function-no-unknown': (boolean | {
|
|
43
|
+
ignoreFunctions: string[];
|
|
44
|
+
})[];
|
|
45
|
+
'function-url-quotes': string;
|
|
46
|
+
'hue-degree-notation': string;
|
|
47
|
+
'import-notation': string;
|
|
48
|
+
'keyframes-name-pattern': (string | {
|
|
49
|
+
message: string;
|
|
50
|
+
})[];
|
|
51
|
+
'no-descending-specificity': null;
|
|
52
|
+
'order/order': ((string | {
|
|
53
|
+
type: string;
|
|
54
|
+
name: string;
|
|
55
|
+
selector?: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
type: string;
|
|
58
|
+
selector: string;
|
|
59
|
+
name?: undefined;
|
|
60
|
+
})[] | {
|
|
61
|
+
unspecified: string;
|
|
62
|
+
})[];
|
|
63
|
+
'order/properties-order': string[][];
|
|
64
|
+
'plugin/no-unsupported-browser-features': (boolean | {
|
|
65
|
+
ignore: string[];
|
|
66
|
+
severity: string;
|
|
67
|
+
})[];
|
|
68
|
+
'prettier/prettier': boolean;
|
|
69
|
+
'property-disallowed-list': string[];
|
|
70
|
+
'property-no-unknown': (boolean | {
|
|
71
|
+
ignoreProperties: string[];
|
|
72
|
+
})[];
|
|
73
|
+
'rule-empty-line-before': (string | {
|
|
74
|
+
except: string[];
|
|
75
|
+
ignore: string[];
|
|
76
|
+
})[];
|
|
77
|
+
'selector-class-pattern': string;
|
|
78
|
+
'selector-nested-pattern': string;
|
|
79
|
+
'selector-type-no-unknown': (boolean | {
|
|
80
|
+
ignoreTypes: string[];
|
|
81
|
+
})[];
|
|
82
|
+
'shorthand-property-no-redundant-values': null;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export default _default;
|