-
Notifications
You must be signed in to change notification settings - Fork 1
Using Prettier to Check Code Formatting
Rueben van der Westhuizen edited this page Jun 2, 2024
·
1 revision
Ensure you have Node.js and npm installed. If not, you can download and install them from
To check the formatting of all JavaScript and TypeScript files in your project, use the following command:
npx prettier --check "**/*.{js,ts}"
To format all JavaScript and TypeScript files in your project, use the following command:
npx prettier --write "**/*.{js,ts}"
~ Additionally we can add husky to do this automatically if this is not already the case