8000 [class-methods-use-this] Prevent false positives with classes · Issue #52 · typescript-eslint/typescript-eslint · GitHub
[go: up one dir, main page]

Skip to content

[class-methods-use-this] Prevent false positives with classes #52

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

Closed
luxaritas opened this issue Aug 2, 2018 · 1 comment
Closed

[class-methods-use-this] Prevent false positives with classes #52

luxaritas opened this issue Aug 2, 2018 · 1 comment
Labels
enhancement: new plugin rule New rule request for eslint-plugin enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin

Comments

@luxaritas
Copy link
Contributor

I think it would be benefit to have a rule similar to typescript/no-unused-vars to prevent class-methods-use-this from triggering on class methods where the method in base class (or additionally one of its descendants) doesn't use this, but one of the (other) subclasses does. For example, an abstract class may implement a method as just returning a default value, but the intention of the method is that some/most subclasses will have a concrete implementation that does use this.

@JamesHenry JamesHenry transferred this issue from bradzacher/eslint-plugin-typescript Jan 18, 2019
@bradzacher bradzacher added enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin enhancement: new plugin rule New rule request for eslint-plugin labels Jan 18, 2019
@luxaritas luxaritas changed the title Prevent false positives from class-methods-use-this with classes [no-unused-vars] Prevent false positives from class-methods-use-this with classes Jun 3, 2019
@luxaritas luxaritas changed the title [no-unused-vars] Prevent false positives from class-methods-use-this with classes [class-methods-use-this ] Prevent false positives with classes Jun 3, 2019
@luxaritas luxaritas changed the title [class-methods-use-this ] Prevent false positives with classes [class-methods-use-this] Prevent false positives with classes Jun 3, 2019
@bradzacher
Copy link
Member

I'll close this in favour of #1103 as that has more discussion

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement: new plugin rule New rule request for eslint-plugin enhancement New feature or request package: eslint-plugin Issues related to @typescript-eslint/eslint-plugin
Projects
None yet
Development

No branches or pull requests

2 participants
0