![](/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.