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
Merged

Update: add react plugin config for eslint init #12446

merged 1 commit into from Nov 13, 2019

Conversation

ghost
Copy link

@ghost ghost 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-deprecated eslint-deprecated bot added the triage An ESLint team member will look at this issue soon label Oct 16, 2019
Copy link
Sponsor Contributor

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

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

@ghost
Copy link
Author

ghost 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 platinumazure added cli Relates to ESLint's command-line interface enhancement This change enhances an existing feature of ESLint evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion and removed triage An ESLint team member will look at this issue soon labels Oct 16, 2019
@platinumazure
Copy link
Member

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).

@ghost
Copy link
Author

ghost 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 aladdin-add left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@aladdin-add aladdin-add added accepted There is consensus among the team that this change meets the criteria for inclusion and removed evaluating The team will evaluate this issue to decide whether it meets the criteria for inclusion labels Nov 13, 2019
@aladdin-add aladdin-add merged commit 0f7edef into eslint:master Nov 13, 2019
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators May 13, 2020
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label May 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted There is consensus among the team that this change meets the criteria for inclusion archived due to age This issue has been archived; please open a new issue for any further discussion cli Relates to ESLint's command-line interface enhancement This change enhances an existing feature of ESLint
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants