-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
42 lines (37 loc) · 1.4 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
module.exports = {
parser: '@typescript-eslint/parser', // Specifies the ESLint parser
parserOptions: {
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
ignorePatterns: ['dist/', 'scripts/'],
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:jsdoc/recommended',
],
rules: {
'curly': ['error', 'multi-or-nest'],
'brace-style': ['error', '1tbs'],
'quotes': ['error', 'single'],
'semi': 'error',
'eqeqeq': '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-namespace': 'off',
// 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': '^_' }],
},
};