eslint-plugin-react-x 2.12.4-beta.0 → 2.12.4-beta.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.js +5 -6
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -67,7 +67,7 @@ const rules$7 = {
|
|
|
67
67
|
//#endregion
|
|
68
68
|
//#region package.json
|
|
69
69
|
var name$6 = "eslint-plugin-react-x";
|
|
70
|
-
var version = "2.12.4-beta.
|
|
70
|
+
var version = "2.12.4-beta.2";
|
|
71
71
|
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/utils/create-rule.ts
|
|
@@ -2358,7 +2358,7 @@ var no_unstable_context_value_default = createRule({
|
|
|
2358
2358
|
meta: {
|
|
2359
2359
|
type: "problem",
|
|
2360
2360
|
docs: { description: "Prevents non-stable values (i.e., object literals) from being used as a value for 'Context.Provider'." },
|
|
2361
|
-
messages: { unstableContextValue: "A/an '{{
|
|
2361
|
+
messages: { unstableContextValue: "A/an '{{kind}}' passed as the value prop to the context provider should not be constructed. It will change on every render. {{suggestion}}" },
|
|
2362
2362
|
schema: []
|
|
2363
2363
|
},
|
|
2364
2364
|
name: RULE_NAME$16,
|
|
@@ -2397,7 +2397,7 @@ function create$16(context) {
|
|
|
2397
2397
|
messageId: "unstableContextValue",
|
|
2398
2398
|
node: constructionNode,
|
|
2399
2399
|
data: {
|
|
2400
|
-
|
|
2400
|
+
kind: ast.getHumanReadableKind(constructionNode),
|
|
2401
2401
|
suggestion
|
|
2402
2402
|
}
|
|
2403
2403
|
});
|
|
@@ -2427,7 +2427,7 @@ var no_unstable_default_props_default = createRule({
|
|
|
2427
2427
|
meta: {
|
|
2428
2428
|
type: "problem",
|
|
2429
2429
|
docs: { description: "Prevents using referential-type values as default props in object destructuring." },
|
|
2430
|
-
messages: { default: "A/an '{{
|
|
2430
|
+
messages: { default: "A/an '{{kind}}' as default prop. This could lead to potential infinite render loop in React. Use a variable instead of '{{kind}}'." },
|
|
2431
2431
|
schema: schema$1
|
|
2432
2432
|
},
|
|
2433
2433
|
name: RULE_NAME$15,
|
|
@@ -2473,11 +2473,10 @@ function create$15(context, [options]) {
|
|
|
2473
2473
|
const identifier = extractIdentifier(right);
|
|
2474
2474
|
if (identifier != null && safePatterns.some((pattern) => pattern.test(identifier))) continue;
|
|
2475
2475
|
}
|
|
2476
|
-
const forbiddenType = ast.toDelimiterFormat(right);
|
|
2477
2476
|
context.report({
|
|
2478
2477
|
messageId: "default",
|
|
2479
2478
|
node: right,
|
|
2480
|
-
data: {
|
|
2479
|
+
data: { kind: ast.getHumanReadableKind(right) }
|
|
2481
2480
|
});
|
|
2482
2481
|
}
|
|
2483
2482
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "2.12.4-beta.
|
|
3
|
+
"version": "2.12.4-beta.2",
|
|
4
4
|
"description": "A set of composable ESLint rules for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"is-immutable-type": "^5.0.1",
|
|
46
46
|
"ts-api-utils": "^2.4.0",
|
|
47
47
|
"ts-pattern": "^5.9.0",
|
|
48
|
-
"@eslint-react/ast": "2.12.4-beta.
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/shared": "2.12.4-beta.
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/
|
|
48
|
+
"@eslint-react/ast": "2.12.4-beta.2",
|
|
49
|
+
"@eslint-react/core": "2.12.4-beta.2",
|
|
50
|
+
"@eslint-react/shared": "2.12.4-beta.2",
|
|
51
|
+
"@eslint-react/var": "2.12.4-beta.2",
|
|
52
|
+
"@eslint-react/eff": "2.12.4-beta.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/react": "^19.2.13",
|