Option to opt-out of eslint-plugin-react
See original GitHub issueCurrent Behavior
tsdx
supports eslint-plugin-react
outof the box. If React is not used this warning pops up:
Warning: React version was set to "detect" in eslint-plugin-react settings, but the "react" package is not installed. Assuming latest React version for linting.
Desired Behavior
Opt-out of eslint
plugins that are not in used. For example, I’m using tsdx
to build a logger plugin for a specific library. I don’t need .eslintrc
extendingreact-app
, because my work is only node
related.
Suggested Solution
My suggestion is to remove any dedicated eslint
plugin except the ones that are typescript
and prettier
related. User would manually add additional rules to the project if needed, for example eslint-plugin-vue
, and configure it in the local .eslintrc
. This way tsdx
remains decoupled from any specific library.
Who does this impact? Who is this for?
TypeScript users that develop plugins, libraries for NodeJS.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
eslint-plugin-react - npm
Start using eslint-plugin-react in your project by running `npm i eslint-plugin-react`. ... Automatically fixable by the --fix CLI option.
Read more >12 essential ESLint rules for React - LogRocket Blog
ESLint has a comprehensive set of rules for JavaScript code that cover stylistic choices and prevent common bugs. Using ESLint alone will give ......
Read more >How To Customize ESLint Rules with an Ejected Create React ...
Ejecting a Create React App Project · eslint is the core JavaScript linter. · eslint-loader tells webpack that you want to use eslint...
Read more >Rules - ESLint - Pluggable JavaScript Linter
Rules from Plugins ... To configure a rule that is defined within a plugin, prefix the rule ID with the plugin name and...
Read more >Setup ESLINT and PRETTIER in React app
In React - 17.0.0 , importing react to a file is optional, To fix this, we will add a rule to our .eslintrc...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@arthurdenner i’d be happy to accept a PR for this
@zcuric, as I said, it definitely can be done. If you want to work on it, you just have to change the ESLint config that is created on the
lint
command. My point was that we are currently using a tool that handles more than just React, so removing it requires more changes and I’ll wait for some input from maintainers to suggest some changes.