mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 12:49:10 +00:00
Fix and enable linting of deno_typescript/*, tools/*, website/* (#2962)
This commit is contained in:
parent
c6afe87feb
commit
02cb34d8ad
11 changed files with 185 additions and 133 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue