Skip to content
This repository has been archived by the owner on Feb 26, 2021. It is now read-only.

Latest commit

 

History

History
58 lines (34 loc) · 1.27 KB

README.md

File metadata and controls

58 lines (34 loc) · 1.27 KB

This project is now deprecated.

tslint-rimeto


TSLint rules used at Rimeto.


Rules

sorted-imports

Enforces a case-insensitive sort of imports within groups. Inclues an autofix for reordering imports to conform to the rule, distinquishing it from similar rules including ordered-imports.

Usage

  1. Install via yarn/npm:

     yarn add --dev tslint
    
  2. Configure your tslint.json to extend tslint-rimeto, for example,

     {
       "extends": ["tslint:latest" "tslint-rimeto"],
       "rules": { ...
    
  3. Run tslint with --fix to autofix existing issues.

Examples

Autofixes unsorted input like,

    import * as Immutable from 'immutable';	
    import * as React from 'react';	
    import * as _ from 'lodash';	

    import RoutePath from '../../constants/RoutePath';
    import IAddress from '../../ifs/IAddress';

to be,

    import * as _ from 'lodash';
    import * as Immutable from 'immutable';
    import * as React from 'react';

    import IAddress from '../../ifs/IAddress';
    import RoutePath from '../../constants/RoutePath';

maintaining grouping and sorting within them.

License

tslint-rimeto is MIT licensed.