'TypeError: context.getAncestors is not a function' with ESLint v9
vpmedia opened this issue · comments
Andras Csizmadia commented
After upgrading to ESLint v9 I'm getting the following exception:
TypeError: context.getAncestors is not a function
Occurred while linting PROJECT_DIR/eslint.config.js:1
Rule: "import/no-named-as-default"
at importDeclaration (PROJECT_DIR/node_modules/eslint-plugin-import/lib/importDeclaration.js:2:27)
at checkDefault (PROJECT_DIR/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js:21:62)
at ruleErrorHandler (PROJECT_DIR/node_modules/eslint/lib/linter/linter.js:1145:48)
at PROJECT_DIR/node_modules/eslint/lib/linter/safe-emitter.js:45:58
at Array.forEach (<anonymous>)
at Object.emit (PROJECT_DIR/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (PROJECT_DIR/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
at NodeEventGenerator.applySelectors (PROJECT_DIR/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
at NodeEventGenerator.enterNode (PROJECT_DIR/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
at runRules (PROJECT_DIR/node_modules/eslint/lib/linter/linter.js:1184:40)
Anna Bocharova commented
eslint-plugin-import/package.json
Line 104 in 8587c85
Compatibility issue: #2948
Sergey Shenets commented
is it package will upgrade or no?
Jordan Harband commented
Just like with every eslint major, you basically always have to wait weeks or months to upgrade to it, until all the plugins and configs you depend on have had a chance to do so.
Closing as a duplicate of #2948. Thanks for the stack trace - that will help the effort to add compatibility.