Vize

nuxt/no-nuxt-config-test-key

Disallow setting test key in Nuxt config

Bad · Good

Default severity: error
Presets: nuxt
Automatic fix: None; review the suggested change
Applies to: Nuxt configuration files (nuxt.config.ts)
Options: No rule-specific options. Severity and preset selection are configurable.

Configuration (Vite+)

import { defineConfig } from "@vizejs/vite-plugin/vite-plus";

export default defineConfig({
  lint: {
    vize: {
      "preset": "incremental",
      "rules": {
        "nuxt/no-nuxt-config-test-key": "error"
      }
    },
  },
});
vp run lint

Bad

The exported Nuxt config sets the identifier key test to the boolean true, the obsolete config shape this rule rejects.

nuxt.config.ts

export default defineNuxtConfig({ test: true });

Good

The empty config removes that boolean test property. This example does not forbid a test configuration object.

nuxt.config.ts

export default defineNuxtConfig({});

Good avoids this rule's finding under the configuration above; other rules may still report diagnostics.

Implementation · All rules