epic: typescript migration

未关闭
#2,349 5 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

@ChayanDass 已经在做这个了。

开始于 2026年3月18日。

评估

难度
5/5
预计耗时
一周以上
新手友好度
20/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
停滞
领域
frontend

调研方向

从本 issue 中的 TypeScript Migration Guidelines 开始,并检查 tsconfig.json 以了解当前的迁移范围。只有在代码库完成全面迁移,并遵循所列出的 TypeScript、linting、测试、依赖项和兼容性指南后,该 issue 才算完成。

由索引模型根据 Issue 内容生成。

描述

effort/months Epic exp/intermediate help wanted kind/architecture kind/enhancement P1 status/ready

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 Standard (we're trying to get to a point where we can lint using aegir lint) 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!

主要语言
JavaScript
星标
1.6k
派生
539
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ipfs/ipfs-webui 的其他 Issue

查看 ipfs/ipfs-webui 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。