diff --git a/.eslintrc.js b/.eslintrc.js index a2d35c4..ab847b3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -4,12 +4,10 @@ module.exports = { es2021: true, node: true, }, - extends: ['standard', 'prettier'], - parser: '@typescript-eslint/parser', + extends: ['standard', 'plugin:react-hooks/recommended', 'prettier'], parserOptions: { ecmaVersion: 'latest', }, - plugins: ['@typescript-eslint'], rules: { 'space-before-function-paren': 'off', 'comma-dangle': ['error', 'always-multiline'], diff --git a/package.json b/package.json index 0500489..e3cd623 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "eslint-plugin-n": "^15.6.1", "eslint-plugin-promise": "^6.1.1", "eslint-plugin-react": "^7.32.2", + "eslint-plugin-react-hooks": "^4.6.0", "microbundle": "^0.15.1", "npm-run-all": "^4.1.5", "prettier": "^2.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d4ff506..0050d0a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,6 +9,7 @@ specifiers: eslint-plugin-n: ^15.6.1 eslint-plugin-promise: ^6.1.1 eslint-plugin-react: ^7.32.2 + eslint-plugin-react-hooks: ^4.6.0 microbundle: ^0.15.1 npm-run-all: ^4.1.5 prettier: ^2.8.3 @@ -24,6 +25,7 @@ devDependencies: eslint-plugin-n: 15.6.1_eslint@8.33.0 eslint-plugin-promise: 6.1.1_eslint@8.33.0 eslint-plugin-react: 7.32.2_eslint@8.33.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.33.0 microbundle: 0.15.1 npm-run-all: 4.1.5 prettier: 2.8.3 @@ -2900,6 +2902,15 @@ packages: eslint: 8.33.0 dev: true + /eslint-plugin-react-hooks/4.6.0_eslint@8.33.0: + resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} + engines: {node: '>=10'} + peerDependencies: + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + dependencies: + eslint: 8.33.0 + dev: true + /eslint-plugin-react/7.32.2_eslint@8.33.0: resolution: {integrity: sha512-t2fBMa+XzonrrNkyVirzKlvn5RXzzPwRHtMvLAtVZrt8oxgnTQaYbU6SXTOO1mwQgp1y5+toMSKInnzGr0Knqg==} engines: {node: '>=4'}