(context)
| 39 | } |
| 40 | |
| 41 | function reportIfMissing(context) { |
| 42 | if (!hasInspectorCheck) { |
| 43 | missingCheckNodes.forEach((node) => { |
| 44 | context.report({ |
| 45 | node, |
| 46 | message: msg, |
| 47 | fix: (fixer) => { |
| 48 | if (commonModuleNode) { |
| 49 | return fixer.insertTextAfter( |
| 50 | commonModuleNode, |
| 51 | '\ncommon.skipIfInspectorDisabled();', |
| 52 | ); |
| 53 | } |
| 54 | }, |
| 55 | }); |
| 56 | }); |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | return { |
| 61 | 'CallExpression': (node) => testInspectorUsage(context, node), |