“Extra semicolon” 多余的分號
“Missing semicolon.” : “缺少分號.”,
“Use the function form of \\”use strict\\”.” : “使用標準化定義function.”,
“Unexpected space after ‘-’.” : “在’-'后面不應出現空格.”,
“Expected a JSON value.” : “請傳入一個json的值.”,
“Mixed spaces and tabs.”: “空格和TAB重復.”,
“Unsafe character.” : “不安全的字符.”,
“Line too long.”: “本行中的字符超過設定的最大長度.”,
“Trailing whitespace.”: “本行末尾有過多無用空格.”,
“Script URL.” : “腳本URL.”,
“Unexpected {a} in ‘{b}’.” : “在 ‘{b}’ 中不該出現 {a}.”,
“Unexpected ‘{a}’.” : “不該在此出現’{a}’.”,
“Strings must use doublequote.” : “字符串需要用雙引號”,
“Unnecessary escapement.” : “不需要轉義”,
“Control character in string: {a}.” : “在字符串中出現了Control的字符”,
“Avoid \\’.” : “避免 \\”,
“Avoid \\v.” : “避免 \\v”,
“Avoid \\x-.” : “避免 \\x-”,
“Bad escapement.” : “錯誤的轉義字符”,
“Bad number ‘{a}’.” : “錯誤的數字 ‘{a}’”,
“Missing space after ‘{a}’.” : “在’{a}’之后缺少空格”,
“Don’t use extra leading zeros ‘{a}’.” : “不要再’{a}’的前面用多余的0″,
“Avoid 0x-. ‘{a}’.” : “避免使用 0x-. ‘{a}’.”,
“A trailing decimal point can be confused with a dot ‘{a}’.” : “在’{a}’中使用點尾隨小數點”,
“Unexpected comment.” : “不該在此處出現注釋”,
“Unescaped ‘{a}’.” : “沒有轉義 ‘{a}’”,
“Unexpected control character in regular expression.” : “在正則表達式中出現了control字符”,
“Unexpected escaped character ‘{a}’ in regular expression.” : “在正則表達式中出現了沒有轉義的字符 ‘{a}’”,
“Expected ‘{a}’ and instead saw ‘{b}’.” : “應該用 ‘{a}’代替’{b}’”,
“Spaces are hard to count. Use {{a}}.” : “空格難以統計,請使用 {{a}}”,
“Insecure ‘{a}’.” : “不安全的 ‘{a}’”,
“Empty class.” : “空的class”,
“Expected a number and instead saw ‘{a}’.”:“應該用數字代替’{a}’”,
“‘{a}’ should not be greater than ‘{b}’.”:“‘{a}’不應該比’{b}’大”,
“‘hasOwnProperty’ is a really bad name.”: “‘hasOwnProperty’是關鍵字”,
“‘{a}’ was used before it was defined.”:“‘{a}’未定義就已經使用了.”,
“‘{a}’ is already defined.”:“‘{a}’被重復定義”,
“A dot following a number can be confused with a decimal point.”:“數字后面的一個點會被誤認為是十進制的小數點”,
“Confusing minusses” : “容易混淆的負數表達-”,
“Confusing plusses.” : “容易混淆的正數表達+”,
“Unmatched ‘{a}’.” : “無法匹配的’{a}’”,
“Expected ‘{a}’ to match ‘{b}’ from line {c} and instead saw ‘{d}’.”:“在行{c}中需要用’{a}’和’{b}’匹配,用來代替’{d}’”,
“Unexpected early end of program.”:“程序不可預期的提前終止”,
“A leading decimal point can be confused with a dot: ‘.{a}’.”:“‘{a}’前的點容易混淆成小數點”,
“Use the array literal notation \[\].”:“使用數組的符號 \[\]“,
“Expected an operator and instead saw ‘{a}’.”:“需要用一個符號來代替’{a}’”,
“Unexpected space after ‘{a}’.”:“在’{a}’之后不能出現空格”,
“Unexpected space before ‘{a}’.”:“在’{a}’之前不能出現空格”,
“Bad line breaking before ‘{a}’.”:“在’{a}’之前錯誤的換行”,
“Expected ‘{a}’ to have an indentation at {b} instead at {c}.”:“‘{a}’需要在{c}而不是{b}處縮進”,
“Line breaking error ‘{a}’.”:“換行錯誤 ‘{a}’”,
“Unexpected use of ‘{a}’.”:“此處不能用’{a}’”,
“Bad operand.”:“錯誤的操作數”,
“Use the isNaN function to compare with NaN.”:“使用isNaN來與NaN比較”,
“Confusing use of ‘{a}’.”:“容易混淆的’{a}’的使用”,
“Read only.”:“只讀的屬性”,
“‘{a}’ is a function.”:“‘{a}’是一個函數”,
‘Bad assignment.’:“錯誤的賦值”,
“Do not assign to the exception parameter.”:“不要給額外的參數賦值”,
“Expected an identifier in an assignment and instead saw a function invocation.”:“在賦值的語句中需要有一個標識符,而不是一個方法的調用”,
“Expected an identifier and instead saw ‘{a}’ (a reserved word).”:“需要有一個標識符,而不是’{a}’(保留字符)”,
“Missing name in function declaration.”:“在方法聲明中缺少名稱”,
“Expected an identifier and instead saw ‘{a}’.”:“需要有一個標識符,而不是’{a}’”,
“Inner functions should be listed at the top of the outer function.”:“內部函數的聲明應該放在此函數的頂部。”,
“Unreachable ‘{a}’ after ‘{b}’.”:“在’{b}’之后無法獲取’{a}’”,
“Unnecessary semicolon.”:“不必要的分號”,
“Label ‘{a}’ on {b} statement.”:“將’{a}’放在{b}的聲明中”,
“Label ‘{a}’ looks like a javascript url.”:“‘{a}’看上去像一個js的鏈接”,
“Expected an assignment or function call and instead saw an expression”:“需要一個賦值或者一個函數調用,而不是一個表達式.”,
“Do not use ‘new’ for side effects.”:“不要用’new’語句.”,
“Unnecessary \\”use strict\\”.”:“不必要的\\”use strict\\”.”,
“Missing \\”use strict\\” statement.”:“缺少\\”use strict\\”的聲明”,
“Empty block.”:“空的模塊”,
“Unexpected /*member ‘{a}’.”:“不應出現 /*元素 ‘{a}’.”,
“‘{a}’ is a statement label.”:“‘{a}’是一個聲明”,
“‘{a}’ used out of scope.”:“‘{a}’使用超出范圍”,
“‘{a}’ is not allowed.”:“不允許使用’{a}’”,
“‘{a}’ is not defined.”:“‘{a}’沒有被定義”,
“Use ‘{a}’ to compare with ‘{b}’.”:“使用’{a}’與’{b}’相比”,
“Variables should not be deleted.”:“變量需要被刪除”,
“Use the object literal notation {}.”:“使用對象的文字符號 {}”,
“Do not use {a} as a constructor.”:“不要使用{a}作為一個構造對象”,
“The Function constructor is eval.”:“The Function constructor is eval.”,
“A constructor name should start with an uppercase letter.”:“一個構造對象的名稱必須用大寫字母開頭.”,
“Bad constructor.”:“錯誤的構造對象”,
“Weird construction. Delete ‘new’.”:“構造對象有誤,請刪除’new’”,
“Missing ‘()’ invoking a constructor.”:“缺少括號()”,
“Avoid arguments.{a}.”:“避免參數.{a}.”,
“document.write can be a form of eval.”:“document.write是eval的一種形式”,
‘eval is evil.’:“盡量不要使用eval”,
“Math is not a function.”:“Math不是一個函數”,
“Missing ‘new’ prefix when invoking a constructor.”:“此處缺少了’new’”,
“Missing radix parameter.”:“缺少參數”,
“Implied eval is evil. Pass a function instead of a string.”:“傳遞一個函數,而不是一個字符串”,
“Bad invocation.”:“錯誤的調用”,
“\['{a}'\] is better written in dot notation.”:“\['{a}'\]最好用點.的方式”,
“Extra comma.”:“多余的逗號”,
“Don’t make functions within a loop.”:“不要用循環的方式創建函數”,
“Unexpected parameter ‘{a}’ in get {b} function.”:“在{b}方法中不該用到參數’{a}’”,
“Duplicate member ‘{a}’.”:“重復的’{a}’”,
“Expected to see a statement and instead saw a block.”:“此處應該是語句聲明.”,
“Too many var statements.”:“過多var的聲明”,
“Redefinition of ‘{a}’.”:“‘{a}’被重復定義”,
“It is not necessary to initialize ‘{a}’ to ‘undefined’.”:“無需將’{a}’初始化為’undefined’”,
“Expected a conditional expression and instead saw an assignment.”:“此處需要一個表達式,而不是賦值語句”,
“Expected a ‘break’ statement before ‘case’.”:“在’case’之前需要有’break’.”,
“Expected a ‘break’ statement before ‘default’.”:“在’default’之前需要有’break’.”,
“This ‘switch’ should be an ‘if’.”:“此處’switch’應該是’if’.”,
“All ‘debugger’ statements should be removed.”:“請刪除’debugger’的語句”,
“‘{a}’ is not a statement label.”:“‘{a}’不是一個聲明標簽.”,
“Expected an assignment or function call and instead saw an expression.”:“需要一個語句或者一個函數調用,而不是一個表達式”,
“Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.”:“函數的聲明不能放在類似if的塊中,需要放在外部函數的頂部.”
針對自己項目中遇到的一些提示,做一些舉例說明:
W099:Mixed spaces and tabs
這個錯誤是最常見的,意思是在同一行中,空格和Tab縮進混合使用了,修改很簡單,一般是刪除Tab縮進,全部改為空格。為了方便,我們可以把編輯器的Tab縮進設置成2個或4個空格,來代替原有的縮進。
W030 - Expected an assignment or function call and instead saw an expression.
這種情況是沒有給變量賦初值。給變量賦初值。
W041:Use '===' to compare with ... 一般使用 === 代替兩個 == 就能解決
W033:Missing semicolon 缺少分號
W014 : Misleading line break before '+'; readers may interpret this as an expression boundary.
不要把 + 放在第一位,這樣容易被人認為是一個數學表達式。
作者:簡陌刀丶阿吉
鏈接:https://www.jianshu.com/p/18340629623d
來源:簡書
簡書著作權歸作者所有,任何形式的轉載都請聯系作者獲得授權并注明出處。
- 技巧
- 激活
- 為文件添加標簽
- 詞典
- Alt左鍵拖動
- 圖表操作
- 打開項目
- 查找文件所在目錄
- 有紅波浪線怎么找到語法錯誤
- JS有紅色波浪線
- JSHint 遇見的錯誤集合
- layui is not defined
- 設置
- phpstorm之自定義代碼碎片(tab鍵自動填充代碼)
- 體驗
- 對象冒號對齊
- 文件排序如何設置
- phpstorm設置等號對齊
- Phpstorm 設置注釋符縮進位置
- 鼠標滾輪改變字體大小
- 拖放文件打開
- 關閉其他tab的方法
- 用鼠標控制字體大小
- 方法之間有橫線
- 換行
- 添加jQuery自動提示,自動補全,提示文檔
- phpstorm取消強制換行
- 移除項目
- ext-json is missing in composer.json
- 版本
- 本地版本控制
- 規范
- 文件
- 駝峰跳轉
- 查看文檔結構
- 規范一:ThinkPHP規范
- 規范二:phpStrom設置規范
- 規范三:PHP_CodeSniffer 輔佐代碼規范
- 規范四:PHP_CodeSniffer 開發規范示例
- 規范五:PHP命名規則
- .規范六:PHP標準注釋
- 快捷鍵
- Ctrl + 左鍵 導航文件路徑
- Ctrl+Shift+N 快速查找文件
- Alt+Home 導航
- Ctrl + Alt + F7
- Ctrl + Shift + Ctrl + I
- Ctrl+Shift + A
- Shift+F6從HTML重命名CSS
- HTML/JS/CSS自動完成
- ctrl+后引號 選擇當前頁面主題
- 粘貼最近的代碼
- 導航
- ctrl+shift+J 合并行
- 快速查看最新更改的文件
- 查找和替換
- 快速移到方法
- Alt+Shift+F10運行調試
- Alt+Enter 快速修復
- 開機快捷鍵
- Ctrl+Alt+T包裹標簽
- 智能提醒
- 快速完成 ctrl+空格
- 注釋
- ctrl+H查看所選繼承結構
- Ctrl+Shift+Enter判斷語句自動完成
- Ctrl+Shift+I
- Ctrl+Shift+Enter
- Ctrl+X刪除當前行
- Alt+1
- Ctrl+D比較文件
- 雙擊Shift
- ctrl+。
- Alt+Shift+J
- ctrl+alt+shift+insert選擇語言
- 自動完成
- Ctrl+F
- 快捷鍵 Alt+后引號
- 調試
- phpstrom+wamp+xdebug
- Evaluate評估
- 斷點變量長放顯示調試
- debugger
- PhpStorm Xdebug遠程調試環境搭建原理分析及問題排查
- phpstorm中設置連接FTP,并快速進行文件比較,上傳下載,同步等操作
- 調試xdebug
- xdebug參數
- 右鍵斷點調整斷點屬性
- 配置xdebug遠程調試php的三種方法(配合phpstorm)
- 手機版調試技巧
- phpstorm+php7+xdebug+centos遠程調試(不建議
- 遠程socket調試
- 插件
- gitee
- Editor
- Emmet
- 工具等
- Termial終端
- 終端設置
- 打開終端等工具的入口
- 菜單
- view
- 面包屑
- Tools
- 數據庫
- 打開數據庫控制臺
- Ctrl+Enter 執行數據庫
- Ctrl+Enter
- ctrl+d 數據表對比
- ctrl+shift+空格
- 啟動界面
- 提示
- PHPStorm 2017.3提示