【发布时间】:2022-10-20 19:52:30
【问题描述】:
我有一个 .eslintrc 文件,其中包含以下规则:
"rules": {
"prettier/prettier": "error",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "error",
"no-console": "warn"
},
我已经安装了:eslint-plugin-prettier、eslint-config-prettier 和 eslint-plugin-react-hooks
我在 vscode 的 settings.json 中启用了"eslint.validate": [ "javascript", "javascriptreact", "html", "typescriptreact" ],
但是当我删除 useEffect 中所需的依赖项时,它并没有显示我希望它会出现的错误
我还需要做什么?
【问题讨论】:
标签: reactjs react-hooks eslint