Skip to content

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

Description

@DarlanPrado

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions