ESLint 是一个语法规则和代码风格的检查工具,可以用来保证写出语法正确、风格统一的代码。
1.配置路径:.eslintrc.json文件下rules属性内
no-console:1,禁止使用console.log
no-debugger:2,禁用debugger
no-extra-semi:2,禁止不必要的分号
no-alert:2,禁用alert,confirm和prompt
no-unused-vars:变量定义后没有使用
off或者0,关闭规则,
warn或者1:打开规则,作为警告
error或者2:打开规则,作为错误
来源:CSDN
作者:自信人生---会当击水
链接:https://blog.csdn.net/qq_25506089/article/details/103753216