Fix and enable linting of deno_typescript/*, tools/*, website/* (#2962)

This commit is contained in:
Bert Belder 2019-09-16 23:25:32 +02:00
parent c6afe87feb
commit 02cb34d8ad
No known key found for this signature in database
GPG key ID: 7A77887B2E2ED461
11 changed files with 185 additions and 133 deletions

View file

@ -1,28 +1,26 @@
// Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
const { args, readFileSync, writeFileSync, exit, dial } = Deno;
const { args, readFileSync, writeFileSync, exit } = Deno;
const name = args[1];
const test: (args: string[]) => void = {
read: (files: string[]): void => {
files.forEach((file): any => readFileSync(file));
read(files: string[]): void {
files.forEach(file => readFileSync(file));
},
write: (files: string[]): void => {
files.forEach(
(file): any => writeFileSync(file, new Uint8Array(), { append: true })
write(files: string[]): void {
files.forEach(file =>
writeFileSync(file, new Uint8Array(0), { append: true })
);
},
net_fetch: (hosts: string[]): void => {
hosts.forEach((host): any => fetch(host));
netFetch(hosts: string[]): void {
hosts.forEach(host => fetch(host));
},
net_listen: (hosts: string[]): void => {
hosts.forEach(
(host): any => {
const listener = Deno.listen("tcp", host);
listener.close();
}
);
netListen(hosts: string[]): void {
hosts.forEach(host => {
const listener = Deno.listen("tcp", host);
listener.close();
});
},
net_dial: async (hosts: string[]): Promise<void> => {
async netDial(hosts: string[]): Promise<void> {
for (const host of hosts) {
const listener = await Deno.dial("tcp", host);
listener.close();