-
-
Notifications
You must be signed in to change notification settings - Fork 118
CodeGuidelines And Conventions
Divyanshu Rawat edited this page Mar 15, 2020
·
10 revisions
- Please don't commit your
package-lock.json
until & unless you are not adding a new package. - Please create a new feature branch from
develop
not frommaster
, and also create a pull request todevelop
not tomaster
.
- Use camelCase for defining variable as
const
,let
. - Use camelCase for
className
. - Use camelCase for function and method names.
- Use camelCase for property names and local variables.
- Use
ignitus-PascalCase
fordirectories
. e.g -ignitus-CoreTeam
,ignitus-AboutPage
.
- Use SVG Icons defined in
ignitus-Icons
, if you don't find the icon you want to use download its SVG fromfontAwesome/Material-icons
, please don't forget to give them credits by leaving a comment in the file.
- Do not export
types
orfunctions
unless you need to share it across multiple components. - Do not introduce new types or values to the
global namespace
.
- Use 'single quotes' for strings.
- Use
arrow functions
=> over anonymous function expressions. - Always surround loop and conditional bodies with curly braces.
- Please resolve all suggestions by
hound
.
- Please move all
relative imports
afterabsolute imports
. - CSS properties should be ordered in alphabetical order.
- Please don't use
IDS
inhtml
tags. - Please use semantic
classNames
that makes some sense about the content inside them. - Please use
rem
everywhere instead ofem
,px
,vw
. - Colours should be written in
hexadecimal
form and should be picked fromcolors.ts
, if it is not present there then create a newconst
for that colour. - Please avoid
inline-styles
.
background, border, border-radius, color, font-size, font-weight, padding,
- If you get any err similar to this Node
SASS
could not find a binding for your current environment, try switching node version tov8.16.2
.