/
.eslintrc.js
114 lines (113 loc) · 3.63 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
108
109
110
111
112
113
114
const { rules: tslintRulesRecommended } = require('tslint/lib/configs/recommended');
const tslintRules = Object.assign({}, tslintRulesRecommended, {
"member-access": false,
"ordered-imports": false,
"quotemark": false,
"no-var-keyword": false,
"object-literal-sort-keys": false,
"no-console": false,
"arrow-parens": false,
"max-line-length": false,
"object-literal-key-quotes": false,
"no-shadowed-variable": false,
"only-arrow-functions": false,
"no-var-requires": false,
"semicolon": false,
"no-empty": false,
"interface-over-type-literal": false,
"no-debugger": false,
"trailing-comma": false,
});
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"node": true,
},
"parser": "typescript-eslint-parser",
"parserOptions": {
"ecmaFeatures": {
"experimentalObjectRestSpread": true
},
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:unicorn/recommended",
],
"plugins": [
"typescript",
"unicorn",
"tslint",
],
"rules": {
"tslint/config": [1, {
rules: tslintRules,
rulesDirectory: ["node_modules/tslint/lib/rules"],
}],
"no-undef": 0,
"no-unused-vars": [0, { "vars": "local", "args": "after-used" }],
"no-empty-function": 0,
"no-dupe-args": 0,
"no-redeclare": 0,
"indent": [0, 4, { "SwitchCase": 1 }],
"no-extra-semi": 1,
"class-methods-use-this": 1,
"max-lines": [1, {"max": 300}],
"max-nested-callbacks": [1, {max: 5}],
"function-paren-newline": [1, "consistent"],
"prefer-promise-reject-errors": [1, {"allowEmptyReject": true}],
"no-unneeded-ternary": [1],
"typescript/type-annotation-spacing": 0,
"unicorn/no-abusive-eslint-disable": 0,
"unicorn/import-index": 0,
"unicorn/no-fn-reference-in-iterator": 0,
"no-with": 2,
"comma-dangle": [1, "only-multiline"],
"no-bitwise": 1,
"one-var": [1, "never"],
"no-underscore-dangle": [1, { "allowAfterThis": true }],
"radix": 1,
"no-console": 1,
"no-debugger": 1,
"no-duplicate-case": 1,
"no-empty": 1,
"no-unreachable": 1,
"no-unsafe-finally": 1,
"no-this-before-super": 1,
"constructor-super": 1,
"quotes": [1, "single", { "allowTemplateLiterals": true }],
"semi": [1, "always"],
"eqeqeq": 2,
"block-spacing": [1, "always"],
"comma-spacing": [1, { "before": false, "after": true }],
"eol-last": 1,
"no-mixed-spaces-and-tabs": 1,
"no-multiple-empty-lines": [1, { "max": 1 }],
"no-spaced-func": 1,
"no-trailing-spaces": 1,
"space-before-blocks": 1,
"space-unary-ops": [1, { "words": true, "nonwords": false }],
"no-irregular-whitespace": 2,
"no-use-before-define": [2, "nofunc"],
"no-else-return": 2,
"no-unexpected-multiline": 2,
"dot-location": [2, "property"],
"no-throw-literal": 2,
"comma-style": [2, "last"],
"no-await-in-loop": 1,
"no-eval": 2,
"no-extra-bind": 2,
"no-implicit-coercion": [1, { "boolean": true }],
"no-loop-func": 2,
"no-script-url": 2,
"no-self-compare": 1,
"no-throw-literal": 1,
"max-params": [1, { "max": 5 }],
"no-trailing-spaces": 1,
"no-confusing-arrow": [1, {"allowParens": true}],
"prefer-const": 1,
"prefer-destructuring": 1,
}
};