Skip to content

Commit 1bc62ea

Browse files
Add eslint-plugin-react-hooks
1 parent ced8017 commit 1bc62ea

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

bin/create-expo-app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const devDependencies = [
2525
'@typescript-eslint/parser',
2626
'eslint-config-prettier',
2727
'eslint-plugin-import',
28+
'eslint-plugin-react-hooks',
2829
'eslint-plugin-react',
2930
'eslint',
3031
'jest-expo',

template/.eslintrc.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,23 @@ module.exports = {
1616
project: 'tsconfig.json',
1717
sourceType: 'module',
1818
},
19-
plugins: ['@typescript-eslint', 'import'],
19+
plugins: ['@typescript-eslint', 'import', 'react-hooks'],
2020
rules: {
21+
'@typescript-eslint/ban-ts-ignore': 'off',
2122
'@typescript-eslint/explicit-function-return-type': 'off',
2223
'@typescript-eslint/explicit-member-accessibility': 'off',
2324
'@typescript-eslint/no-explicit-any': 'off',
2425
'@typescript-eslint/no-non-null-assertion': 'off',
2526
'@typescript-eslint/no-use-before-define': 'off',
26-
'@typescript-eslint/ban-ts-ignore': 'off',
2727
'import/order': [
2828
'error',
2929
{
3030
groups: ['builtin', 'external', 'internal'],
3131
'newlines-between': 'always',
3232
},
3333
],
34+
'react-hooks/exhaustive-deps': 'warn',
35+
'react-hooks/rules-of-hooks': 'error',
3436
},
3537
settings: { react: { version: 'detect' } },
3638
};

0 commit comments

Comments
 (0)