eslint-config-typed 4.0.5 → 4.0.7
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/plugins/react-coding-style/rules/display-name.d.mts +2 -2
- package/dist/plugins/react-coding-style/rules/display-name.d.mts.map +1 -1
- package/dist/plugins/react-coding-style/rules/display-name.mjs +110 -30
- package/dist/plugins/react-coding-style/rules/display-name.mjs.map +1 -1
- package/dist/plugins/react-coding-style/rules/rules.d.mts +2 -2
- package/dist/rules/eslint-react-coding-style-rules.d.mts +1 -3
- package/dist/rules/eslint-react-coding-style-rules.d.mts.map +1 -1
- package/dist/rules/eslint-react-coding-style-rules.mjs +1 -1
- package/dist/rules/eslint-react-coding-style-rules.mjs.map +1 -1
- package/dist/rules/eslint-react-rules.d.mts +1 -1
- package/dist/rules/eslint-react-rules.mjs +1 -1
- package/dist/rules/eslint-react-rules.mjs.map +1 -1
- package/dist/types/rules/eslint-cypress-rules.d.mts +2 -2
- package/dist/types/rules/eslint-import-rules.d.mts +214 -168
- package/dist/types/rules/eslint-import-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-jest-rules.d.mts +47 -45
- package/dist/types/rules/eslint-jest-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-playwright-rules.d.mts +41 -34
- package/dist/types/rules/eslint-playwright-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-prefer-arrow-functions-rules.d.mts +6 -2
- package/dist/types/rules/eslint-prefer-arrow-functions-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-react-coding-style-rules.d.mts +21 -6
- package/dist/types/rules/eslint-react-coding-style-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-react-rules.d.mts +208 -185
- package/dist/types/rules/eslint-react-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-rules.d.mts +1244 -1073
- package/dist/types/rules/eslint-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-stylistic-rules.d.mts +707 -619
- package/dist/types/rules/eslint-stylistic-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-ts-restrictions-rules.d.mts +94 -76
- package/dist/types/rules/eslint-ts-restrictions-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-unicorn-rules.d.mts +145 -121
- package/dist/types/rules/eslint-unicorn-rules.d.mts.map +1 -1
- package/dist/types/rules/eslint-vitest-rules.d.mts +43 -42
- package/dist/types/rules/eslint-vitest-rules.d.mts.map +1 -1
- package/dist/types/rules/typescript-eslint-rules.d.mts +1973 -1763
- package/dist/types/rules/typescript-eslint-rules.d.mts.map +1 -1
- package/package.json +58 -57
- package/src/plugins/react-coding-style/README.md +4 -3
- package/src/plugins/react-coding-style/rules/display-name.mts +160 -38
- package/src/plugins/react-coding-style/rules/display-name.test.mts +70 -6
- package/src/plugins/react-coding-style/rules/shared.test.mts +148 -0
- package/src/plugins/vitest-coding-style/rules/original-assert-api-type.test.mts +147 -143
- package/src/rules/eslint-react-coding-style-rules.mts +1 -1
- package/src/rules/eslint-react-rules.mts +1 -1
- package/src/types/rules/eslint-cypress-rules.mts +2 -2
- package/src/types/rules/eslint-import-rules.mts +214 -168
- package/src/types/rules/eslint-jest-rules.mts +47 -45
- package/src/types/rules/eslint-playwright-rules.mts +41 -34
- package/src/types/rules/eslint-prefer-arrow-functions-rules.mts +6 -2
- package/src/types/rules/eslint-react-coding-style-rules.mts +21 -6
- package/src/types/rules/eslint-react-rules.mts +208 -185
- package/src/types/rules/eslint-rules.mts +1229 -1058
- package/src/types/rules/eslint-stylistic-rules.mts +707 -619
- package/src/types/rules/eslint-ts-restrictions-rules.mts +94 -76
- package/src/types/rules/eslint-unicorn-rules.mts +145 -121
- package/src/types/rules/eslint-vitest-rules.mts +43 -42
- package/src/types/rules/typescript-eslint-rules.mts +1973 -1763
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { type TSESLint } from '@typescript-eslint/utils';
|
|
2
2
|
type Options = readonly [
|
|
3
3
|
Readonly<{
|
|
4
|
-
|
|
4
|
+
ignoreName?: string | readonly string[];
|
|
5
5
|
}>?
|
|
6
6
|
];
|
|
7
|
-
type MessageIds = 'missingDisplayName';
|
|
7
|
+
type MessageIds = 'missingDisplayName' | 'mismatchedDisplayName';
|
|
8
8
|
/**
|
|
9
9
|
* Rule to require displayName property for React components
|
|
10
10
|
* This helps with debugging and component identification in React DevTools
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-name.d.mts","sourceRoot":"","sources":["../../../../src/plugins/react-coding-style/rules/display-name.mts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EAEd,MAAM,0BAA0B,CAAC;AAIlC,KAAK,OAAO,GAAG,SAAS;IACtB,QAAQ,CAAC;QACP,
|
|
1
|
+
{"version":3,"file":"display-name.d.mts","sourceRoot":"","sources":["../../../../src/plugins/react-coding-style/rules/display-name.mts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,QAAQ,EAEd,MAAM,0BAA0B,CAAC;AAIlC,KAAK,OAAO,GAAG,SAAS;IACtB,QAAQ,CAAC;QACP,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;KACzC,CAAC,CAAC;CACJ,CAAC;AAEF,KAAK,UAAU,GAAG,oBAAoB,GAAG,uBAAuB,CAAC;AAEjE;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,UAAU,EAAE,OAAO,CA6GpE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
|
|
2
|
-
import 'ts-data-forge';
|
|
2
|
+
import { castDeepMutable } from 'ts-data-forge';
|
|
3
3
|
import { isReactApiCall } from './shared.mjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -10,15 +10,22 @@ const displayNameRule = {
|
|
|
10
10
|
meta: {
|
|
11
11
|
type: 'suggestion',
|
|
12
12
|
docs: {
|
|
13
|
-
description: 'Require
|
|
13
|
+
description: 'Require React.memo components to define displayName matching the component name',
|
|
14
14
|
},
|
|
15
15
|
schema: [
|
|
16
16
|
{
|
|
17
17
|
type: 'object',
|
|
18
18
|
properties: {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
ignoreName: {
|
|
20
|
+
description: 'Component names allowed to have displayName different from the variable name.',
|
|
21
|
+
oneOf: [
|
|
22
|
+
{ type: 'string' },
|
|
23
|
+
{
|
|
24
|
+
type: 'array',
|
|
25
|
+
items: { type: 'string' },
|
|
26
|
+
minItems: 0,
|
|
27
|
+
},
|
|
28
|
+
],
|
|
22
29
|
},
|
|
23
30
|
},
|
|
24
31
|
additionalProperties: false,
|
|
@@ -26,11 +33,13 @@ const displayNameRule = {
|
|
|
26
33
|
],
|
|
27
34
|
messages: {
|
|
28
35
|
missingDisplayName: 'Component should have a displayName property for better debugging',
|
|
36
|
+
mismatchedDisplayName: 'displayName should match the component name "{{componentName}}"',
|
|
29
37
|
},
|
|
30
38
|
},
|
|
31
39
|
create: (context) => {
|
|
32
40
|
const options = context.options[0] ?? {};
|
|
33
|
-
const
|
|
41
|
+
const ignoreNameSet = normalizeNames(options.ignoreName);
|
|
42
|
+
const shouldIgnoreMismatch = (componentName) => ignoreNameSet.has(componentName);
|
|
34
43
|
const checkComponent = (node) => {
|
|
35
44
|
if (node.id.type !== AST_NODE_TYPES.Identifier) {
|
|
36
45
|
return;
|
|
@@ -42,36 +51,38 @@ const displayNameRule = {
|
|
|
42
51
|
return;
|
|
43
52
|
}
|
|
44
53
|
const componentName = node.id.name;
|
|
45
|
-
|
|
54
|
+
const assignment = getDisplayNameAssignment(node);
|
|
55
|
+
if (assignment === undefined) {
|
|
56
|
+
context.report({
|
|
57
|
+
node: castDeepMutable(node),
|
|
58
|
+
messageId: 'missingDisplayName',
|
|
59
|
+
});
|
|
46
60
|
return;
|
|
47
61
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
62
|
+
if (!isComponentDisplayNameAssignment(assignment, componentName)) {
|
|
63
|
+
context.report({
|
|
64
|
+
node: castDeepMutable(node),
|
|
65
|
+
messageId: 'missingDisplayName',
|
|
66
|
+
});
|
|
51
67
|
return;
|
|
52
68
|
}
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
69
|
+
const displayName = extractDisplayName(assignment.right);
|
|
70
|
+
if (displayName === undefined) {
|
|
71
|
+
context.report({
|
|
72
|
+
node: assignment.right,
|
|
73
|
+
messageId: 'mismatchedDisplayName',
|
|
74
|
+
data: { componentName },
|
|
75
|
+
});
|
|
56
76
|
return;
|
|
57
77
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
nextStatement.expression.left.type ===
|
|
63
|
-
AST_NODE_TYPES.MemberExpression &&
|
|
64
|
-
nextStatement.expression.left.object.type ===
|
|
65
|
-
AST_NODE_TYPES.Identifier &&
|
|
66
|
-
nextStatement.expression.left.object.name === componentName &&
|
|
67
|
-
nextStatement.expression.left.property.type ===
|
|
68
|
-
AST_NODE_TYPES.Identifier &&
|
|
69
|
-
nextStatement.expression.left.property.name === 'displayName';
|
|
70
|
-
if (!hasDisplayName) {
|
|
78
|
+
if (shouldIgnoreMismatch(componentName)) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (displayName !== componentName) {
|
|
71
82
|
context.report({
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
83
|
+
node: assignment.right,
|
|
84
|
+
messageId: 'mismatchedDisplayName',
|
|
85
|
+
data: { componentName },
|
|
75
86
|
});
|
|
76
87
|
}
|
|
77
88
|
};
|
|
@@ -79,7 +90,76 @@ const displayNameRule = {
|
|
|
79
90
|
VariableDeclarator: checkComponent,
|
|
80
91
|
};
|
|
81
92
|
},
|
|
82
|
-
defaultOptions: [{
|
|
93
|
+
defaultOptions: [{ ignoreName: [] }],
|
|
94
|
+
};
|
|
95
|
+
const normalizeNames = (names) => {
|
|
96
|
+
if (names === undefined) {
|
|
97
|
+
return new Set();
|
|
98
|
+
}
|
|
99
|
+
if (typeof names === 'string') {
|
|
100
|
+
return new Set([names]);
|
|
101
|
+
}
|
|
102
|
+
return new Set(names);
|
|
103
|
+
};
|
|
104
|
+
const getDisplayNameAssignment = (node) => {
|
|
105
|
+
let mut_current = node.parent;
|
|
106
|
+
let mut_statement = undefined;
|
|
107
|
+
while (mut_current !== undefined) {
|
|
108
|
+
if (mut_current.type === AST_NODE_TYPES.VariableDeclaration ||
|
|
109
|
+
mut_current.type === AST_NODE_TYPES.ExportNamedDeclaration) {
|
|
110
|
+
mut_statement = mut_current;
|
|
111
|
+
}
|
|
112
|
+
if (mut_current.type === AST_NODE_TYPES.Program) {
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
mut_current = mut_current.parent;
|
|
116
|
+
}
|
|
117
|
+
if (mut_current === undefined || mut_statement === undefined) {
|
|
118
|
+
return undefined;
|
|
119
|
+
}
|
|
120
|
+
const program = mut_current;
|
|
121
|
+
const componentIndex = program.body.indexOf(
|
|
122
|
+
// eslint-disable-next-line total-functions/no-unsafe-type-assertion
|
|
123
|
+
mut_statement);
|
|
124
|
+
if (componentIndex === -1) {
|
|
125
|
+
return undefined;
|
|
126
|
+
}
|
|
127
|
+
const nextStatement = program.body[componentIndex + 1];
|
|
128
|
+
if (nextStatement === undefined) {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
if (nextStatement.type !== AST_NODE_TYPES.ExpressionStatement) {
|
|
132
|
+
return undefined;
|
|
133
|
+
}
|
|
134
|
+
if (nextStatement.expression.type !== AST_NODE_TYPES.AssignmentExpression) {
|
|
135
|
+
return undefined;
|
|
136
|
+
}
|
|
137
|
+
return nextStatement.expression;
|
|
138
|
+
};
|
|
139
|
+
const isComponentDisplayNameAssignment = (assignment, componentName) => {
|
|
140
|
+
if (assignment.left.type !== AST_NODE_TYPES.MemberExpression) {
|
|
141
|
+
return false;
|
|
142
|
+
}
|
|
143
|
+
if (assignment.left.object.type !== AST_NODE_TYPES.Identifier) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
if (assignment.left.object.name !== componentName) {
|
|
147
|
+
return false;
|
|
148
|
+
}
|
|
149
|
+
return (assignment.left.property.type === AST_NODE_TYPES.Identifier &&
|
|
150
|
+
assignment.left.property.name === 'displayName');
|
|
151
|
+
};
|
|
152
|
+
const extractDisplayName = (expression) => {
|
|
153
|
+
if (expression.type === AST_NODE_TYPES.Literal &&
|
|
154
|
+
typeof expression.value === 'string') {
|
|
155
|
+
return expression.value;
|
|
156
|
+
}
|
|
157
|
+
if (expression.type === AST_NODE_TYPES.TemplateLiteral &&
|
|
158
|
+
expression.expressions.length === 0 &&
|
|
159
|
+
expression.quasis.length === 1) {
|
|
160
|
+
return expression.quasis[0]?.value.cooked ?? undefined;
|
|
161
|
+
}
|
|
162
|
+
return undefined;
|
|
83
163
|
};
|
|
84
164
|
|
|
85
165
|
export { displayNameRule };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display-name.mjs","sources":["../../../../src/plugins/react-coding-style/rules/display-name.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAgBA;;;AAGG;AACI,MAAM,eAAe,GAA6C;AACvE,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,YAAY;AAClB,QAAA,IAAI,EAAE;AACJ,YAAA,WAAW,EACT,
|
|
1
|
+
{"version":3,"file":"display-name.mjs","sources":["../../../../src/plugins/react-coding-style/rules/display-name.mts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAgBA;;;AAGG;AACI,MAAM,eAAe,GAA6C;AACvE,IAAA,IAAI,EAAE;AACJ,QAAA,IAAI,EAAE,YAAY;AAClB,QAAA,IAAI,EAAE;AACJ,YAAA,WAAW,EACT,iFAAiF;AACpF,SAAA;AACD,QAAA,MAAM,EAAE;AACN,YAAA;AACE,gBAAA,IAAI,EAAE,QAAQ;AACd,gBAAA,UAAU,EAAE;AACV,oBAAA,UAAU,EAAE;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AC0B;IAC/C,IAAI,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,gBAAgB,EAAE;AAC5D,QAAA,OAAO,KAAK;IACd;AAEA,IAAA,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU,EAAE;AAC7D,QAAA,OAAO,KAAK;IACd;IAEA,IAAI,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,aAAa,EAAE;AACjD,QAAA,OAAO,KAAK;IACd;IAEA,QACE,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,cAAc,CAAC,UAAU;QAC3D,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,KAAK,aAAa;AAEnD,CAAC;AAED,MAAM,kBAAkB,GAAG,CACzB,UAA6C,KACvB;AACtB,IAAA,IACE,UAAU,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO;AAC1C,QAAA,OAAO,UAAU,CAAC,KAAK,KAAK,QAAQ,EACpC;QACA,OAAO,UAAU,CAAC,KAAK;IACzB;AAEA,IAAA,IACE,UAAU,CAAC,IAAI,KAAK,cAAc,CAAC,eAAe;AAClD,QAAA,UAAU,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC;AACnC,QAAA,UAAU,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,EAC9B;AACA,QAAA,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,IAAI,SAAS;IACxD;AAEA,IAAA,OAAO,SAAS;AAClB,CAAC;;;;"}
|
|
@@ -12,8 +12,8 @@ export declare const reactCodingStyleRules: {
|
|
|
12
12
|
readonly 'react-memo-type-parameter': import("@typescript-eslint/utils/ts-eslint").RuleModule<"requirePropsTypeParameter" | "omitTypeParameterWhenPropsEmpty", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
13
13
|
readonly 'use-memo-hook-style': import("@typescript-eslint/utils/ts-eslint").RuleModule<"disallowUseMemoTypeAnnotation", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
14
14
|
readonly 'ban-use-imperative-handle-hook': import("@typescript-eslint/utils/ts-eslint").RuleModule<"disallowUseImperativeHandle", [], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
15
|
-
readonly 'display-name': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingDisplayName", readonly [(Readonly<{
|
|
16
|
-
|
|
15
|
+
readonly 'display-name': import("@typescript-eslint/utils/ts-eslint").RuleModule<"missingDisplayName" | "mismatchedDisplayName", readonly [(Readonly<{
|
|
16
|
+
ignoreName?: string | readonly string[];
|
|
17
17
|
}> | undefined)?], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener>;
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=rules.d.mts.map
|
|
@@ -11,8 +11,6 @@ export declare const eslintReactCodingStyleRules: {
|
|
|
11
11
|
readonly 'react-coding-style/react-memo-type-parameter': "error";
|
|
12
12
|
readonly 'react-coding-style/ban-use-imperative-handle-hook': "error";
|
|
13
13
|
readonly 'react-coding-style/use-memo-hook-style': "error";
|
|
14
|
-
readonly 'react-coding-style/display-name': readonly ["error", {
|
|
15
|
-
readonly ignoreTranspilerName: false;
|
|
16
|
-
}];
|
|
14
|
+
readonly 'react-coding-style/display-name': readonly ["error", {}];
|
|
17
15
|
};
|
|
18
16
|
//# sourceMappingURL=eslint-react-coding-style-rules.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-react-coding-style-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-react-coding-style-rules.mts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"eslint-react-coding-style-rules.d.mts","sourceRoot":"","sources":["../../src/rules/eslint-react-coding-style-rules.mts"],"names":[],"mappings":"AAEA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;CAYQ,CAAC"}
|
|
@@ -8,7 +8,7 @@ const eslintReactCodingStyleRules = {
|
|
|
8
8
|
'react-coding-style/react-memo-type-parameter': 'error',
|
|
9
9
|
'react-coding-style/ban-use-imperative-handle-hook': 'error',
|
|
10
10
|
'react-coding-style/use-memo-hook-style': 'error',
|
|
11
|
-
'react-coding-style/display-name': ['error', {
|
|
11
|
+
'react-coding-style/display-name': ['error', {}],
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export { eslintReactCodingStyleRules };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-react-coding-style-rules.mjs","sources":["../../src/rules/eslint-react-coding-style-rules.mts"],"sourcesContent":[null],"names":[],"mappings":"AAEO,MAAM,2BAA2B,GAAG;;IAEzC,iCAAiC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;IAE1E,mCAAmC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;AACjE,IAAA,kDAAkD,EAAE,OAAO;AAC3D,IAAA,gDAAgD,EAAE,OAAO;AACzD,IAAA,mDAAmD,EAAE,OAAO;AAC5D,IAAA,8CAA8C,EAAE,OAAO;AACvD,IAAA,mDAAmD,EAAE,OAAO;AAC5D,IAAA,wCAAwC,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"eslint-react-coding-style-rules.mjs","sources":["../../src/rules/eslint-react-coding-style-rules.mts"],"sourcesContent":[null],"names":[],"mappings":"AAEO,MAAM,2BAA2B,GAAG;;IAEzC,iCAAiC,EAAE,CAAC,OAAO,EAAE,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;IAE1E,mCAAmC,EAAE,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC;AACjE,IAAA,kDAAkD,EAAE,OAAO;AAC3D,IAAA,gDAAgD,EAAE,OAAO;AACzD,IAAA,mDAAmD,EAAE,OAAO;AAC5D,IAAA,8CAA8C,EAAE,OAAO;AACvD,IAAA,mDAAmD,EAAE,OAAO;AAC5D,IAAA,wCAAwC,EAAE,OAAO;AACjD,IAAA,iCAAiC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC;;;;;"}
|
|
@@ -24,7 +24,7 @@ export declare const eslintReactRules: {
|
|
|
24
24
|
readonly 'react/default-props-match-prop-types': 2 | 1;
|
|
25
25
|
/** Enforce consistent usage of props destructuring. */
|
|
26
26
|
readonly 'react/destructuring-assignment': 2 | 1;
|
|
27
|
-
readonly 'react/display-name':
|
|
27
|
+
readonly 'react/display-name': "off";
|
|
28
28
|
readonly 'react/forbid-component-props': readonly ["error", {
|
|
29
29
|
readonly forbid: readonly ["className"];
|
|
30
30
|
}];
|
|
@@ -26,7 +26,7 @@ const eslintReactRules = {
|
|
|
26
26
|
'react/default-props-match-prop-types': withDefaultOption('error'),
|
|
27
27
|
/** Enforce consistent usage of props destructuring. */
|
|
28
28
|
'react/destructuring-assignment': withDefaultOption('error'),
|
|
29
|
-
'react/display-name':
|
|
29
|
+
'react/display-name': 'off', // Covered by react-coding-style/display-name
|
|
30
30
|
'react/forbid-component-props': ['error', { forbid: ['className'] }],
|
|
31
31
|
'react/forbid-dom-props': withDefaultOption('error'),
|
|
32
32
|
'react/forbid-elements': withDefaultOption('error'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eslint-react-rules.mjs","sources":["../../src/rules/eslint-react-rules.mts"],"sourcesContent":[null],"names":[],"mappings":";;AAEO,MAAM,gBAAgB,GAAG;AAC9B;;;;AAIG;AACH,IAAA,iCAAiC,EAAE,KAAK;AACxC,IAAA,oCAAoC,EAAE,KAAK;AAC3C,IAAA,gCAAgC,EAAE,KAAK;AACvC,IAAA,yBAAyB,EAAE,KAAK;AAChC,IAAA,yBAAyB,EAAE,KAAK;AAChC,IAAA,0BAA0B,EAAE,KAAK;AACjC,IAAA,+BAA+B,EAAE,KAAK;AACtC,IAAA,kBAAkB,EAAE,KAAK;AACzB,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,EAAE,iBAAiB,CAAC,OAAO,CAAC;AACxD,IAAA,iCAAiC,EAAE,iBAAiB,CAAC,OAAO,CAAC;AAC7D,IAAA,yBAAyB,EAAE,iBAAiB,CAAC,OAAO,CAAC;AACrD,IAAA,qCAAqC,EAAE,OAAO;AAC9C,IAAA,4BAA4B,EAAE;QAC5B,OAAO;AACP,QAAA;YACE,eAAe,EAAE,CAAC,SAAS,CAAC;AAC7B,SAAA;AACF,KAAA;AACD,IAAA,6CAA6C,EAAE,iBAAiB,CAAC,OAAO,CAAC;AACzE,IAAA,iCAAiC,EAAE,OAAO;AAC1C,IAAA,4BAA4B,EAAE,OAAO;;AAGrC,IAAA,8BAA8B,EAAE,CAAC;AACjC,IAAA,gCAAgC,EAAE,CAAC;;;;;"}
|
|
@@ -196,7 +196,6 @@ declare namespace UnsafeToChainCommand {
|
|
|
196
196
|
* ```json
|
|
197
197
|
* [
|
|
198
198
|
* {
|
|
199
|
-
* "title": "rules",
|
|
200
199
|
* "description": "disallow actions within chains",
|
|
201
200
|
* "type": "object",
|
|
202
201
|
* "properties": {
|
|
@@ -205,7 +204,8 @@ declare namespace UnsafeToChainCommand {
|
|
|
205
204
|
* "description": "An additional list of methods to check for unsafe chaining.",
|
|
206
205
|
* "default": []
|
|
207
206
|
* }
|
|
208
|
-
* }
|
|
207
|
+
* },
|
|
208
|
+
* "title": "Options"
|
|
209
209
|
* }
|
|
210
210
|
* ]
|
|
211
211
|
* ```
|