chore(010): scaffold ESLint, Prettier, Vitest, node:test, CI, VS Code config#2
Merged
Merged
Conversation
… config Issue 010. Stands up the static-check + test + build layer that all 011+ issues will depend on. No production code touched except a single dead duplicate `width` key in VideoPlayer.jsx (explicit one-line exception to the do-not-touch list, user-approved). Root: - .editorconfig, .prettierrc.json, .prettierignore, .gitattributes - root package.json: rename to "nightfeed", add engines node >=22, add lint/test scripts that fan out to workspaces - .github/workflows/ci.yml: Node 22, install/lint/test/build on push + PR Frontend (nightfeed-frontend): - eslint.config.js (flat: @eslint/js + react flat + react-hooks + jsx-runtime + eslint-config-prettier; warn-baseline overrides for legacy code) - jsconfig.json, vitest.config.js, src/test/setup.js - vite.config.js: add @ -> ./src resolve alias - package.json: lint, lint:fix, test, test:ui scripts; new devDeps - src/utils/format.test.js: 4 real tests of formatDuration Backend (nightfeed-backend): - eslint.config.js (flat: @eslint/js + Node globals + eslint-config-prettier) - jsconfig.json - package.json: lint, lint:fix, test (node --test auto-discovery); new devDeps - src/utils/normalizePost.test.js: 6 real tests of sanitizeLimit + sanitizeSort VS Code: - .vscode/extensions.json (ESLint, Prettier, Copilot, Copilot Chat, Claude Code) - .vscode/settings.json (formatOnSave, fixAll.eslint on save, working dirs) memory.md: updated Current state, added 2026-05-26 decisions entry (warn-baseline, Node 22 floor, react-hooks v7 strategy, no-dupe-keys exception). Local verification: - npm run lint (root): 0 errors, 43 warnings, exit 0 - npm test (root): 10 tests passed (6 backend, 4 frontend), exit 0 - npm run build (root): exit 0 - Deliberate parse error: lint exits 1 as expected; clean again after revert. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
❌ Deploy Preview for nightfeed failed.
|
There was a problem hiding this comment.
Pull request overview
This PR scaffolds the monorepo’s developer tooling so linting, testing, and builds are consistently runnable locally and in CI (issue 010), while keeping production code changes minimal.
Changes:
- Adds workspace-level scripts and a Node 22+ engine floor to standardize
lint/test/buildexecution. - Sets up ESLint (flat config) + Prettier for both frontend and backend, plus Vitest (jsdom) for frontend and
node --testfor backend with initial unit tests. - Adds VS Code workspace configuration and a GitHub Actions CI workflow to run install/lint/test/build on pushes and PRs.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Renames package, adds Node engine floor, adds workspace lint/test scripts. |
| memory.md | Documents project “memory”, current state, and tooling decisions for issue 010. |
| frontend/vitest.config.js | Configures Vitest to run in jsdom with setup file and @/ alias. |
| frontend/vite.config.js | Adds @/ path alias resolution to Vite config. |
| frontend/src/utils/format.test.js | Adds unit tests for formatDuration. |
| frontend/src/test/setup.js | Adds test setup importing Testing Library matchers. |
| frontend/src/components/VideoPlayer.jsx | Removes a dead duplicate width key in inline style object. |
| frontend/package.json | Adds lint/test scripts and devDependencies for ESLint/Prettier/Vitest/Testing Library. |
| frontend/jsconfig.json | Adds JS path mapping for @/* and module resolution settings for editor tooling. |
| frontend/eslint.config.js | Adds frontend ESLint flat config including react + react-hooks and Prettier integration. |
| backend/src/utils/normalizePost.test.js | Adds backend unit tests for sanitizeLimit and sanitizeSort using node:test. |
| backend/package.json | Adds lint/test scripts and devDependencies for ESLint + supertest. |
| backend/jsconfig.json | Adds backend JS project config for editor tooling. |
| backend/eslint.config.js | Adds backend ESLint flat config and Prettier integration. |
| .vscode/settings.json | Adds workspace formatting and ESLint-on-save settings with per-package working directories. |
| .vscode/extensions.json | Recommends ESLint/Prettier and assistant extensions for contributors. |
| .prettierrc.json | Adds Prettier formatting configuration. |
| .prettierignore | Ignores node_modules, dist, and package-lock from formatting. |
| .github/workflows/ci.yml | Adds CI workflow running install/lint/test/build on Node 22. |
| .gitattributes | Normalizes line endings to LF for text files. |
| .editorconfig | Adds editor defaults (2-space indent, LF, trim whitespace, etc.). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+33
to
+36
| "jsdom": "^29.1.1", | ||
| "prettier": "^3.8.3", | ||
| "vite": "^5.4.10", | ||
| "vitest": "^4.1.7" |
| "frontend" | ||
| ], | ||
| "engines": { | ||
| "node": ">=22" |
| cache: npm | ||
|
|
||
| - name: Install dependencies | ||
| run: npm install |
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Closes the tooling-scaffolding portion of issue 010.
Stands up the static-check + test + build layer so every later issue's "done" criteria (
npm run lint,npm test,npm run build) actually resolve. No production code touched except a single dead duplicatewidthkey inVideoPlayer.jsx(user-approved one-line exception).Highlights
.editorconfig,.prettierrc.json,.prettierignore,.gitattributes,engines.node >= 22, lint/test scripts fanning out via npm workspaces.@/alias invite.config.jsandjsconfig.json, 4 real tests offormatDuration.node --testauto-discovery (Node 22+),supertestavailable for future route tests, 6 real tests ofsanitizeLimit/sanitizeSort.eslint.workingDirectories)..github/workflows/ci.ymlruns install / lint / test / build on Node 22 for every push and PR.memory.mdupdated; new decisions log entry records warn-baseline, Node 22 floor, react-hooks v7 strategy, and theno-dupe-keysone-line exception.Local verification
npm run lint(root): 0 errors, 43 warnings, exit 0npm test(root): 10 tests passed (6 backend, 4 frontend), exit 0npm run build(root): exit 0Scope kept tight
The modified
README.md,feed-mode-prd.md,CLAUDE.md,TESTING.md, andissues/011-019.mdare intentionally NOT in this PR; they're a separate concern from tooling and will land in their own changes.Follow-ups (not in this PR)
no-constant-binary-expressionwarnings inLightboxModal.jsxlook like real logic bugs; recommend addressing during that file's shrink, not under 010.npm audit fix --force, which is explicitly forbidden perCLAUDE.md).🤖 Generated with Claude Code