Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auto Fix is enabled by default. Use the single string form

When I configure my vscode with eslint & prettier, I met a problem in .settings.json file with error message "Auto Fix is enabled by default. Use the single string form.": enter image description here

My eslint configuration is:

enter image description here

My prettier configuration is:

module.exports = {
  singleQuote: true,
  semi: false
}

Does anybody know what's the reason and how to fix?

like image 270
LegendOfFire Avatar asked Apr 20 '20 06:04

LegendOfFire


1 Answers

It seems a tab width issue, try add "tabWidth": 4 in your prettier config.

EDIT:

According to ESLint Reference: "eslint.validate" is an array of language identifiers specifying the files for which validation is to be enforced.

"eslint.validate" accept an array of language identifiers, not an array of objects.

No need for "autoFix", it defaults to be true.

So your settings should be:

"eslint.validate": [
    "vue",
    "html",
    "javascript"
]
like image 132
Yan Avatar answered Sep 18 '22 17:09

Yan