1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const common_tags_1 = require("common-tags");
|
4 | const Command = require('../ember-cli/lib/models/command');
|
5 | exports.default = Command.extend({
|
6 | name: 'lint',
|
7 | aliases: ['l'],
|
8 | description: 'Lints code in existing project.',
|
9 | works: 'insideProject',
|
10 | availableOptions: [
|
11 | {
|
12 | name: 'fix',
|
13 | type: Boolean,
|
14 | default: false,
|
15 | description: 'Fixes linting errors (may overwrite linted files).'
|
16 | },
|
17 | {
|
18 | name: 'force',
|
19 | type: Boolean,
|
20 | default: false,
|
21 | description: 'Succeeds even if there was linting errors.'
|
22 | },
|
23 | {
|
24 | name: 'format',
|
25 | alias: 't',
|
26 | type: String,
|
27 | default: 'prose',
|
28 | description: common_tags_1.oneLine `
|
29 | Output format (prose, json, stylish, verbose, pmd, msbuild, checkstyle, vso, fileslist).
|
30 | `
|
31 | }
|
32 | ],
|
33 | run: function (commandOptions) {
|
34 | const LintTask = require('../tasks/lint').default;
|
35 | const lintTask = new LintTask({
|
36 | ui: this.ui,
|
37 | project: this.project
|
38 | });
|
39 | return lintTask.run(commandOptions);
|
40 | }
|
41 | });
|
42 |
|
\ | No newline at end of file |