Use Prettier to make your code uniform and maintain code style integrity.

Refer to official documentation for detailed usage. →


All required configurations will be handled automatically by CLI as long as you choose plugins during the project creation phase.

"scripts": {
"prettier": "prettier '**/*.{js,jsx,ts,tsx}'"
"dependencies": {
"prettier": "^2.2.1"

Prettier uses cosmiconfig for configuration file support. This means you can configure Prettier in the ways specified in the original document.

"semi": true,
"trailingComma": "all",
"singleQuote": false,
"printWidth": 80,
"tabWidth": 4

To exclude files from formatting, create a .prettierignore file in the root of your project.


Adding Prettier to your project later#

npm i -D prettier
Last updated on by Necati Özmen