-
Notifications
You must be signed in to change notification settings - Fork 0
Style Guide Proposal #1
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
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
index.js
Outdated
], | ||
"rules": { | ||
"comma-dangle": ["error", "always-multiline"], | ||
"indent": ["error", 2, { "SwitchCase": 1 }], |
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.
👍
index.js
Outdated
"react" | ||
], | ||
"rules": { | ||
"comma-dangle": ["error", "always-multiline"], |
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.
You are not following this rule in this 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.
LGTM but I think a README file it would be awesome, what about to add some instructions about how are we going to use it, etc?
index.js
Outdated
"browser": true, | ||
"es6": true, | ||
"mocha": true, | ||
"node": true |
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 fine if some of these are mutually exclusive? i.e. "browser"
and "node"
will never be true at the same time, right?
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.
thinking about more use cases, it could be split into several configs, using a main one as a parent, like https://github.com/segmentio/eslint-config
Im not sure if those flags were added considering those cases. If not, I can remove the unused ones.
This is also a good opportunity to set additional rules :) Like: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/prefer-stateless-function.md |
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.
👍
The idea is to unify all the eslint rules in one place, so we can have an standard between projects.
As we're adding rules from time to time to each project, it would be great to do the change in one place, and more important, to have a way to discuss these rule as needed.
This first iteration doesn't consider the use of flow as an standard plugin.
The way it will be used in each project: