eslint提示'React' is defined but never used

使用eslint --init进行基础的设置后,在React项目中发现如下报错提示
'React' is defined but never used
.eslintrc.js文件中配置如下rule即可
"react/jsx-uses-react": 2

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章