Skip to content

Applied Prettier Formatting and Configured .prettierrc.json and .prettierignore#237

Open
sakina1303 wants to merge 1 commit intoAOSSIE-Org:mainfrom
sakina1303:main
Open

Applied Prettier Formatting and Configured .prettierrc.json and .prettierignore#237
sakina1303 wants to merge 1 commit intoAOSSIE-Org:mainfrom
sakina1303:main

Conversation

@sakina1303
Copy link
Contributor

@sakina1303 sakina1303 commented Feb 25, 2025

Description

-To maintain a uniform code style and enhance code quality across the project, Prettier formatting scripts have been added to package.json. These scripts enable developers to easily format code and check for adherence to predefined formatting rules. Additionally, a .prettierrc file has been created to define project-specific Prettier configuration rules, ensuring consistency and reducing the need for manual adjustments.

Changes Made

Added the necessary scripts in package.json:

Scripts were added to package.json to enable automatic code formatting and validation. One script formats all project files, while the other checks for adherence to Prettier rules without making changes.

Created a .prettierrc.json and prettierignore file to define custom Prettier configuration settings.


How It Works

npm run format → Automatically formats all files in the project according to Prettier rules.

npm run format:check → Checks if files follow Prettier formatting without making any changes.

.prettierrc.json → Stores the project's Prettier configuration to maintain consistent formatting across the codebase.

.prettierignore → Specifies files and directories that should be ignored by Prettier, preventing unnecessary formatting of certain files like build outputs, dependencies, or specific project files.

Benefits

  1. Consistent Code Formatting – Ensures uniform code style across the project, improving readability.
  2. Improved Collaboration – Reduces formatting-related conflicts in PR reviews.
  3. Better Maintainability – Clean and structured code makes future modifications easier.
  4. Automated Formatting – Saves time by automatically formatting files, reducing manual effort.
  5. Adheres to Best Practices – Enforces coding standards, making the codebase more professional.

Fixes #235

@sakina1303
Copy link
Contributor Author

Hi Sir @Aditya062003 ,
Awaiting your reviews and let me know if further improvement needed.
Thanks !

@Naman-B-Parlecha
Copy link
Contributor

Hey @sakina1303, I noticed that this feature is already implemented in my PR #118.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Prettier Formatting Scripts for Code Consistency

2 participants