Skip to content

Latest commit

 

History

History
41 lines (26 loc) · 1.76 KB

CONTRIBUTING.md

File metadata and controls

41 lines (26 loc) · 1.76 KB

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue.

Issues and Pull Requests

Please use provided templates for issues and pull requests. If you don't give the details these templates ask for it will be harder to address your issue and/or review your code.

Coding Style

This repository adheres (or at least tries 😉) to WordPress Coding Standards for PHP and JavaScript. The exceptions are:

  • Indentation with spaces, not tabs
  • PHP indentation: 2 spaces

The code you submit should follow these rules.

PHP

For PHP files rules are enforced by PHP Code Sniffer with the WordPress standard. Refer to the official repository for more information.

README.md contains information on how to use PHP Code Sniffer in this project. This is very helpful in fixing style issues. You can also use the phpcbf command to resolve some style issues automatically.

JavaScript

Currently there are no automated style checks for JS files so please double-check your code. Eslint is set up but it only performs basic syntax checks.

If you have any style related questions you can include them in your PR's description or in a related issue.

Pull Request Process

  1. Discuss your changes in an issue first.
  2. Make sure the npm run build command runs without errors.
  3. Make sure the phpcs --tab-width=2 command runs without errors or warnings. Remember this should be executed on the Vagrant machine.
  4. Open a new pull request by filling out the template.