Skip to content

Commit

Permalink
chore: add lint-ts rule (#10427)
Browse files Browse the repository at this point in the history
  • Loading branch information
JLHwung authored and nicolo-ribaudo committed Sep 11, 2019
1 parent 1b352ca commit 0ee2c42
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Makefile
Expand Up @@ -54,9 +54,14 @@ watch: clean clean-lib
flow:
./node_modules/.bin/flow check --strip-root

lint:
lint: lint-js lint-ts

lint-js:
./node_modules/.bin/eslint scripts $(SOURCES) '*.js' --format=codeframe

lint-ts:
./scripts/tests/typescript/lint.sh

fix: fix-json
./node_modules/.bin/eslint scripts $(SOURCES) '*.js' --format=codeframe --fix

Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -65,6 +65,7 @@
"rollup-plugin-replace": "^2.2.0",
"test262-stream": "^1.2.0",
"through2": "^2.0.0",
"typescript": "^3.6.3",
"warnings-to-errors-webpack-plugin": "^2.0.0",
"webpack": "^3.4.1",
"webpack-dependency-suite": "^2.4.4",
Expand Down
7 changes: 7 additions & 0 deletions scripts/tests/typescript/lint.sh
@@ -0,0 +1,7 @@
#!/bin/bash
set -e

node="node"
tsFlags="--strict"

$node ./node_modules/typescript/bin/tsc $tsFlags ./packages/babel-types/lib/index.d.ts
5 changes: 5 additions & 0 deletions yarn.lock
Expand Up @@ -10438,6 +10438,11 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^3.6.3:
version "3.6.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.6.3.tgz#fea942fabb20f7e1ca7164ff626f1a9f3f70b4da"
integrity sha512-N7bceJL1CtRQ2RiG0AQME13ksR7DiuQh/QehubYcghzv20tnh+MQnQIuJddTmsbqYj+dztchykemz0zFzlvdQw==

uglify-js@3.4.x:
version "3.4.10"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.10.tgz#9ad9563d8eb3acdfb8d38597d2af1d815f6a755f"
Expand Down

0 comments on commit 0ee2c42

Please sign in to comment.