Closed roginfarrer closed 3 years ago
This is definitely possible to implement, and in fact the plugin already checks to see if an ESLint config file exists at the project root. I originally wanted to make this the default behavior, but what stopped me is that ESLint configuration can live inside package.json
, and since that can be a large file, parsing it to check if it has the right config key seemed aggressive. It might also have some issues in monorepos, from what I understand.
Still, I can implement this as an opt-in setting if that makes sense to you.
Ya opt-in makes sense to me, especially if it adds any runtime overhead. In my experience for monorepos, every package needs to have its own eslint config, so maybe that makes this simpler (at least this is what I experience with work).
Thanks for this package! It's a must have for anyone working with JS/TS
Thank you for the kind words! I added this option in 81573beadcf4a916d5ac5907742318531f4bf50c as eslint_disable_if_no_config
. Let me know if that works for you.
Update: 02ea3e319fb4894ed974b4ddf001417f1e25c4db removes the option but allows setting up the requested behavior via eslint_opts
, as described in #65.
Issues
Feature description
I move between projects that use ESLint and those that don't. For the repos that don't, I never want ESLint to run since that project doesn't have a config. And because there isn't a config, I get extraneous errors like
The keyword 'import' is reserved
.I think there should be some way to check if a config file exists in the project (using package.json or .git/ as a project root), and if not, disable ESLint. But I'm not sure how to go about that.
Help
Yes, but I don't know how to start. I would need guidance
Implementation help
No response