forked from canalplus/rx-player
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
95 lines (91 loc) · 2.9 KB
/
.eslintrc
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
{
"rules": {
// Possible Errors <http://eslint.org/docs/rules/#possible-errors>
// babel removes them for older browsers, we should do a codemod
"comma-dangle": [1, "always-multiline"],
// equivalent to jshint boss
"no-cond-assign": 0,
// equivalent to jshint devel
"no-console": 0,
// prohibits things like `while (true)`
"no-constant-condition": 0,
// we need to be able to match these
"no-control-regex": 0,
// equivalent to jshint debug
"no-debugger": 2,
// equivalent to jshint W004
"no-dupe-args": 2,
// syntax error in strict mode, almost certainly unintended in any case
"no-dupe-keys": 2,
// almost certainly a bug
"no-duplicate-case": 1,
// almost certainly a bug
"no-empty-character-class": 1,
// would warn on uncommented empty `catch (ex) {}` blocks
"no-empty": 0,
// can cause subtle bugs in IE 8, and we shouldn't do this anyways
"no-ex-assign": 1,
// we shouldn"t do this anyways
"no-extra-boolean-cast": 1,
// parens may be used to improve clarity, equivalent to jshint W068
'no-extra-parens': [1, 'functions'],
// equivalent to jshint W032
'no-extra-semi': 1,
// a function delaration shouldn't be rewritable
'no-func-assign': 2,
// babel and es6 allow block-scoped functions
'no-inner-declarations': 0,
// will cause a runtime error
'no-invalid-regexp': 1,
// disallow non-space or tab whitespace characters
'no-irregular-whitespace': 1,
// write `if (!(a in b))`, not `if (!a in b)`, equivalent to jshint W007
'no-negated-in-lhs': 2,
// will cause a runtime error
'no-obj-calls': 2,
// improves legibility
'no-regex-spaces': 1,
// equivalent to jshint elision
'no-sparse-arrays': 2,
// equivalent to jshint W027
'no-unreachable': 2,
// equivalent to jshint use-isnan
'use-isnan': 2,
// probably too noisy ATM
'valid-jsdoc': 0,
// equivalent to jshint notypeof
'valid-typeof': 2,
// we already require semicolons
'no-unexpected-multiline': 0,
// Best Practices <http://eslint.org/docs/rules/#best-practices>
// probably a bug, we shouldn't actually even use this yet, because of IE8
'accessor-pairs': [1, {setWithoutGet: true}],
// probably too noisy ATM
'block-scoped-var': 0,
// cyclomatic complexity, we're too far gone
'complexity': 0,
// style guide: Always use brackets, even when optional.
'curly': [1, 'all'],
'no-var': 1,
'prefer-const': 1,
'max-len': [1, 120, 2,
{'ignorePattern': maxLenIgnorePattern},
],
"indent": [1, 2],
"quotes": [1, "double"],
"linebreak-style": [1, "unix"],
"semi": [1, "always"],
},
"env": {
"es6": true,
"browser": true,
"commonjs": true
},
"globals": {
"__DEV__": true,
},
"extends": "eslint:recommended",
"ecmaFeatures": {
"experimentalObjectRestSpread": true,
}
}