-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
80 lines (52 loc) · 2.59 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
{
"globals": {
"document": true,
"window": true
},
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module",
"allowImportExportEverywhere": false
},
"rules": {
/* Possible Errors */
"no-irregular-whitespace": 1, // disallow irregular whitespace outside of strings and comments
"quote-props": 1, // disallow reserved words being used as object literal keys (off by default)
"no-sparse-arrays": 1, // disallow sparse arrays
"use-isnan": 1, // disallow comparisons with the value NaN
"valid-jsdoc": 1, // Ensure JSDoc comments are valid (off by default)
"valid-typeof": 1, // Ensure that the results of typeof are compared against a valid string
/* Best Practice */
"strict": 0,
"radix": 1,
"eqeqeq": 1, // require the use of === and !==
"curly": 1, // specify curly brace conventions for all control statements
"dot-notation": 1, // encourages use of dot notation whenever possible
"no-unused-vars": 1, // disallow declaration of variables that are not used in the code
"no-use-before-define": 1, // disallow use of variables before they are defined
"wrap-regex": 1,
"no-var": 1, // require let or const instead of var (off by default)
"no-multiple-empty-lines": 1, // disallow multiple empty lines (off by default)
"eol-last": 1, // enforce newline at the end of file, with no multiple empty lines
"no-mixed-spaces-and-tabs": 1, // disallow mixed spaces and tabs for indentation
"vars-on-top": 1, // requires to declare all vars on top of their containing scope (off by default)
"no-lone-blocks": 1, // disallow unnecessary nested blocks
"no-loop-func": 1, // disallow creation of functions within loops
"no-implied-eval": 1, // disallow use of eval()-like methods
"no-alert": 1, // disallow the use of alert, confirm, and prompt
},
"plugins": [
"flowtype"
],
}
/*
TODO: lookinto these
"quotes": 2,
"no-unused-vars": 2,
"no-underscore-dangle": 2,
"no-alert": 2,
"no-lone-blocks": 2,
"unsafe": {
"enable_getters_and_setters": true
}
*/