-
Notifications
You must be signed in to change notification settings - Fork 4
/
.eslintrc.js
44 lines (44 loc) · 1.06 KB
/
.eslintrc.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
38
39
40
41
42
43
44
module.exports = {
extends: ['airbnb', 'prettier'],
plugins: ['prettier', 'react-hooks'],
rules: {
'prettier/prettier': 'error',
'react/no-unescaped-entities': 0,
'react/jsx-filename-extension': 0,
'react/jsx-one-expression-per-line': 0,
'react/prop-types': 0,
// The jsx-wrap-multilines rule conflicts with Prettier.
// https://github.com/prettier/prettier/issues/1009#issuecomment-286993938
'react/jsx-wrap-multilines': [
'error',
{
declaration: false,
assignment: false,
},
],
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
},
overrides: [
// Set Jest rules only for test files.
{
files: ['**/*.test.js', '**/__mocks__/**/*.js'],
extends: ['plugin:jest/recommended'],
env: {
jest: true,
},
plugins: ['jest'],
rules: {
'global-require': 0,
'react/jsx-props-no-spreading': 0,
},
},
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
},
env: {
es6: true,
},
}