Skip to content

Instantly share code, notes, and snippets.

@kavitshah8
Last active August 1, 2019 18:38
Show Gist options
  • Save kavitshah8/d3851a3e6dc3118cb0f4c7b71866e589 to your computer and use it in GitHub Desktop.
Save kavitshah8/d3851a3e6dc3118cb0f4c7b71866e589 to your computer and use it in GitHub Desktop.

To setup your Visual Studio Code to run prettier to reprint the code on File Save follow these steps.

Now when you will save your file it will use ESLint --fix option which will run prettier to reprint entire code. Then it will run ESLint rules to catch the actual bugs in your code. This will also show red squiggly lines with errors.

  • Prettier Error Example: Delete ,eslint(prettier/prettier)
  • ESLint Error Example: Parsing error: Unexpected token {eslint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment