Wire up ESLint + Prettier, fix existing violations, add CI workflow#25
Merged
Conversation
- Add root-level ESLint flat config (eslint.config.js) with:
- Base JS recommended rules
- Node globals for backend; browser globals for frontend
- React + React-Hooks (rules-of-hooks, exhaustive-deps) for frontend
- React-Refresh (warning) for Vite HMR safety
- Vitest globals for test files
- eslint-config-prettier to avoid stylistic rule conflicts
- Add Prettier config (.prettierrc.json) matching existing code style
(single quotes, semis, 2-space, 100-col) and .prettierignore for
generated output (dist, public, drizzle, db files, lockfile)
- Add lint/lint:fix/format/format:check scripts to root package.json
- Install devDeps: eslint, @eslint/js, globals, eslint-plugin-react,
eslint-plugin-react-hooks, eslint-plugin-react-refresh, prettier,
eslint-config-prettier
- Mark root package.json as "type": "module" so eslint.config.js loads
without the ESM warning
- Apply prettier --write across the repo (mechanical formatting only)
- Fix the 11 pre-existing ESLint errors surfaced by the new config:
- Prefix unused args with _ (Express error middleware, carrier adapter
contract params) or drop unused catch bindings / imports
- Escape apostrophes in JSX text with '
- Add .github/workflows/ci.yml running lint, format:check, test, and
build on PRs and pushes to main
- Update .github/copilot-instructions.md to document the new commands
(the previous note about eslint being unavailable is no longer true)
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.
(single quotes, semis, 2-space, 100-col) and .prettierignore for
generated output (dist, public, drizzle, db files, lockfile)
eslint-plugin-react-hooks, eslint-plugin-react-refresh, prettier,
eslint-config-prettier
without the ESM warning
contract params) or drop unused catch bindings / imports
build on PRs and pushes to main
(the previous note about eslint being unavailable is no longer true)