-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.ts
118 lines (114 loc) · 2.87 KB
/
index.ts
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import { Linter } from 'eslint'
const config: Linter.Config = {
parserOptions: {
ecmaFeatures: {
jsx: true
},
ecmaVersion: 2021,
sourceType: 'module'
},
env: {
es2021: true,
node: true
},
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/typescript',
'plugin:prettier/recommended',
'prettier'
],
plugins: ['@typescript-eslint', '@delagen/deprecation', 'prettier'],
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
rules: {
'@typescript-eslint/array-type': [
'error',
{
default: 'generic',
readonly: 'generic'
}
],
'@typescript-eslint/ban-types': [
'error',
{
types: {
Array: {
message: 'Use ReadonlyArray instead',
fixWith: 'ReadonlyArray'
},
Map: {
message: 'Use ReadonlyMap instead',
fixWith: 'ReadonlyMap'
},
Set: {
message: 'Use ReadonlySet instead',
fixWith: 'ReadonlySet'
}
},
extendDefaults: true
}
],
'@typescript-eslint/camelcase': 'off',
'@typescript-eslint/indent': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/explicit-member-accessibility': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/member-delimiter-style': [
'error',
{
multiline: {
delimiter: 'none',
requireLast: false
},
singleline: {
delimiter: 'semi',
requireLast: false
}
}
],
'@typescript-eslint/no-base-to-string': 'error',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-parameter-properties': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/restrict-template-expressions': 'error'
}
}
],
rules: {
'@delagen/deprecation/deprecation': 'warn',
eqeqeq: [
'error',
'always',
{
null: 'ignore'
}
],
'import/namespace': 'off',
'import/order': 'error',
'object-shorthand': ['error', 'always'],
'no-restricted-imports': [
'error',
{
paths: ['.']
}
],
'prettier/prettier': [
'error',
{
arrowParens: 'avoid',
bracketSameLine: true,
bracketSpacing: true,
printWidth: 130,
semi: false,
singleQuote: true,
trailingComma: 'none'
}
]
}
}
export = config