-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheslint-config.js
74 lines (69 loc) · 1.93 KB
/
eslint-config.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
module.exports = {
extends: [
'eslint-config-airbnb',
'eslint-config-prettier',
'eslint-config-prettier/react'
].map(require.resolve),
plugins: ['react', 'prettier'],
globals: {
PLATFORM: true,
MODE: true,
window: true,
document: true,
__REDUX_DEVTOOLS_EXTENSION_COMPOSE__: true,
__REDUX_DEVTOOLS_EXTENSION__: true,
createjs: true,
TweenMax: true,
TimelineMax: true,
SplitText: true,
Back: true,
Power1: true,
Power2: true,
Power3: true,
Cubic: true,
Elastic: true,
Linear: true,
Bounce: true,
describe: true,
test: true,
beforeEach: true,
afterEach: true,
expect: true
},
parserOptions: {
ecmaVersion: 8,
sourceType: 'module',
ecmaFeatures: {
experimentalObjectRestSpread: true,
jsx: true
}
},
rules: {
indent: 0, // eslint vs prettier. Round 1! Fight!
curly: ['error', 'all'],
'import/prefer-default-export': 'off',
'no-alert': 'error',
'no-debugger': 'error',
'no-console': ['warn', { allow: ['warn', 'error'] }],
'linebreak-style': 'off',
'lines-around-comment': ['error', { beforeBlockComment: true }],
'multiline-comment-style': ['error', 'separate-lines'],
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }],
'prettier/prettier': [
'error',
{
// Number of spaces it should use per tab
tabWidth: 2,
singleQuote: true,
// Controls the printing of trailing commas wherever possible. Valid options:
// 'none' - No trailing commas
// 'es5' - Trailing commas where valid in ES5 (objects, arrays, etc)
// 'all' - Trailing commas wherever possible (function arguments)
trailingComma: 'none',
// If true, puts the `>` of a multi-line jsx element at the end of
// The last line instead of being alone on the next line
jsxBracketSameLine: false
}
]
}
};