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

Prettier conflicts with ESLint after VSCode update #1613

Closed
Darkzarich opened this issue Oct 20, 2020 · 2 comments
Closed

Prettier conflicts with ESLint after VSCode update #1613

Darkzarich opened this issue Oct 20, 2020 · 2 comments
Labels
locked Please open a new issue and fill out the template instead of commenting.

Comments

@Darkzarich
Copy link

Darkzarich commented Oct 20, 2020

Summary

After VSCode got updated to version 1.50.1 Prettier started to conflict with ESLint. There is .eslintrc.js in my project folder and it states that I prefer using single quotes but from the log output of Prettier I see singleQuote": false, it puts double quotes everywhere and it's not the only rule that gets ignored. I believe there is some conflict happening that wasn't here before the update: when I press save all single quotes become double quotes but if I press save again for a split second quotes turn into single quotes and then double quotes again

gif

Everything was working fine before the update so there shouldn't be any problem with configs I think...

Additional information

VS Code Version: 1.50.1

Prettier Extension Version: v5.7.1

OS and version: Windows 10

Prettier Log Output

["INFO" - 03:18:20] Formatting m:\X\myproject\src\main\index.js
["INFO" - 03:18:20] Using ignore file (if present) at m:\X\myproject\.prettierignore
["INFO" - 03:18:20] Using bundled version of prettier.
["INFO" - 03:18:20] File Info:
{
  "ignored": false,
  "inferredParser": "babel"
}
["INFO" - 03:18:20] No local configuration (i.e. .prettierrc or .editorconfig) detected, falling back to VS Code configuration
["INFO" - 03:18:20] Prettier Options:
{
  "arrowParens": "always",
  "bracketSpacing": true,
  "endOfLine": "lf",
  "htmlWhitespaceSensitivity": "css",
  "insertPragma": false,
  "jsxBracketSameLine": false,
  "jsxSingleQuote": false,
  "printWidth": 80,
  "proseWrap": "preserve",
  "quoteProps": "as-needed",
  "requirePragma": false,
  "semi": true,
  "singleQuote": false,
  "tabWidth": 2,
  "trailingComma": "es5",
  "useTabs": false,
  "vueIndentScriptAndStyle": false,
  "filepath": "m:\\X\\myproject\\src\\main\\index.js",
  "parser": "babel"
}
["INFO" - 03:18:20] Formatting completed in 153.839501ms.
@Darkzarich
Copy link
Author

I've solved this issue just now: apparently I somehow turned on vscode settings line editor. formatOnSave and it was conflicting with a similar line from ESLint config. Now everything is alright!

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the locked Please open a new issue and fill out the template instead of commenting. label Jan 22, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

No branches or pull requests

1 participant