eslint-plugin-react-x 1.34.0-next.1 → 1.34.0-next.2
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/index.d.mts +9 -5
- package/dist/index.d.ts +9 -5
- package/dist/index.js +15 -13
- package/dist/index.mjs +15 -13
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
2
|
import { RulePreset } from '@eslint-react/shared';
|
|
3
3
|
|
|
4
|
-
type MessageID$1 = "
|
|
4
|
+
type MessageID$1 = "noNestedComponentDefinition" | "noNestedComponentDefinitionInProps";
|
|
5
5
|
|
|
6
6
|
type MessageID = "missingKey" | "unexpectedFragmentSyntax";
|
|
7
7
|
|
|
@@ -44,7 +44,7 @@ declare const _default: {
|
|
|
44
44
|
readonly "no-missing-component-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingComponentDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
45
45
|
readonly "no-missing-context-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingContextDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
46
46
|
readonly "no-missing-key": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
47
|
-
readonly "no-nested-
|
|
47
|
+
readonly "no-nested-component-definitions": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
48
48
|
readonly "no-prop-types": _typescript_eslint_utils_ts_eslint.RuleModule<"noPropTypes", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
49
49
|
readonly "no-redundant-should-component-update": _typescript_eslint_utils_ts_eslint.RuleModule<"noRedundantShouldComponentUpdate", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
50
50
|
readonly "no-set-state-in-component-did-mount": _typescript_eslint_utils_ts_eslint.RuleModule<"noSetStateInComponentDidMount", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -73,6 +73,7 @@ declare const _default: {
|
|
|
73
73
|
readonly "jsx-no-duplicate-props": _typescript_eslint_utils_ts_eslint.RuleModule<"noDuplicateJsxProps", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
74
74
|
readonly "jsx-uses-vars": _typescript_eslint_utils_ts_eslint.RuleModule<"useJsxVars", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
75
75
|
readonly "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
76
|
+
readonly "no-nested-components": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
76
77
|
};
|
|
77
78
|
};
|
|
78
79
|
};
|
|
@@ -120,7 +121,7 @@ declare const _default: {
|
|
|
120
121
|
readonly "no-missing-component-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingComponentDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
121
122
|
readonly "no-missing-context-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingContextDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
122
123
|
readonly "no-missing-key": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
123
|
-
readonly "no-nested-
|
|
124
|
+
readonly "no-nested-component-definitions": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
124
125
|
readonly "no-prop-types": _typescript_eslint_utils_ts_eslint.RuleModule<"noPropTypes", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
125
126
|
readonly "no-redundant-should-component-update": _typescript_eslint_utils_ts_eslint.RuleModule<"noRedundantShouldComponentUpdate", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
126
127
|
readonly "no-set-state-in-component-did-mount": _typescript_eslint_utils_ts_eslint.RuleModule<"noSetStateInComponentDidMount", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -149,6 +150,7 @@ declare const _default: {
|
|
|
149
150
|
readonly "jsx-no-duplicate-props": _typescript_eslint_utils_ts_eslint.RuleModule<"noDuplicateJsxProps", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
150
151
|
readonly "jsx-uses-vars": _typescript_eslint_utils_ts_eslint.RuleModule<"useJsxVars", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
151
152
|
readonly "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
153
|
+
readonly "no-nested-components": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
152
154
|
};
|
|
153
155
|
};
|
|
154
156
|
};
|
|
@@ -196,7 +198,7 @@ declare const _default: {
|
|
|
196
198
|
readonly "no-missing-component-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingComponentDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
197
199
|
readonly "no-missing-context-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingContextDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
198
200
|
readonly "no-missing-key": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
199
|
-
readonly "no-nested-
|
|
201
|
+
readonly "no-nested-component-definitions": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
200
202
|
readonly "no-prop-types": _typescript_eslint_utils_ts_eslint.RuleModule<"noPropTypes", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
201
203
|
readonly "no-redundant-should-component-update": _typescript_eslint_utils_ts_eslint.RuleModule<"noRedundantShouldComponentUpdate", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
202
204
|
readonly "no-set-state-in-component-did-mount": _typescript_eslint_utils_ts_eslint.RuleModule<"noSetStateInComponentDidMount", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -225,6 +227,7 @@ declare const _default: {
|
|
|
225
227
|
readonly "jsx-no-duplicate-props": _typescript_eslint_utils_ts_eslint.RuleModule<"noDuplicateJsxProps", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
226
228
|
readonly "jsx-uses-vars": _typescript_eslint_utils_ts_eslint.RuleModule<"useJsxVars", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
227
229
|
readonly "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
230
|
+
readonly "no-nested-components": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
228
231
|
};
|
|
229
232
|
};
|
|
230
233
|
};
|
|
@@ -270,7 +273,7 @@ declare const _default: {
|
|
|
270
273
|
readonly "no-missing-component-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingComponentDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
271
274
|
readonly "no-missing-context-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingContextDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
272
275
|
readonly "no-missing-key": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
273
|
-
readonly "no-nested-
|
|
276
|
+
readonly "no-nested-component-definitions": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
274
277
|
readonly "no-prop-types": _typescript_eslint_utils_ts_eslint.RuleModule<"noPropTypes", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
275
278
|
readonly "no-redundant-should-component-update": _typescript_eslint_utils_ts_eslint.RuleModule<"noRedundantShouldComponentUpdate", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
276
279
|
readonly "no-set-state-in-component-did-mount": _typescript_eslint_utils_ts_eslint.RuleModule<"noSetStateInComponentDidMount", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -299,6 +302,7 @@ declare const _default: {
|
|
|
299
302
|
readonly "jsx-no-duplicate-props": _typescript_eslint_utils_ts_eslint.RuleModule<"noDuplicateJsxProps", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
300
303
|
readonly "jsx-uses-vars": _typescript_eslint_utils_ts_eslint.RuleModule<"useJsxVars", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
301
304
|
readonly "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
305
|
+
readonly "no-nested-components": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
302
306
|
};
|
|
303
307
|
};
|
|
304
308
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _typescript_eslint_utils_ts_eslint from '@typescript-eslint/utils/ts-eslint';
|
|
2
2
|
import { RulePreset } from '@eslint-react/shared';
|
|
3
3
|
|
|
4
|
-
type MessageID$1 = "
|
|
4
|
+
type MessageID$1 = "noNestedComponentDefinition" | "noNestedComponentDefinitionInProps";
|
|
5
5
|
|
|
6
6
|
type MessageID = "missingKey" | "unexpectedFragmentSyntax";
|
|
7
7
|
|
|
@@ -44,7 +44,7 @@ declare const _default: {
|
|
|
44
44
|
readonly "no-missing-component-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingComponentDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
45
45
|
readonly "no-missing-context-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingContextDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
46
46
|
readonly "no-missing-key": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
47
|
-
readonly "no-nested-
|
|
47
|
+
readonly "no-nested-component-definitions": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
48
48
|
readonly "no-prop-types": _typescript_eslint_utils_ts_eslint.RuleModule<"noPropTypes", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
49
49
|
readonly "no-redundant-should-component-update": _typescript_eslint_utils_ts_eslint.RuleModule<"noRedundantShouldComponentUpdate", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
50
50
|
readonly "no-set-state-in-component-did-mount": _typescript_eslint_utils_ts_eslint.RuleModule<"noSetStateInComponentDidMount", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -73,6 +73,7 @@ declare const _default: {
|
|
|
73
73
|
readonly "jsx-no-duplicate-props": _typescript_eslint_utils_ts_eslint.RuleModule<"noDuplicateJsxProps", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
74
74
|
readonly "jsx-uses-vars": _typescript_eslint_utils_ts_eslint.RuleModule<"useJsxVars", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
75
75
|
readonly "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
76
|
+
readonly "no-nested-components": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
76
77
|
};
|
|
77
78
|
};
|
|
78
79
|
};
|
|
@@ -120,7 +121,7 @@ declare const _default: {
|
|
|
120
121
|
readonly "no-missing-component-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingComponentDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
121
122
|
readonly "no-missing-context-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingContextDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
122
123
|
readonly "no-missing-key": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
123
|
-
readonly "no-nested-
|
|
124
|
+
readonly "no-nested-component-definitions": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
124
125
|
readonly "no-prop-types": _typescript_eslint_utils_ts_eslint.RuleModule<"noPropTypes", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
125
126
|
readonly "no-redundant-should-component-update": _typescript_eslint_utils_ts_eslint.RuleModule<"noRedundantShouldComponentUpdate", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
126
127
|
readonly "no-set-state-in-component-did-mount": _typescript_eslint_utils_ts_eslint.RuleModule<"noSetStateInComponentDidMount", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -149,6 +150,7 @@ declare const _default: {
|
|
|
149
150
|
readonly "jsx-no-duplicate-props": _typescript_eslint_utils_ts_eslint.RuleModule<"noDuplicateJsxProps", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
150
151
|
readonly "jsx-uses-vars": _typescript_eslint_utils_ts_eslint.RuleModule<"useJsxVars", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
151
152
|
readonly "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
153
|
+
readonly "no-nested-components": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
152
154
|
};
|
|
153
155
|
};
|
|
154
156
|
};
|
|
@@ -196,7 +198,7 @@ declare const _default: {
|
|
|
196
198
|
readonly "no-missing-component-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingComponentDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
197
199
|
readonly "no-missing-context-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingContextDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
198
200
|
readonly "no-missing-key": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
199
|
-
readonly "no-nested-
|
|
201
|
+
readonly "no-nested-component-definitions": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
200
202
|
readonly "no-prop-types": _typescript_eslint_utils_ts_eslint.RuleModule<"noPropTypes", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
201
203
|
readonly "no-redundant-should-component-update": _typescript_eslint_utils_ts_eslint.RuleModule<"noRedundantShouldComponentUpdate", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
202
204
|
readonly "no-set-state-in-component-did-mount": _typescript_eslint_utils_ts_eslint.RuleModule<"noSetStateInComponentDidMount", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -225,6 +227,7 @@ declare const _default: {
|
|
|
225
227
|
readonly "jsx-no-duplicate-props": _typescript_eslint_utils_ts_eslint.RuleModule<"noDuplicateJsxProps", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
226
228
|
readonly "jsx-uses-vars": _typescript_eslint_utils_ts_eslint.RuleModule<"useJsxVars", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
227
229
|
readonly "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
230
|
+
readonly "no-nested-components": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
228
231
|
};
|
|
229
232
|
};
|
|
230
233
|
};
|
|
@@ -270,7 +273,7 @@ declare const _default: {
|
|
|
270
273
|
readonly "no-missing-component-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingComponentDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
271
274
|
readonly "no-missing-context-display-name": _typescript_eslint_utils_ts_eslint.RuleModule<"noMissingContextDisplayName", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
272
275
|
readonly "no-missing-key": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
273
|
-
readonly "no-nested-
|
|
276
|
+
readonly "no-nested-component-definitions": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
274
277
|
readonly "no-prop-types": _typescript_eslint_utils_ts_eslint.RuleModule<"noPropTypes", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
275
278
|
readonly "no-redundant-should-component-update": _typescript_eslint_utils_ts_eslint.RuleModule<"noRedundantShouldComponentUpdate", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
276
279
|
readonly "no-set-state-in-component-did-mount": _typescript_eslint_utils_ts_eslint.RuleModule<"noSetStateInComponentDidMount", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
@@ -299,6 +302,7 @@ declare const _default: {
|
|
|
299
302
|
readonly "jsx-no-duplicate-props": _typescript_eslint_utils_ts_eslint.RuleModule<"noDuplicateJsxProps", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
300
303
|
readonly "jsx-uses-vars": _typescript_eslint_utils_ts_eslint.RuleModule<"useJsxVars", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
301
304
|
readonly "no-complicated-conditional-rendering": _typescript_eslint_utils_ts_eslint.RuleModule<"noComplexConditionalRendering", [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
305
|
+
readonly "no-nested-components": _typescript_eslint_utils_ts_eslint.RuleModule<MessageID$1, [], unknown, _typescript_eslint_utils_ts_eslint.RuleListener>;
|
|
302
306
|
};
|
|
303
307
|
};
|
|
304
308
|
|
package/dist/index.js
CHANGED
|
@@ -75,7 +75,7 @@ var rules = {
|
|
|
75
75
|
"react-x/no-forward-ref": "warn",
|
|
76
76
|
"react-x/no-implicit-key": "warn",
|
|
77
77
|
"react-x/no-missing-key": "error",
|
|
78
|
-
"react-x/no-nested-
|
|
78
|
+
"react-x/no-nested-component-definitions": "error",
|
|
79
79
|
"react-x/no-prop-types": "error",
|
|
80
80
|
"react-x/no-redundant-should-component-update": "error",
|
|
81
81
|
"react-x/no-set-state-in-component-did-mount": "warn",
|
|
@@ -136,7 +136,7 @@ var settings3 = {
|
|
|
136
136
|
|
|
137
137
|
// package.json
|
|
138
138
|
var name4 = "eslint-plugin-react-x";
|
|
139
|
-
var version = "1.34.0-next.
|
|
139
|
+
var version = "1.34.0-next.2";
|
|
140
140
|
var createRule = shared.createRuleForPlugin("x");
|
|
141
141
|
|
|
142
142
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -1911,11 +1911,11 @@ function create27(context) {
|
|
|
1911
1911
|
function isArrayFromCall(node) {
|
|
1912
1912
|
return node.type === types.AST_NODE_TYPES.CallExpression && node.callee.type === types.AST_NODE_TYPES.MemberExpression && node.callee.property.type === types.AST_NODE_TYPES.Identifier && node.callee.property.name === "from";
|
|
1913
1913
|
}
|
|
1914
|
-
var RULE_NAME30 = "no-nested-
|
|
1914
|
+
var RULE_NAME30 = "no-nested-component-definitions";
|
|
1915
1915
|
var RULE_FEATURES30 = [
|
|
1916
1916
|
"CHK"
|
|
1917
1917
|
];
|
|
1918
|
-
var
|
|
1918
|
+
var no_nested_component_definitions_default = createRule({
|
|
1919
1919
|
meta: {
|
|
1920
1920
|
type: "problem",
|
|
1921
1921
|
docs: {
|
|
@@ -1923,8 +1923,8 @@ var no_nested_components_default = createRule({
|
|
|
1923
1923
|
[Symbol.for("rule_features")]: RULE_FEATURES30
|
|
1924
1924
|
},
|
|
1925
1925
|
messages: {
|
|
1926
|
-
|
|
1927
|
-
|
|
1926
|
+
noNestedComponentDefinition: "Do not nest component definitions inside other components. Move it to the top level.",
|
|
1927
|
+
noNestedComponentDefinitionInProps: "Do not nest component definitions inside props. Move it to the top level or pass it as a prop."
|
|
1928
1928
|
},
|
|
1929
1929
|
schema: []
|
|
1930
1930
|
},
|
|
@@ -1964,7 +1964,7 @@ function create28(context) {
|
|
|
1964
1964
|
if (isInsideJSXPropValue) {
|
|
1965
1965
|
if (!core.isDeclaredInRenderPropLoose(component)) {
|
|
1966
1966
|
context.report({
|
|
1967
|
-
messageId: "
|
|
1967
|
+
messageId: "noNestedComponentDefinitionInProps",
|
|
1968
1968
|
node: component,
|
|
1969
1969
|
data: {
|
|
1970
1970
|
name: name5
|
|
@@ -1975,7 +1975,7 @@ function create28(context) {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
if (isInsideCreateElementProps(context, component)) {
|
|
1977
1977
|
context.report({
|
|
1978
|
-
messageId: "
|
|
1978
|
+
messageId: "noNestedComponentDefinitionInProps",
|
|
1979
1979
|
node: component,
|
|
1980
1980
|
data: {
|
|
1981
1981
|
name: name5
|
|
@@ -1987,7 +1987,7 @@ function create28(context) {
|
|
|
1987
1987
|
const isParentComponentNotDirectValueOfRenderProperty = parentComponent != null && !core.isDirectValueOfRenderPropertyLoose(parentComponent);
|
|
1988
1988
|
if (isParentComponentNotDirectValueOfRenderProperty) {
|
|
1989
1989
|
context.report({
|
|
1990
|
-
messageId: isInsideProperty ? "
|
|
1990
|
+
messageId: isInsideProperty ? "noNestedComponentDefinitionInProps" : "noNestedComponentDefinition",
|
|
1991
1991
|
node: component,
|
|
1992
1992
|
data: {
|
|
1993
1993
|
name: name5
|
|
@@ -1997,7 +1997,7 @@ function create28(context) {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
if (core.isInsideRenderMethod(component)) {
|
|
1999
1999
|
context.report({
|
|
2000
|
-
messageId: "
|
|
2000
|
+
messageId: "noNestedComponentDefinition",
|
|
2001
2001
|
node: component,
|
|
2002
2002
|
data: {
|
|
2003
2003
|
name: name5
|
|
@@ -2010,7 +2010,7 @@ function create28(context) {
|
|
|
2010
2010
|
continue;
|
|
2011
2011
|
}
|
|
2012
2012
|
context.report({
|
|
2013
|
-
messageId: "
|
|
2013
|
+
messageId: "noNestedComponentDefinition",
|
|
2014
2014
|
node: component,
|
|
2015
2015
|
data: {
|
|
2016
2016
|
name: name5
|
|
@@ -3533,7 +3533,7 @@ var plugin = {
|
|
|
3533
3533
|
"no-missing-component-display-name": no_missing_component_display_name_default,
|
|
3534
3534
|
"no-missing-context-display-name": no_missing_context_display_name_default,
|
|
3535
3535
|
"no-missing-key": no_missing_key_default,
|
|
3536
|
-
"no-nested-
|
|
3536
|
+
"no-nested-component-definitions": no_nested_component_definitions_default,
|
|
3537
3537
|
"no-prop-types": no_prop_types_default,
|
|
3538
3538
|
"no-redundant-should-component-update": no_redundant_should_component_update_default,
|
|
3539
3539
|
"no-set-state-in-component-did-mount": no_set_state_in_component_did_mount_default,
|
|
@@ -3564,7 +3564,9 @@ var plugin = {
|
|
|
3564
3564
|
/** @deprecated Use `use-jsx-vars` instead */
|
|
3565
3565
|
"jsx-uses-vars": use_jsx_vars_default,
|
|
3566
3566
|
/** @deprecated Use `no-complex-conditional-rendering` instead */
|
|
3567
|
-
"no-complicated-conditional-rendering": no_complex_conditional_rendering_default
|
|
3567
|
+
"no-complicated-conditional-rendering": no_complex_conditional_rendering_default,
|
|
3568
|
+
/** @deprecated Use `no-nested-component-definitions` instead */
|
|
3569
|
+
"no-nested-components": no_nested_component_definitions_default
|
|
3568
3570
|
}
|
|
3569
3571
|
};
|
|
3570
3572
|
|
package/dist/index.mjs
CHANGED
|
@@ -48,7 +48,7 @@ var rules = {
|
|
|
48
48
|
"react-x/no-forward-ref": "warn",
|
|
49
49
|
"react-x/no-implicit-key": "warn",
|
|
50
50
|
"react-x/no-missing-key": "error",
|
|
51
|
-
"react-x/no-nested-
|
|
51
|
+
"react-x/no-nested-component-definitions": "error",
|
|
52
52
|
"react-x/no-prop-types": "error",
|
|
53
53
|
"react-x/no-redundant-should-component-update": "error",
|
|
54
54
|
"react-x/no-set-state-in-component-did-mount": "warn",
|
|
@@ -109,7 +109,7 @@ var settings3 = {
|
|
|
109
109
|
|
|
110
110
|
// package.json
|
|
111
111
|
var name4 = "eslint-plugin-react-x";
|
|
112
|
-
var version = "1.34.0-next.
|
|
112
|
+
var version = "1.34.0-next.2";
|
|
113
113
|
var createRule = createRuleForPlugin("x");
|
|
114
114
|
|
|
115
115
|
// src/rules/avoid-shorthand-boolean.ts
|
|
@@ -1884,11 +1884,11 @@ function create27(context) {
|
|
|
1884
1884
|
function isArrayFromCall(node) {
|
|
1885
1885
|
return node.type === AST_NODE_TYPES.CallExpression && node.callee.type === AST_NODE_TYPES.MemberExpression && node.callee.property.type === AST_NODE_TYPES.Identifier && node.callee.property.name === "from";
|
|
1886
1886
|
}
|
|
1887
|
-
var RULE_NAME30 = "no-nested-
|
|
1887
|
+
var RULE_NAME30 = "no-nested-component-definitions";
|
|
1888
1888
|
var RULE_FEATURES30 = [
|
|
1889
1889
|
"CHK"
|
|
1890
1890
|
];
|
|
1891
|
-
var
|
|
1891
|
+
var no_nested_component_definitions_default = createRule({
|
|
1892
1892
|
meta: {
|
|
1893
1893
|
type: "problem",
|
|
1894
1894
|
docs: {
|
|
@@ -1896,8 +1896,8 @@ var no_nested_components_default = createRule({
|
|
|
1896
1896
|
[Symbol.for("rule_features")]: RULE_FEATURES30
|
|
1897
1897
|
},
|
|
1898
1898
|
messages: {
|
|
1899
|
-
|
|
1900
|
-
|
|
1899
|
+
noNestedComponentDefinition: "Do not nest component definitions inside other components. Move it to the top level.",
|
|
1900
|
+
noNestedComponentDefinitionInProps: "Do not nest component definitions inside props. Move it to the top level or pass it as a prop."
|
|
1901
1901
|
},
|
|
1902
1902
|
schema: []
|
|
1903
1903
|
},
|
|
@@ -1937,7 +1937,7 @@ function create28(context) {
|
|
|
1937
1937
|
if (isInsideJSXPropValue) {
|
|
1938
1938
|
if (!isDeclaredInRenderPropLoose(component)) {
|
|
1939
1939
|
context.report({
|
|
1940
|
-
messageId: "
|
|
1940
|
+
messageId: "noNestedComponentDefinitionInProps",
|
|
1941
1941
|
node: component,
|
|
1942
1942
|
data: {
|
|
1943
1943
|
name: name5
|
|
@@ -1948,7 +1948,7 @@ function create28(context) {
|
|
|
1948
1948
|
}
|
|
1949
1949
|
if (isInsideCreateElementProps(context, component)) {
|
|
1950
1950
|
context.report({
|
|
1951
|
-
messageId: "
|
|
1951
|
+
messageId: "noNestedComponentDefinitionInProps",
|
|
1952
1952
|
node: component,
|
|
1953
1953
|
data: {
|
|
1954
1954
|
name: name5
|
|
@@ -1960,7 +1960,7 @@ function create28(context) {
|
|
|
1960
1960
|
const isParentComponentNotDirectValueOfRenderProperty = parentComponent != null && !isDirectValueOfRenderPropertyLoose(parentComponent);
|
|
1961
1961
|
if (isParentComponentNotDirectValueOfRenderProperty) {
|
|
1962
1962
|
context.report({
|
|
1963
|
-
messageId: isInsideProperty ? "
|
|
1963
|
+
messageId: isInsideProperty ? "noNestedComponentDefinitionInProps" : "noNestedComponentDefinition",
|
|
1964
1964
|
node: component,
|
|
1965
1965
|
data: {
|
|
1966
1966
|
name: name5
|
|
@@ -1970,7 +1970,7 @@ function create28(context) {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
if (isInsideRenderMethod(component)) {
|
|
1972
1972
|
context.report({
|
|
1973
|
-
messageId: "
|
|
1973
|
+
messageId: "noNestedComponentDefinition",
|
|
1974
1974
|
node: component,
|
|
1975
1975
|
data: {
|
|
1976
1976
|
name: name5
|
|
@@ -1983,7 +1983,7 @@ function create28(context) {
|
|
|
1983
1983
|
continue;
|
|
1984
1984
|
}
|
|
1985
1985
|
context.report({
|
|
1986
|
-
messageId: "
|
|
1986
|
+
messageId: "noNestedComponentDefinition",
|
|
1987
1987
|
node: component,
|
|
1988
1988
|
data: {
|
|
1989
1989
|
name: name5
|
|
@@ -3506,7 +3506,7 @@ var plugin = {
|
|
|
3506
3506
|
"no-missing-component-display-name": no_missing_component_display_name_default,
|
|
3507
3507
|
"no-missing-context-display-name": no_missing_context_display_name_default,
|
|
3508
3508
|
"no-missing-key": no_missing_key_default,
|
|
3509
|
-
"no-nested-
|
|
3509
|
+
"no-nested-component-definitions": no_nested_component_definitions_default,
|
|
3510
3510
|
"no-prop-types": no_prop_types_default,
|
|
3511
3511
|
"no-redundant-should-component-update": no_redundant_should_component_update_default,
|
|
3512
3512
|
"no-set-state-in-component-did-mount": no_set_state_in_component_did_mount_default,
|
|
@@ -3537,7 +3537,9 @@ var plugin = {
|
|
|
3537
3537
|
/** @deprecated Use `use-jsx-vars` instead */
|
|
3538
3538
|
"jsx-uses-vars": use_jsx_vars_default,
|
|
3539
3539
|
/** @deprecated Use `no-complex-conditional-rendering` instead */
|
|
3540
|
-
"no-complicated-conditional-rendering": no_complex_conditional_rendering_default
|
|
3540
|
+
"no-complicated-conditional-rendering": no_complex_conditional_rendering_default,
|
|
3541
|
+
/** @deprecated Use `no-nested-component-definitions` instead */
|
|
3542
|
+
"no-nested-components": no_nested_component_definitions_default
|
|
3541
3543
|
}
|
|
3542
3544
|
};
|
|
3543
3545
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "1.34.0-next.
|
|
3
|
+
"version": "1.34.0-next.2",
|
|
4
4
|
"description": "A set of composable linting rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
"compare-versions": "^6.1.1",
|
|
50
50
|
"string-ts": "^2.2.1",
|
|
51
51
|
"ts-pattern": "^5.6.2",
|
|
52
|
-
"@eslint-react/
|
|
53
|
-
"@eslint-react/
|
|
54
|
-
"@eslint-react/
|
|
55
|
-
"@eslint-react/shared": "1.34.0-next.
|
|
56
|
-
"@eslint-react/var": "1.34.0-next.
|
|
57
|
-
"@eslint-react/
|
|
52
|
+
"@eslint-react/eff": "1.34.0-next.2",
|
|
53
|
+
"@eslint-react/jsx": "1.34.0-next.2",
|
|
54
|
+
"@eslint-react/core": "1.34.0-next.2",
|
|
55
|
+
"@eslint-react/shared": "1.34.0-next.2",
|
|
56
|
+
"@eslint-react/var": "1.34.0-next.2",
|
|
57
|
+
"@eslint-react/ast": "1.34.0-next.2"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/react": "^19.0.10",
|