diff --git a/eslint.config.mjs b/eslint.config.mjs index 952ce4eb43a260..94a8030237bae2 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -282,7 +282,6 @@ export default typescript.config([ 'no-cond-assign': ['error', 'always'], 'no-async-promise-executor': 'off', // TODO(ryan953): Fix violations and delete this line 'no-case-declarations': 'off', // TODO(ryan953): Fix violations and delete this line - 'no-constant-binary-expression': 'off', // TODO(ryan953): Fix violations and delete this line 'no-dupe-class-members': 'off', // TODO(ryan953): Fix violations and delete this line 'no-dupe-else-if': 'off', // TODO(ryan953): Fix violations and delete this line 'no-empty-pattern': 'off', // TODO(ryan953): Fix violations and delete this line @@ -296,7 +295,6 @@ export default typescript.config([ 'no-unused-vars': 'off', // TODO(ryan953): Fix violations and delete this line 'no-useless-catch': 'off', // TODO(ryan953): Fix violations and delete this line 'no-useless-escape': 'off', // TODO(ryan953): Fix violations and delete this line - 'valid-typeof': 'off', // TODO(ryan953): Fix violations and delete this line }, }, { diff --git a/static/app/components/charts/percentageAreaChart.tsx b/static/app/components/charts/percentageAreaChart.tsx index 3697f14be07cfd..0679b2ea0588ab 100644 --- a/static/app/components/charts/percentageAreaChart.tsx +++ b/static/app/components/charts/percentageAreaChart.tsx @@ -76,10 +76,9 @@ export default class PercentageAreaChart extends Component { const series = toArray(seriesParams); // Filter series that have 0 counts - const date = - `${ - series.length && moment(series[0].data[0]).format('MMM D, YYYY') - }
` || ''; + const date = `${ + series.length && moment(series[0].data[0]).format('MMM D, YYYY') + }
`; return [ '
', diff --git a/static/app/utils/profiling/profile/utils.tsx b/static/app/utils/profiling/profile/utils.tsx index a94fa967495de4..cd9f339f909c6b 100644 --- a/static/app/utils/profiling/profile/utils.tsx +++ b/static/app/utils/profiling/profile/utils.tsx @@ -19,9 +19,9 @@ export function createContinuousProfileFrameIndex( for (let i = 0; i < frames.length; i++) { const frame = frames[i]!; - const frameKey = `${frame.filename ?? ''}:${frame.function ?? 'unknown'}:${ - String(frame.lineno) ?? '' - }:${frame.instruction_addr ?? ''}`; + const frameKey = `${frame.filename ?? ''}:${frame.function ?? 'unknown'}:${String( + frame.lineno + )}:${frame.instruction_addr ?? ''}`; const existing = insertionCache[frameKey]; if (existing) { @@ -64,9 +64,9 @@ export function createSentrySampleProfileFrameIndex( for (let i = 0; i < frames.length; i++) { const frame = frames[i]!; - const frameKey = `${frame.filename ?? ''}:${frame.function ?? 'unknown'}:${ - String(frame.lineno) ?? '' - }:${frame.instruction_addr ?? ''}`; + const frameKey = `${frame.filename ?? ''}:${frame.function ?? 'unknown'}:${String( + frame.lineno + )}:${frame.instruction_addr ?? ''}`; const existing = insertionCache[frameKey]; if (existing) { diff --git a/static/app/views/performance/utils/index.tsx b/static/app/views/performance/utils/index.tsx index a9cff9a3abc366..0355a2719498d6 100644 --- a/static/app/views/performance/utils/index.tsx +++ b/static/app/views/performance/utils/index.tsx @@ -369,11 +369,7 @@ export function getProject( eventData: EventData, projects: Project[] ): Project | undefined { - const projectSlug = (eventData?.project as string) || undefined; - - if (typeof projectSlug === undefined) { - return undefined; - } + const projectSlug = eventData.project as string | undefined; return projects.find(currentProject => currentProject.slug === projectSlug); } diff --git a/static/app/views/profiling/profileSummary/regressedProfileFunctions.tsx b/static/app/views/profiling/profileSummary/regressedProfileFunctions.tsx index b01ec795597fd4..ecb2b7734850b2 100644 --- a/static/app/views/profiling/profileSummary/regressedProfileFunctions.tsx +++ b/static/app/views/profiling/profileSummary/regressedProfileFunctions.tsx @@ -162,8 +162,9 @@ export function MostRegressedProfileFunctions(props: MostRegressedProfileFunctio const onChangeTrendType = useCallback(v => setTrendType(v.value), []); - const hasDifferentialFlamegraphPageFeature = - false && organization.features.includes('profiling-differential-flamegraph-page'); + const hasDifferentialFlamegraphPageFeature = organization.features.includes( + 'profiling-differential-flamegraph-page' + ); return ( diff --git a/static/app/views/settings/account/notifications/utils.tsx b/static/app/views/settings/account/notifications/utils.tsx index 1c068cb1bc7d3b..772136036d0f9f 100644 --- a/static/app/views/settings/account/notifications/utils.tsx +++ b/static/app/views/settings/account/notifications/utils.tsx @@ -41,22 +41,21 @@ export function getDocsLinkForEventType( event: DataCategoryExact | string // TODO(isabella): get rid of strings after removing need for backward compatibility on gs ) { switch (event) { - case DataCategoryExact.TRANSACTION || 'transaction': + case DataCategoryExact.TRANSACTION: // For pre-AM3 plans prior to June 11th, 2024 return 'https://docs.sentry.io/pricing/quotas/legacy-manage-transaction-quota/'; - case DataCategoryExact.SPAN || - DataCategoryExact.SPAN_INDEXED || - 'span' || - 'span_indexed': + case DataCategoryExact.SPAN: + case DataCategoryExact.SPAN_INDEXED: + case 'span_indexed': // For post-AM3 plans after June 11th, 2024 return 'https://docs.sentry.io/pricing/quotas/manage-transaction-quota/'; - case DataCategoryExact.ATTACHMENT || 'attachment': + case DataCategoryExact.ATTACHMENT: return 'https://docs.sentry.io/product/accounts/quotas/manage-attachments-quota/#2-rate-limiting'; - case DataCategoryExact.REPLAY || 'replay': + case DataCategoryExact.REPLAY: return 'https://docs.sentry.io/product/session-replay/'; - case DataCategoryExact.MONITOR_SEAT || 'monitorSeat': + case DataCategoryExact.MONITOR_SEAT: return 'https://docs.sentry.io/product/crons/'; - case DataCategoryExact.PROFILE_DURATION || 'profileDuration': + case DataCategoryExact.PROFILE_DURATION: return 'https://docs.sentry.io/product/explore/profiling/'; default: return 'https://docs.sentry.io/product/accounts/quotas/manage-event-stream-guide/#common-workflows-for-managing-your-event-stream'; diff --git a/static/app/views/traces/content.tsx b/static/app/views/traces/content.tsx index 46e8e0519dc67e..d9f11d88e72395 100644 --- a/static/app/views/traces/content.tsx +++ b/static/app/views/traces/content.tsx @@ -79,19 +79,17 @@ function Content() { const handleClearSearch = useCallback( (searchIndex: number) => { const newQueries = [...queries]; - if (typeof newQueries[searchIndex] !== undefined) { - delete newQueries[searchIndex]; - browserHistory.push({ - ...location, - query: { - ...location.query, - cursor: undefined, - query: newQueries, - }, - }); - return true; - } - return false; + // TODO: do we need to return false when `newQueries[searchIndex] === undefined`? + delete newQueries[searchIndex]; + browserHistory.push({ + ...location, + query: { + ...location.query, + cursor: undefined, + query: newQueries, + }, + }); + return true; }, [location, queries] ); diff --git a/static/app/views/traces/tracesChart.tsx b/static/app/views/traces/tracesChart.tsx index 2b035a8d110c85..426e717887c261 100644 --- a/static/app/views/traces/tracesChart.tsx +++ b/static/app/views/traces/tracesChart.tsx @@ -89,8 +89,7 @@ export function TracesChart({}: Props) { } const data = series[i]!['count()']; data.color = CHART_PALETTE[2][i]; - data.seriesName = - `span ${i + 1}: ${queries[i] || t('All spans')}` || t('All spans'); + data.seriesName = `span ${i + 1}: ${queries[i] || t('All spans')}`; allData.push(data); }