Skip to content

Code Style Guide

michael - blurpesec edited this page Jul 29, 2020 · 10 revisions

Table of Contents

  1. Imports
  2. ToDos
  3. New libraries

Imports

Keep to the ordered format for imports as follows:

  1. External module imports
  2. Absolute imports (Use the @ operator to reference things in the /src directory)
  3. Relative imports ex.
import React from 'react';
import { Heading } from '@mycrypto/ui';

import { AccountContext, StoreContext } from '@services/Store';

import { actions } from './constants';
import './Dashboard.scss';

Libraries

Please avoid adding new libraries. If you do add one, please note it in your PR and a short description of what it is used for so that the person reviewing has a simple time understanding what it is/what it is used for.

ToDos

If you add a ToDo somewhere in the code, please use the format @todo: <explanation> so it's easily-searchable in the future.