Skip to content

TypeError: context.getScope is not a function (ESLint 9 compatibility issues) #589

@robinloeffel

Description

@robinloeffel

When using some of the plugins' rules directly, without going via one of the provided flat configs that wrap around @eslint/compat, you will sooner or later run into the following error:

Oops! Something went wrong! :(

ESLint: 9.17.0

TypeError: context.getScope is not a function
Occurred while linting /Users/robin/Sites/portfolio/src/ts/email.ts:4
Rule: "github/async-preventdefault"
    at CallExpression (/Users/robin/Sites/portfolio/node_modules/eslint-plugin-github/lib/rules/async-preventdefault.js:20:33)
    at ruleErrorHandler (/Users/robin/Sites/portfolio/node_modules/eslint/lib/linter/linter.js:1098:48)
    at /Users/robin/Sites/portfolio/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/robin/Sites/portfolio/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/Users/robin/Sites/portfolio/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/Users/robin/Sites/portfolio/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/Users/robin/Sites/portfolio/node_modules/eslint/lib/linter/node-event-generator.js:337:14)
    at runRules (/Users/robin/Sites/portfolio/node_modules/eslint/lib/linter/linter.js:1142:40)
    at #flatVerifyWithoutProcessors (/Users/robin/Sites/portfolio/node_modules/eslint/lib/linter/linter.js:1911:31)

Please update the plugin according to ESLint's guide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions