forked from binary-com/deriv-bot
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
81 lines (80 loc) · 3.51 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
module.exports = {
parser: 'babel-eslint',
env: {
es6 : true,
browser: true,
amd : true,
jquery : true,
jest : true,
jasmine: true,
},
globals: {
Blockly: false,
trackJs: false,
jest: false,
dataLayer: false,
goog: false,
google: false,
gapi: false,
},
rules: {
camelcase : 0,
semi : ['error', 'always'],
'array-callback-return' : 0,
'brace-style' : ['error', '1tbs', { allowSingleLine: true }],
'eol-last' : ['error', 'always'],
'func-names' : ['error', 'never'],
'keyword-spacing' : ['error', { after: true , before: true }],
'lines-between-class-members' : ['error', 'always', { exceptAfterSingleLine: true }],
'no-extra-semi' : 'error',
'no-console' : 'error',
'no-else-return' : ['error', { allowElseIf: true }],
'no-multi-assign' : 0,
'no-param-reassign' : ['error', { props: false }],
'no-restricted-globals' : 0,
'no-script-url' : 0,
'no-trailing-spaces' : ['error', { skipBlankLines: true }],
'object-curly-spacing' : ['error', 'always', { arraysInObjects: true, objectsInObjects: true }],
'one-var' : ['error', { initialized: 'never', uninitialized: 'always' }],
'prefer-destructuring' : 0,
'space-in-parens' : ['error', 'never'],
'space-infix-ops' : 'error',
'space-unary-ops' : 'error',
'no-multiple-empty-lines' : ['error', { 'max': 1, 'maxEOF': 1 }],
'prefer-const' : ['error', {destructuring: 'all', ignoreReadBeforeAssign: false}],
// import rules
'import/no-extraneous-dependencies' : [0, { extensions: ['.jsx'] }],
'import/no-useless-path-segments' : 'error',
'import/order' : ['error', { groups: [['builtin', 'external'], 'internal', 'sibling', 'parent'], 'newlines-between': 'ignore' }],
'import/prefer-default-export' : 0,
// 'sort-imports' : ['error'],
// react rules
'jsx-quotes' : ['error', 'prefer-single'],
'react/jsx-closing-bracket-location': ['error', { selfClosing: 'line-aligned', nonEmpty: 'line-aligned' }],
'react/jsx-closing-tag-location' : 'error',
'react/jsx-first-prop-new-line' : ['error', 'multiline-multiprop'],
'react/jsx-indent' : ['error', 4],
'react/jsx-indent-props' : ['error', 4],
'react/jsx-max-props-per-line' : ['error', { when: 'multiline' }],
'react/jsx-tag-spacing' : ['error', { closingSlash: 'never', beforeSelfClosing: 'always' }],
'react/prop-types' : 0,
'react/self-closing-comp' : 'error',
'react/sort-prop-types' : ['error', { ignoreCase: true, sortShapeProp: true }],
},
extends: [
'airbnb-base',
'binary',
'plugin:react/recommended',
],
parserOptions: {
ecmaVersion : 6,
ecmaFeatures: {
jsx: true,
},
},
settings: {
'import/resolver': {
'webpack': { 'config': 'webpack.config.js' }
}
},
};