1
- // TODO: Remove this file after migration!
2
- // TODO: Remove Sentry ESLint config package from package.json
3
1
// Note: All paths are relative to the directory in which eslint is being run, rather than the directory where this file
4
2
// lives
5
3
6
4
// ESLint config docs: https://eslint.org/docs/user-guide/configuring/
7
5
8
6
module . exports = {
9
- root : true ,
10
- env : {
11
- es6 : true ,
12
- } ,
13
- parserOptions : {
14
- ecmaVersion : 2018 ,
15
- } ,
16
- extends : [ '@sentry-internal/sdk' ] ,
7
+ extends : [ '../../.eslintrc.js' ] ,
17
8
ignorePatterns : [
18
9
'coverage/**' ,
19
10
'build/**' ,
@@ -31,16 +22,16 @@ module.exports = {
31
22
] ,
32
23
overrides : [
33
24
{
34
- files : [ '*.ts' , '*.tsx' , '*.d .ts'] ,
25
+ files : [ 'worker/**/* .ts' ] ,
35
26
parserOptions : {
36
- project : [ 'tsconfig.json' ] ,
27
+ // TODO: figure out if we need a worker-specific tsconfig
28
+ project : [ 'config/tsconfig.worker.json' ] ,
37
29
} ,
38
30
} ,
39
- // TODO: Extract this to package-specific config after mgiration
40
31
{
41
- files : [ 'worker/**/*.ts ' ] ,
32
+ files : [ 'src/ worker/**/*.js ' ] ,
42
33
parserOptions : {
43
- project : [ './config/tsconfig.worker.json' ] ,
34
+ sourceType : 'module' ,
44
35
} ,
45
36
} ,
46
37
{
@@ -86,6 +77,11 @@ module.exports = {
86
77
} ,
87
78
{
88
79
files : [ 'test/**/*.ts' ] ,
80
+ parserOptions : {
81
+ // TODO: remove this parserOptions object after we added a tsconfig.test.json
82
+ // Replay previously didn't have a tsconfig.test.json, so for now we just the regular one.
83
+ project : [ 'tsconfig.json' ] ,
84
+ } ,
89
85
rules : {
90
86
// TODO: decide if we want to keep our '@test' import paths
91
87
'import/no-unresolved' : 'off' ,
@@ -96,29 +92,5 @@ module.exports = {
96
92
'@typescript-eslint/no-floating-promises' : 'off' ,
97
93
} ,
98
94
} ,
99
- {
100
- files : [ 'src/worker/**/*.js' ] ,
101
- parserOptions : {
102
- sourceType : 'module' ,
103
- } ,
104
- } ,
105
- // ----------------
106
- {
107
- files : [ '*.tsx' ] ,
108
- rules : {
109
- // Turn off jsdoc on tsx files until jsdoc is fixed for tsx files
110
- // See: https://github.com/getsentry/sentry-javascript/issues/3871
111
- 'jsdoc/require-jsdoc' : 'off' ,
112
- } ,
113
- } ,
114
- {
115
- files : [ 'scenarios/**' , 'rollup/**' ] ,
116
- parserOptions : {
117
- sourceType : 'module' ,
118
- } ,
119
- rules : {
120
- 'no-console' : 'off' ,
121
- } ,
122
- } ,
123
95
] ,
124
96
} ;
0 commit comments