This repository has been archived by the owner on Mar 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
126 lines (124 loc) · 3.17 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
module.exports = {
'root': true,
'parser': 'babel-eslint',
'env': {
'browser': true,
'node': true,
'es6': true,
'jest': true,
'commonjs': true
},
'globals': {
'App': true,
'Page': true,
'getApp': true,
'Component': true,
'my': true
},
'parserOptions': {
'sourceType': 'module',
'ecmaVersion': 6,
'ecmaFeatures': {
'generators': true,
'experimentalObjectRestSpread': true
}
},
'rules': {
// ES6
'prefer-const': 'off',
'no-const-assign': 'error',
'no-class-assign': 'error',
'no-dupe-class-members': 'error',
'rest-spread-spacing': 'error',
'no-duplicate-imports': 'error',
'no-useless-rename': 'error',
'arrow-spacing': 'error',
'no-useless-computed-key': 'error',
'template-curly-spacing': 'error',
'generator-star-spacing': ['error', {'before': false, 'after': true}],
'yield-star-spacing': ['error', {'before': false, 'after': true}],
'strict': ['off', 'global'],
'global-strict': ['off', 'always'],
'no-extra-strict': 'off',
'no-shadow': 'off',
'no-unused-vars': ['off', {
'vars': 'local',
'args': 'after-used',
'varsIgnorePattern': 'createElement'
}],
'no-undef': 'error',
'no-unused-expressions': 'off',
'no-use-before-define': 'off',
'yoda': 'off',
'eqeqeq': 'off',
'no-new': 'off',
'consistent-return': 'off',
'dot-notation': ['error', {
'allowKeywords': true
}],
'no-extend-native': 'error',
'no-native-reassign': 'error',
'no-return-assign': 'off',
'no-constant-condition': ['error', {
'checkLoops': false
}],
'no-caller': 'error',
'no-loop-func': 'off',
// Node.js
'no-console': 'off',
'no-catch-shadow': 'error',
'no-new-require': 'off',
'no-mixed-requires': ['off', false],
'no-path-concat': 'off',
'handle-callback-err': 'off',
'no-empty': 'off',
'indent': ['error', 2, {
'SwitchCase': 1
}],
'camelcase': ['off', {
'properties': 'always'
}],
'quotes': ['error', 'single', 'avoid-escape'],
'brace-style': ['error', '1tbs', {
'allowSingleLine': false
}],
'comma-spacing': ['error', {
'before': false,
'after': true
}],
'comma-style': ['error', 'last'],
'eol-last': 'off',
'func-names': 'off',
'new-cap': ['error', {
'capIsNewExceptions': ['App', 'Page', 'Component']
}],
'key-spacing': ['error', {
'beforeColon': false,
'afterColon': true
}],
'no-multi-spaces': 'error',
'no-multiple-empty-lines': 'error',
'no-new-object': 'error',
'no-spaced-func': 'error',
'no-trailing-spaces': 'error',
'no-extra-parens': 'error',
'padded-blocks': ['error', 'never'],
'semi': 'error',
'semi-spacing': 'error',
'keyword-spacing': 'error',
'space-before-blocks': 'error',
'space-before-function-paren': ['error', 'never'],
'space-infix-ops': 'error',
'spaced-comment': ['error', 'always', {
'line': {
'markers': ['/'],
'exceptions': ['-', '+']
},
'block': {
'markers': ['!'],
'exceptions': ['*'],
'balanced': true
}
}]
}
};