From 7d924e1d7642c6123706012672061188201b7eaa Mon Sep 17 00:00:00 2001 From: Noel Date: Tue, 16 Apr 2024 20:13:35 -0700 Subject: [PATCH] fix eslint --- eslint.config.js | 2 +- scripts/eslint.ts | 4 ++-- scripts/prettier.ts | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 644d3c4b..580b96e7 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -24,7 +24,7 @@ import noel from '@augu/eslint-config'; import { fileURLToPath } from 'url'; -export default noel({ +export default (typeof noel === 'function' ? noel : noel.default)({ perfectionist: true, typescript: { tsconfig: fileURLToPath(new URL('tsconfig.json', import.meta.url)) diff --git a/scripts/eslint.ts b/scripts/eslint.ts index f886186b..f28509a0 100644 --- a/scripts/eslint.ts +++ b/scripts/eslint.ts @@ -22,11 +22,11 @@ */ import { Stopwatch } from '@noelware/utils'; +import { fileURLToPath } from 'node:url'; import * as log from './util/logging'; -import { ESLint } from 'eslint'; import * as colors from 'colorette'; import { resolve } from 'node:path'; -import { fileURLToPath } from 'node:url'; +import { ESLint } from 'eslint'; async function main() { const ROOT = fileURLToPath(new URL('..', import.meta.url)); diff --git a/scripts/prettier.ts b/scripts/prettier.ts index 1c9218de..f36a86e8 100644 --- a/scripts/prettier.ts +++ b/scripts/prettier.ts @@ -22,13 +22,14 @@ */ import { Stopwatch } from '@noelware/utils'; +import { fileURLToPath } from 'node:url'; import * as log from './util/logging'; import * as prettier from 'prettier'; import * as colors from 'colorette'; import { resolve } from 'node:path'; async function main() { - const ROOT = Bun.fileURLToPath(new URL('..', import.meta.url)); + const ROOT = fileURLToPath(new URL('..', import.meta.url)); log.info(`root directory: ${ROOT}`); const config = await prettier.resolveConfig(resolve(ROOT, '.prettierrc.json'));