Skip to content

Commit

Permalink
ci: support TS type-checking in CI
Browse files Browse the repository at this point in the history
- add `yarn tscheck` command
  - same naming as Babel core

- modify `yarn validate` to also run `yarn tscheck`

- modify ci.yml GitHub workflow to also run `yarn tscheck`

- add `yarn tscheck` to CONTRIBUTING.md
  • Loading branch information
agilgur5 committed Mar 28, 2022
1 parent 8fca4f2 commit 1237ed7
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
run: yarn lint
- name: Flow
run: yarn flow
- name: TSCheck
run: yarn tscheck
- name: Check compat-data
run: yarn build-es-shims-data
env:
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,18 @@ $ yarn lint

#### Type-check

To run Flow type-checking, run:

```sh
$ yarn flow
```

To run TypeScript type-checking, run:

```sh
$ yarn tscheck
```

#### Test

```sh
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"publish": "yarn clean && NODE_ENV=production yarn build && yarn validate && lerna publish from-git",
"test": "jest && yarn test:esm",
"test:esm": "node test/esm/index.mjs",
"validate": "yarn lint && yarn flow && yarn test",
"tscheck": "yarn tsc",
"validate": "yarn lint && yarn flow && yarn tscheck && yarn test",
"watch": "gulp watch"
},
"devDependencies": {
Expand Down

0 comments on commit 1237ed7

Please sign in to comment.