Skip to content

Latest commit

 

History

History
62 lines (40 loc) · 2.18 KB

CONTRIBUTING.md

File metadata and controls

62 lines (40 loc) · 2.18 KB

How to Contribute

General Guidelines

  • Use an editor with an inline linter

Commits

  • Follow the conventional commits practice for all commits
  • Every commit should represent a complete, working state for the system

Branching and Pull Requests

  • Push work to branches named fixes/* or features/*
  • Open a pull request with the prefix WIP: as soon as you first push a new branch
  • When the PR is ready for merging, remove the WIP: prefix and assign a reviewer

Additionally, for work based on a JIRA issue:

  • Reference the issue number in the branch name: fixes/LP11-hotjar-siteid

PHP Style Guide

Auto-format PHP sources

Run this command to auto-format all .php files:

./vendor/bin/phpcbf

JavaScript Style Guide

Auto-format JS sources

This command will auto-format all .js files that your current branch adds, run it from the root of the repository:

yarn run eslint --fix `git diff --name-only --diff-filter=A origin/main HEAD | grep '.js'`

Common Style Guide

Configure your editor to lint in realtime based on .editorconfig, .phpcs.xml, and .eslintrc.js

Naming conventions

  • Avoid abbreviations and Hungarian notation
  • Aim for minimal but descriptive naming
  • For consistency, refer to existing code and use same names or similar naming patterns
  • Use camelCase