Skip to content

Commit 2ccaadf

Browse files
committed
fixes for eslint-plugin-eslint-plugin 😏
1 parent c5a3f87 commit 2ccaadf

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

patches/eslint-plugin-eslint-plugin+5.0.6.patch

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
diff --git a/node_modules/eslint-plugin-eslint-plugin/lib/rules/no-only-tests.js b/node_modules/eslint-plugin-eslint-plugin/lib/rules/no-only-tests.js
2-
index caa646e..c3fb975 100644
2+
index caa646e..29b5177 100644
33
--- a/node_modules/eslint-plugin-eslint-plugin/lib/rules/no-only-tests.js
44
+++ b/node_modules/eslint-plugin-eslint-plugin/lib/rules/no-only-tests.js
5+
@@ -36,7 +36,7 @@ module.exports = {
6+
7+
const onlyProperty = test.properties.find(
8+
(property) =>
9+
- property.key.type === 'Identifier' &&
10+
+ property.key?.type === 'Identifier' &&
11+
property.key.name === 'only' &&
12+
property.value.type === 'Literal' &&
13+
property.value.value
514
@@ -82,7 +82,7 @@ module.exports = {
615
test.type === 'CallExpression' &&
716
test.callee.type === 'MemberExpression' &&
@@ -11,8 +20,21 @@ index caa646e..c3fb975 100644
1120
test.callee.property.type === 'Identifier' &&
1221
test.callee.property.name === 'only'
1322
) {
23+
diff --git a/node_modules/eslint-plugin-eslint-plugin/lib/rules/prefer-output-null.js b/node_modules/eslint-plugin-eslint-plugin/lib/rules/prefer-output-null.js
24+
index 0716d91..2bee9f4 100644
25+
--- a/node_modules/eslint-plugin-eslint-plugin/lib/rules/prefer-output-null.js
26+
+++ b/node_modules/eslint-plugin-eslint-plugin/lib/rules/prefer-output-null.js
27+
@@ -48,7 +48,7 @@ module.exports = {
28+
*/
29+
function getTestInfo(key) {
30+
if (test.type === 'ObjectExpression') {
31+
- return test.properties.find((item) => item.key.name === key);
32+
+ return test.properties.find((item) => item.key?.name === key);
33+
}
34+
return null;
35+
}
1436
diff --git a/node_modules/eslint-plugin-eslint-plugin/lib/utils.js b/node_modules/eslint-plugin-eslint-plugin/lib/utils.js
15-
index 3129903..be85e4a 100644
37+
index 3129903..c7e1d88 100644
1638
--- a/node_modules/eslint-plugin-eslint-plugin/lib/utils.js
1739
+++ b/node_modules/eslint-plugin-eslint-plugin/lib/utils.js
1840
@@ -25,10 +25,10 @@ function isNormalFunctionExpression(node) {
@@ -28,3 +50,12 @@ index 3129903..be85e4a 100644
2850
);
2951
}
3052

53+
@@ -534,7 +534,7 @@ module.exports = {
54+
(isRuleTesterConstruction(expression.callee.object) ||
55+
variableIdentifiers.has(expression.callee.object)) &&
56+
expression.callee.property.type === 'Identifier' &&
57+
- expression.callee.property.name === 'run'
58+
+ expression.callee.property.name === 'runGraphQLTests'
59+
) {
60+
runCalls.push(expression);
61+
}

0 commit comments

Comments
 (0)