Skip to content

Instantly share code, notes, and snippets.

View c0dezer019's full-sized avatar

Brian Blankenship c0dezer019

View GitHub Profile
@c0dezer019
c0dezer019 / setting_up_eslint_prettier.md
Last active October 23, 2020 17:23
How to setup ESLint and Prettier for your project

Setting Up ESLint and Prettier

ESLint checks for syntax and formatting errors. Prettier will automatically format your code to those stands.

Note upon Prettier placing trailing commas : It is an ES5 standard to place a trailing comma after the last property of an object to ease workflow and reduce chances of a comma being overlooked when new properties are added. This is not an error.

  1. Download Prettier and ESLint extension from marketplace to install into VS Code.
  2. Download ESLint and Prettier into your project

$ npm install --save-dev eslint eslint-config-prettier eslint-plugin-prettier eslint-plugin-react eslint-plugin-react-hooks prettier