- off"或0 -关闭规则
- “warn” 或1 - 开启规则, 使用警告 程序不会退出
- "error"或2 - 开启规则, 使用错误 程序退出
- eqeqeq 双等于和全等于区别 (==, ===)
-
报错信息: Missing space before function parentheses
意思是在方法名和刮号之间需要有一格空格。
-
报错信息:Expected error to be handled
这是因为回调函数里面的参数error没有运用到,所以可以不设置参数,或者在回调函数内console.log(error)
3. Newline required at end of file but not found
在最后一行加一个回车
4. Expected error to be handled
error没有用到,不用声明
5. Requires a space before ‘}’
需要在false和}中间加一个空格
6. 这里的意思说name的值不唯一,删除或者改个名称
7.Unnecessary return statement
没有无用的返回值,返回个东西,返回false即可
8. Trailing spaces not allowed
空格太多了,删除多余空格
9.Block must not be padded by blank lines
不能有空行