Open
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces ESLint and Prettier tooling to the frontend, updates related configs, and reformats code to comply with the new lint rules.
- Add ESLint (flat config) and Prettier configs plus npm scripts for linting/formatting
- Update TypeScript and package.json to support ESM and lint tool dependencies
- Reformat nearly all frontend files to adhere to the new style rules
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Condensed lib/include/exclude arrays inline |
| package.json | Added "type": "module", lint/format scripts, and devDeps |
| next.config.js | Converted CJS export to ESM export default |
| eslint.config.js | New flat ESLint config |
| .prettierrc, .prettierignore | Added Prettier settings and ignore file |
All .tsx/.ts files |
Bulk reformatting for quote style, trailing commas, indentation |
Comments suppressed due to low confidence (3)
frontend/components/AuthSession.tsx:5
- Missing import of React hooks: add
import { useState, useEffect } from 'react';at the top of this module.
const [session, setSession] = useState<Session | null>(null);
frontend/next.config.js:2
- [nitpick] Using an ESM
export defaultinnext.config.jsmay not be loaded by Next.js unless the file is renamed to.mjsortype: moduleis configured for the build. Consider reverting to CommonJSmodule.exportsor moving tonext.config.mjs.
const nextConfig = {
frontend/components/PromptCompressionView.tsx:157
- This empty catch silently swallows errors and hinders debugging. Log the error or surface it to the UI so failures in diff generation can be tracked.
} catch (error) {}
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.
Motivation
I added linting to the frontend and pushed it here to not further bloat the other changeset.