angular-cli/rules/Rule.ts
Hans Larsen 483cbe2665 refactor: add tslint-sonarts and a lot of tslint rules
This should clean up the code a bit.

Note: at first I added the no-useless-cast rule, but after getting frustrated
with it (as it has many false positive), I decided to remove the rule but some
useless casts were removed so I let those in the PR.
2018-07-10 15:07:36 -07:00

28 lines
721 B
TypeScript

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as Lint from 'tslint';
import * as ts from 'typescript';
// An empty rule so that tslint does not error on rules '//' (which are comments).
export class Rule extends Lint.Rules.AbstractRule {
public static metadata: Lint.IRuleMetadata = {
ruleName: '//',
type: 'typescript',
description: ``,
rationale: '',
options: null,
optionsDescription: `Not configurable.`,
typescriptOnly: false,
};
public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
return [];
}
}