fix: lint

This commit is contained in:
2024-07-19 17:21:46 +02:00
parent 16c66c6fec
commit f1764732c3
4 changed files with 5 additions and 5 deletions

View File

@@ -1,6 +1,5 @@
{ {
"deno.enable": true, "deno.enable": true,
"deno.lint": true,
"eslint.nodePath": "./.eslint/node_modules", "eslint.nodePath": "./.eslint/node_modules",
"eslint.options": { "eslint.options": {
"overrideConfigFile": "./.eslint/eslint.config.mjs" "overrideConfigFile": "./.eslint/eslint.config.mjs"

View File

@@ -25,7 +25,7 @@
"lineWidth": 120 "lineWidth": 120
}, },
"tasks": { "tasks": {
"lint": "npx eslint -c .eslint/eslint.config.mjs .", "lint": "deno lint && npx eslint -c .eslint/eslint.config.mjs .",
"test": "export ENVIRONMENT=testing && deno test --allow-all --unstable-ffi" "test": "export ENVIRONMENT=testing && deno test --allow-all --unstable-ffi"
} }
} }

View File

@@ -1,3 +1,4 @@
import type { Response } from "../../http/mod.ts";
import { type CreateExecOptions, Exec } from "./exec.ts"; import { type CreateExecOptions, Exec } from "./exec.ts";
import { modem } from "./modem.ts"; import { modem } from "./modem.ts";
@@ -74,7 +75,7 @@ export class Container {
until?: number; until?: number;
timestamps?: boolean; timestamps?: boolean;
tail?: number | "all"; tail?: number | "all";
} = {}) { } = {}): Promise<Response> {
return modem.request({ method: "GET", path: `/containers/${this.id}/logs`, query }); return modem.request({ method: "GET", path: `/containers/${this.id}/logs`, query });
} }

View File

@@ -2,7 +2,7 @@ import { PROTOCOL } from "./common.ts";
export class Response { export class Response {
status: number = 500; status: number = 500;
headers = new Map<string, string>(); headers: Map<string, string> = new Map<string, string>();
body = ""; body = "";
constructor(readonly connection: Deno.Conn) {} constructor(readonly connection: Deno.Conn) {}
@@ -44,7 +44,7 @@ export class Response {
/** /**
* Parsed JSON instance of the response body. * Parsed JSON instance of the response body.
*/ */
get json() { get json(): Record<string, unknown> {
if (this.body === "") { if (this.body === "") {
return {}; return {};
} }