1
1
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 f680961..c9a08b4 100644
2
+ index e6719bb..b0e871d 100644
3
3
--- a/node_modules/eslint-plugin-eslint-plugin/lib/rules/no-only-tests.js
4
4
+++ b/node_modules/eslint-plugin-eslint-plugin/lib/rules/no-only-tests.js
5
- @@ -31 ,7 +31 ,7 @@ module.exports = {
5
+ @@ -32 ,7 +32 ,7 @@ module.exports = {
6
6
7
7
const onlyProperty = test.properties.find(
8
8
property =>
@@ -12,7 +12,7 @@ index f680961..c9a08b4 100644
12
12
property.value.type === 'Literal' &&
13
13
property.value.value
14
14
diff --git a/node_modules/eslint-plugin-eslint-plugin/lib/utils.js b/node_modules/eslint-plugin-eslint-plugin/lib/utils.js
15
- index d7a2b82..326d387 100644
15
+ index 8aca920..707fe53 100644
16
16
--- a/node_modules/eslint-plugin-eslint-plugin/lib/utils.js
17
17
+++ b/node_modules/eslint-plugin-eslint-plugin/lib/utils.js
18
18
@@ -24,10 +24,10 @@ function isNormalFunctionExpression (node) {
@@ -28,35 +28,7 @@ index d7a2b82..326d387 100644
28
28
);
29
29
}
30
30
31
- @@ -85,12 +85,17 @@ function isFunctionRule (node) {
32
- /**
33
- * Helper for `getRuleInfo`. Handles ESM and TypeScript rules.
34
- */
35
- - function getRuleExportsESM (ast) {
36
- + function getRuleExportsESM (ast, scopeManager) {
37
- return ast.body
38
- .filter(statement => statement.type === 'ExportDefaultDeclaration')
39
- .map(statement => statement.declaration)
40
- // eslint-disable-next-line unicorn/prefer-object-from-entries
41
- .reduce((currentExports, node) => {
42
- + // Check `const rule = { create() {}, meta: {} }; export default rule`
43
- + if (node.type === 'Identifier' && scopeManager) {
44
- + const variable = findVariable(scopeManager.globalScope, node);
45
- + return collectInterestingProperties(variable.defs[0].node.init.properties, INTERESTING_RULE_KEYS);
46
- + }
47
- if (node.type === 'ObjectExpression') {
48
- // Check `export default { create() {}, meta: {} }`
49
- return collectInterestingProperties(node.properties, INTERESTING_RULE_KEYS);
50
- @@ -218,7 +223,7 @@ module.exports = {
51
- from the file, the return value will be `null`.
52
- */
53
- getRuleInfo ({ ast, scopeManager }) {
54
- - const exportNodes = ast.sourceType === 'module' ? getRuleExportsESM(ast) : getRuleExportsCJS(ast);
55
- + const exportNodes = ast.sourceType === 'module' ? getRuleExportsESM(ast, scopeManager) : getRuleExportsCJS(ast);
56
-
57
- const createExists = Object.prototype.hasOwnProperty.call(exportNodes, 'create');
58
- if (!createExists) {
59
- @@ -317,7 +322,7 @@ module.exports = {
31
+ @@ -343,7 +343,7 @@ module.exports = {
60
32
variableIdentifiers.has(statement.expression.callee.object)
61
33
) &&
62
34
statement.expression.callee.property.type === 'Identifier' &&
0 commit comments