You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the eslint-config for nextjs and I'm having some issues when using constructor shorthand while creating my module classes. I would like to know if is it possible to add the rules above to the lint setup
How to reproduce the error:
1- Create a nextjs project with typescript
2- add rocketseat eslint config on your .eslintrc
3- create a typescript class like the example bellow:
I've bypassed this error by adding thoose rules bellow:
{
// note you must disable the base rule as it can report incorrect errors"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": ["error"]
}
The text was updated successfully, but these errors were encountered:
Description
I'm using the eslint-config for nextjs and I'm having some issues when using constructor shorthand while creating my module classes. I would like to know if is it possible to add the rules above to the lint setup
How to reproduce the error:
1- Create a nextjs project with typescript
2- add rocketseat eslint config on your
.eslintrc
3- create a typescript class like the example bellow:
4- view an error similar to this one:
Possible solution:
I've bypassed this error by adding thoose rules bellow:
The text was updated successfully, but these errors were encountered: