mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 10:33:43 +08:00
* docs: add README files to all root folders Except benchmark and tools. * refactor: move rules/ directory to etc/ And fix a linting error that was found while updating tslint usage * ci: lint errors out if TSLint shows a warning This is not a warning from the code itself, but from TSLint. For example, if a rule was missing, TSLint will just ignore the rule, show something on STDOUT and not fail. This fixes CI where local rules were missing for unknown reasons. It will now fail CI when that happens, which is the correct behaviour.
28 lines
721 B
TypeScript
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 [];
|
|
}
|
|
}
|