what is Prettier
Tool that autoformats your code for you
explain npm i -D
same as:
npm install –save-dev
dev dependency means that application will work fine without it
Prettier vs ESLint
Formatter vs Linter
Linters have two categories of rules:
1. Formatting rules: eg: max-len, no-mixed-spaces-and-tabs, etc…
2. Code-quality rules: eg no-unused-vars, no-extra-bind, no-implicit-globals
Prettier does not not help with Code-quality Rules. It only does formatting.
use Prettier for formatting and linters for catching bugs!
what is npm
the package manager for Node.js.
npm allows you to bring in code from the npm registry which is a bunch of open source modules that people have written so you can use them in your project.
What we want from a build tool
Build tool examples: Vite, Parcel, Webpack
React community has currently selected Vite as tool of choice