@@ -3,100 +3,41 @@ module.exports = {
3
3
node : true ,
4
4
jest : true ,
5
5
} ,
6
-
7
6
parser : '@typescript-eslint/parser' ,
8
7
parserOptions : {
9
8
project : './tsconfig.build.json' ,
10
9
} ,
11
- plugins : [
12
- '@typescript-eslint' ,
13
- 'prettier' ,
14
- 'import' ,
15
- 'jest' ,
16
- 'eslint-plugin-tsdoc' ,
17
- ] ,
10
+ plugins : [ '@typescript-eslint' , 'prettier' , 'import' , 'jest' , 'eslint-plugin-tsdoc' ] ,
18
11
extends : [
19
- 'airbnb-base' ,
12
+ 'airbnb-typescript/ base' ,
20
13
'eslint:recommended' ,
21
- 'plugin:@typescript-eslint/eslint-recommended' ,
22
14
'plugin:@typescript-eslint/recommended' ,
15
+ 'plugin:@typescript-eslint/recommended-requiring-type-checking' ,
16
+ 'plugin:jest/recommended' ,
17
+ 'plugin:jest/style' ,
23
18
'prettier' ,
24
19
'prettier/@typescript-eslint' ,
25
20
] ,
26
- ignorePatterns : [ " **/build" , " **/node_modules" , " documentation" ] ,
21
+ ignorePatterns : [ ' **/build' , ' **/node_modules' , ' documentation' ] ,
27
22
rules : {
28
- "tsdoc/syntax" : "warn" ,
29
- 'import/extensions' : [
30
- 'error' ,
31
- 'ignorePackages' ,
32
- {
33
- 'ts' : 'never' ,
34
- 'js' : 'never' ,
35
- } ,
36
- ] ,
37
23
'prettier/prettier' : 'error' ,
38
- "no-underscore-dangle" : 0 ,
39
- // C2FO Preference
40
- 'func-names' : [
41
- 'error' ,
42
- 'always' ,
43
- ] ,
44
- 'max-len' : [
45
- 'error' ,
46
- 150 ,
47
- 2 ,
48
- {
49
- 'ignoreComments' : false ,
50
- 'ignoreRegExpLiterals' : true ,
51
- 'ignoreStrings' : true ,
52
- 'ignoreTemplateLiterals' : true ,
53
- 'ignoreUrls' : true ,
54
- } ,
55
- ] ,
56
- 'import/prefer-default-export' : 0 ,
57
- 'max-classes-per-file' : [ 'error' , 5 ] ,
58
- 'import/no-cycle' : 0 ,
59
- } ,
60
- settings : {
61
- 'import/extensions' : [
62
- '.ts' ,
63
- '.js' ,
64
- ] ,
65
- 'import/parsers' : {
66
- '@typescript-eslint/parser' : [
67
- '.ts' ,
68
- ] ,
69
- } ,
70
- 'import/resolver' : {
71
- node : {
72
- 'extensions' : [
73
- '.ts' ,
74
- ] ,
75
- } ,
76
- typescript : {
77
- 'alwaysTryTypes' : true ,
78
- } ,
79
- } ,
24
+ 'tsdoc/syntax' : 'warn' ,
25
+ // todo remove this when upgrading airbnb-typescript
26
+ '@typescript-eslint/camelcase' : 'off' ,
27
+ // never allow default export
28
+ 'import/prefer-default-export' : 'off' ,
29
+ // never allow default export
30
+ 'import/no-default-export' : 'error' ,
31
+ // needed to implement streams api :(
32
+ 'no-underscore-dangle' : 0 ,
80
33
} ,
81
34
overrides : [
82
35
{
83
- "files" : [
84
- "*.spec.ts"
85
- ] ,
86
- "rules" : {
87
- "@typescript-eslint/explicit-function-return-type" : "off" ,
88
- "@typescript-eslint/ban-ts-ignore" : "off"
89
- }
36
+ files : [ '*.spec.ts' ] ,
37
+ rules : {
38
+ '@typescript-eslint/explicit-function-return-type' : 'off' ,
39
+ '@typescript-eslint/ban-ts-comment' : 'off' ,
40
+ } ,
90
41
} ,
91
- {
92
- "files" : [
93
- "*.js" ,
94
- "examples/example-runner/bin/run-examples"
95
- ] ,
96
- "rules" : {
97
- "@typescript-eslint/explicit-function-return-type" : "off" ,
98
- "@typescript-eslint/no-var-requires" : "off"
99
- }
100
- }
101
42
] ,
102
43
} ;
0 commit comments