美文网首页
安装配置代码检查工具eslint-plugin-react-ho

安装配置代码检查工具eslint-plugin-react-ho

作者: 楠楠_c811 | 来源:发表于2020-05-03 08:02 被阅读0次

安装命令:

npm i eslint-plugin-react-hooks -D

安装完成之后,打开package.json文件修改配置:


原配置

将原配置修改为:


修改后配置

代码如下:

"eslintConfig": {
    "extends": "react-app",
    "plugins":[
      "react-hooks"
    ],
    "rules":{
      "react-hooks/rules-of-hooks":"error"
    }
  },

相关文章

网友评论

      本文标题:安装配置代码检查工具eslint-plugin-react-ho

      本文链接:https://www.haomeiwen.com/subject/cxwrghtx.html