eslint-plugin-react-x 2.10.0 → 2.10.1-next.0
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 +6 -2
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -66,7 +66,7 @@ const rules$7 = {
|
|
|
66
66
|
//#endregion
|
|
67
67
|
//#region package.json
|
|
68
68
|
var name$6 = "eslint-plugin-react-x";
|
|
69
|
-
var version = "2.10.0";
|
|
69
|
+
var version = "2.10.1-next.0";
|
|
70
70
|
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/utils/create-rule.ts
|
|
@@ -1353,8 +1353,12 @@ var no_implicit_key_default = createRule({
|
|
|
1353
1353
|
});
|
|
1354
1354
|
function create$35(context) {
|
|
1355
1355
|
const services = ESLintUtils.getParserServices(context, false);
|
|
1356
|
+
const checker = services.program.getTypeChecker();
|
|
1356
1357
|
return { JSXSpreadAttribute(node) {
|
|
1357
|
-
for (const type of unionConstituents(getConstrainedTypeAtLocation(services, node.argument)))
|
|
1358
|
+
for (const type of unionConstituents(getConstrainedTypeAtLocation(services, node.argument))) {
|
|
1359
|
+
const key = type.getProperty("key");
|
|
1360
|
+
if (key == null) continue;
|
|
1361
|
+
if (checker.getFullyQualifiedName(key) === "React.Attributes.key") continue;
|
|
1358
1362
|
context.report({
|
|
1359
1363
|
messageId: "default",
|
|
1360
1364
|
node
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-plugin-react-x",
|
|
3
|
-
"version": "2.10.0",
|
|
3
|
+
"version": "2.10.1-next.0",
|
|
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.10.0",
|
|
49
|
-
"@eslint-react/
|
|
50
|
-
"@eslint-react/
|
|
51
|
-
"@eslint-react/
|
|
52
|
-
"@eslint-react/
|
|
48
|
+
"@eslint-react/ast": "2.10.1-next.0",
|
|
49
|
+
"@eslint-react/eff": "2.10.1-next.0",
|
|
50
|
+
"@eslint-react/shared": "2.10.1-next.0",
|
|
51
|
+
"@eslint-react/var": "2.10.1-next.0",
|
|
52
|
+
"@eslint-react/core": "2.10.1-next.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@types/react": "^19.2.13",
|