forked from transcom/mymove
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
88 lines (88 loc) · 2.58 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
module.exports = {
plugins: ['prettier', 'security', 'no-only-tests', 'you-dont-need-lodash-underscore', 'ato'],
extends: [
'react-app',
'airbnb',
'prettier',
'prettier/prettier',
'plugin:security/recommended',
'plugin:you-dont-need-lodash-underscore/compatible',
],
root: true,
rules: {
'prettier/prettier': 'error',
'no-only-tests/no-only-tests': 'error',
'ato/no-explicit-eslint-disable': 'error',
'ato/no-unapproved-annotation': process.env.NODE_ENV === 'production' ? 'error' : 'off',
'no-debugger': 'warn',
'no-console': 'warn',
'jsx-a11y/anchor-is-valid': ['warn', { aspects: ['noHref', 'preferButton'] }],
'jsx-a11y/label-has-associated-control': [
'error',
{
labelAttributes: ['htmlFor'],
assert: 'either',
depth: 2,
},
],
'react/button-has-type': 'error',
'react/jsx-no-target-blank': 'error',
'react/jsx-curly-brace-presence': 'error',
'react/require-default-props': 'warn',
'no-unused-vars': 'warn',
'import/order': [
'error',
{
'newlines-between': 'always',
},
],
'you-dont-need-lodash-underscore/capitalize': 'off',
'you-dont-need-lodash-underscore/clone': 'off',
'you-dont-need-lodash-underscore/cloneDeep': 'off',
'you-dont-need-lodash-underscore/findKey': 'off',
'you-dont-need-lodash-underscore/findLast': 'off',
'you-dont-need-lodash-underscore/mapValues': 'off',
'you-dont-need-lodash-underscore/memoize': 'off',
'you-dont-need-lodash-underscore/snakeCase': 'off',
'you-dont-need-lodash-underscore/startCase': 'off',
'you-dont-need-lodash-underscore/sum': 'off',
'you-dont-need-lodash-underscore/union': 'off',
'you-dont-need-lodash-underscore/uniqueId': 'off',
'you-dont-need-lodash-underscore/get': 'off',
},
overrides: [
{
files: ['*.stories.js', '*.stories.jsx', 'setupTests.js'],
rules: {
'import/no-extraneous-dependencies': 'off',
'react/jsx-props-no-spreading': 'off',
'react/destructuring-assignment': 'off',
},
},
{
files: ['*.test.jsx'],
rules: {
'react/jsx-props-no-spreading': 'off',
},
},
],
settings: {
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
linkComponents: [
// Components used as alternatives to <a> for linking, eg. <Link to={ url } />
{
name: 'Link',
linkAttribute: 'href',
},
{
name: 'Link',
linkAttribute: 'to',
},
],
},
};