1- // TODO: Remove this file after migration!
2- // TODO: Remove Sentry ESLint config package from package.json
31// Note: All paths are relative to the directory in which eslint is being run, rather than the directory where this file
42// lives
53
64// ESLint config docs: https://eslint.org/docs/user-guide/configuring/
75
86module . 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' ] ,
178 ignorePatterns : [
189 'coverage/**' ,
1910 'build/**' ,
@@ -31,16 +22,16 @@ module.exports = {
3122 ] ,
3223 overrides : [
3324 {
34- files : [ '*.ts' , '*.tsx' , '*.d .ts'] ,
25+ files : [ 'worker/**/* .ts' ] ,
3526 parserOptions : {
36- project : [ 'tsconfig.json' ] ,
27+ // TODO: figure out if we need a worker-specific tsconfig
28+ project : [ 'config/tsconfig.worker.json' ] ,
3729 } ,
3830 } ,
39- // TODO: Extract this to package-specific config after mgiration
4031 {
41- files : [ 'worker/**/*.ts ' ] ,
32+ files : [ 'src/ worker/**/*.js ' ] ,
4233 parserOptions : {
43- project : [ './config/tsconfig.worker.json' ] ,
34+ sourceType : 'module' ,
4435 } ,
4536 } ,
4637 {
@@ -86,6 +77,11 @@ module.exports = {
8677 } ,
8778 {
8879 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+ } ,
8985 rules : {
9086 // TODO: decide if we want to keep our '@test' import paths
9187 'import/no-unresolved' : 'off' ,
@@ -96,29 +92,5 @@ module.exports = {
9692 '@typescript-eslint/no-floating-promises' : 'off' ,
9793 } ,
9894 } ,
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- } ,
12395 ] ,
12496} ;
0 commit comments