Browse Source

chore: add react-hook eslint plugin (#22368)

pull/22382/head
骗你是小猫咪 5 years ago
committed by GitHub
parent
commit
f259be818c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .eslintrc.js
  2. 1
      package.json

3
.eslintrc.js

@ -20,7 +20,7 @@ const eslintrc = {
},
},
parser: '@typescript-eslint/parser',
plugins: ['markdown', 'react', 'babel', 'jest', '@typescript-eslint'],
plugins: ['markdown', 'react', 'babel', 'jest', '@typescript-eslint', 'react-hooks'],
// https://github.com/typescript-eslint/typescript-eslint/issues/46#issuecomment-470486034
overrides: [
{
@ -90,6 +90,7 @@ const eslintrc = {
'react/static-property-placement': 0,
'jest/no-test-callback': 0,
'jest/expect-expect': 0,
'react-hooks/rules-of-hooks': 2, // Checks rules of Hooks
},
globals: {
gtag: true,

1
package.json

@ -190,6 +190,7 @@
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-markdown": "^1.0.0",
"eslint-plugin-react": "^7.14.2",
"eslint-plugin-react-hooks": "^2.5.0",
"eslint-tinker": "^0.5.0",
"fetch-jsonp": "^1.1.3",
"full-icu": "^1.3.0",

Loading…
Cancel
Save