Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epic: typescript migration #2349

Open
SgtPooki opened this issue Mar 17, 2025 · 0 comments
Open

epic: typescript migration #2349

SgtPooki opened this issue Mar 17, 2025 · 0 comments
Labels
effort/months Epic exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/architecture Core architecture of project kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked

Comments

@SgtPooki
Copy link
Member

TypeScript Migration Guidelines

Context:
We are migrating our codebase to TypeScript. This issue will remain open until the migration is fully complete. Please ensure that all new contributions follow these guidelines to maintain consistency and code quality.

File Types & Naming Conventions

  • File Types:
    • Use TypeScript files only: use .tsx for React components and .ts for non-React components.
  • Filename Convention:
    • Use kebab-case for filenames (lowercase only, words separated by hyphens).

Code Standards

  • Component Style:
    • All components must be functional.
    • Do not use prop-types or .defaultProps as these are unnecessary in a TypeScript codebase.
  • Imports:
    • All imports must include the .js extension.
  • State Management & Bundles:
    • Do not use redux-bundler or redux-bundler-react.
    • Do not add new bundles; if possible, create a hook or use context instead.
  • Internationalization:
    • Do not use withTransation; use useTranslation instead.

Project Configuration

  • TypeScript Setup:
    • Add new TypeScript files to tsconfig.json.
    • Include any dependent files that require type checking.
    • If an existing file is too large or requires extensive changes, it can be temporarily ignored until someone can convert it properly.

Additional Guidelines for Contributors

  • Linting & Formatting:
    • Follow the project’s ESLint and Prettier configurations to maintain a consistent code style.
  • Testing:
    • Include unit tests & e2e tests with 100% coverage for all new code. This ensures that our code remains robust during the migration.
  • Documentation:
    • Update or add documentation as necessary to reflect changes or new patterns introduced during the migration.
  • Dependencies:
    • Verify that any new third-party libraries include proper TypeScript type definitions.
  • Backwards Compatibility:
    • Avoid breaking changes. When updating legacy code, strive to maintain compatibility until the entire file can be migrated.
  • Questions & Support:
    • If you have any questions or need clarification on migration specifics, please ping @SgtPooki.

Your cooperation in following these guidelines is essential for a smooth transition to a fully TypeScript codebase. Thank you for your contributions!

@SgtPooki SgtPooki pinned this issue Mar 17, 2025
@SgtPooki SgtPooki added help wanted Seeking public contribution on this issue exp/intermediate Prior experience is likely helpful P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked kind/enhancement A net-new feature or improvement to an existing feature kind/architecture Core architecture of project Epic effort/months labels Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort/months Epic exp/intermediate Prior experience is likely helpful help wanted Seeking public contribution on this issue kind/architecture Core architecture of project kind/enhancement A net-new feature or improvement to an existing feature P1 High: Likely tackled by core team if no one steps up status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

1 participant