ESLint定义前不使用

# ESLint定义前不使用

{
  "no-use-before-define": ["error", { "variables": false }]
}
1
2
3

这将使该规则对其他事物保持启用,例如同一范围内的类和函数以及变量,但对于上层范围内的变量将放宽它。

对函数和类声明禁用规则

"rules": {    
  "no-use-before-define": ["error", {"functions": false, "classes": false}]
}
1
2
3
上次更新: 2022/6/23 上午11:50:25