This repository has been archived by the owner on May 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy path.eslintrc.js
64 lines (64 loc) · 2 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
module.exports = {
root: true,
extends: '@dooboo/eslint-config',
rules: {
'padding-line-between-statements': [
'warn',
{blankLine: 'always', prev: '*', next: 'return'},
// Always require blank lines after directive (like 'use-strict'), except between directives
{blankLine: 'always', prev: 'directive', next: '*'},
{blankLine: 'any', prev: 'directive', next: 'directive'},
// Always require blank lines after import, except between imports
{blankLine: 'always', prev: 'import', next: '*'},
{blankLine: 'any', prev: 'import', next: 'import'},
// Always require blank lines before and after every sequence of variable declarations and export
{
blankLine: 'always',
prev: '*',
next: ['const', 'let', 'var', 'export'],
},
{
blankLine: 'always',
prev: ['const', 'let', 'var', 'export'],
next: '*',
},
{
blankLine: 'any',
prev: ['const', 'let', 'var', 'export'],
next: ['const', 'let', 'var', 'export'],
},
{
blankLine: 'always',
prev: ['multiline-const', 'multiline-expression', 'multiline-let'],
next: '*',
},
{
blankLine: 'always',
prev: '*',
next: ['multiline-const', 'multiline-expression', 'multiline-let'],
},
// Always require blank lines before and after class declaration, if, do/while, switch, try
{
blankLine: 'always',
prev: '*',
next: ['if', 'class', 'for', 'do', 'while', 'switch', 'try'],
},
{
blankLine: 'always',
prev: ['if', 'class', 'for', 'do', 'while', 'switch', 'try'],
next: '*',
},
],
'@typescript-eslint/no-empty-function': 0,
'@typescript-eslint/ban-ts-comment': 0,
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': [
'error',
{
allowShortCircuit: true,
allowTernary: true,
allowTaggedTemplates: true,
},
],
},
};