eslint-plugin-react-x 2.7.2-next.5 → 2.7.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 +4 -5
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -68,7 +68,7 @@ const rules$7 = {
|
|
|
68
68
|
//#endregion
|
|
69
69
|
//#region package.json
|
|
70
70
|
var name$6 = "eslint-plugin-react-x";
|
|
71
|
-
var version = "2.7.2
|
|
71
|
+
var version = "2.7.2";
|
|
72
72
|
|
|
73
73
|
//#endregion
|
|
74
74
|
//#region src/utils/create-rule.ts
|
|
@@ -3198,7 +3198,7 @@ var prefer_destructuring_assignment_default = createRule({
|
|
|
3198
3198
|
meta: {
|
|
3199
3199
|
type: "problem",
|
|
3200
3200
|
docs: { description: "Enforces destructuring assignment for component props and context." },
|
|
3201
|
-
messages: { preferDestructuringAssignment: "Use destructuring assignment for
|
|
3201
|
+
messages: { preferDestructuringAssignment: "Use destructuring assignment for component props." },
|
|
3202
3202
|
schema: []
|
|
3203
3203
|
},
|
|
3204
3204
|
name: RULE_NAME$4,
|
|
@@ -3216,12 +3216,11 @@ function create$4(context) {
|
|
|
3216
3216
|
const propName = props.name;
|
|
3217
3217
|
const propReferences = context.sourceCode.getScope(component.node).variables.find((v) => v.name === propName)?.references ?? [];
|
|
3218
3218
|
for (const ref of propReferences) {
|
|
3219
|
-
const parent = ref.identifier
|
|
3219
|
+
const { name: name$9, parent } = ref.identifier;
|
|
3220
3220
|
if (parent.type !== AST_NODE_TYPES.MemberExpression) continue;
|
|
3221
3221
|
context.report({
|
|
3222
3222
|
messageId: "preferDestructuringAssignment",
|
|
3223
|
-
node: parent
|
|
3224
|
-
data: { name: "props" }
|
|
3223
|
+
node: parent
|
|
3225
3224
|
});
|
|
3226
3225
|
}
|
|
3227
3226
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "2.7.2
|
|
3
|
+
"version": "2.7.2",
|
|
4
4
|
"description": "A set of composable ESLint rules for for libraries and frameworks that use React as a UI runtime.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
"string-ts": "^2.3.1",
|
|
47
47
|
"ts-api-utils": "^2.4.0",
|
|
48
48
|
"ts-pattern": "^5.9.0",
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/var": "2.7.2
|
|
53
|
-
"@eslint-react/
|
|
49
|
+
"@eslint-react/ast": "2.7.2",
|
|
50
|
+
"@eslint-react/eff": "2.7.2",
|
|
51
|
+
"@eslint-react/shared": "2.7.2",
|
|
52
|
+
"@eslint-react/var": "2.7.2",
|
|
53
|
+
"@eslint-react/core": "2.7.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/react": "^19.2.8",
|