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

Detect typos in nuxt.config #14135

Closed
pi0 opened this issue Jun 10, 2022 · 2 comments · Fixed by nuxt/framework#8487
Closed

Detect typos in nuxt.config #14135

pi0 opened this issue Jun 10, 2022 · 2 comments · Fixed by nuxt/framework#8487

Comments

@pi0
Copy link
Member

pi0 commented Jun 10, 2022

Ref: nuxt/framework#5294 (comment)_

We added support for [key: string]: any] in nuxt.config since 1) some modules might not have provided types and 2) making easier during module development to not have errors before stubbing

But this seems having a negative DX effect as increases chance of unnoticed typos in config file.

I think we shall try making it strict again...

@chris-visser
Copy link
Contributor

Maybe we could somehow provide a way to "losen up" the config interface to ensure typechecking would not fail for libs without types. I'm not a TS guru, but maybe something like this?

declare namespace Nuxt {
    interface NuxtConfig {
        someModule: any;
    }
}

@bendwarn
Copy link

Vote for strict. It's pretty easy to suppress error with ts-expect-error during module development.

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

Successfully merging a pull request may close this issue.

4 participants