Hey, just upgraded to ESLint 10 and the plugin is completely broken — every file fails with this:
TypeError: Error while loading rule 'depend/ban-dependencies': Cannot read properties of undefined (reading 'bind')
at Object.ruleCreate [as create] (.../node_modules/@eslint/compat/dist/esm/index.js:139:38)
ESLint 10 removed a bunch of deprecated context methods (context.getFilename(), context.getSourceCode(), etc.) that the plugin seems to be relying on. Wrapping with fixupPluginRules from @eslint/compat doesn't help either — the rule itself still blows up.
Versions:
eslint-plugin-depend: 1.4.0
eslint: 10.0.2
The fix should be switching to the new equivalents (context.filename, context.sourceCode, etc.). ESLint's migration guide has the full list.
Hey, just upgraded to ESLint 10 and the plugin is completely broken — every file fails with this:
ESLint 10 removed a bunch of deprecated
contextmethods (context.getFilename(),context.getSourceCode(), etc.) that the plugin seems to be relying on. Wrapping withfixupPluginRulesfrom@eslint/compatdoesn't help either — the rule itself still blows up.Versions:
eslint-plugin-depend: 1.4.0eslint: 10.0.2The fix should be switching to the new equivalents (
context.filename,context.sourceCode, etc.). ESLint's migration guide has the full list.