dwyl / goodparts

:see_no_evil: An ESLint Style that only allows JavaScript the Good Parts (and "Better Parts") in your code.
GNU General Public License v2.0
78 stars 26 forks source link

Add default folders for exclusion #255

Open jrans opened 7 years ago

jrans commented 7 years ago

Don't want lint any generated files from transpilers or generated coverage files.

Which ones shall we do? Just the coverage folder?

nelsonic commented 7 years ago

@jrans I'm in favour of always ignoring /coverage for linting purposes as I don't know of a situation where I would want to lint anything generated by istanbul ...

does anyone know of any reason not to ignore /coverage ...?

eliasmalik commented 7 years ago

@jrans how are you planning on implementing this? Do you plan to still supporting the use of user-defined .eslintignore files?

Looking at the node API docs for eslint, you can see that configuring the CLIEngine with a default ignore configuration using the ignorePath option, will prevent the engine from picking up .eslintignore files.

If you still want to support user defined ignore configs, the first thing I can think of would be to look for .eslintignore files in the dependent projects tree, read them in and combine the patterns specified there with some default ones that we specify and use that as the value for the ignorePattern parameter in the CLIEngine.

This adds a fair bit of complexity to the CLI though.