I always get the following output when trying to run jshint:
C:\Users\foo\Source\
λ jshint -c .glados-jshintrc gulpfile.js
ERROR: Can't parse config file: .glados-jshintrc
Error:SyntaxError: Unexpected token
My jshint config file is quite trivial, I copied it directly from the jshint docs:
{
"undef": true,
"unused": true,
"predef": [ "MY_GLOBAL" ]
}
Any ideas to be able to get this working would be appreciated.
I found that the issue was caused by Visual Studio. When I created the jshint config file in VS, it created it as UTF-8 with a prefix BOM (byte order mark). This seemed to break the config file parser. To fix the issue, I visited the File menu:
File -> Advanced Save Options
And changed Encoding accordingly:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With