/aip-week5

Primary LanguageJavaScript

AIP - Homize

Coding Standards

General

  • Use UNIX-style line endings (LF)
  • use empty lines at end of file
  • cut too long lines based on context
  • comments in english
  • name with camelCase

JS

  • Only use multi-line comments
  • use const, let avoid var
  • spacing as followed:
    • function name(param1, param2) {}
    • const a = { a: 1, b: 'asd' }
  • use literal object and array creation:
    • const a = {}
    • const b = []
  • split up long arrays and object into multiple lines

React

  • One Component per file
  • Always use JSX syntax
  • Use class instead of React.createClass