-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy patheslint-typescript.cjs
57 lines (57 loc) · 1.54 KB
/
eslint-typescript.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
module.exports = {
extends: [
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
],
plugins: ['@typescript-eslint', 'prettier', 'import'],
parser: '@typescript-eslint/parser',
parserOptions: {
sourceType: 'module',
ecmaVersion: 2018,
ecmaFeatures: {
jsx: true,
},
},
rules: {
'@typescript-eslint/explicit-function-return-type': ['off'],
'@typescript-eslint/explicit-member-accessibility': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-non-null-assertion': ['off'],
'@typescript-eslint/consistent-type-assertions': [
'error',
{
assertionStyle: 'as',
objectLiteralTypeAssertions: 'allow',
},
],
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/no-unused-vars': ['error'],
'@typescript-eslint/no-use-before-define': ['off'],
'@typescript-eslint/prefer-interface': ['off'],
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'default',
filter: {
regex: '^(?:UNSAFE|LEGACY|DANGEROUS|DEPRECATED)_',
match: true,
},
format: null,
},
],
'@typescript-eslint/explicit-module-boundary-types': ['off'],
'@typescript-eslint/func-call-spacing': ['error'],
'@typescript-eslint/member-ordering': [
'error',
{
classes: [
'static-field',
'static-method',
'instance-field',
'constructor',
'instance-method',
],
},
],
},
};