Skip to content

Comments

Add frontend linting#5

Open
shaunjoshi wants to merge 1 commit intoshaunak/gofrom
shaunak/fe-lint
Open

Add frontend linting#5
shaunjoshi wants to merge 1 commit intoshaunak/gofrom
shaunak/fe-lint

Conversation

@shaunjoshi
Copy link
Owner

Motivation

I added linting to the frontend and pushed it here to not further bloat the other changeset.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 default in next.config.js may not be loaded by Next.js unless the file is renamed to .mjs or type: module is configured for the build. Consider reverting to CommonJS module.exports or moving to next.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) {}

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.

1 participant