Conversation
The frontend had an .eslintrc.json config extending next/core-web-vitals and next/typescript, but the actual eslint packages were never listed in package.json. This meant `npm run lint` always failed. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove unused imports. Replace empty interfaces with type aliases. Fix a const used only as a type. Export DialogClose so it's not flagged as unused. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove unused imports. Drop bindings from catch clauses where the error variable was unused. Remove dead API_BASE assignments. Replace require() calls with dynamic import() in QueryConsole. Escape apostrophes in JSX text. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Remove unused imports and variables. Drop bindings from catch clauses. Use const where variables are never reassigned. Remove unused map callback parameters. Escape apostrophes in JSX text. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Replace the dummy CI workflow with one that runs ESLint and tsc on every push and PR. Document how to run both checks via Docker. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds frontend ESLint + CI enforcement and updates existing frontend code to comply with lint/typecheck rules.
Changes:
- Add ESLint dependencies to the frontend and enforce
lint+typecheckin GitHub Actions CI. - Clean up frontend code to satisfy linting (unused imports/vars,
prefer-const, JSX apostrophe escaping, etc.). - Minor type/style refactors (e.g.,
typealiases, additional UI exports).
Reviewed changes
Copilot reviewed 27 out of 28 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/types/components.ts | Removes unused type imports to satisfy linting. |
| frontend/src/types/api.ts | Changes TrendQueryParams to a type alias for backward compatibility. |
| frontend/src/lib/api.ts | Removes unused imported API types. |
| frontend/src/hooks/use-toast.ts | Refactors action type definitions to avoid unused constants. |
| frontend/src/components/ui/textarea.tsx | Simplifies props type to a type alias. |
| frontend/src/components/ui/dialog.tsx | Exports DialogClose from the dialog UI module. |
| frontend/src/components/ui/collapsible.tsx | Removes unused React import. |
| frontend/src/components/diff/CommitTooltipContent.tsx | Removes unused UI imports. |
| frontend/src/app/version-comparison/page.tsx | Removes unused imports/variables; escapes apostrophes for JSX. |
| frontend/src/app/trends/page.tsx | Applies prefer-const in key parsing logic. |
| frontend/src/app/page.tsx | Removes unused index parameter in .map. |
| frontend/src/app/diff/page.tsx | Removes unused imports/helpers; minor whitespace cleanup. |
| frontend/src/app/build-comparison/page.tsx | Lint-driven refactors (consts, escaping); adjusts memoization usage. |
| frontend/src/app/binaries/[id]/page.tsx | Prefixes unused prop with _ to satisfy no-unused-vars rule. |
| frontend/src/app/admin/page.tsx | Removes unused constants/imports; simplifies catch blocks. |
| frontend/src/app/admin/components/TokensManager.tsx | Simplifies catch blocks; escapes apostrophes in UI text. |
| frontend/src/app/admin/components/QueryConsole.tsx | Reworks dynamic imports; removes unused imports; formatting cleanup. |
| frontend/src/app/admin/components/MemrayFailuresManager.tsx | Removes unused API_BASE. |
| frontend/src/app/admin/components/EnvironmentsManager.tsx | Simplifies catch blocks; formatting cleanup. |
| frontend/src/app/admin/components/BinariesManager.tsx | Removes unused imports; simplifies catch blocks. |
| frontend/src/app/admin/components/BenchmarkResultsManager.tsx | Removes unused icon imports; simplifies catch blocks; formatting cleanup. |
| frontend/src/app/admin/components/AdminUsersManager.tsx | Removes unused imports/types; formatting cleanup. |
| frontend/src/app/about/page.tsx | Simplifies catch blocks; escapes apostrophes; removes unused index. |
| frontend/package.json | Adds eslint and eslint-config-next devDependencies. |
| docker-README.md | Documents linting and typecheck commands via Docker. |
| README.md | Updates testing instructions and notes CI enforcement. |
| .github/workflows/ci.yml | Replaces dummy CI with frontend lint + typecheck job. |
Comments suppressed due to low confidence (1)
frontend/src/app/build-comparison/page.tsx:316
- This
useMemocomputes and returns an array but the return value is discarded (not assigned/used). This still runs the expensive aggregation/sort work when deps change, but has no effect on rendering. Either remove this hook entirely, or assign it to a variable and use it (or switch touseEffectif side effects are intended).
useMemo(() => {
// For "All Benchmarks" mode, don't require selectedBenchmarks
const requiresBenchmarkSelection =
benchmarkMode === 'specific' && selectedBenchmarks.length === 0;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Yhg1s
approved these changes
Mar 16, 2026
# Conflicts: # .github/workflows/ci.yml # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
We'll be adding more bona fide tests to the three components of the system, but let's at least start with sensible linting. Frontend first.