Skip to content

Conversation

charliesbot
Copy link
Contributor

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:

// .eslintrc
{
  "extends": "eslint-config-wizeline",
  // if required
  "plugins": [
      "flowtype"
  ]
}

Copy link

@jfer-rubio jfer-rubio left a 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 }],

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"],

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 😛

Copy link

@bit-dragon bit-dragon left a 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

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?

Copy link
Contributor Author

@charliesbot charliesbot Apr 3, 2017

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.

@charliesbot
Copy link
Contributor Author

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

Copy link

@bit-dragon bit-dragon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@charliesbot charliesbot merged commit 0874943 into master Apr 5, 2017
@charliesbot charliesbot deleted the style-guide-proposal branch April 5, 2017 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants