Skip to content

Latest commit

 

History

History
40 lines (32 loc) · 1.27 KB

FrontEnd_Standards.md

File metadata and controls

40 lines (32 loc) · 1.27 KB

General Code Styles for all Frontend Projects

Table of Contents

File Structure

Lines

Lines must:

  • Use spaces instead of tabs
  • Use 4 spaces for indentation
  • Use LF for the End of Line character
  • Not contain any trailing whitespace

Files

Files must

  • Use UTF-8 file encoding
  • Have a new line at the End of File
  • Have the same name as the module they are defining, using lowercase letters and dashes between words
    • TestService
      • test-service.{js|ts}
      • test-service.html
      • test-service.{Spec.js|spec.ts}

Variable, Function, Class, Constant and Module naming

  • Variables must use camelcase
  • Functions must use camelcase
  • Constants must use titlecase
  • Classes must use titlecase
    • constructor functions are not allowed to return any value. Reason
  • Modules must use titlecase