Add TypeScript linting (#827)

* add tslint, create tslint.json ruleset from .eslintrc

* remove leftover rules

* fix up meta files
This commit is contained in:
Fred K. Schott
2018-01-17 14:41:24 -08:00
committed by Elliot Lee
parent 19eaedf50d
commit d3fb4b6260
5 changed files with 150 additions and 378 deletions

View File

@@ -7,19 +7,9 @@ function checkEOL {
./scripts/checkeol.sh
}
typecheck() {
yarn install -g flow-bin
flow --version
yarn run typecheck
}
lint() {
echo "eslint $(node_modules/.bin/eslint --version)"
yarn list babel-eslint
REPO_URL="https://raw.githubusercontent.com/ripple/javascript-style-guide"
curl "$REPO_URL/es6/eslintrc" > .eslintrc
echo "parser: babel-eslint" >> .eslintrc
node_modules/.bin/eslint -c .eslintrc $(git --no-pager diff --name-only -M100% --diff-filter=AM --relative $(git merge-base FETCH_HEAD origin/HEAD) FETCH_HEAD | grep "\.js$")
echo "tslint $(node_modules/.bin/tslint --version)"
yarn lint
}
unittest() {