chore(eslint): add eslint typescript linting (#5635)

This commit adds linting for `*.ts` files and loads up the recommended
list of TS rules from the ESLint TypeScript plugin. We can adjust the
exact rules overtime, but starting with the recommended list seems
sensible.
This commit is contained in:
Jack Franklin
2020-04-14 12:08:52 +01:00
committed by GitHub
parent 88d843d4f0
commit 2529ee6508
4 changed files with 26 additions and 24 deletions

View File

@@ -21,7 +21,7 @@
"prepublishOnly": "npm run tsc",
"dev-install": "npm run tsc && node install.js",
"install": "node install.js",
"lint": "([ \"$CI\" = true ] && eslint --quiet -f codeframe . || eslint .) && npm run tsc && npm run doc",
"lint": "([ \"$CI\" = true ] && eslint --ext js --ext ts --quiet -f codeframe . || eslint --ext js --ext ts .) && npm run tsc && npm run doc",
"doc": "node utils/doclint/cli.js",
"tsc": "tsc --version && tsc -p . && cp src/protocol.d.ts lib/ && cp src/externs.d.ts lib/",
"apply-next-version": "node utils/apply_next_version.js",
@@ -53,6 +53,8 @@
"@types/rimraf": "^2.0.2",
"@types/tar-fs": "^1.16.2",
"@types/ws": "^6.0.1",
"@typescript-eslint/eslint-plugin": "^2.28.0",
"@typescript-eslint/parser": "^2.28.0",
"commonmark": "^0.28.1",
"cross-env": "^5.0.5",
"eslint": "^6.8.0",