generated from SFDigitalServices/template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
recommended.js
49 lines (49 loc) · 1.16 KB
/
recommended.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
module.exports = {
extends: [
'standard',
'eslint:recommended',
'plugin:import/recommended',
'plugin:promise/recommended'
],
rules: {
// these rules are nice reminders, but not necessarily errors
'promise/always-return': 'warn',
'promise/catch-or-return': 'warn',
/**
* We generally don't need or want semicolons, but we should require them
* before so-called continuation characters like "(" and "[", because
* automatic semicolon insertion doesn't "fix" cases like this:
*
* ```js
* const foo = 'bar'
*
* (() => {
* console.log(foo)
* })()
* ```
*
* Our rules only require semicolons in cases like this, where ASI doesn't
* apply and it would be interpreted as:
*
* ```js
* const foo = 'bar'(() => { console.log(foo) })()
* ```
*
* ...yielding the difficult-to-decipher error:
*
* ```
* Uncaught TypeError: "bar" is not a function
* ```
*/
semi: ['error', 'never', {
beforeStatementContinuationChars: 'always'
}]
},
parserOptions: {
ecmaVersion: 9
},
plugins: [
'import',
'promise'
]
}