Skip to content

techeeks/standards

 
 

Repository files navigation

Coding Standards

Coding Standards and Practices for Javascript/ES6 used by Pillar.

General

  • Resolve all errors or warnings before pushing to production!

Variable Names

Variable name specifying content type followed by variable name using first upper-case letters.

  • sVariableName strings
  • iVariableName integers
  • nVariableName floats
  • aVariableName arrays
  • oVariableName objects
  • bVariableName booleans
  • fVariableName functions and callbacks
  • tVariableName unix timestamps

Also welcome:

  • isVariableName booleans
  • hasVariableName booleans

Class Names

Use first upper-case letters for both class and file names.

  • ClassName

Comments and Documenting

Class

/**
 * @name ClassName
 *
 * @description
 * - Description 1
 * - Description 2
 * - Description 3
 * - ...
 */

Class::Functions

/**
 * @name ClassName.functionName
 * @function
 *
 * @param   {type}   xVariableName   Description
 * @param   {type}   ...             ...
 *
 * @returns {type}   xVariableName   Description
 *
 * @description
 * - Description 1
 * - Description 2
 * - Description 3
 * - ...
 */

Class::Properties

/**
 * @name ClassName.propertyName
 * @object
 *
 * @description
 * - Description
 * - ...
 */

Code Explanations

// Explanation content
// ...

Todo

// TODO: Task description

References

  1. Folder Structure
  2. Angular Documentation
  3. CSS BEM Syntax

About

Coding Standards and Practices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%