From 05328d68e492368c1eeb14132b1a6e2ae2ab30b3 Mon Sep 17 00:00:00 2001 From: Adrien Foulon <6115458+Tofandel@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:13:44 +0100 Subject: [PATCH] chore: remove unused imports and update eslint config (#29876) --- eslint.config.mjs | 3 ++- packages/nuxt/src/core/cache.ts | 2 +- packages/nuxt/src/core/external-config-files.ts | 1 - packages/nuxt/src/core/nuxt.ts | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index a6ad15a72e..46176dcab2 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -72,8 +72,9 @@ export default createConfigForNuxt({ 'error', { argsIgnorePattern: '^_', + destructuredArrayIgnorePattern: '^_', ignoreRestSiblings: true, - varsIgnorePattern: '^_', + varsIgnorePattern: '', }, ], '@typescript-eslint/triple-slash-reference': 'off', diff --git a/packages/nuxt/src/core/cache.ts b/packages/nuxt/src/core/cache.ts index 748d57bc79..3096ecf554 100644 --- a/packages/nuxt/src/core/cache.ts +++ b/packages/nuxt/src/core/cache.ts @@ -6,7 +6,7 @@ import { isIgnored } from '@nuxt/kit' import type { Nuxt, NuxtConfig, NuxtConfigLayer } from '@nuxt/schema' import { hash, murmurHash, objectHash } from 'ohash' import { glob } from 'tinyglobby' -import _consola, { consola } from 'consola' +import { consola } from 'consola' import { dirname, join, relative } from 'pathe' import { createTar, parseTar } from 'nanotar' import type { TarFileInput } from 'nanotar' diff --git a/packages/nuxt/src/core/external-config-files.ts b/packages/nuxt/src/core/external-config-files.ts index 6c6d5d0d21..1f0359cee8 100644 --- a/packages/nuxt/src/core/external-config-files.ts +++ b/packages/nuxt/src/core/external-config-files.ts @@ -1,6 +1,5 @@ import { findPath, logger } from '@nuxt/kit' import { basename } from 'pathe' -import { generateApp as _generateApp } from './app' /** * Check for those external configuration files that are not compatible with Nuxt, diff --git a/packages/nuxt/src/core/nuxt.ts b/packages/nuxt/src/core/nuxt.ts index 41b0c29db4..b81c4ed141 100644 --- a/packages/nuxt/src/core/nuxt.ts +++ b/packages/nuxt/src/core/nuxt.ts @@ -5,7 +5,6 @@ import { createDebugger, createHooks } from 'hookable' import ignore from 'ignore' import type { LoadNuxtOptions } from '@nuxt/kit' import { addBuildPlugin, addComponent, addPlugin, addRouteMiddleware, addServerPlugin, addVitePlugin, addWebpackPlugin, installModule, loadNuxtConfig, logger, nuxtCtx, resolveAlias, resolveFiles, resolveIgnorePatterns, resolvePath, tryResolveModule, useNitro } from '@nuxt/kit' -import { resolvePath as _resolvePath } from 'mlly' import type { Nuxt, NuxtHooks, NuxtModule, NuxtOptions } from 'nuxt/schema' import type { PackageJson } from 'pkg-types' import { readPackageJSON } from 'pkg-types'