Automattic / Automattic/jetpack

General: Introduce TypeScript to the monorepo

Open
#16,375 6 comments 3 reactions 0 assignees View on GitHub
[Plugin] Jetpack [Pri] Low [Type] Janitorial Epic Task
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

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.

- [x] Update our build tools accordingly
- [x] Make sure the new file type is also linted (right now we lint .js and jsx, not .ts files)
- [x] Ensure our pre-commit hooks / tests listen for .ts files
- [x] 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.

Contributor guide

Open the contributing guide

Research direction

Review the checked build, linting, and pre-commit work in the Jetpack monorepo, then compare the remaining coding-guidelines task with the linked Calypso TypeScript guidelines. Confirm which checklist items are still applicable and identify the project documentation location before deciding what would constitute completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
eslint, typescript
Domain
build-system, documentation, testing, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.