-
Notifications
You must be signed in to change notification settings - Fork 17
/
eslintrc
45 lines (45 loc) · 1.67 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
// These are rules that apply to javascript files, particularly for
// KA webapp. These files use ES6 constructs, which get transpiled
// down to ES5 before deploying. They are also often jsx files.
// They also allow a lot of globals because they use third-party
// packages that expose globals, or for backwards-compatibility
// reasons.
//
// If you want to adjust/add a rule that is not ES6-, flow-, or jsx-specific,
// modify eslintrc.shared instead. In particular, when adjusting the
// list of built-in globals (useful for both javascript files and
// <script> contents inside html), do that in eslintrc.shared.
{
"rules": {
// ---------------------------------------
// ES6 rules.
"constructor-super": 2,
"no-const-assign": 2,
"no-this-before-super": 2,
"no-var": 2,
"prefer-const": 2,
"prefer-spread": 2,
// We turned this off because it complains when you have a
// multi-line string, which I think is going too far.
"prefer-template": 0,
// We've decided explicitly not to care about this.
"arrow-parens": 0,
// ---------------------------------------
// ES6/jsx stuff that's disabled for now, but maybe shouldn't be.
// TODO(csilvers): enable these if/when community agrees on it.
"prefer-arrow-callback": 0
},
"parser": "babel-eslint",
"env": {
// TODO(csilvers): once we properly use eslintrc.node for node
// files, get rid of this next line.
"node": true,
"browser": true,
"es6": true
},
"extends": [
"./eslintrc.shared",
"./eslintrc.flow",
"./eslintrc.react",
]
}