error Do not use 'new' for side effects no-new 这个错误
打开 eslintrc.js 文件,添加一条自定义规则
no-new : off 如图所示。

禁用new ESLint规则
本文介绍了解决ESLint中no-new错误的方法。通过编辑eslintrc.js文件并设置no-new规则为off状态,可以避免使用new关键字时触发警告。
error Do not use 'new' for side effects no-new 这个错误
打开 eslintrc.js 文件,添加一条自定义规则
no-new : off 如图所示。

1861
450
1477
2268

被折叠的 条评论
为什么被折叠?