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

CheckerOptions.fix #394

Closed
3 of 4 tasks
amery opened this issue Apr 15, 2024 · 3 comments
Closed
3 of 4 tasks

CheckerOptions.fix #394

amery opened this issue Apr 15, 2024 · 3 comments

Comments

@amery
Copy link

amery commented Apr 15, 2024

Describe the feature

NuxtConfig['eslint'] doesn't allow fix?: boolean anywhere, I would expect it as part of CheckerOptions to do something as follows:

const autoFix = true;

export default defineNuxtConfig({
  modules: [
    ...modules,
    '@nuxt/eslint',
  ],
  eslint: {
    checker: {
      lintOnStart: autoFix,
      fix: autoFix, // <--- wanted
    },
  },
});

fix was supported by the legacy module.
example repo: https://github.com/amery/go-nuxt-template/tree/main/web/client

Additional information

  • Would you be willing to help implement this feature?
  • Could this feature be implemented as a module?

Final checks

@amery amery changed the title ChckerOptions.fix CheckerOptions.fix Apr 15, 2024
@amery
Copy link
Author

amery commented Apr 16, 2024

that test repo has @stylistic/semi set to always, so seeing fix: true doesn't work is easy to reproduce.

✖ 1 problem (1 error, 0 warnings)
  1 error and 0 warnings potentially fixable with the `--fix` option.
  Plugin: vite:eslint2

@antfu
Copy link
Member

antfu commented Apr 18, 2024

It works for me -- it seems that it's just the type is not exposed, but the runtime it does work

@antfu antfu closed this as completed in 05f0005 Apr 18, 2024
@amery
Copy link
Author

amery commented Apr 18, 2024

Thank you 🙏🏻

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

2 participants