Skip to content

Commit 0581d99

Browse files
author
devgioele
committed
move react rules and settings from ts to ts-react config
1 parent 6642e87 commit 0581d99

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

ts-react.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,14 @@ module.exports = {
55
'plugin:react/jsx-runtime',
66
'plugin:prettier/recommended'
77
],
8-
plugins: ['react', 'react-hooks']
8+
plugins: ['react', 'react-hooks'],
9+
settings: {
10+
react: {
11+
version: 'detect'
12+
}
13+
},
14+
rules: {
15+
'react-hooks/rules-of-hooks': 'error',
16+
'react-hooks/exhaustive-deps': 'error'
17+
}
918
}

ts.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,13 @@ module.exports = {
2727
},
2828
plugins: ['@typescript-eslint'],
2929
settings: {
30-
react: {
31-
version: 'detect'
32-
},
3330
'import/resolver': {
3431
node: {
3532
paths: ['./']
3633
}
3734
}
3835
},
3936
rules: {
40-
'react-hooks/rules-of-hooks': 'error',
41-
'react-hooks/exhaustive-deps': 'error',
4237
'@typescript-eslint/no-unused-vars': [
4338
'error',
4439
{

0 commit comments

Comments
 (0)