Skip to content

Commit 3d91d53

Browse files
Broccohansl
authored andcommitted
Update lint command
1 parent 6c42036 commit 3d91d53

File tree

2 files changed

+18
-47
lines changed

2 files changed

+18
-47
lines changed
Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
1-
import { Command, CommandScope, Option } from '../models/command';
1+
import { CommandScope, Option } from '../models/command';
2+
import { ArchitectCommand } from '../models/architect-command';
23

3-
export interface LintCommandOptions {
4-
fix?: boolean;
5-
typeCheck?: boolean;
6-
format?: string;
7-
force?: boolean;
4+
export interface RunOptions {
5+
app?: string;
6+
configuration?: string;
87
}
98

10-
export default class LintCommand extends Command {
9+
export default class LintCommand extends ArchitectCommand {
1110
public readonly name = 'lint';
11+
public readonly target = 'tslint';
1212
public readonly description = 'Lints code in existing project.';
1313
public static aliases = ['l'];
1414
public readonly scope = CommandScope.inProject;
15-
public readonly arguments: string[] = [];
16-
public readonly options: Option[] = [];
15+
public readonly arguments: string[] = ['app'];
16+
public readonly options: Option[] = [
17+
this.configurationOption
18+
];
1719

18-
public async run(options: LintCommandOptions) {
19-
const LintTask = require('../tasks/lint').default;
20-
21-
const lintTask = new LintTask({
22-
ui: this.ui,
23-
project: this.project
20+
public async run(options: RunOptions) {
21+
const overrides = {...options};
22+
delete overrides.app;
23+
return this.runArchitect({
24+
app: options.app,
25+
configuration: options.configuration,
26+
overrides
2427
});
25-
26-
return await lintTask.run(options);
2728
}
2829
}

packages/@angular/cli/tasks/lint.ts

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)