-
Notifications
You must be signed in to change notification settings - Fork 45
/
.eslintrc.js
56 lines (51 loc) · 1.81 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
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
},
overrides: [
{
files: ['*.ts'],
extends: [
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
parserOptions: {
project: './tsconfig.json',
},
},
],
ignorePatterns: ['dist/', 'webpack.config.js'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:jsdoc/recommended',
],
rules: {
'curly': ['error', 'multi-or-nest'],
'brace-style': ['error', '1tbs'],
'quotes': ['error', 'single'],
'eqeqeq': 'error',
'default-case': 'error',
'semi': 'off',
'eol-last': ['error', 'always'],
'@typescript-eslint/semi': ['error'],
'comma-dangle': ['error', {
'arrays': 'always-multiline',
'objects': 'always-multiline',
'imports': 'always-multiline',
'exports': 'always-multiline',
'functions': 'always-multiline',
}],
'jsdoc/require-jsdoc': ['error', { require: { 'MethodDefinition': true } }],
'jsdoc/require-param-type': 0,
'jsdoc/require-returns': 0,
'jsdoc/require-returns-type': 0,
'@typescript-eslint/explicit-function-return-type': ['error'],
'@typescript-eslint/no-empty-function': 0,
// I use them rarely but they are understandable and commented. They simplify the code.
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-non-null-asserted-optional-chain': 0,
// Ignore args starting with an underscore.
'@typescript-eslint/no-unused-vars': ['error', { 'argsIgnorePattern': '^_' }],
},
};