This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
77 lines (77 loc) · 2.06 KB
/
.eslintrc.cjs
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
module.exports = {
root: true,
env: {
browser: true,
es2020: true,
mocha: true,
node: true,
},
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'no-useless-catch': 'off',
'@typescript-eslint/no-extra-semi': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/ban-ts-comment': 'warn',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-empty-function': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-misused-new': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'off',
camelcase: 'off',
eqeqeq: 'off',
'getter-return': 'off',
'key-spacing': 'off',
'no-constant-condition': 'off',
'no-empty': 'off',
'no-prototype-builtins': 'off',
'no-redeclare': 'off',
'no-restricted-imports': [
'error',
{
paths: ['console'],
},
],
'no-unused-vars': 'off',
quotes: 'off',
'require-await': 'warn',
'space-before-function-paren': 'off',
'no-control-regex': 'warn',
'no-misleading-character-class': 'warn',
'no-case-declarations': 'off',
},
overrides: [
{
files: ['*/*/src/*.ts', '*/*/src/**/*.ts'],
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module',
project: ['**/tsconfig.json', '**/tsconfig.*.json'],
},
rules: {
'@typescript-eslint/no-floating-promises': 'error',
},
},
{
files: ['test/**/*.ts', '*.test.ts'],
rules: {
'no-unused-expressions': 'off',
},
},
],
};