From 6a649012bcd780f4b3adfa55647772fce0012fde Mon Sep 17 00:00:00 2001 From: Chris Bystrek Date: Fri, 5 Oct 2018 07:29:55 -0400 Subject: Changed tools/lint.py to lint the entire js and tests directories. (#900) * Changed tools/lint.py to lint the entire js and tests directorys and sub directories, currently it was pointing at tsconfig and would only lint files that were part of js/main.ts or node_modules/typescript/lib/lib.esnext.d.ts and their dependencies * Broke the typescript linting out into separate steps for the main typescript programing and tests. * Fixed linting issues in ts tests. --- tests/010_set_interval.ts | 4 ++-- tests/cat.ts | 4 ++-- tests/https_import.ts | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/010_set_interval.ts b/tests/010_set_interval.ts index f58cc3fcd..ee0641c5a 100644 --- a/tests/010_set_interval.ts +++ b/tests/010_set_interval.ts @@ -1,7 +1,7 @@ -const id = setInterval(function() { +const id = setInterval(() => { console.log("test"); }, 200); -setTimeout(function() { +setTimeout(() => { clearInterval(id); }, 500); diff --git a/tests/cat.ts b/tests/cat.ts index bede0d432..66df14794 100644 --- a/tests/cat.ts +++ b/tests/cat.ts @@ -2,8 +2,8 @@ import { stdout, open, copy, args } from "deno"; async function main() { for (let i = 1; i < args.length; i++) { - let filename = args[i]; - let file = await open(filename); + const filename = args[i]; + const file = await open(filename); await copy(stdout, file); } } diff --git a/tests/https_import.ts b/tests/https_import.ts index faaf2175f..0a5cea3d1 100644 --- a/tests/https_import.ts +++ b/tests/https_import.ts @@ -1,5 +1,6 @@ // TODO Use https://localhost:4555/ but we need more infrastructure to // support verifying self-signed certificates. +// tslint:disable-next-line:max-line-length import { printHello } from "https://gist.githubusercontent.com/ry/f12b2aa3409e6b52645bc346a9e22929/raw/79318f239f51d764384a8bded8d7c6a833610dde/print_hello.ts"; printHello(); -- cgit v1.2.3