node package manager
Don’t reinvent the wheel. Reuse code within your team. Create a free org »

tslint-origin-ordered-imports-rule

TSLint Origin Ordered Imports Rule

Custom rule for tslint

Strict order for imports (node_modules imports must be higher than custom imports).

Right:

import * as _ from 'lodash';
 
import MyClass from './my-class';

Wrong:

import MyClass from './my-class';
 
import * as _ from 'lodash';

Installing / Getting started

Install:

npm i -D tslint-origin-ordered-imports-rule

Edit your tslint.json file:

"rulesDirectory"[
  "node_modules/tslint-origin-ordered-imports-rule/dist"
],
"rules"{
    "origin-ordered-imports": true
}

Licensing

"The code in this project is licensed under MIT license."