Browse Source

prepare for hooks

pull/1/head
Angelo DiNardi 3 years ago
parent
commit
31d7298f39
  1. 7
      .eslintrc.js
  2. 1
      package.json
  3. 5
      yarn.lock

7
.eslintrc.js

@ -22,7 +22,8 @@ module.exports = { @@ -22,7 +22,8 @@ module.exports = {
plugins: [
'react',
'flowtype',
"babel"
"babel",
"react-hooks",
],
rules: {
quotes: ["error", "double"],
@ -31,6 +32,8 @@ module.exports = { @@ -31,6 +32,8 @@ module.exports = {
"indent": ["error", 4],
"space-before-function-paren": ["error", "never"],
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error"
"react/jsx-uses-vars": "error",
"react-hooks/rules-of-hooks": "error", // Checks rules of Hooks
"react-hooks/exhaustive-deps": "warn", // Checks effect dependencies
}
}

1
package.json

@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-hooks": "^2.2.0",
"eslint-plugin-standard": "^4.0.1",
"flow-bin": "^0.111.3",
"flow-typed": "^2.6.2",

5
yarn.lock

@ -3066,6 +3066,11 @@ eslint-plugin-promise@^4.2.1: @@ -3066,6 +3066,11 @@ eslint-plugin-promise@^4.2.1:
resolved "https://registry.yarnpkg.com/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz#845fd8b2260ad8f82564c1222fce44ad71d9418a"
integrity sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==
eslint-plugin-react-hooks@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.2.0.tgz#078264e9e388da6929ace09d6abe92c85963aff4"
integrity sha512-jSlnBjV2cmyIeL555H/FbvuSbQ1AtpHjLMHuPrQnt1eVA6lX8yufdygh7AArI2m8ct7ChHGx2uOaCuxq2MUn6g==
eslint-plugin-react@^7.16.0:
version "7.16.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.16.0.tgz#9928e4f3e2122ed3ba6a5b56d0303ba3e41d8c09"

Loading…
Cancel
Save