This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
forked from react-ga/react-ga
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
58 lines (57 loc) · 1.52 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
module.exports = {
parser: 'babel-eslint',
extends: ['airbnb', 'prettier', 'plugin:jest/recommended'],
plugins: ['prettier', 'jest'],
env: {
browser: true
},
rules: {
'prettier/prettier': 'error',
'react/no-find-dom-node': 'off',
'arrow-body-style': 'off',
'no-mixed-operators': 'off',
'no-shadow': ['error', { allow: ['err', 'error'] }],
'react/prefer-stateless-function': [
'error',
{ ignorePureComponents: true }
],
'no-console': ['error', { allow: ['warn', 'error', 'info'] }],
'no-underscore-dangle': 'off',
'guard-for-in': 'off',
'no-param-reassign': ['error', { props: false }],
'jsx-a11y/label-has-associated-control': 'off',
'jsx-a11y/control-has-associated-control': 'off',
'react/jsx-curly-brace-presence': 'off',
'react/jsx-one-expression-per-line': 'off',
'react/jsx-props-no-spreading': 'off'
},
overrides: [
{
files: ['demo/**/*', 'src/components/*.js'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: true }
],
'import/no-named-as-default-member': 'off',
'react/no-array-index-key': 'off',
'react/jsx-no-bind': 'off',
'react/prop-types': 'off'
}
},
{
files: ['test/**/*'],
env: {
browser: true,
node: true,
'jest/globals': true
},
rules: {
'import/no-extraneous-dependencies': [
'error',
{ devDependencies: true }
]
}
}
]
};