-
Create branches from
main. -
Branch naming:
feat/<name>fix/<name>style/<name>
-
Do not push directly to
main. -
Open a Pull Request before merging.
-
Use squash merge.
-
Delete branch after merge.
Format:
<type>(<scope>): <short summary> # max 50 chars
<optional body wrapped at 72 chars>
<optional footer>
Types:
feat,fix,style,refactor,docs,chore,test
Scopes:
layout,header,footer,nav,home,about,css,assets
Rules:
- Use present tense (e.g., "add", "fix", "update").
- Keep summary under 50 characters.
- Follow Conventional Commits: https://www.conventionalcommits.org/en/v1.0.0/
Examples:
feat(nav): add mobile dropdown menufix(layout): prevent footer overlapstyle(css): reindent card component
- Use 4 spaces for indentation.
- Applies to all HTML and CSS files.
- Follow the project’s
.editorconfig.
-
Lowercase and hyphen-separated.
-
No spaces.
-
Examples:
about-us.htmlmain-navigation.css
- Use semantic elements (
header,nav,main,section,footer). - No inline styles.
- No inline CSS in HTML files.
- Images must include
altattributes. - Keep indentation consistent (4 spaces).
Use BEM for CSS classes:
.block.block__element.block--modifier.block__element--modifier
Rules:
- Avoid ID selectors for styling.
- One declaration per line.
- Keep selectors simple and readable.
Before merging:
- Code follows BEM.
- Indentation uses 4 spaces.
- Commit message follows the format.
- Pull Request reviewed by at least one teammate.