Skip to content

🤖 Fix all outstanding eslint warnings#43387

Draft
iansltx wants to merge 12 commits intomainfrom
lint-cleanup
Draft

🤖 Fix all outstanding eslint warnings#43387
iansltx wants to merge 12 commits intomainfrom
lint-cleanup

Conversation

@iansltx
Copy link
Copy Markdown
Member

@iansltx iansltx commented Apr 10, 2026

No description provided.

iansltx added 7 commits April 9, 2026 14:38
Zed + Opus 4.6; prompt: Run `make lint-js`. You'll get a lot of warnings back. Fix _at least_ the easiest 20%.
Zed + Opus 4.6; prompt: Resolve the low-hanging fruit on `no-explicit-any`. Goal is to cut the number of warnings there in half.
Zed + Opus 4.6, same conversation as the primary commit; prompt: Nice. Next up, fix the `consistent-return` issues.
Zed + Opus 4.6, same conversation as previous commit; prompt: Next, fix the `react/no-unused-prop-types` warnings.
Zed + Opus 4.6, same conversation as previous commit; prompt: Next, fix the `react-hooks/exhaustive-deps` issues
Zed + Opus 4.6 from same conversation as last commit; prompt: Next, fix the `@typescript-eslint/no-non-null-assertion` issues
Zed + Opus 4.6; prompt: Next, fix no-constant-condition and no-alert issues, then react/no-danger, at which point we should have a clean linting run
Zed + Opus 4.6; prompt: Tests are broken on this branch right now, including an OOM. See job-logs.txt for more details (particularly toward the end of the file). Fix the issues so tests pass.
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

❌ Patch coverage is 52.14724% with 78 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.88%. Comparing base (23df8aa) to head (5fdb9e7).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
frontend/interfaces/package_type.ts 23.52% 13 Missing ⚠️
...policies/ManagePoliciesPage/ManagePoliciesPage.tsx 0.00% 12 Missing ⚠️
frontend/utilities/helpers.tsx 50.00% 7 Missing ⚠️
...crets/components/AddSecretModal/AddSecretModal.tsx 0.00% 4 Missing ⚠️
...ditionalAccessModal/OktaConditionalAccessModal.tsx 0.00% 4 Missing ⚠️
...policies/edit/components/PolicyForm/PolicyForm.tsx 42.85% 4 Missing ⚠️
...tPage/components/SelectRoleForm/SelectRoleForm.tsx 0.00% 3 Missing ⚠️
...tailsPage/modals/RunScriptModal/RunScriptModal.tsx 0.00% 3 Missing ⚠️
...re/SelfService/SelfServiceCard/SelfServiceCard.tsx 25.00% 3 Missing ⚠️
...ts/SyntaxHighlightedCode/SyntaxHighlightedCode.tsx 33.33% 2 Missing ⚠️
... and 18 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #43387      +/-   ##
==========================================
- Coverage   66.88%   66.88%   -0.01%     
==========================================
  Files        2591     2592       +1     
  Lines      207684   207709      +25     
  Branches     9286     9224      -62     
==========================================
+ Hits       138913   138918       +5     
- Misses      56136    56156      +20     
  Partials    12635    12635              
Flag Coverage Δ
frontend 54.73% <52.14%> (-0.04%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.


interface IAppProps {
children: JSX.Element;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

destruct type we expect

const [addedSoftwareToken, setAddedSoftwareToken] = useState<string | null>(
null
);
const [addedSoftwareToken] = useState<string | null>(null);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this a use state then, double check.

<SoftwareAndroidForm
onSubmit={onAddSoftware}
onCancel={goBackToSoftwareTitles}
onClickPreviewEndUserExperience={onClickPreviewEndUserExperience}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look to see if this was intentional

onSubmit,
isLoading = false,
onCancel,
onClickPreviewEndUserExperience,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look to see if this was intentional

setLastEditedQueryDiscardData(DEFAULT_QUERY.discard_data);
}
}, [queryId]);
}, [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will need to go through all use effect dependencies, I vaguely remember adverse effects many moons ago

hostStatusWebhookHostPercentage,
(val) => `${val}%`
),
// intentionally omit dependency so options only computed initially
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this. So will need to fix accordingly

// it's safe to assume that frequency is a number
(frequency: number | string) => `${frequency as number} days`
),
// intentionally leave activityExpiryWindow out of the dependencies, so that the custom
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this. So will need to fix accordingly

{}
);
const [error, setError] = useState<Error | null>(null);
const [error] = useState<Error | null>(null);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wut


// Create a simple mock SVG component for matched icons
const MockSvgIcon = ({ width, height, className }: any) => (
/* eslint-disable react/prop-types */
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't be lazy bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants