-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
70 lines (69 loc) · 1.73 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
module.exports = {
env: {
es6: true,
},
extends: 'airbnb',
parser: 'babel-eslint',
parserOptions: {
ecmaFeatures: {
jsx: true,
classes: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
plugins: [
'react',
],
globals: {
$: true,
window: true,
document: true,
test: true,
expect: true,
isNaN: true,
alert: true,
localStorage: true,
},
rules: {
indent: [
'error',
4,
],
// Indent JSX with 4 spaces
'react/jsx-indent': ['error', 4],
// Indent props with 4 spaces
'react/jsx-indent-props': ['error', 4],
'linebreak-style': [
'error',
'unix',
],
'max-len': ['error', { code: 120 }],
quotes: [
'error',
'single',
],
'no-param-reassign': 0,
'jsx-quotes': ['error', 'prefer-single'],
semi: [
'error',
'never',
],
camelcase: 'off',
'class-methods-use-this': 'off',
'react/jsx-one-expression-per-line': 'off',
'no-console': 'off',
'no-alert': 'off',
'no-plusplus': 'off',
'import/prefer-default-export': 'off',
'no-use-before-define': 'off',
'no-class-assign': 'off',
'react/no-multi-comp': 'off',
'react/prefer-stateless-function': 'off',
'no-underscore-dangle': 'off',
'prefer-template': 'off',
'click-events-have-key-events': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
},
}