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

Update: add react plugin config for eslint init #12446

Merged
merged 1 commit into from Nov 13, 2019

Conversation

@RsPlayer
Copy link
Contributor

RsPlayer commented Oct 16, 2019

This add the recommended config for eslint-plugin-react when using eslint --init
doc: https://github.com/yannickcr/eslint-plugin-react#configuration

Without it, eslint detects React components and other stuff as unused vars, while they are used in jsx tags

This add the recommended config for eslint-plugin-react when using `eslint --init`
doc: https://github.com/yannickcr/eslint-plugin-react#configuration
@eslint eslint bot added the triage label Oct 16, 2019
@ljharb
ljharb approved these changes Oct 16, 2019
Copy link
Contributor

ljharb left a comment

altho at this point why wouldn't react users just get the airbnb config

@RsPlayer
Copy link
Contributor Author

RsPlayer commented Oct 16, 2019

altho at this point why wouldn't react users just get the airbnb config

I never heard about it as a react beginner, I ran eslint --init in create-react-app project and then I chose react option, but many warnings about unused vars appeared to me. after searching for the problem I found that react plugin configuration is missing.

@platinumazure
Copy link
Member

platinumazure commented Oct 16, 2019

I don't know if this is technically a bug or an enhancement request, but this seems reasonable to me since we do the same sort of thing for Vue (adding plugin:vue/essential config).

@RsPlayer
Copy link
Contributor Author

RsPlayer commented Oct 17, 2019

I called it Update because I though that the recommended config was added to the plugin after the moment when the coder wrote the code.

Copy link
Member

aladdin-add left a comment

LGTM, thanks!

@aladdin-add aladdin-add added accepted and removed evaluating labels Nov 13, 2019
@aladdin-add aladdin-add merged commit 0f7edef into eslint:master Nov 13, 2019
16 checks passed
16 checks passed
Verify Files
Details
Test (ubuntu-latest, 8.x)
Details
Test (ubuntu-latest, 10.x)
Details
Test (ubuntu-latest, 12.x)
Details
Test (windows-latest, 12.x)
Details
Test (macOS-latest, 12.x)
Details
Browser Test
Details
commit-message Commit message follows guidelines
Details
continuous-integration Build #20191016.7 succeeded
Details
continuous-integration (Test on Node.js 10 (Linux)) Test on Node.js 10 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Linux)) Test on Node.js 12 (Linux) succeeded
Details
continuous-integration (Test on Node.js 12 (Windows)) Test on Node.js 12 (Windows) succeeded
Details
continuous-integration (Test on Node.js 12 (macOS)) Test on Node.js 12 (macOS) succeeded
Details
continuous-integration (Test on Node.js 8 (Linux)) Test on Node.js 8 (Linux) succeeded
Details
licence/cla Contributor License Agreement is signed.
Details
release-monitor No patch release is pending
Details
@eslint eslint bot locked and limited conversation to collaborators May 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.