Skip to content
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

Setup eslint for react #1521

Merged
merged 2 commits into from Jul 7, 2018
Merged

Setup eslint for react #1521

merged 2 commits into from Jul 7, 2018

Conversation

feichao93
Copy link
Member

I found that eslint fails to run in examples folder. So I install eslint-plugin-react and eslint now will lint the examples folder too. I'll update the code in example folder gradually.

@@ -1,5 +1,5 @@
{
"extends": "eslint:recommended",
"extends": ["eslint:recommended", "plugin:react/recommended"],
Copy link
Contributor

Choose a reason for hiding this comment

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

should we add "plugin:react/recommended" only for examples folder?

Copy link
Member Author

Choose a reason for hiding this comment

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

Agree. There are no react code in packages folder.

@feichao93 feichao93 changed the title Setup eslint for react WIP: Setup eslint for react Jul 5, 2018
@feichao93
Copy link
Member Author

feichao93 commented Jul 5, 2018

Sadly, ESLint does not support extends in overrides now (eslint/eslint#8813). It will be supported but we may need wait some time.

image

@restrry How about just keeping "extends": ["eslint:recommended", "plugin:react/recommended"] globally? Rules from plugin:react/recommended only influences react-related code.

@feichao93 feichao93 changed the title WIP: Setup eslint for react Setup eslint for react Jul 5, 2018
@mshustov
Copy link
Contributor

mshustov commented Jul 6, 2018

ok

@feichao93
Copy link
Member Author

Rebased this upon master.

@Andarist Andarist merged commit db6b6e1 into master Jul 7, 2018
@Andarist Andarist deleted the eslint-react branch July 7, 2018 09:57
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.

None yet

3 participants