diff --git a/packages/replay/.eslintrc.js b/packages/replay/.eslintrc.js index be3ad9eca1d1..90f4a84945d3 100644 --- a/packages/replay/.eslintrc.js +++ b/packages/replay/.eslintrc.js @@ -1,19 +1,10 @@ -// TODO: Remove this file after migration! -// TODO: Remove Sentry ESLint config package from package.json // Note: All paths are relative to the directory in which eslint is being run, rather than the directory where this file // lives // ESLint config docs: https://eslint.org/docs/user-guide/configuring/ module.exports = { - root: true, - env: { - es6: true, - }, - parserOptions: { - ecmaVersion: 2018, - }, - extends: ['@sentry-internal/sdk'], + extends: ['../../.eslintrc.js'], ignorePatterns: [ 'coverage/**', 'build/**', @@ -31,16 +22,16 @@ module.exports = { ], overrides: [ { - files: ['*.ts', '*.tsx', '*.d.ts'], + files: ['worker/**/*.ts'], parserOptions: { - project: ['tsconfig.json'], + // TODO: figure out if we need a worker-specific tsconfig + project: ['config/tsconfig.worker.json'], }, }, - // TODO: Extract this to package-specific config after mgiration { - files: ['worker/**/*.ts'], + files: ['src/worker/**/*.js'], parserOptions: { - project: ['./config/tsconfig.worker.json'], + sourceType: 'module', }, }, { @@ -86,6 +77,11 @@ module.exports = { }, { files: ['test/**/*.ts'], + parserOptions: { + // TODO: remove this parserOptions object after we added a tsconfig.test.json + // Replay previously didn't have a tsconfig.test.json, so for now we just the regular one. + project: ['tsconfig.json'], + }, rules: { // TODO: decide if we want to keep our '@test' import paths 'import/no-unresolved': 'off', @@ -96,29 +92,5 @@ module.exports = { '@typescript-eslint/no-floating-promises': 'off', }, }, - { - files: ['src/worker/**/*.js'], - parserOptions: { - sourceType: 'module', - }, - }, - // ---------------- - { - files: ['*.tsx'], - rules: { - // Turn off jsdoc on tsx files until jsdoc is fixed for tsx files - // See: https://github.com/getsentry/sentry-javascript/issues/3871 - 'jsdoc/require-jsdoc': 'off', - }, - }, - { - files: ['scenarios/**', 'rollup/**'], - parserOptions: { - sourceType: 'module', - }, - rules: { - 'no-console': 'off', - }, - }, ], };