Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[no-invalid-this] TypeError: rules.FunctionExpression is not a function #4524

Closed
3 tasks done
TomMettam opened this issue Feb 7, 2022 · 3 comments
Closed
3 tasks done
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@TomMettam
Copy link

TomMettam commented Feb 7, 2022

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have read the FAQ and my problem is not listed.

Repro

{
  "root": true,
  "parser": "@typescript-eslint/parser",
  "parserOptions": {
    "project": "tsconfig.json"
  },
  "plugins": [
    "@typescript-eslint"
  ],
  "extends": [
    "plugin:@typescript-eslint/all"
  ]
}
export class Test
{
    public someFunction()
    {
        
    }
}

Expected Result

No error

Actual Result

TypeError: rules.FunctionExpression is not a function

Versions

package version
@typescript-eslint/eslint-plugin 5.10.2
@typescript-eslint/parser 5.10.2
TypeScript 4.5.4
ESLint 8.8.0
node 14.17.6
@TomMettam TomMettam added package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin triage Waiting for maintainers to take a look labels Feb 7, 2022
@TomMettam
Copy link
Author

Sorry, I should mention: disabling no-invalid-this clears the error

@bradzacher
Copy link
Member

This was fixed (#4444)
If you're still facing it - you likely have multiple versions of our plugin installed (see the FAQ article).

@bradzacher bradzacher added duplicate This issue or pull request already exists and removed triage Waiting for maintainers to take a look labels Feb 7, 2022
@TomMettam
Copy link
Author

Hello, what version was this included in?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

2 participants