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
Added some rules to '.eslintrc.js' #68
Conversation
"jest": true, | ||
}, | ||
rules: { | ||
"no-console": "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.
Question: why "off"
vs. 0
, which you use below?
Also, since this is a .js
file, we can include comments, so would you mind adding a comment above each of these new rules explaining what you're doing here? That way others can discover what this is all about.
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.
For no-console
, I used what eslint uses in their examples here, and when I was testing func-names
lint complained and wanted me to use 0. I can test if no-console
works with 0
or if func-names
works with off
to have more consistency.
Also, I didn't add any comments because all the info to read about these changes is included in the description of the PR. Should I still add it to the js file?
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 changed it and now they all use off
.
c0f8037
to
018e132
Compare
I added some comments to |
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.
This is better, thank you. I think having the extra comments above will help people work more quickly, since they won't have to go read the entire doc. Thanks.
chore(deps): update dependency eslint to v8.10.0
Added some rules to
.eslintrc.js
that I think would be useful.no-console
no-param-reassign
func-names