forked from angular/angular-cli
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlint.ts
29 lines (25 loc) · 750 Bytes
/
lint.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
const Command = require('../ember-cli/lib/models/command');
export interface LintCommandOptions {
fix?: boolean;
format?: string;
force?: boolean;
}
export default Command.extend({
name: 'lint',
aliases: ['l'],
description: 'Lints code in existing project',
works: 'insideProject',
availableOptions: [
{ name: 'fix', type: Boolean, default: false },
{ name: 'force', type: Boolean, default: false },
{ name: 'format', alias: 't', type: String, default: 'prose' }
],
run: function (commandOptions: LintCommandOptions) {
const LintTask = require('../tasks/lint').default;
const lintTask = new LintTask({
ui: this.ui,
project: this.project
});
return lintTask.run(commandOptions);
}
});