starter icon indicating copy to clipboard operation
starter copied to clipboard

[module-devtools] eslint errors in nuxt.config.ts

Open DarlanPrado opened this issue 4 months ago • 0 comments

There are two errors in nuxt.config.ts in playground

here is the code

https://github.com/nuxt/starter/blob/module-devtools/playground/nuxt.config.ts

export default defineNuxtConfig({

  devtools: {
    enabled: true,
  },
  modules: [
    /**
     * My module
     */
    '../src/module',
    /**
     * Start a sub Nuxt Server for developing the client
     *
     * The terminal output can be found in the Terminals tab of the devtools.
     */
    defineNuxtModule({
      setup(_, nuxt) {
        if (!nuxt.options.dev) {
          return
        }

        const _process = startSubprocess(
          {
            command: 'npx',
            args: ['nuxi', 'dev', '--port', '3300'],
            cwd: resolve(__dirname, '../client'),
          },
          {
            id: 'my-module:client',
            name: 'My Module Client Dev',
          },
        )
      },
    }),
  ],

  myModule: {},
})
  • devtools is defined before modules, which causes an error "Expected config key "modules" to come before "devtools"eslint[nuxt/nuxt-config-keys-order](https://eslint.nuxt.com/packages/plugin#nuxtnuxt-config-keys-order)"
  • i dont understand what "myModule" is and has caused a eslint error "Object literal may only specify known properties, but 'myModule' does not exist in type 'InputConfig<NuxtConfig, ConfigLayerMeta>'. Did you mean to write 'modules'?ts(2561)"

Another question is compatibilityDate, which is defined. I understand that this is not correct, because the date is not compatible with the new features.

DarlanPrado avatar Oct 18 '25 03:10 DarlanPrado