-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.eslintrc.js
37 lines (37 loc) · 1.38 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
module.exports = {
root: true,
env: {
node: true,
jest: true
},
extends: ['prettier'],
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false,
babelOptions: {
parserOpts: {
plugins: ['typescript']
}
}
},
plugins: ['prettier'],
ignorePatterns: ['**/dist/**'],
rules: {
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-fallthrough': 'off',
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
{ blankLine: 'any', prev: ['const', 'let', 'var'], next: ['const', 'let', 'var'] },
{ blankLine: 'any', prev: ['case', 'default'], next: 'break' },
{ blankLine: 'any', prev: 'case', next: 'case' },
{ blankLine: 'always', prev: '*', next: 'return' },
{ blankLine: 'always', prev: 'block', next: '*' },
{ blankLine: 'always', prev: '*', next: 'block' },
{ blankLine: 'always', prev: 'block-like', next: '*' },
{ blankLine: 'always', prev: '*', next: 'block-like' },
{ blankLine: 'always', prev: ['import'], next: ['const', 'let', 'var'] }
]
}
};