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

Use jsx-uses-inferno eslint rule #62

Closed
jstrangfeld opened this issue Feb 22, 2018 · 4 comments
Closed

Use jsx-uses-inferno eslint rule #62

jstrangfeld opened this issue Feb 22, 2018 · 4 comments

Comments

@jstrangfeld
Copy link

eslint-plugin-inferno provides better eslint rules than the default configuration. In particular, eslint gives the following warning with every component: 'Inferno' is defined but never used (no-unused-vars)

There are two solutions:

  1. Use .eslintrc configuration from the project root, if present. Currently, custom .eslintrc files are ignored. Allow developers to customize eslint using their own configuration.

  2. Add eslint-plugin-inferno as a project dependency and configure eslint to use it automatically. This would change the default rules for everyone without giving an option to modify them.

@Havunen
Copy link
Member

Havunen commented Feb 23, 2018

Hi @jstrangfeld can you send PR for this?

@jstrangfeld jstrangfeld changed the title Use eslint-plugin-inferno Use jsx-uses-inferno eslint rule Feb 23, 2018
@jstrangfeld
Copy link
Author

I dug into this more and it looks like the rule I am requesting is not enabled by default. I will submit a pull request.

@Havunen
Copy link
Member

Havunen commented Feb 24, 2018

Wait a minute, I might have misunderstood something here. This error is valid:
'Inferno' is defined but never used (no-unused-vars)
because after v4 babel plugin can import what it needs and you dont need import Inferno from 'inferno'

@jstrangfeld
Copy link
Author

Closed in #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants