Skip to content

Commit

Permalink
Activate SourceMap for Sentry and resolve TypeScript version conflict…
Browse files Browse the repository at this point in the history
… with ESLint (#384)

* Add `.eslintignore`

* Update eslint to fix version conflict

* Update `vite.config.ts` to enable sourcemap
  • Loading branch information
devleejb authored Oct 25, 2024
1 parent f45c03d commit 204dc3e
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 66 deletions.
4 changes: 2 additions & 2 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "eslint . --report-unused-disable-directives --max-warnings 0",
"lint": "eslint . --report-unused-disable-directives",
"format": "prettier . --write",
"format:check": "prettier . --check"
},
Expand Down Expand Up @@ -92,7 +92,7 @@
"@types/react-scroll-sync": "^0.9.0",
"@types/validator": "^13.12.1",
"@vitejs/plugin-react": "^4.2.1",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.5",
"vite": "^5.0.8"
},
Expand Down
10 changes: 5 additions & 5 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ import { sentryVitePlugin } from "@sentry/vite-plugin";
// https://vitejs.dev/config/
export default defineConfig({
build: {
// Source map generation must be turned on
// Only enable Sentry plugin if the environment variables are set
sourcemap: Boolean(
process.env.SENTRY_ORG && process.env.SENTRY_PROJECT && process.env.SENTRY_AUTH_TOKEN
),
sourcemap: true,
},
plugins: [
react(),
Expand All @@ -19,6 +15,10 @@ export default defineConfig({
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
// sourcemaps: {
// assets: "./dist/**",
// filesToDeleteAfterUpload: "./dist/**/*.map", // Delete after upload sourcemap
// },
}),
],
});
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"format:check": "pnpm run --parallel format:check"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"@typescript-eslint/eslint-plugin": "^8.11.0",
"@typescript-eslint/parser": "^8.11.0",
"eslint": "^9.11.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.0.0",
Expand Down
114 changes: 57 additions & 57 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 204dc3e

Please sign in to comment.