Skip to content

General: Introduce TypeScript to the monorepo #16375

Open
@jeherve

Description

Branching off from #16363

I suppose this could be the opportunity to introduce TypeScript to Jetpack, but if we do so I'd rather we do in a separate PR, by starting with introducing the necessary linting plugins and updating our tools to take into account the new file type.

To introduce TypeScript, we'd need to make a few changes.

  • Update our build tools accordingly
  • Make sure the new file type is also linted (right now we lint .js and jsx, not .ts files)
  • Ensure our pre-commit hooks / tests listen for .ts files
  • Update our linting config. Since we have a cascading configuration of eslint across the different projects in the Jetpack repo, we'll need to make sure we break nothing. Ideally, I'd favor using / extending the config the Calypso team worked on for the Calypso repo.
  • Add coding guidelines, or refer to the Calypso coding guidelines from Calypso:
    https://github.com/Automattic/wp-calypso/blob/ee8665992c48fd6befe29649282c7d46e2581383/docs/coding-guidelines/typescript.md

Here is what comes to mind right now, but part of this work should be to make sure everything is up to date.

Metadata

Assignees

No one assigned

    Labels

    EpicFormerly "Primary Issue", or "Master Issue"[Plugin] JetpackIssues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/[Pri] Low[Type] Janitorial[Type] Task

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions