chore: Add ESLint 9, TypeScript ESLint, and Prettier configuration#1200
Conversation
- Upgrade ESLint from v8 to v9 with flat config format - Add eslint-config-next v16 (now properly used) - Add Prettier v3 with eslint-config-prettier integration - Add TypeScript ESLint via typescript-eslint - Update lint script to include TypeScript files - Add format and format:check scripts for Prettier https://claude.ai/code/session_015FEGtz1yJ5Yb1REqChSqTg
- Add Husky pre-commit hook - Configure lint-staged to run ESLint fix and Prettier on staged files - JS/TS files: eslint --fix + prettier --write - JSON/CSS/MD/YAML: prettier --write https://claude.ai/code/session_015FEGtz1yJ5Yb1REqChSqTg
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1a0c2c7912
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // Next.js recommended config (includes TypeScript ESLint, React, etc.) | ||
| ...nextConfig, |
There was a problem hiding this comment.
Replace invalid spread of eslint-config-next
Because eslint-config-next exports a single legacy config object (not an array), ...nextConfig will throw a TypeError: object is not iterable as soon as ESLint loads eslint.config.mjs, so npm run lint will fail before any rules execute. This happens whenever the lint config is evaluated, so CI/dev linting is broken until the Next config is adapted (e.g., via FlatCompat or by using a flat-config export).
Useful? React with 👍 / 👎.
https://claude.ai/code/session_015FEGtz1yJ5Yb1REqChSqTg