-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
37 lines (37 loc) · 909 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module.exports = {
parser: 'babel-eslint',
parserOptions: {
ecmaVersion: 10,
sourceType: 'module',
ecmaFeatures: {
legacyDecorators: true,
jsx: true
}
},
env: {
node: true,
browser: true,
jest: true
},
globals: {
history: 'off',
Promise: 'readonly'
},
settings: {
react: {
version: 'detect'
}
},
extends: ['eslint:recommended', 'plugin:react/recommended'],
plugins: ['react', 'react-native', 'react-hooks'],
rules: {
'no-empty': ['warn', {allowEmptyCatch: true}],
'react/prop-types': [1, {skipUndeclared: true}],
'no-unused-vars': [1, {vars: 'all', args: 'none', ignoreRestSiblings: true}],
'no-console': 'off',
'react/no-string-refs': 'warn',
// hooks
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn' // Checks effect dependencies
}
}