Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 11 additions & 39 deletions packages/replay/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -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/**',
Expand All @@ -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',
},
},
{
Expand Down Expand Up @@ -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',
Expand All @@ -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',
},
},
],
};