TSLint rules used at Rimeto.
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
.
-
Install via yarn/npm:
yarn add --dev tslint
-
Configure your
tslint.json
to extendtslint-rimeto
, for example,{ "extends": ["tslint:latest" "tslint-rimeto"], "rules": { ...
-
Run
tslint
with--fix
to autofix existing issues.
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.
tslint-rimeto is MIT licensed.