This repository has been archived by the owner on Oct 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 299
/
.eslintrc.js
67 lines (66 loc) · 1.76 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
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint', 'implicit-dependencies', 'import', 'prettier'],
env: {
es2020: true,
node: true,
mocha: true
},
ignorePatterns: [
'node_modules/',
'dist/',
'coverage/',
'prettier.config.js',
'typedoc.js',
'karma.conf.js',
],
extends: ['typestrict', 'eslint:recommended'],
rules: {
'no-console': 'warn',
'no-debugger': 'error',
'prefer-const': 'error',
'no-var': 'error',
'no-constant-condition': 'warn',
'implicit-dependencies/no-implicit': ['error', { peer: true, dev: true, optional: true }],
'@typescript-eslint/prefer-nullish-coalescing': 'error',
'@typescript-eslint/no-use-before-define': 'warn',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase', 'camelCase'],
custom: {
regex: '^I[A-Z]',
match: false,
},
},
],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/no-unnecessary-condition': 'off',
'no-dupe-class-members': 'off',
'no-extra-semi': 'off',
'prettier/prettier': 'error',
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': ['error'],
'@typescript-eslint/restrict-plus-operands': 'off',
'import/no-default-export' : 'off'
},
overrides: [
{
files: ['test/index.spec.ts'],
rules: {
'no-invalid-this': 'off',
'no-prototype-builtins': 'off',
'@typescript-eslint/no-floating-promises': 'off',
},
},
],
parserOptions: {
sourceType: 'module',
project: './tsconfig.json',
},
}