-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
69 lines (69 loc) · 1.78 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
module.exports = {
extends: ['airbnb', 'plugin:cypress/recommended', 'plugin:prettier/recommended'],
plugins: ['react-hooks'],
rules: {
'array-callback-return': 'off',
'arrow-parens': 'off',
'comma-dangle': ['error', 'never'],
'func-names': ['warn', 'as-needed'],
'func-style': 'off',
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'no-confusing-arrow': 'off',
'no-nested-ternary': 'off',
'object-curly-newline': [
'error',
{
ObjectExpression: { consistent: true, multiline: true },
ObjectPattern: { consistent: true, multiline: true }
}
],
'prefer-destructuring': ['error', { object: true, array: false }],
'quote-props': ['error'],
'react/button-has-type': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-props-no-spreading': 'warn',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn'
},
overrides: [
{
files: ['**/*.test*'],
env: {
jest: true
},
globals: {
cy: true
},
rules: {
'import/no-extraneous-dependencies': 'off',
'import/no-named-as-default': 'off',
'react/prop-types': 'off'
}
},
{
files: ['cypress/**'],
globals: {
cy: true
},
rules: {
'import/no-extraneous-dependencies': 'off'
}
},
{
files: ['**/.storybook/**', '**/*.stories.js?(x)', '**/*.template.js?(x)'],
rules: {
'import/no-extraneous-dependencies': 'off',
'react/jsx-props-no-spreading': 'off',
'react/prop-types': 'off'
}
}
],
parser: '@babel/eslint-parser',
parserOptions: {
requireConfigFile: false,
babelOptions: {
presets: ['@babel/preset-react']
}
}
};