-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
40 lines (40 loc) · 1.71 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
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended'
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.json'
},
rules: {
'@typescript-eslint/array-type': ['error', {default: 'generic'}],
'@typescript-eslint/brace-style': 'error',
'@typescript-eslint/comma-spacing': 'error',
'@typescript-eslint/explicit-function-return-type': 'error',
'@typescript-eslint/func-call-spacing': 'error',
'@typescript-eslint/indent': ['error', 2],
'@typescript-eslint/lines-between-class-members': ['error', {"exceptAfterSingleLine": true}],
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extra-parens': 'error',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unnecessary-boolean-literal-compare': ['error', {"allowComparingNullableBooleansToTrue": false, "allowComparingNullableBooleansToFalse": false}],
'@typescript-eslint/no-var-requires': 'error',
'@typescript-eslint/prefer-optional-chain': 'error',
'@typescript-eslint/prefer-readonly': 'error',
'@typescript-eslint/quotes': ['error', 'single', {"allowTemplateLiterals": false}],
'@typescript-eslint/semi': ['error'],
'@typescript-eslint/space-before-function-paren': ['error', 'never'],
'@typescript-eslint/type-annotation-spacing': 'error',
'comma-dangle': 'error',
'no-confusing-arrow': 'error',
'no-lonely-if': 'error',
'no-trailing-spaces': 'error',
'no-unneeded-ternary': 'error',
'one-var': ['error', 'never']
}
}