-
-
Save guilhermelimak/742312595931f4b0dc53f34da2051cc3 to your computer and use it in GitHub Desktop.
Add prettier to a node project in one script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add -D prettier | |
cat > ./.prettierrc <<EOL | |
{ | |
"printWidth": 80, | |
"singleQuote": true, | |
"trailingComma": "es5" | |
} | |
EOL | |
npx add-project-script -n "format:check" -v "prettier --check './src/**/*.{tsx,ts}'" | |
npx add-project-script -n "format" -v "prettier --write './src/**/*.{tsx,ts}'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment