[英]When use jshint for a hello world script, I got “line 0, col 0, Bad option: 'script'.”
This is my simple hello world programme. 这是我简单的hello world程序。
function sayHello() {
return 'Hello world';
}
And my jshint
configuration: 而我的
jshint
配置:
{
"browser": true,
"browserify": true,
"devel": true,
"script": {
"lint": "jshint src"
}
}
and package.json
和
package.json
{
"name": "myangular",
"version": "1.0.0",
"devDependencies": {
"jshint": "^2.9.5"
}
}
When I run jshint
, get the following error: 当我运行
jshint
,出现以下错误:
$./node_modules/jshint/bin/jshint src
src/hello.js: line 0, col 0, Bad option: 'script'.
1 error
I found the reason. 我找到了原因。 I put script in a wrong place.
我将脚本放在错误的位置。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.