I would like to introduce how to install Prettier which is code formatter and a configuration to co-exist with ESLint
Prettier is a code formatter with support for:
- CSS, Less, SCSS
- Markdown(GitHub Flavored Markdown)
It ensures that all output code confirms to a consistent style.
Some merits for using Prettier are as follows:
- Building and enforcing a style guide
- Easy to adopt
- Clean up an existing codebase
Install with yarn:
Modify ESLint configuration:
Add the following commands to the
package.json to format all files before commit:
Add a .prettierrc for formatting overrides like this
🖥 Recommended VPS Service
VULTR provides high performance cloud compute environment for you.
Vultr has 15 data-centers strategically placed around the globe, you can use a VPS with 512 MB memory for just $ 2.5 / month ($ 0.004 / hour).
In addition, Vultr is up to 4 times faster than the competition, so please check it => Check Benchmark Results!!