-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.eslintrc.js
44 lines (44 loc) · 1.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
module.exports = {
root: true,
env: {
es6: true,
node: true,
browser: true,
},
extends: ['eslint:recommended', 'plugin:unicorn/recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
ecmaFeatures: {
jsx: false,
},
warnOnUnsupportedTypeScriptVersion: false,
},
plugins: ['unicorn'],
rules: {
// core
'no-unused-vars': 0,
'consistent-return': [1, { treatUndefinedAsUnspecified: true }],
quotes: [1, 'single', { allowTemplateLiterals: true, avoidEscape: true }],
semi: [1, 'always'],
'max-lines': [1, { max: 200 }],
'max-params': [1, { max: 5 }],
'no-unneeded-ternary': [1],
// unicorn
'unicorn/prefer-spread': 0,
'unicorn/catch-error-name': 0,
'unicorn/prevent-abbreviations': [
1,
{
replacements: {
args: false,
err: false,
prod: false,
ref: false,
params: false,
},
},
],
},
};