-
Notifications
You must be signed in to change notification settings - Fork 1
/
.eslintrc.js
95 lines (95 loc) · 3.13 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
module.exports = {
'env': {
'es2017': true,
'node': true,
},
'globals': {
'Atomics': 'readonly',
'SharedArrayBuffer': 'readonly',
},
'parserOptions': {
'ecmaVersion': 2018,
'sourceType': 'module',
"project": './tsconfig.json'
},
"parser": '@typescript-eslint/parser',
"plugins": [
'@typescript-eslint',
'prettier'
],
"extends": [
'eslint:recommended',
'google',
'plugin:@typescript-eslint/recommended',
"prettier/@typescript-eslint",
"plugin:prettier/recommended"
],
'rules': {
"prettier/prettier": ["error", {
"singleQuote": true,
"printWidth" : 120
}],
'prefer-spread': 'off',
'require-jsdoc': 'off',
"no-prototype-builtins": "off",
'new-cap': 'off',
'@typescript-eslint/no-explicit-any': 'off',
"@typescript-eslint/interface-name-prefix": ["error", {
"prefixWithI": "always"
}],
"@typescript-eslint/explicit-member-accessibility": ["error",
{
accessibility: 'explicit',
overrides: {
accessors: 'explicit',
constructors: 'no-public',
methods: 'explicit',
properties: 'explicit',
parameterProperties: 'explicit'
}
}
],
"@typescript-eslint/explicit-function-return-type": ["error", {
allowExpressions: true
}],
"camelcase": "off",
"@typescript-eslint/camelcase": ["error", { "properties": "always" }],
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{
"checksVoidReturn": false
}
],
"@typescript-eslint/no-unused-vars": ["error", {
args: "none"
}],
"@typescript-eslint/promise-function-async": "off",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/no-this-alias": [
"error",
{
"allowDestructuring": true, // Allow `const { props, state } = this`; false by default
"allowedNames": ["self"], // Allow `const self = this`; `[]` by default
},
],
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-var-requires": "error",
"no-else-return": ["error", {
allowElseIf: true
}],
"max-nested-callbacks": ["error"],
"complexity": ["error"],
"default-case": ["error"],
"eqeqeq": ["error"],
"no-else-return": ["error", {
allowElseIf: true
}],
"no-floating-decimal": ["error"],
"no-unmodified-loop-condition": ["error"],
"@typescript-eslint/member-naming": ["error", { "private": "^_", "public": "^[a-z]" }]
},
};