From 27ab4ef220dd38d9dd8a507336e0baff5068174e Mon Sep 17 00:00:00 2001 From: Pinta365 Date: Thu, 18 Apr 2024 23:13:47 +0200 Subject: [PATCH] linting issues --- deno.jsonc | 2 +- lib/filehandler.ts | 3 ++- mod.test.ts | 13 ++----------- mod.ts | 9 ++------- 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/deno.jsonc b/deno.jsonc index a71fcd5..af71f4c 100644 --- a/deno.jsonc +++ b/deno.jsonc @@ -1,6 +1,6 @@ { "name": "@cross/env", - "version": "1.0.1", + "version": "1.0.2", "exports": { ".": "./mod.ts", "./load": "./load.ts" diff --git a/lib/filehandler.ts b/lib/filehandler.ts index b657e21..2bff149 100644 --- a/lib/filehandler.ts +++ b/lib/filehandler.ts @@ -1,4 +1,5 @@ -import { EnvOptions, FileReadError, UnsupportedEnvironmentError } from "./helpers.ts"; +import { FileReadError, UnsupportedEnvironmentError } from "./helpers.ts"; +import type { EnvOptions } from "./helpers.ts"; import { readFile } from "node:fs/promises"; /** diff --git a/mod.test.ts b/mod.test.ts index 1729ed0..955c376 100644 --- a/mod.test.ts +++ b/mod.test.ts @@ -1,16 +1,7 @@ import { assert, assertEquals, assertThrows } from "@std/assert"; import { ValidationError } from "./lib/helpers.ts"; -import { - getAllEnv, - getEnv, - hasEnv, - requireEnv, - setEnv, - setupEnv, - validateAndGetEnv, - validateEnv, - ValidatorFunction, -} from "./mod.ts"; +import { getAllEnv, getEnv, hasEnv, requireEnv, setEnv, setupEnv, validateAndGetEnv, validateEnv } from "./mod.ts"; +import type { ValidatorFunction } from "./mod.ts"; import { test } from "@cross/test"; /** ==== getEnv() ==== */ diff --git a/mod.ts b/mod.ts index 1db0003..1e22806 100644 --- a/mod.ts +++ b/mod.ts @@ -4,13 +4,8 @@ * retrieving environment variables across Deno, Bun and Node.js */ -import { - EnvOptions, - UndefinedEnvironmentError, - UnsupportedEnvironmentError, - ValidationError, - ValidatorFunction, -} from "./lib/helpers.ts"; +import { UndefinedEnvironmentError, UnsupportedEnvironmentError, ValidationError } from "./lib/helpers.ts"; +import type { EnvOptions, ValidatorFunction } from "./lib/helpers.ts"; import { simpleMerge } from "@cross/deepmerge"; import { getCurrentRuntime } from "@cross/runtime"; import { loadEnvFile } from "./lib/filehandler.ts";