示例:
{
plugins: [
'typescript',
'@typescript-eslint',
"prettier"
]
}...共享配置包需要安装才能使用,配置时可省略报名中的 eslint-config- 前缀。...,例如:react)
/
配置名(例如:recommended)
示例:
{
"plugins": [
"react"
],
"extends": [
"eslint:recommended...": 2,//switch中的case标签不能重复
"no-else-return": 2,//如果if语句里面有return,后面不能跟else语句
"no-empty": 2,//块语句中的内容不能为空..."no-empty-character-class": 2,//正则表达式中的[]内容不能为空
"no-empty-label": 2,//禁止使用空label
"no-eq-null": 2,//禁止对