From 8e82a4a66d8d40d977d4e148f97eaebdd8c48253 Mon Sep 17 00:00:00 2001 From: "J.D. Sandifer" Date: Sun, 23 Apr 2017 07:48:42 -0700 Subject: [PATCH] [Docs] Edit for clarity Around line 143, gave "constants" its own bullet point. Although it is a form of variable or field, it also forms a separate style element with a different guideline. It's also easier to find when skimming when separated - for new contributors who need to learn the style, and veteran contributors who are just double checking. --- CONTRIBUTING.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 29dbbc46cc..a9db522827 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -139,12 +139,12 @@ JavaScript sources in Open MCT should: * Classes should use camel case, first letter capitalized (e.g. SomeClassName.) * Methods, variables, fields, and function names should use camel case, - first letter lower-case (e.g. someVariableName.) Constants - (variables or fields which are meant to be declared and initialized - statically, and never changed) should use only capital letters, with - underscores between words (e.g. SOME_CONSTANT.) - * File name should be the name of the exported class, plus a .js extension - (e.g. SomeClassName.js) + first letter lower-case (e.g. someVariableName.) + * Constants (variables or fields which are meant to be declared and + initialized statically, and never changed) should use only capital + letters, with underscores between words (e.g. SOME_CONSTANT.) + * File names should be the name of the exported class, plus a .js extension + (e.g. SomeClassName.js). * Avoid anonymous functions, except when functions are short (a few lines) and/or their inclusion makes sense within the flow of the code (e.g. as arguments to a forEach call.)