Skip to content

Latest commit

 

History

History
72 lines (53 loc) · 1.9 KB

STYLE_GUIDE.md

File metadata and controls

72 lines (53 loc) · 1.9 KB

iTalanta Opensource coding style guide

Looking for an opinionated guide to syntax, conventions, and application structure? Step right in. This style guide presents preferred conventions and, as importantly, explains why.

Project Structure

Before we get started you need to understand how this project is structured.

.
└── italanta-apps/
    ├── .github
    ├── apps/
    │   └── elewa-website/
    ├── libs/
    │   ├── elements/
    │   ├── features/
    │   ├── model/
    │   └── data/
    ├── public/
    ├── tools/
    │   ├── generators/
    │   └── scripts/
    ├── .editorconfig
    ├── .eslintrc.json
    ├── .firebaserc
    ├── .gitignore
    ├── .prettierignore
    ├── .prettierrc
    ├── CODE_OF_CONDUCT.md
    ├── CONTRIBUTING.md
    ├── decorate-angular-cli.js
    ├── firebase.json
    ├── jest.config.ts
    ├── jest.preset.js 
    ├── LICENSE.md 
    ├── nx.json
    ├── package-lock.json
    ├── package.json 
    ├── README.md 
    └── tsconfig.base.json 

Ordering of Imports in an Angular application

The following is the convention we use when ordering Imports:

// Angular core imports

// Third party imports e.g RXJS

// Model imports  (They are located in italanta-apps/libs/model)

// State imports (They are located in italanta-apps/libs/state)

// Elements imports (They are located in italanta-apps/libs/elements)

// Features imports (They are located in italanta-apps/libs/features)

// local imports (e.g. ../../…) to this file e.g components, services, )

Coding Style

The project folows coding convetions adopted form the following:

  1. Angular style guide

  2. TypeScript StyleGuide