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

ESlint rejects static props and methods #952

Open
sergii-nosachenko opened this issue Aug 10, 2022 · 2 comments
Open

ESlint rejects static props and methods #952

sergii-nosachenko opened this issue Aug 10, 2022 · 2 comments

Comments

@sergii-nosachenko
Copy link

When trying to declare static props get an ESlint error: Parsing error: Unexpected token =.
Fixed only by adding additional configuration line to .eslintrc.js file above extends entry: parser: "babel-eslint",.

@Dmytro-Matsehora
Copy link

I had the same problem, thanks a lot for sharing your solution!

@sergii-nosachenko
Copy link
Author

@Dmytro-Matsehora Also you can add static property after class declaration:

class ClassName {
  ...
}

ClassName.staticProperty = value;

@33Orange 33Orange mentioned this issue May 12, 2023
This was referenced May 30, 2023
@Timi2424 Timi2424 mentioned this issue Nov 19, 2023
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