From ad7b6a9cdc0935bd47c6bea9a85067bd4b2384f7 Mon Sep 17 00:00:00 2001 From: Jesse Squires Date: Sun, 19 Jan 2020 16:52:03 -0800 Subject: [PATCH] Update CONTRIBUTING.md --- CONTRIBUTING.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bffbe78..cf29ddc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,6 +12,7 @@ - [Submitting Pull Requests](#repeat-submitting-pull-requests) - [Writing Commit Messages](#memo-writing-commit-messages) - [Code Review](#white_check_mark-code-review) +- [Coding Style](#nail_care-coding-style) - [Certificate of Origin](#medal_sports-certificate-of-origin) - [Credits](#pray-credits) @@ -151,6 +152,14 @@ See also: #456, #789 - Kindly note any violations to the guidelines specified in this document. +## :nail_care: Coding Style + +Consistency is the most important. Following the existing style, formatting, and naming conventions of the file you are modifying and of the overall project. Failure to do so will result in a prolonged review process that has to focus on updating the superficial aspects of your code, rather than improving its functionality and performance. + +For example, if all private properties are prefixed with an underscore `_`, then new ones you add should be prefixed in the same way. Or, if methods are named using camelcase, like `thisIsMyNewMethod`, then do not diverge from that by writing `this_is_my_new_method`. You get the idea. If in doubt, please ask or search the codebase for something similar. + +When possible, style and format will be enforced with a linter. + ## :medal_sports: Certificate of Origin *Developer's Certificate of Origin 1.1*