This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
114 lines (113 loc) · 3.19 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['plugin:@typescript-eslint/recommended', 'prettier', 'prettier/@typescript-eslint'],
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 2018,
sourceType: 'module',
},
env: {
node: true,
mocha: true,
es6: true,
},
// see https://github.com/typescript-eslint/typescript-eslint/tree/master/packages/eslint-plugin
// for list of rules
rules: {
'@typescript-eslint/indent': ['warn', 2],
'@typescript-eslint/interface-name-prefix': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/member-naming': 'error',
'@typescript-eslint/no-extra-parens': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-useless-constructor': 'error',
'@typescript-eslint/prefer-for-of': 'error',
'@typescript-eslint/prefer-includes': 'error',
'@typescript-eslint/prefer-string-starts-ends-with': 'error',
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/unified-signatures': 'error',
semi: [
'error',
'never',
{
beforeStatementContinuationChars: 'always',
},
],
'no-trailing-spaces': 'error',
'no-irregular-whitespace': 'error',
quotes: ['error', 'backtick'],
'prefer-arrow-callback': 'error',
'no-confusing-arrow': 'error',
'arrow-spacing': 'error',
'arrow-parens': [
'warn',
'always',
{
requireForBlockBody: true,
},
],
'arrow-body-style': 'error',
'no-console': 'off',
'max-len': [
1,
{
code: 132,
ignoreStrings: true,
},
],
'no-unexpected-multiline': 2,
'no-new-object': 'error',
'object-shorthand': 'error',
'quote-props': ['error', 'as-needed'],
'no-prototype-builtins': 'error',
'no-array-constructor': 'error',
'array-callback-return': 'error',
'prefer-destructuring' :'off',
'prefer-template': 'error',
'template-curly-spacing': ['error', 'never'],
'no-eval': 'error',
'no-var': 'error',
'prefer-const': 'error',
'no-const-assign': 'error',
'func-style': 'error',
'wrap-iife': 'error',
'no-loop-func': 'error',
'prefer-rest-params': 'error',
'spaced-comment': 'error',
'space-before-blocks': 'error',
'keyword-spacing': 'error',
'space-infix-ops': 'error',
'newline-per-chained-call': 'error',
'no-whitespace-before-property': 'error',
'padded-blocks': [
'warn',
'never',
{
classes: 'always',
},
],
'space-in-parens': 'error',
'array-bracket-spacing': 'error',
'block-spacing': ['error', 'never'],
'comma-spacing': 'error',
'func-call-spacing': 'error',
'object-curly-spacing': 'error',
'no-multiple-empty-lines': 'error',
'comma-style': 'error',
'no-new-wrappers': 'error',
radix: 'error',
'id-length': [
'warn',
{
min: 1,
max: 28,
},
],
camelcase: 'error',
'new-cap': 'error',
'no-restricted-globals': 'error',
'eol-last': 'off',
},
}