Summary
The function getCopilotDir() in src/utils/lockfile.js is exported but never imported by any production file. It only appears in the test file.
How to Fix
- Remove the
getCopilotDir export from src/utils/lockfile.js (the function definition and the export keyword)
- Remove the test for it in
src/utils/lockfile.test.js (around line 88-89)
- Run
npm test to verify all tests pass
- Run
npm run lint to verify no syntax errors
Why This Matters
Keeping dead code in the codebase increases maintenance burden and confuses new contributors trying to understand the project.
Difficulty
Easy — no new logic needed, just deletion.
Files
src/utils/lockfile.js (line 34-36)
src/utils/lockfile.test.js (around line 88-89)
Summary
The function
getCopilotDir()insrc/utils/lockfile.jsis exported but never imported by any production file. It only appears in the test file.How to Fix
getCopilotDirexport fromsrc/utils/lockfile.js(the function definition and theexportkeyword)src/utils/lockfile.test.js(around line 88-89)npm testto verify all tests passnpm run lintto verify no syntax errorsWhy This Matters
Keeping dead code in the codebase increases maintenance burden and confuses new contributors trying to understand the project.
Difficulty
Easy — no new logic needed, just deletion.
Files
src/utils/lockfile.js(line 34-36)src/utils/lockfile.test.js(around line 88-89)