Unable to use GLOB with JSHint on Windows?

I am making PoC NPM as a build tool ( http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/ ). I am new to NPM. So far, I have only JSHint and Mocha installed. My packagae.json is attached. Now when I run "npm run lint" on the command line (Windows 7), it gives me an error:

c:\project>npm run list MyNPMProject@1.0.0 lint c:\project jshint test/*.js 

ERROR: cannot open test / *. js

It works when I modify the script "lint": "jshint test / test.js".

Can glob be used with jshint?

Please advise and thank you for the advanced.

+6
source share
2 answers

You don't need a globe, just give it a directory, and it scans all js files there.

+6
source

If you need to use a wildcard that can be moved to subfolders, for example test/**.js , the Windows base shell (Command Prompt) does not support this, but there are various workarounds / alternatives. See This for more details: fooobar.com/questions/980012 / ...

0
source

Source: https://habr.com/ru/post/980013/


All Articles