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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nuxt 3 TS error/conflict with eslint.config.js #376

Closed
juretopolak opened this issue Dec 27, 2023 · 2 comments
Closed

Nuxt 3 TS error/conflict with eslint.config.js #376

juretopolak opened this issue Dec 27, 2023 · 2 comments

Comments

@juretopolak
Copy link

Hi! 馃憢

I'm using antfu/eslint-config in a Nuxt 3 project. It seems there is some kind of conflict with eslint.config.js:

Screenshot 2023-12-27 at 11 12 18

I've followed the steps in the documentation to configure it... but as a "newcomer", I may have misconfigured something.

The TS error appears in the file server/tsconfig.json:

Cannot write file '/Users/jure/Code3/nuxt-antfu-eslint/eslint.config.js' because it would overwrite input file.ts

It's strange that the error only appears when any .ts file in the ./server/ folder is opened with VSCode.

I'm wondering if anyone else has the same problem or is this the issue with my VSCode...

This is a minimal demo project to quickly reproduce the error (containing only Nuxt 3 and @antfu/eslint-config):

https://github.com/juretopolak/nuxt-antfu-eslint

@so1ve
Copy link
Contributor

so1ve commented Jan 13, 2024

Add "noEmit": true to your tsconfig.json:

{
  "compilerOptions": {
    "noEmit": true
  }
}

@antfu antfu closed this as completed Jan 14, 2024
@juretopolak
Copy link
Author

@so1ve thank you, this works and I can finally get rid of the annoying ESLint error. 馃檪

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

No branches or pull requests

3 participants