From 8238844785ca9b7369dd94a47abacaa0b538129f Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Mon, 18 Nov 2024 19:10:37 +0100 Subject: [PATCH] chore: fix lint issues --- eslint.config.mjs | 15 ++++++++------- examples/raw.ts | 1 - lib/index.cjs | 1 + src/constants.ts | 1 - src/index.ts | 2 +- src/utils/prompt.ts | 1 - 6 files changed, 10 insertions(+), 11 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index cc49c53b..5543773e 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -4,10 +4,11 @@ import unjs from "eslint-config-unjs"; export default unjs({ ignores: [], rules: { - "no-undef": 0, - "unicorn/prefer-module": 0, - "unicorn/prefer-top-level-await": 0, - "unicorn/no-null": 0, - "@typescript-eslint/no-unused-vars": 0 -}, -}); \ No newline at end of file + "no-undef": 0, + "unicorn/prefer-module": 0, + "unicorn/prefer-top-level-await": 0, + "unicorn/no-null": 0, + "@typescript-eslint/no-unused-vars": 0, + "unicorn/expiring-todo-comments": 0, + }, +}); diff --git a/examples/raw.ts b/examples/raw.ts index 16d11a84..72cb1e9a 100644 --- a/examples/raw.ts +++ b/examples/raw.ts @@ -7,4 +7,3 @@ consola.log({ message: "hello" }); consola.log('consola.log.raw({ message: "hello" })'); // Prints "{ message: 'hello' }" consola.log.raw({ message: "hello" }); -``; diff --git a/lib/index.cjs b/lib/index.cjs index e4ea1050..0024c64d 100644 --- a/lib/index.cjs +++ b/lib/index.cjs @@ -1,3 +1,4 @@ +// eslint-disable-next-line @typescript-eslint/no-require-imports const lib = require("../dist/index.cjs"); module.exports = lib.consola; diff --git a/src/constants.ts b/src/constants.ts index 0c00df49..58afce6b 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -6,7 +6,6 @@ import { LogObject } from "./types"; * @type {0 | 1 | 2 | 3 | 4 | 5 | (number & {})} LogLevel - Represents the log level. * @default 0 - Represents the default log level. */ -// eslint-disable-next-line @typescript-eslint/ban-types export type LogLevel = 0 | 1 | 2 | 3 | 4 | 5 | (number & {}); /** diff --git a/src/index.ts b/src/index.ts index 72dff331..24f4d401 100644 --- a/src/index.ts +++ b/src/index.ts @@ -31,7 +31,7 @@ export function createConsola( stderr: process.stderr, prompt: (...args) => import("./prompt").then((m) => m.prompt(...args)), reporters: options.reporters || [ - options.fancy ?? !(isCI || isTest) + (options.fancy ?? !(isCI || isTest)) ? new FancyReporter() : new BasicReporter(), ], diff --git a/src/utils/prompt.ts b/src/utils/prompt.ts index bb708d0d..e08cca1c 100644 --- a/src/utils/prompt.ts +++ b/src/utils/prompt.ts @@ -1039,7 +1039,6 @@ export interface PromptGroupOptions { }) => void; } -// eslint-disable-next-line @typescript-eslint/ban-types type Prettify = {} & { [P in keyof T]: T[P]; };