nuxt/eslint

eslint.config.mjs is not generated

5ym opened this issue · 8 comments

5ym commented

Environment

  • Operating System: Linux
  • Node Version: v20.18.0
  • Nuxt Version: 2.18.1
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.6
  • Package Manager: npm@10.8.2
  • Builder: webpack
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Package

@nuxt/eslint

Reproduction

This is currently occurring only in certain private repositories.
A reproduced project is available.

Describe the bug

If you update your package to 0.5.6 or later, the .nuxt/eslint.config.mjs that used to be generated by nuxi prepare will no longer be generated.

package.json
Image

nuxt.config.ts
Image

.nuxt directory
Image

Additional context

No response

Logs

No response

I also encountered this problem, I had to stay on version >0.5.6 for now, I hope it will be fixed

Try deleting the eslint.config.mjs in the root of your project. I think if this file already exists it blocks the creation of the file in .nuxt/

5ym commented

I deleted eslint.config.mjs and ran nuxi prepare, but no files were generated in .nuxt.

Image

I deleted eslint.config.mjs and ran nuxi prepare, but no files were generated in .nuxt.

Image

Its generated (should be) when you run yarn dev not when you run nuxi prepare

5ym commented

What is the reason why it is no longer generated by nuxi prepare?
I want to use it for github actions.

5ym commented

@pjr94
Thanks for your comments.
Do you mean that I need to run npm run dev within github actions as well?

We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info.
Please provide a minimal reproduction to reopen the issue.
Thanks.

Why reproduction is required