Skip to content

Latest commit

 

History

History
84 lines (81 loc) · 5.62 KB

LINTING.md

File metadata and controls

84 lines (81 loc) · 5.62 KB

Linting Set up

This project uses TS Lint to do Linting in combination with Codelyzer

1. Prerequisites

  • tslint.json has all the linting rules that are being followed for the project
  • Make sure that you have installed the application level dependencies
    cd TODOAngular2
    npm i

Note that you need to have tslint plugin install on your editor.

Codelyzer should work out of the box with Atom but for VSCode you will have to open Code > Preferences > User Settings, and enter the following config:

{
  "tslint.rulesDirectory": "./node_modules/codelyzer",
  "typescript.tsdk": "node_modules/typescript/lib"
}

How to Run Linting

  • Run the following command
     npm run lint

Linting Rules

These are the linting rules that are in place in this Angular project. For detailed tests and examples of most of these rules refer to this Github Repo

Codelyzer Rules

For details about these rules see this Github Repo. These are based on the Angular Style Guide