From d7d0d42d3914abfef35e3f5bd39a0785244cdf95 Mon Sep 17 00:00:00 2001 From: ThrRip Date: Wed, 16 Oct 2024 05:02:17 +0800 Subject: [PATCH] Adopt the `nuxt-config-keys-order` ESLint rule --- nuxt.config.ts | 7 +++++-- packages/admin/nuxt.config.ts | 26 +++++++++++++++++--------- packages/home/nuxt.config.ts | 17 ++++++++++++----- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/nuxt.config.ts b/nuxt.config.ts index 277b6ce..83a07af 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -7,12 +7,15 @@ */ export default defineNuxtConfig({ - compatibilityDate: '2024-07-19', - + // Extensions modules: [ '@nuxt/eslint' ], + // Feature flags + compatibilityDate: '2024-07-19', + + // Tooling eslint: { config: { stylistic: true diff --git a/packages/admin/nuxt.config.ts b/packages/admin/nuxt.config.ts index 65a8f10..018219b 100644 --- a/packages/admin/nuxt.config.ts +++ b/packages/admin/nuxt.config.ts @@ -7,6 +7,12 @@ */ export default defineNuxtConfig({ + // Nuxt + devtools: { + enabled: false + }, + + // Client app: { baseURL: '/admin/', head: { @@ -32,34 +38,36 @@ export default defineNuxtConfig({ '@fortawesome/fontawesome-svg-core/styles.css' ], - compatibilityDate: '2024-07-19', + // Runtime secrets + runtimeConfig: { + appSecureContext: true, + backendApiKey: '' + }, + // Build build: { transpile: ['@fortawesome/vue-fontawesome'] }, + // Development devServer: { host: '0.0.0.0', port: 3001 }, - devtools: { - enabled: false - }, + // Feature flags + compatibilityDate: '2024-07-19', + // Nitro nitro: { preset: 'bun' }, + // Tooling postcss: { plugins: { tailwindcss: {}, autoprefixer: {} } - }, - - runtimeConfig: { - appSecureContext: true, - backendApiKey: '' } }) diff --git a/packages/home/nuxt.config.ts b/packages/home/nuxt.config.ts index 2e2ae35..20459cf 100644 --- a/packages/home/nuxt.config.ts +++ b/packages/home/nuxt.config.ts @@ -7,6 +7,12 @@ */ export default defineNuxtConfig({ + // Nuxt + devtools: { + enabled: false + }, + + // Client app: { head: { htmlAttrs: { lang: 'zh' }, @@ -32,24 +38,25 @@ export default defineNuxtConfig({ '@fortawesome/fontawesome-svg-core/styles.css' ], - compatibilityDate: '2024-07-19', - + // Build build: { transpile: ['@fortawesome/vue-fontawesome'] }, + // Development devServer: { host: '0.0.0.0' }, - devtools: { - enabled: false - }, + // Feature flags + compatibilityDate: '2024-07-19', + // Nitro nitro: { preset: 'bun' }, + // Tooling postcss: { plugins: { tailwindcss: {},