PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, October 17, 2022

[FIXED] How to fix "1 error potentially fixable with the `--fix` option" when using vue.js?

 October 17, 2022     eslint, vue.js     No comments   

Issue

When compiling my vue.js (v 3.10.0) project, I get a error which says "1 error potentially fixable with the --fix option." because of eslint.

I have already searched for some solutions, that said I had to change some config-files but I couldn't find any of the described files. I also tried to use npm run lint -- --fix and it worked, but I do not want to execute this line of code every time.

Is there any way to do this, so for example like to "disable" eslint?


Solution

You can run this command right before vue-cli-service build. Just modify your package.json "scripts" section. package.json:

...
"build": "npm run lint -- --fix && vue-cli-service build",
...

ES Lint removing:

Just drop these lines of code into your vue.config.js:

module.exports = {
    chainWebpack: config => {
        config.module.rules.delete('eslint');
    }
}


Answered By - Andrew Vasilchuk
Answer Checked By - Cary Denson (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing