React configuration for the eslint

1. In the first run the vscode npm i eslint-plugin-react-hooks -Dmounted reliance;

2. Open and then package.jsonconfigure:

 "eslintConfig": {
    "extends": "react-app",
    "plugins": [
      "react-hooks"
    ],
    "rules": {
      "react-hooks/rules-of-hooks":"error"
    }
  },
Published 80 original articles · won praise 82 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_42893625/article/details/104274457