Browse Source

Add lint rules for react-hooks

develop
Apostolos Fanakis 4 years ago
parent
commit
3f352bd7f0
  1. 6
      packages/concordia-app/.eslintrc.js
  2. 20
      packages/concordia-app/package.json

6
packages/concordia-app/.eslintrc.js

@ -12,6 +12,7 @@ module.exports = {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly'
},
parser: 'babel-eslint',
'parserOptions': {
'ecmaFeatures': {
'jsx': true
@ -20,7 +21,8 @@ module.exports = {
'sourceType': 'module'
},
'plugins': [
'react'
'react',
'react-hooks',
],
'rules': {
'react/jsx-props-no-spreading': 'off',
@ -35,6 +37,8 @@ module.exports = {
],
'react/require-default-props': 'off',
'react/prop-types': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'max-len': ['warn', {'code': 120, 'tabWidth': 4}],
'no-unused-vars': 'warn',
'no-console': 'warn',

20
packages/concordia-app/package.json

@ -28,14 +28,19 @@
"@ezerous/drizzle": "~0.4.0",
"@reduxjs/toolkit": "~1.4.0",
"concordia-contracts": "~0.1.0",
"history": "^5.0.0",
"i18next": "^19.8.3",
"i18next-browser-languagedetector": "^6.0.1",
"i18next-http-backend": "^1.0.21",
"level": "~6.0.1",
"orbit-db-identity-provider": "~0.3.1",
"prop-types": "~15.7.2",
"react": "~16.13.1",
"react-dom": "~16.13.1",
"react-i18next": "^11.7.3",
"react-redux": "~7.2.1",
"react-router": "~5.2.0",
"react-router-dom": "~5.2.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "~3.4.3",
"redux-saga": "~1.1.3",
"semantic-ui-css": "~2.4.1",
@ -43,11 +48,12 @@
"web3": "1.3.0"
},
"devDependencies": {
"eslint": "6.8.0",
"eslint-config-airbnb": "18.1.0",
"eslint-plugin-import": "2.20.2",
"eslint-plugin-jsx-a11y": "6.2.3",
"eslint-plugin-react": "7.19.0",
"eslint": "^6.8.0",
"eslint-config-airbnb": "^18.1.0",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.2.0",
"patch-package": "~6.2.2",
"postinstall-postinstall": "~2.1.0",
"source-map-explorer": "~2.5.0"

Loading…
Cancel
Save