Skip to content

Conversation

ruridge
Copy link
Contributor

@ruridge ruridge commented May 9, 2016

We don't need to enable "jsx-uses-vars" when "no-unused-vars" is disabled. Linting for unused vars is useful so I've left no-unused-vars enabled from "eslint:recommended", however disabling "no-unused-vars" and removing "jsx-uses-vars" would be equally valid.

"If you are not using JSX or if you do not use the no-unused-vars rule then you can disable this rule." ref: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md#when-not-to-use-it

We don't need to enable "jsx-uses-vars" when "no-unused-vars" is disabled. Linting for unused vars is useful so I've left no-unused-vars enabled from "eslint:recommended", however disabling "no-unused-vars" and removing "jsx-uses-vars" would be equally valid.

"If you are not using JSX or if you do not use the no-unused-vars rule then you can disable this rule." ref: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-uses-vars.md#when-not-to-use-it
@coryhouse
Copy link
Owner

I'm confused. You removed no-unused-vars, but left jsx-uses-vars enabled. Given the link you provided, it appears we should either have both enabled or both disabled. Am I missing something?

@ruridge
Copy link
Contributor Author

ruridge commented May 9, 2016

I'm sorry, I should have mentioned that the "extends": "eslint:recommended" property enables "no-unused-vars": http://eslint.org/docs/rules/#variables so it's already enabled by default.

@coryhouse coryhouse merged commit 65ac1f7 into coryhouse:master May 9, 2016
@coryhouse
Copy link
Owner

Ah, great point. Thanks for the PR! 👍

@ruridge ruridge deleted the patch-1 branch May 9, 2016 16:55
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.

2 participants