diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f11e667..0ff6873 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,6 +33,16 @@ npm run lint This command will execute ESLint on your project files and report any errors or warnings. +### Running the Formatter + +To format your code, run the following command: + +```bash +npm run format +``` + +This command will execute Prettier on your project files and apply consistent formatting according to the rules defined in your configuration. + ## Maintainers This project is actively maintained by: diff --git a/README.md b/README.md index 0f5c1ef..adef21e 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,16 @@ npm run lint This command will execute ESLint on your project files and report any errors or warnings. +### Running the Formatter + +To format your code, run the following command: + +```bash +npm run format +``` + +This command will execute Prettier on your project files and apply consistent formatting according to the rules defined in your configuration. + ## Contributing to Hacktoberfest 2024 🎉 ![hecktoberfest](https://github.com/user-attachments/assets/9352e904-6b2d-495e-8140-1437e385ffdb) diff --git a/package.json b/package.json index a9b006b..19b8339 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,7 @@ "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "format": "prettier --write .", + "prettier": "prettier --check .", "lint": "eslint ." }, "keywords": [],