infernojs / create-inferno-app

Create Inferno apps with no build configuration.
MIT License
351 stars 34 forks source link

Use jsx-uses-inferno eslint rule #62

Closed jstrangfeld closed 6 years ago

jstrangfeld commented 6 years ago

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 commented 6 years ago

Hi @jstrangfeld can you send PR for this?

jstrangfeld commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Closed in #63