-
Notifications
You must be signed in to change notification settings - Fork 7
/
.eslintrc.js
executable file
·107 lines (107 loc) · 2.49 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
module.exports = {
parserOptions: {
ecmaVersion: 2018,
ecmaFeatures: {
impliedStrict: true
}
},
extends: [
'eslint:recommended',
'plugin:react/recommended',
'standard',
],
parserOptions: {
'ecmaFeatures': {
'experimentalObjectRestSpread': true,
'jsx': true
},
'sourceType': 'module'
},
env: {
es6: true,
node: true
},
plugins: [
'react'
],
rules: {
quotes: [2, 'single', { avoidEscape: true }],
'prefer-promise-reject-errors': 1,
'no-template-curly-in-string': 2,
'no-extra-parens': [1, 'all'],
'no-misleading-character-class': 1,
'no-prototype-builtins': 1,
'no-async-promise-executor': 0, // nedeed for mam controller
'no-await-in-loop': 0, // should probably be on for perf dependent application
'require-atomic-updates': 1,
// best practices
'accessor-pairs': 1,
'array-callback-return': 0, // this best practice calls out the use of map over forEach
'complexity': [1, 15],
'curly': [1, 'multi-or-nest', 'consistent'],
'dot-location': [2, 'property'],
'no-empty-function': 1,
'no-eval': 2,
'no-extend-native': 1,
'no-extra-bind': 1,
'no-implicit-coercion': 1,
'no-implicit-globals': 2,
'no-implied-eval': 2,
'no-lone-blocks': 1,
'no-loop-func': 1,
'no-magic-numbers': 0, // could be useful?
'no-new': 1,
'no-new-func': 2,
'no-new-wrappers': 1,
'no-param-reassign': 1,
'no-redeclare': [2, { 'builtinGlobals': true }],
'no-return-await': 1,
'no-script-url': 1,
'no-self-compare': 1,
'no-sequences': 1,
'no-throw-literal': 2,
'no-unmodified-loop-condition': 1,
'no-useless-call': 1,
'no-useless-catch': 0,
'no-useless-concat': 2,
'no-useless-escape': 2,
'no-useless-return': 0,
'no-console': ["error", {
allow: [
"warn",
"error",
"info",
"log"
]
}],
'no-shadow': [1, {
'builtinGlobals': true,
'allow': [
'request',
'window'
]
}],
'no-undef': 0,
'require-await': 1,
'vars-on-top': 2,
'wrap-iife': [2, 'inside'],
// strict mode
'strict': [2, 'safe'],
// variables
'no-use-before-define': [2, {
variables: true,
functions: true,
classes: true
}],
// node
'handle-callback-err': 1,
'no-buffer-constructor': 2,
'no-mixed-requires': 2,
'no-new-require': 0,
'no-path-concat': 1,
'no-sync': 1
},
'globals': {
'localStorage': true,
},
}