使用eslint --init进行基础的设置后,在React项目中发现如下报错提示
'React' is defined but never used
在.eslintrc.js
文件中配置如下rule即可
"react/jsx-uses-react": 2
eslint提示'React' is defined but never used
最新推荐文章于 2024-05-02 13:22:08 发布
使用eslint --init进行基础的设置后,在React项目中发现如下报错提示
'React' is defined but never used
在.eslintrc.js
文件中配置如下rule即可
"react/jsx-uses-react": 2