Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import * as Lint from 'tslint';
- import * as ts from 'typescript';
- // Exported class always should be named "Rule" and extends Lint.Rules.AbstractRule
- export class Rule extends Lint.Rules.AbstractRule {
- public static FAILURE_STRING = 'Wrong import order';
- public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
- return this.applyWithWalker(new Walker(sourceFile, 'module-imports-order', this.getOptions()))
- }
- }
- class Walker extends Lint.AbstractWalker<any> {
- public walk(sourceFile: ts.SourceFile) {
- // Some code that will implement your rule logic
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement