-
Notifications
You must be signed in to change notification settings - Fork 80
backlog task: add eslint and prettier to the project #70
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
antosan
left a comment
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.
Nice job @orama254 🎉 I have some comments:
-
We should remove the
.eslintrc.jsonline from the.gitignoreso that git can track the.eslintrc.jsonfile. After removing it, runnpm run lint, choose strict and include the generated.eslintrc.jsonfile in the committed files.Also,
eslintrules usually conflict withprettierrules and in order to prevent this:- Run
npm install --save-dev eslint-config-prettier - Update
.eslintrc.jsonto:
{ "extends": ["next/core-web-vitals", "prettier"] } - Run
-
Whenever I open a
.jsxfile that does not includeimport React from 'react';in VSCode, e.g.src/pages/index.page.jsx, I get a lot of warnings. Do you have the same?
@antosan for the second point there is a line on the lint config that should disable this. Could you try it out now that the file isn't ignored inside git. {
"globals": {
"React": "readonly"
},
} |
This didn't fix it for me, probably it is just my editor misbehaving. |
antosan
left a comment
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.
LGTM 👍

Fixes Issue
configure eslint and prettier for project wide code uniformity
Changes proposed
Check List (Check all the applicable boxes)
Screenshots
Note to reviewers