Skip to content

Commit a783985

Browse files
committed
docs: Add code formatting section to README
1 parent 73a1c86 commit a783985

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.md

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,29 @@ For detailed Docker setup instructions, please refer to:
126126
- [README.docker.md](README.docker.md) - Detailed Docker setup guide
127127
- [README.dockerhub.md](README.dockerhub.md) - Docker Hub specific information
128128

129+
## Code Formatting
130+
131+
This project uses [Prettier](https://prettier.io/) for consistent code formatting. Configuration is defined in the root `.prettierrc.json` file.
132+
133+
### Automatic Formatting
134+
135+
Formatting is automatically applied to staged files before each commit using [Husky](https://typicode.github.io/husky/) and [lint-staged](https://github.com/okonet/lint-staged). This ensures that all committed code adheres to the defined style guide.
136+
137+
### Manual Formatting
138+
139+
You can also manually format the code using the npm scripts available in both the `backend` and `frontend` directories:
140+
141+
```bash
142+
# Navigate to the respective directory (backend or frontend)
143+
cd backend # or cd frontend
144+
145+
# Format all relevant files
146+
npm run format
147+
148+
# Check if all relevant files are formatted correctly
149+
npm run format:check
150+
```
151+
129152
## License
130153

131-
MIT
154+
MIT

0 commit comments

Comments
 (0)