Skip to content

Chore/lint type cleanup main - #781

Open
DhineshPonnarasan wants to merge 30 commits into
CodeGraphContext:mainfrom
DhineshPonnarasan:chore/lint-type-cleanup-main
Open

Chore/lint type cleanup main#781
DhineshPonnarasan wants to merge 30 commits into
CodeGraphContext:mainfrom
DhineshPonnarasan:chore/lint-type-cleanup-main

Conversation

@DhineshPonnarasan

Copy link
Copy Markdown
Contributor

Summary

This PR performs a comprehensive cleanup of the codebase to ensure a 100% error-free lint, type-check, and build process.


What was fixed and implemented

TypeScript & ESLint Errors

  • Removed all TypeScript type errors and ESLint errors across the codebase
  • Fixed all any usages, missing/incorrect types, and interface/type issues
  • Removed or replaced all empty interfaces/types to comply with @typescript-eslint/no-empty-object-type
  • Fixed unnecessary escape character errors in regexes (e.g., in LocalUploader.tsx, parser.worker.ts, and API handlers)
  • Addressed block statement and empty block errors

Regex & Validation

  • Cleaned up regex patterns to remove unnecessary escapes
  • Ensured cross-platform compatibility
  • Updated path splitting and validation logic in file upload and parsing utilities

Component & API Refactoring

  • Ensured all React components and API handlers are properly typed
  • Updated imports and exports for better Fast Refresh compatibility
    (Note: warnings remain, but no errors)

Dependency Management

  • Installed missing dev dependencies (e.g., Next.js types for API handlers)
  • Ensured all required packages are present for lint/type/build

Build & Lint Verification

  • Ran npm run lint and npm run build to confirm zero errors
  • Only non-blocking warnings remain (mostly Fast Refresh/component export warnings)

Testing

  • No test script was present
  • Verification limited to linting and build process

Remaining Warnings

  • Some Fast Refresh/component export warnings remain
    (e.g., exporting constants/functions alongside components)
  • No blocking issues — project is ready for further development or deployment

Motivation

  • Ensures codebase is maintainable and type-safe
  • Provides a clean baseline for future PRs
  • Unblocks CI/CD and contributor workflows

Closes #770


Hi @Shashankss1205 ,
Please review these changes and let me know if any further modifications are needed. If you notice any issues, please leave a comment below and I’ll address them. Thank you!

@vercel

vercel Bot commented Mar 31, 2026

Copy link
Copy Markdown

@DhineshPonnarasan is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@DhineshPonnarasan
DhineshPonnarasan force-pushed the chore/lint-type-cleanup-main branch from d60dbfd to d01cb48 Compare March 31, 2026 14:36
@Shashankss1205

Copy link
Copy Markdown
Collaborator

👋 Thanks for contributing to CodeGraphContext! Since this PR was opened, main has moved forward significantly (we just shipped v0.5.2 and merged ~50 PRs), so this one now has merge conflicts. Could you please rebase onto the latest main and resolve the conflicts? Once it is conflict-free and CI is green, we will review and merge it. Really appreciate your work — thank you! 🙏

@Shashankss1205

Copy link
Copy Markdown
Collaborator

Thanks for the lint/type cleanup effort. Unfortunately this is the kind of PR that conflicts badly with time: it touches 25 files with broad mechanical changes, and against current main it now produces ~21 conflict regions spanning CI workflows (test.yml, e2e-tests.yml), pyproject.toml, cli/main.py and several website files — all of which have been modified independently since March.

Rebasing a cleanup PR of this shape is usually more work than redoing it, because the underlying code has changed and the original fixes may no longer apply where they did.

If you're still interested, the most effective approach would be to run the linter against current main and open a small PR per area (e.g. one for cli/, one for tools/languages/). Those review and land quickly, and they don't go stale while waiting.

Worth knowing: there are meta-tests that enforce some of this automatically now — test_parser_encoding_resilience (every open( in tools/languages/*.py needs errors=) and test_command_delegation_and_exit_codes (CLI abbreviations must forward every Typer option). Those are good targets if you want cleanups that are guaranteed not to be controversial.

Happy to review focused follow-ups. If you'd prefer to drop this one, just let me know and I'll close it.

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.

Runs failining, need to check

2 participants