-
Notifications
You must be signed in to change notification settings - Fork 92
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
Improve linter #166
Improve linter #166
Conversation
# Conflicts: # yarn.lock
✅ Deploy Preview for astonishing-pothos-5f81bd ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
after falling since there is unused import in node modules anyway the project clean from unused export/import if you want to put back in linter you should change and at |
.eslintrc.json
Outdated
"@typescript-eslint/no-unused-vars": "off", | ||
"react/react-in-jsx-scope": "off", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please find a solution so we'll get errors / warning whenever we have unused variable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed to "error"
tsconfig.json
Outdated
@@ -9,6 +9,7 @@ | |||
"allowJs": false, | |||
"skipLibCheck": true, | |||
"esModuleInterop": true, | |||
"noUnusedLocals": false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when you change it to true it raise an error on unused variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok so i remove it.
stay only with linter.
then node modules not make a problem
"plugins": ["react", "@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/no-non-null-assertion": "off", | ||
"@typescript-eslint/no-unused-vars": "error", | ||
"react/react-in-jsx-scope": "off", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I learned something new
https://dev.to/titungdup/you-no-longer-need-to-import-react-from-react-3pbj
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! that's so great
Description
this to resolve #160 issue
clean all unused code with ts-prune
and remove unused export.
add ci in lint check for circular dependencies
add for linter not allowed unused code like
"@typescript-eslint/no-unused-vars": "error",
that was mostly react import so I also add this
"react/react-in-jsx-scope": "off",