![](/img/trans.png)
[英]jshint error: “Bad escaping of EOL. Use option multistr if needed.” but multistr is true
[英]JSHint error: “E001 - Bad option”
我正在研究一些ES6 javascript代码,而linter-jshint
一直在抛出这个错误。
我试着查找所有JSHint选项 。 起初我将{"esversion": 6}
到我的用户目录上的.jshintrc文件中。 这是错误开始出现的时候。 然后我尝试使用已弃用的{"esnext": true}
。 错误只是改为另一个,所以我回去了。
这个选项应该有效,我不明白为什么它会显示这个错误。 这是一个有效的选择,不是吗?
顺便说一下,我正在使用Atom。
这是我工作的.jshintrc文件,我有一个错误的属性错误,给出了同样的消息:
{
"predef": [ "$", "jQuery", "text", "$p", "window", "document", "console", "parent" ],
"curly": true,
"eqeqeq": true,
"funcscope": true,
"futurehostile": true,
"latedef": true,
"nonbsp": true,
"notypeof": true,
"shadow": "outer",
"singleGroups": true,
"undef": true,
"unused": true,
"debug": true,
"scripturl": true,
"-W079": true
}
有用的东西。 如果您Ctrl + Alt + Cmd + L
(在Mac上)重新加载Atom,并将最后的更改考虑在内。
检查package.json
。
偶然发现此错误,因为package.json
具有:
{
jshintConfig": {
"extends": "./node_modules/jsgreat/es6/.jshintrc"
}
}
哪个无效, extends
只能在.jshintrc
文件中使用。
我有一条线
// jshint ignore:line //and wanted to add some more information in the comment
删除附加注释修复了错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.