We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
getSourceCode()
1 parent 05924f4 commit bb8278dCopy full SHA for bb8278d
packages/eslint-plugin-query/src/rules/stable-query-client/stable-query-client.rule.ts
@@ -68,7 +68,10 @@ export const rule = createRule({
68
return
69
}
70
71
- const nodeText = context.getSourceCode().getText(node)
+ // we need the fallbacks for backwards compat with eslint < 8.37.0
72
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
73
+ const sourceCode = context.sourceCode ?? context.getSourceCode()
74
+ const nodeText = sourceCode.getText(node)
75
const variableName = parent.id.name
76
77
return (fixer: TSESLint.RuleFixer) => {
0 commit comments