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

Feature Request: classPropertiesAllowed should work for every method in a class #42

Open
ylc395 opened this issue Jul 10, 2024 · 2 comments

Comments

@ylc395
Copy link

ylc395 commented Jul 10, 2024

Description

According to the document, classPropertiesAllowed is for methods that "when doing so would not alter or break their behaviour". So a method like:

class A {
  method() {
    this;
  }
}

won't be converted to arrow function, which is not so helpful.

Suggested Solution

Add a option to convert methods like this.

@JamieMason
Copy link
Owner

Could you be more specific please about what the actual behaviour is and the expected behaviour? It's not clear to me just yet, thanks!

@ylc395
Copy link
Author

ylc395 commented Jul 11, 2024

class A {
  method() {
    this;
  }
}

In this example, this eslint plugin will do nothing, even if classPropertiesAllowed is set to true. Is there any solution for this case?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants