Skip to content

Commit ed56a5c

Browse files
committed
chore: clean up .eslintignore and refactor index.tsx for improved readability
1 parent 2bab04f commit ed56a5c

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ src/components/workflowEditor/workflowEditor.tsx
374374
src/config/constants.ts
375375
src/config/routes.ts
376376
src/config/utils.ts
377-
src/index.tsx
378377
src/services/fetchWithFullRoute.ts
379378
src/services/service.ts
380379
src/services/service.types.ts

src/index.tsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@
1616

1717
import React from 'react'
1818
import ReactDOM from 'react-dom'
19+
import { BrowserRouter } from 'react-router-dom'
1920
import * as Sentry from '@sentry/browser'
2021
import { CaptureConsole } from '@sentry/integrations'
21-
import { BrowserRouter } from 'react-router-dom'
2222
import { BrowserTracing } from '@sentry/tracing'
23+
2324
import {
25+
customEnv,
2426
OverrideMergeStrategyType,
27+
QueryClientProvider,
28+
ThemeProvider,
2529
ToastManagerContainer,
2630
UseRegisterShortcutProvider,
2731
UserEmailProvider,
28-
customEnv,
29-
ThemeProvider,
30-
ConfirmationModalProvider,
31-
BaseConfirmationModal,
32-
QueryClientProvider,
3332
} from '@devtron-labs/devtron-fe-common-lib'
33+
3434
import App from './App'
3535

3636
declare global {
@@ -60,7 +60,7 @@ if (import.meta.env.VITE_NODE_ENV === 'production' && window._env_ && window._en
6060
}
6161

6262
Sentry.init({
63-
beforeBreadcrumb(breadcrumb, hint) {
63+
beforeBreadcrumb(breadcrumb) {
6464
if (breadcrumb.category === 'console') {
6565
if (breadcrumb.level === 'warning') {
6666
return null
@@ -83,19 +83,19 @@ if (import.meta.env.VITE_NODE_ENV === 'production' && window._env_ && window._en
8383
const error = errorList[index]
8484
if (
8585
error &&
86-
((error['type'] &&
87-
(error['type'] === '[401]' ||
88-
error['type'] === '[403]' ||
89-
error['type'] === '[504]' ||
90-
error['type'] === '[503]' ||
91-
error['type'] === 'ChunkLoadError')) ||
92-
(error['value'] &&
93-
(error['value'].includes('write data discarded, use flow control to avoid losing data') ||
94-
error['value'].includes('Failed to update a ServiceWorker') ||
95-
(error['value'].includes('ServiceWorker script at ') &&
96-
error['value'].includes('encountered an error during installation.')) ||
97-
error['value'].includes('Loading CSS chunk') ||
98-
error['value'].includes(`Unexpected token '<'`))))
86+
((error.type &&
87+
(error.type === '[401]' ||
88+
error.type === '[403]' ||
89+
error.type === '[504]' ||
90+
error.type === '[503]' ||
91+
error.type === 'ChunkLoadError')) ||
92+
(error.value &&
93+
(error.value.includes('write data discarded, use flow control to avoid losing data') ||
94+
error.value.includes('Failed to update a ServiceWorker') ||
95+
(error.value.includes('ServiceWorker script at ') &&
96+
error.value.includes('encountered an error during installation.')) ||
97+
error.value.includes('Loading CSS chunk') ||
98+
error.value.includes(`Unexpected token '<'`))))
9999
) {
100100
return null
101101
}

0 commit comments

Comments
 (0)