Skip to content

eslint autofix doesn't fire #12

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

Closed
kakajansh opened this issue Jul 24, 2019 · 8 comments
Closed

eslint autofix doesn't fire #12

kakajansh opened this issue Jul 24, 2019 · 8 comments
Assignees

Comments

@kakajansh
Copy link

eslint autofix fires when manually extended build in nuxt.config.json

build: {
  extend(config, ctx) {
    config.module.rules.push({
      enforce: "pre",
      test: /\.(js|vue)$/,
      loader: "eslint-loader",
      exclude: /(node_modules)/,
      options: {
        fix: true
      }
    })
  }
}

but below code doesn't work

devModules: [
  '@nuxtjs/eslint-module'
],

eslint: {
  fix: true
},

nor

devModules: [
  ['@nuxtjs/eslint-module', { fix: true }]
],

fresh nuxt project v2.8.1

@ricardogobbosouza
Copy link
Collaborator

ricardogobbosouza commented Jul 25, 2019

Hi @kakajansh I tried and I've not being able to reproduce your issue.
Can you either provide repository or a GIF of the blink ?

@kakajansh
Copy link
Author

I created new app with npx create-nuxt-app. It turns out that it didn't pull the latest version of nuxt-app. So there was installed "@nuxtjs/eslint-module": "^0.0.1" version. Upgrading deps resolves issue 👍

➜  npx create-nuxt-app nuxt-app
npx: installed 379 in 51.567s
create-nuxt-app v2.8.0
✨  Generating Nuxt.js project in /nuxt-app
? Project name nuxt-app
? Project description My divine Nuxt.js project
? Author name Kakajan SH
? Choose the package manager Npm
? Choose UI framework None
? Choose custom server framework None (Recommended)
? Choose Nuxt.js modules
? Choose linting tools ESLint
? Choose test framework None
? Choose rendering mode Single Page App

Maybe some related issues on create-nuxt-app repo:

@begueradj
Copy link

How did you fix this ? I have the same issue

@ricardogobbosouza
Copy link
Collaborator

ricardogobbosouza commented Nov 7, 2019

@begueradj check version @nuxtjs/eslint-module
please use the latest version v1.1.0

@tetreault
Copy link

npx create-nuxt-app still is using < v1.1.0

@bf
Copy link

bf commented Nov 25, 2020

I have the same issue, and my @nuxtjs/eslint-module is version 3.0.1

@metasean
Copy link

@ricardogobbosouza - I know this is an old issue, but I'm running into this with @nuxtjs/eslint-module 3.0.2.

Based on the fact that I'm running the latest published version and, in combination with @bf's comment, I really don't think the solution is "use the latest version".

Unfortunately, I haven't figured out a solution. If you have bandwidth to dig into this, doing so would be appreciated!

@kissu
Copy link

kissu commented Aug 20, 2021

@metasean what's the issue with using the latest version?

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

7 participants