[英]jshint error: “Bad escaping of EOL. Use option multistr if needed.” but multistr is true
I have following .jshintrc file and use grunt-contrib-jshint
: 我有以下.jshintrc文件,并使用
grunt-contrib-jshint
:
{
"predef": [
"after",
"afterEach",
"before",
"beforeEach",
"describe",
"expect",
"it",
"jasmine",
"ls",
"moment",
"runs",
"sinon",
"should",
"spyOn",
"vex",
"waits",
"waitsFor",
"xit",
"xdescribe"
"Zombie"
],
"asi" : false,
"bitwise" : true,
"boss" : false,
"browser" : true,
"curly" : true,
"debug": false,
"devel": false,
"eqeqeq": true,
"evil": false,
"expr": true,
"forin": false,
"immed": true,
"jquery" : true,
"latedef" : false,
"laxbreak": false,
"multistr": true,
"newcap": true,
"noarg": true,
"node" : true,
"noempty": false,
"nonew": true,
"onevar": false,
"plusplus": false,
"regexp": false,
"strict": false,
"sub": false,
"trailing" : true,
"undef": true,
"unused": "vars"
}
As you see there is a line multistr: true
, but it still throws me errors as: 如您所见,有一行
multistr: true
,但仍然向我抛出以下错误:
Linting public/js/homepage.js...ERROR
[L93:C29] W043: Bad escaping of EOL. Use option multistr if needed.
You missed a comma after "xdescribe"
. 您在
"xdescribe"
之后错过了逗号。
(This is why I always format my JSON like that: (这就是为什么我总是这样格式化JSON的原因:
{ "otherdef": false
, "predef":
, [ "after"
, "afterEach"
, "before"
, "beforeEach"
, "describe"
, "expect"
, "it"
]
, "foo": "bar"
, "fob": "baz"
}
so that missing commas are very visible) 这样缺失的逗号非常明显)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.