Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1002 Bytes

eslint.md

File metadata and controls

36 lines (24 loc) · 1002 Bytes

ESLint

安装

$ npm i -g eslint

.eslintrc.*

$ eslint --init

rules

"off" or 0 - turn the rule off
"warn" or 1 - turn the rule on as a warning (doesn’t affect exit code)
"error" or 2 - turn the rule on as an error (exit code is 1 when triggered)

强制在花括号中使用一致的空格, WebStorm: Preferences > Editor > Code Style > Javascript > Spaces > Within > 勾选 ES6 import/export braces

.eslintignore