@itcase/lint 1.1.74 → 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 +44 -18
- 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,33 @@
|
|
|
1
|
+
declare const MESSAGE_IDS: {
|
|
2
|
+
readonly missingAttribute: "missingAttribute";
|
|
3
|
+
readonly missingAttributeValue: "missingAttributeValue";
|
|
4
|
+
};
|
|
5
|
+
type MessageIds = typeof MESSAGE_IDS;
|
|
6
|
+
declare const MESSAGES: {
|
|
7
|
+
missingAttribute: string;
|
|
8
|
+
missingAttributeValue: string;
|
|
9
|
+
};
|
|
10
|
+
declare const ASSERT_DEFAULT_MESSAGE = "Assert violation";
|
|
11
|
+
/**
|
|
12
|
+
* Property name to check for in JSX elements.
|
|
13
|
+
*/
|
|
14
|
+
declare const PROP_TO_CHECK_BY_COMPONENT_TYPE: {
|
|
15
|
+
readonly CUSTOM: {
|
|
16
|
+
readonly name: string;
|
|
17
|
+
readonly kind: "custom";
|
|
18
|
+
};
|
|
19
|
+
readonly HTML: {
|
|
20
|
+
readonly name: string;
|
|
21
|
+
readonly kind: "html";
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Custom element names to which the rule should apply.
|
|
26
|
+
* If the array is empty, the rule applies to all JSX elements.
|
|
27
|
+
*/
|
|
28
|
+
declare const ELEMENT_NAMES_TO_CHECK: string[];
|
|
29
|
+
/**
|
|
30
|
+
* Custom element names to ignore by the rule.
|
|
31
|
+
*/
|
|
32
|
+
declare const ELEMENT_NAMES_TO_IGNORE: string[];
|
|
33
|
+
export { ASSERT_DEFAULT_MESSAGE, ELEMENT_NAMES_TO_CHECK, ELEMENT_NAMES_TO_IGNORE, MESSAGE_IDS, type MessageIds, MESSAGES, PROP_TO_CHECK_BY_COMPONENT_TYPE, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ESLintUtils, TSESLint } from '@typescript-eslint/utils';
|
|
2
|
+
import { type MessageIds } from './constants';
|
|
3
|
+
declare const createRule: <Options extends readonly unknown[], MessageIds extends string>({ meta, name, ...rule }: Readonly<ESLintUtils.RuleWithMetaAndName<Options, MessageIds, unknown>>) => ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener> & {
|
|
4
|
+
name: string;
|
|
5
|
+
};
|
|
6
|
+
declare const ruleName = "data-test-id";
|
|
7
|
+
declare const pluginName = "eslint-data-test-id-plugin";
|
|
8
|
+
declare const defaultOptions: readonly [];
|
|
9
|
+
type Options = typeof defaultOptions;
|
|
10
|
+
type Context = Readonly<TSESLint.RuleContext<keyof MessageIds, Options>>;
|
|
11
|
+
type RuleVisitors = (context: Context, optionsWithDefault: Readonly<Options>) => TSESLint.RuleListener;
|
|
12
|
+
export { type Context, createRule, defaultOptions, pluginName, ruleName, type RuleVisitors, };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import parser from '@typescript-eslint/parser';
|
|
2
|
+
import { TSESLint } from '@typescript-eslint/utils';
|
|
3
|
+
declare const pluginWithoutConfigs: {
|
|
4
|
+
configs: {
|
|
5
|
+
recommended: {
|
|
6
|
+
languageOptions: {
|
|
7
|
+
ecmaVersion: "latest";
|
|
8
|
+
parser: typeof parser;
|
|
9
|
+
};
|
|
10
|
+
plugins: {
|
|
11
|
+
"eslint-data-test-id-plugin": {
|
|
12
|
+
meta: {
|
|
13
|
+
name: string;
|
|
14
|
+
version: string;
|
|
15
|
+
};
|
|
16
|
+
processors: {};
|
|
17
|
+
rules: {
|
|
18
|
+
"data-test-id": TSESLint.RuleModule<"missingAttribute" | "missingAttributeValue", [], unknown, TSESLint.RuleListener> & {
|
|
19
|
+
name: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
rules: {
|
|
25
|
+
"eslint-data-test-id-plugin/data-test-id": "off";
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
meta: {
|
|
30
|
+
name: string;
|
|
31
|
+
version: string;
|
|
32
|
+
};
|
|
33
|
+
processors: {};
|
|
34
|
+
rules: {
|
|
35
|
+
"data-test-id": TSESLint.RuleModule<"missingAttribute" | "missingAttributeValue", [], unknown, TSESLint.RuleListener> & {
|
|
36
|
+
name: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
export default pluginWithoutConfigs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TSESTree } from '@typescript-eslint/utils';
|
|
2
|
+
import { ASSERT_DEFAULT_MESSAGE } from './constants';
|
|
3
|
+
import { Context } from './extra';
|
|
4
|
+
/** Throw an error if the condition is falsy */
|
|
5
|
+
declare function assert(condition: unknown): asserts condition;
|
|
6
|
+
/** Extract name from a string or Identifier node */
|
|
7
|
+
declare function extractNameFromPossibleIdentifier(nodeOrName: string | {
|
|
8
|
+
name: string;
|
|
9
|
+
}): string;
|
|
10
|
+
/** Get name items of functions and variables that wraps the given node */
|
|
11
|
+
declare const getFunctionOrVariableAncestorNameItems: (context: Context, node: TSESTree.Node) => ({
|
|
12
|
+
readonly name: string;
|
|
13
|
+
readonly kind: "function";
|
|
14
|
+
} | {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly kind: "variable";
|
|
17
|
+
})[];
|
|
18
|
+
export { assert, ASSERT_DEFAULT_MESSAGE, extractNameFromPossibleIdentifier, getFunctionOrVariableAncestorNameItems, };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: ({
|
|
2
|
+
plugins: {
|
|
3
|
+
mobx: any;
|
|
4
|
+
};
|
|
5
|
+
rules?: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
rules: {
|
|
8
|
+
'mobx/exhaustive-make-observable': string;
|
|
9
|
+
'mobx/missing-make-observable': string;
|
|
10
|
+
'mobx/missing-observer': string;
|
|
11
|
+
'mobx/no-anonymous-observer': string;
|
|
12
|
+
'mobx/unconditional-make-observable': string;
|
|
13
|
+
};
|
|
14
|
+
plugins?: undefined;
|
|
15
|
+
})[];
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import eslintMobx from 'eslint-plugin-mobx';
|
|
2
|
+
|
|
3
|
+
var index = [
|
|
4
|
+
{
|
|
5
|
+
plugins: {
|
|
6
|
+
mobx: eslintMobx,
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
rules: {
|
|
11
|
+
'mobx/exhaustive-make-observable': 'warn',
|
|
12
|
+
'mobx/missing-make-observable': 'error',
|
|
13
|
+
'mobx/missing-observer': 'off',
|
|
14
|
+
'mobx/no-anonymous-observer': 'warn',
|
|
15
|
+
'mobx/unconditional-make-observable': 'error',
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
export { index as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { sortClasses } from './sortClasses';
|
|
2
|
+
export { sortEnums } from './sortEnums';
|
|
3
|
+
export { sortExports } from './sortExports';
|
|
4
|
+
export { sortInterfaces } from './sortInterfaces';
|
|
5
|
+
export { sortIntersectionTypes } from './sortIntersectionTypes';
|
|
6
|
+
export { sortJSXProps } from './sortJSXProps';
|
|
7
|
+
export { sortMaps } from './sortMaps';
|
|
8
|
+
export { sortNamedExports } from './sortNamedExports';
|
|
9
|
+
export { sortObjects } from './sortObjects';
|
|
10
|
+
export { sortObjectTypes } from './sortObjectTypes';
|
|
11
|
+
export { sortUnionTypes } from './sortUnionTypes';
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
declare const customGroups: {
|
|
2
|
+
id: string;
|
|
3
|
+
direction: string;
|
|
4
|
+
flex: string;
|
|
5
|
+
justify: string;
|
|
6
|
+
align: string;
|
|
7
|
+
min: string;
|
|
8
|
+
max: string;
|
|
9
|
+
fill: string;
|
|
10
|
+
fillActive: string;
|
|
11
|
+
fillActiveHover: string;
|
|
12
|
+
fillDisabled: string;
|
|
13
|
+
fillHover: string;
|
|
14
|
+
initial: string;
|
|
15
|
+
isMobile: string;
|
|
16
|
+
isTablet: string;
|
|
17
|
+
isDesktop: string;
|
|
18
|
+
path: string;
|
|
19
|
+
template: string;
|
|
20
|
+
findIn: string;
|
|
21
|
+
findBy: string;
|
|
22
|
+
title: string;
|
|
23
|
+
subtitle: string;
|
|
24
|
+
label: string;
|
|
25
|
+
message: string;
|
|
26
|
+
desc: string;
|
|
27
|
+
description: string;
|
|
28
|
+
status: string;
|
|
29
|
+
border: string;
|
|
30
|
+
borderColor: string;
|
|
31
|
+
borderColorActive: string;
|
|
32
|
+
borderColorActiveHover: string;
|
|
33
|
+
borderColorDisabled: string;
|
|
34
|
+
borderColorHover: string;
|
|
35
|
+
shadow: string;
|
|
36
|
+
font: string;
|
|
37
|
+
text: string;
|
|
38
|
+
textColor: string;
|
|
39
|
+
textColorActive: string;
|
|
40
|
+
textColorActiveHover: string;
|
|
41
|
+
textColorDisabled: string;
|
|
42
|
+
textColorHover: string;
|
|
43
|
+
background: string;
|
|
44
|
+
ErrorNetworkMock: string;
|
|
45
|
+
ErrorRequestMock: string;
|
|
46
|
+
hasAccent: string;
|
|
47
|
+
hasAccentMuted: string;
|
|
48
|
+
hasDanger: string;
|
|
49
|
+
hasDangerMuted: string;
|
|
50
|
+
hasDefault: string;
|
|
51
|
+
hasDisabled: string;
|
|
52
|
+
hasDisabledMuted: string;
|
|
53
|
+
hasError: string;
|
|
54
|
+
hasErrorMuted: string;
|
|
55
|
+
hasFilled: string;
|
|
56
|
+
hasGet: string;
|
|
57
|
+
hasHigh: string;
|
|
58
|
+
hasHighest: string;
|
|
59
|
+
hasInfo: string;
|
|
60
|
+
hasInfoMuted: string;
|
|
61
|
+
hasInitialValues: string;
|
|
62
|
+
hasIs: string;
|
|
63
|
+
hasLoading: string;
|
|
64
|
+
hasLow: string;
|
|
65
|
+
hasLowest: string;
|
|
66
|
+
hasMedium: string;
|
|
67
|
+
hasMutedPrimaryAppearance: string;
|
|
68
|
+
hasMutedQuaternaryAppearance: string;
|
|
69
|
+
hasMutedSecondaryAppearance: string;
|
|
70
|
+
hasMutedTertiaryAppearance: string;
|
|
71
|
+
hasPrimary: string;
|
|
72
|
+
hasPrimaryAppearance: string;
|
|
73
|
+
hasPrimaryMuted: string;
|
|
74
|
+
hasQuaternary: string;
|
|
75
|
+
hasQuaternaryAppearance: string;
|
|
76
|
+
hasQuaternaryMuted: string;
|
|
77
|
+
hasRequire: string;
|
|
78
|
+
hasSecondary: string;
|
|
79
|
+
hasSecondaryAppearance: string;
|
|
80
|
+
hasSecondaryMuted: string;
|
|
81
|
+
hasServerError: string;
|
|
82
|
+
hasServerErrorData: string;
|
|
83
|
+
hasSet: string;
|
|
84
|
+
hasSuccess: string;
|
|
85
|
+
hasSuccessMuted: string;
|
|
86
|
+
hasSurface: string;
|
|
87
|
+
hasSurfaceMuted: string;
|
|
88
|
+
hasTertiary: string;
|
|
89
|
+
hasTertiaryAppearance: string;
|
|
90
|
+
hasTertiaryMuted: string;
|
|
91
|
+
hasValidation: string;
|
|
92
|
+
hasWarning: string;
|
|
93
|
+
hasWarningMuted: string;
|
|
94
|
+
open: string;
|
|
95
|
+
close: string;
|
|
96
|
+
onClick: string;
|
|
97
|
+
onError: string;
|
|
98
|
+
onSuccess: string;
|
|
99
|
+
on: string;
|
|
100
|
+
DefaultMock: string;
|
|
101
|
+
LoadingMock: string;
|
|
102
|
+
ErrorMock: string;
|
|
103
|
+
SuccessMock: string;
|
|
104
|
+
};
|
|
105
|
+
export { customGroups };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const sortExports: (string | {
|
|
2
|
+
type: string;
|
|
3
|
+
customGroups: never[];
|
|
4
|
+
fallbackSort: {
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
groups: never[];
|
|
8
|
+
ignoreCase: boolean;
|
|
9
|
+
newlinesBetween: string;
|
|
10
|
+
order: string;
|
|
11
|
+
partitionByComment: boolean;
|
|
12
|
+
partitionByNewLine: boolean;
|
|
13
|
+
specialCharacters: string;
|
|
14
|
+
})[];
|
|
15
|
+
export { sortExports };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const sortNamedExports: (string | {
|
|
2
|
+
type: string;
|
|
3
|
+
customGroups: never[];
|
|
4
|
+
fallbackSort: {
|
|
5
|
+
type: string;
|
|
6
|
+
};
|
|
7
|
+
groups: never[];
|
|
8
|
+
ignoreAlias: boolean;
|
|
9
|
+
ignoreCase: boolean;
|
|
10
|
+
newlinesBetween: string;
|
|
11
|
+
order: string;
|
|
12
|
+
partitionByComment: boolean;
|
|
13
|
+
partitionByNewLine: boolean;
|
|
14
|
+
specialCharacters: string;
|
|
15
|
+
})[];
|
|
16
|
+
export { sortNamedExports };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const sortObjects: (string | {
|
|
2
|
+
type: string;
|
|
3
|
+
groups: string[];
|
|
4
|
+
customGroups: {
|
|
5
|
+
groupName: string;
|
|
6
|
+
elementNamePattern: string;
|
|
7
|
+
}[];
|
|
8
|
+
useConfigurationIf: {
|
|
9
|
+
allNamesMatchPattern: string;
|
|
10
|
+
callingFunctionNamePattern: string;
|
|
11
|
+
};
|
|
12
|
+
order?: undefined;
|
|
13
|
+
} | {
|
|
14
|
+
type: string;
|
|
15
|
+
order: string;
|
|
16
|
+
groups: string[];
|
|
17
|
+
customGroups: {
|
|
18
|
+
groupName: string;
|
|
19
|
+
elementNamePattern: unknown;
|
|
20
|
+
}[];
|
|
21
|
+
useConfigurationIf?: undefined;
|
|
22
|
+
})[];
|
|
23
|
+
export { sortObjects };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { i as sortEnums, c as sortExports, h as sortInterfaces, g as sortIntersectionTypes, f as sortJSXProps, e as sortMaps, d as sortNamedExports, a as sortObjectTypes, b as sortObjects, s as sortUnionTypes } from '../sortUnionTypes_rTLrktP3.js';
|
|
2
|
+
|
|
3
|
+
const sortClasses = [
|
|
4
|
+
'error',
|
|
5
|
+
{
|
|
6
|
+
type: 'natural',
|
|
7
|
+
customGroups: [
|
|
8
|
+
{
|
|
9
|
+
elementNamePattern: 'id',
|
|
10
|
+
groupName: 'top',
|
|
11
|
+
},
|
|
12
|
+
],
|
|
13
|
+
groups: [
|
|
14
|
+
'top',
|
|
15
|
+
'index-signature',
|
|
16
|
+
'static-property',
|
|
17
|
+
'private-property',
|
|
18
|
+
'property',
|
|
19
|
+
'constructor',
|
|
20
|
+
'static-method',
|
|
21
|
+
'private-method',
|
|
22
|
+
'get-method',
|
|
23
|
+
'set-method',
|
|
24
|
+
'method',
|
|
25
|
+
],
|
|
26
|
+
order: 'asc',
|
|
27
|
+
},
|
|
28
|
+
];
|
|
29
|
+
|
|
30
|
+
export { sortClasses };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { fixupPluginRules } from '@eslint/compat';
|
|
2
|
+
import eslintReactNative from 'eslint-plugin-react-native';
|
|
3
|
+
|
|
4
|
+
var index = [
|
|
5
|
+
{
|
|
6
|
+
plugins: {
|
|
7
|
+
'react-native': fixupPluginRules(eslintReactNative),
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
rules: {
|
|
12
|
+
'react-native/no-color-literals': 'warn',
|
|
13
|
+
'react-native/no-inline-styles': 'warn',
|
|
14
|
+
'react-native/no-raw-text': 'off',
|
|
15
|
+
'react-native/no-single-element-style-arrays': 'error',
|
|
16
|
+
'react-native/no-unused-styles': 'error',
|
|
17
|
+
'react-native/split-platform-components': 'off',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
export { index as default };
|