Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PublicRuntimeConfig type not being recognized by eslint, only happens after nuxt 3.11.2 #27275

Closed
allusernamestakenexceptthis opened this issue May 20, 2024 · 2 comments

Comments

@allusernamestakenexceptthis
Copy link

Environment


  • Operating System: Linux
  • Node Version: v18.18.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: npm@10.2.3
  • Builder: -
  • User Config: modules, runtimeConfig
  • Runtime Modules: @nuxtjs/i18n@8.3.1, @sidebase/nuxt-auth@0.7.2, @nuxt/eslint@0.3.13
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-m5xc5v?file=nuxt.config.ts

Describe the bug

I'm not certain if it is nuxt bug. but I'm posting it here first. because it only happens with nuxt 3.11.2. someone here might know the reason.

public runtime config properties types are not recognized when running eslint. they appear as any. even when declaring nuxt/schema

This happens only with nuxt 3.11 and installing two modules: @nuxtjs/i18n' and '@sidebase/nuxt-auth and including them in nuxt.config.ts

in the reproduction terminal, you can ctrl+c, then:

npm run lint

you'll get:

error Unexpected any value in conditional. An explicit comparison or type cast is required @typescript-eslint/strict-boolean-expressions

if you remove either of those two modules from nuxt-config.ts, eslint doesn't report an error.

Additional context

No response

Logs

No response

edit: removed srcDir, as I left that initially then edited out from reproduction. issue still occur.

Copy link

stackblitz bot commented May 20, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@allusernamestakenexceptthis
Copy link
Author

Closing this issue. as it turned out it was issue with sidebase-auth.

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

No branches or pull requests

1 participant