auto-install icon indicating copy to clipboard operation
auto-install copied to clipboard

[Improvement] Better devDep heuristic

Open dawsbot opened this issue 8 years ago • 4 comments

Currently, deps are installed only when the file ends with .spec.js and .test.js. Some developers like to follow a different convention which includes a single test.js file or a /test directory where all the files are executed when tests are executed.

Would you be open to changing the heuristic currently used to determine if a file is a test file to include such conventions?

dawsbot avatar Feb 11 '17 00:02 dawsbot

Yes!

I've been thinking about this. What do you think about a regex that you can add to your package.json?

siddharthkp avatar Feb 11 '17 06:02 siddharthkp

Adding that ability in the package.json is a good idea as an override, but as for sensible defaults, why not make a breaking change that operates on files which match **/test/** and **/test.js? I say good defaults beat customization anyday. That way people don't need to setup anything on their own unless they want more advanced filetype triggers.

dawsbot avatar Feb 13 '17 18:02 dawsbot

Do you want to take a shot at it?

siddharthkp avatar Feb 14 '17 04:02 siddharthkp

I'm not going to currently, the offer is open for anyone else.

dawsbot avatar Feb 14 '17 18:02 dawsbot