You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EDIT: 11 hours after the original post, I read my post again. Where you now see (path to global), I had used a different notation (less thans and greater thans) that didn't show. Very confusing.
I'll consistently call two directories on my C: drive "(path to global)" and "(path to dev)". Neither is relative; both start with C:\ and list directories. (path to dev) is longer; it is a child of (path to global).
expected behavior: jsHint analysis of my .js file
actual behavior: I get this report:
(path to global)\node_modules\jshint\src\jshint.js:5438
throw err;
^
TypeError: Cannot read property 'id' of undefined
at Object.nud (<path to global>\node_modules\jshint\src\jshint.js:2570:38)
at expression (<path to global>\node_modules\jshint\src\jshint.js:888:34)
at statement (<path to global>\node_modules\jshint\src\jshint.js:1633:9)
at statements (<path to global>\node_modules\jshint\src\jshint.js:1678:16)
at block <path to global>\node_modules\jshint\src\jshint.js:1773:13)
at doFunction (<path to global>\node_modules\jshint\src\jshint.js:3078:5)
at Object.fud (<path to global>\node_modules\jshint\src\jshint.js:3907:5)
at expression (<path to global>\node_modules\jshint\src\jshint.js:885:32)
at statement (<path to global>\node_modules\jshint\src\jshint.js:1633:9)
at statements (<path to global>\node_modules\jshint\src\jshint.js:1678:16)
Sadly, I don't get this for all .js files. Of the two I've tried, one works and one doesn't. Both are modules. The file that causes the report imports from the file that jsHint analyzes without error. Maybe that's relevant.
environment: Windows 10. My .js file includes ES6 syntax. Babel v6.16.0 makes it ES5. Node.js v6.9.2 runs it.
node.js is in C:\Program Files\nodejs.
jshint was 2.9.3. I upgraded to 2.9.4 and got the same behavior.
jsHint is at (path to global)\node_modules\jshint.
A batch file starts jsHint with the command
call (path to global)\jshint (path to dev)\(file).js
In (path to global) are (among others) two files, jshint and jshint.cmd.
jshint
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
case `uname` in
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
esac
if [ -x "$basedir/node" ]; then
"$basedir/node" "$basedir/node_modules/jshint/bin/jshint" "$@"
ret=$?
else
node "$basedir/node_modules/jshint/bin/jshint" "$@"
ret=$?
fi
exit $ret
EDIT: 11 hours after the original post, I read my post again. Where you now see (path to global), I had used a different notation (less thans and greater thans) that didn't show. Very confusing.
I'll consistently call two directories on my C: drive "(path to global)" and "(path to dev)". Neither is relative; both start with C:\ and list directories. (path to dev) is longer; it is a child of (path to global).
expected behavior: jsHint analysis of my .js file
actual behavior: I get this report:
Sadly, I don't get this for all .js files. Of the two I've tried, one works and one doesn't. Both are modules. The file that causes the report imports from the file that jsHint analyzes without error. Maybe that's relevant.
environment: Windows 10. My .js file includes ES6 syntax. Babel v6.16.0 makes it ES5. Node.js v6.9.2 runs it.
node.js is in C:\Program Files\nodejs.
jshint was 2.9.3. I upgraded to 2.9.4 and got the same behavior.
jsHint is at (path to global)\node_modules\jshint.
A batch file starts jsHint with the command
In (path to global) are (among others) two files, jshint and jshint.cmd.
jshint
jshint.cmd
The lowest .jshintrc in a directory that is parent to the .js file:
(path to global) is a parent directory to this file.
I'd like to be as helpful as possible in providing any additional information!
The text was updated successfully, but these errors were encountered: