Skip to content

Commit 48296d2

Browse files
clydinBrocco
authored andcommitted
test: partial lint rule upgrade and fixes
1 parent 6a3245a commit 48296d2

39 files changed

+160
-127
lines changed

packages/@angular/cli/commands/add.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ import { tags, terminal } from '@angular-devkit/core';
22
import { NodePackageDoesNotSupportSchematics } from '@angular-devkit/schematics/tools';
33
import { CommandScope, Option } from '../models/command';
44
import { parseOptions } from '../models/command-runner';
5-
import { getPackageManager } from '../utilities/config';
65
import { SchematicCommand } from '../models/schematic-command';
76
import { NpmInstall } from '../tasks/npm-install';
7+
import { getPackageManager } from '../utilities/config';
88

99

1010
export default class AddCommand extends SchematicCommand {
@@ -33,7 +33,7 @@ export default class AddCommand extends SchematicCommand {
3333
if (!collectionName) {
3434
this.logger.fatal(
3535
`The "ng ${this.name}" command requires a name argument to be specified eg. `
36-
+ `${terminal.yellow('ng add [name] ')}. For more details, use "ng help".`
36+
+ `${terminal.yellow('ng add [name] ')}. For more details, use "ng help".`,
3737
);
3838

3939
return false;
@@ -48,7 +48,7 @@ export default class AddCommand extends SchematicCommand {
4848
if (!firstArg) {
4949
this.logger.fatal(
5050
`The "ng ${this.name}" command requires a name argument to be specified eg. `
51-
+ `${terminal.yellow('ng add [name] ')}. For more details, use "ng help".`
51+
+ `${terminal.yellow('ng add [name] ')}. For more details, use "ng help".`,
5252
);
5353

5454
return 1;

packages/@angular/cli/commands/build.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { Option, CommandScope } from '../models/command';
2-
import { Version } from '../upgrade/version';
31
import { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-command';
2+
import { CommandScope, Option } from '../models/command';
3+
import { Version } from '../upgrade/version';
44

55
export default class BuildCommand extends ArchitectCommand {
66
public readonly name = 'build';
@@ -11,7 +11,7 @@ export default class BuildCommand extends ArchitectCommand {
1111
public scope = CommandScope.inProject;
1212
public options: Option[] = [
1313
this.prodOption,
14-
this.configurationOption
14+
this.configurationOption,
1515
];
1616

1717
public validate(options: ArchitectCommandOptions) {

packages/@angular/cli/commands/config.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
import { writeFileSync } from 'fs';
2-
import { Command, Option } from '../models/command';
3-
import {
4-
getWorkspace,
5-
getWorkspaceRaw,
6-
migrateLegacyGlobalConfig,
7-
validateWorkspace,
8-
} from '../utilities/config';
91
import {
10-
JsonValue,
112
JsonArray,
123
JsonObject,
134
JsonParseMode,
5+
JsonValue,
146
experimental,
157
parseJson,
168
tags,
179
} from '@angular-devkit/core';
10+
import { writeFileSync } from 'fs';
11+
import { Command, Option } from '../models/command';
12+
import {
13+
getWorkspace,
14+
getWorkspaceRaw,
15+
migrateLegacyGlobalConfig,
16+
validateWorkspace,
17+
} from '../utilities/config';
1818

1919

2020
export interface ConfigOptions {
@@ -162,8 +162,8 @@ export default class ConfigCommand extends Command {
162162
type: Boolean,
163163
'default': false,
164164
aliases: ['g'],
165-
description: 'Get/set the value in the global configuration (in your home directory).'
166-
}
165+
description: 'Get/set the value in the global configuration (in your home directory).',
166+
},
167167
];
168168

169169
public run(options: ConfigOptions) {

packages/@angular/cli/commands/doc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ export default class DocCommand extends Command {
1717
aliases: ['s'],
1818
type: Boolean,
1919
default: false,
20-
description: 'Search whole angular.io instead of just api.'
21-
}
20+
description: 'Search whole angular.io instead of just api.',
21+
},
2222
];
2323

2424
public validate(options: Options) {

packages/@angular/cli/commands/e2e.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { CommandScope, Option } from '../models/command';
21
import { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-command';
2+
import { CommandScope, Option } from '../models/command';
33

44

55
export default class E2eCommand extends ArchitectCommand {
@@ -11,7 +11,7 @@ export default class E2eCommand extends ArchitectCommand {
1111
public readonly multiTarget = true;
1212
public readonly options: Option[] = [
1313
this.prodOption,
14-
this.configurationOption
14+
this.configurationOption,
1515
];
1616

1717
public run(options: ArchitectCommandOptions) {

packages/@angular/cli/commands/easter-egg.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Command, Option } from '../models/command';
21
import { terminal } from '@angular-devkit/core';
2+
import { Command, Option } from '../models/command';
33

44
function pickOne(of: string[]): string {
55
return of[Math.floor(Math.random() * of.length)];
@@ -21,7 +21,7 @@ export default class AwesomeCommand extends Command {
2121
`Nothing to do; already awesome. Exiting.`,
2222
`Error 418: As Awesome As Can Get.`,
2323
`I spy with my little eye a great developer!`,
24-
`Noop... already awesome.`
24+
`Noop... already awesome.`,
2525
]);
2626
this.logger.info(terminal.green(phrase));
2727
}

packages/@angular/cli/commands/generate.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1+
import { tags, terminal } from '@angular-devkit/core';
12
import { CommandScope, Option } from '../models/command';
3+
import { SchematicCommand } from '../models/schematic-command';
24
import { getDefaultSchematicCollection } from '../utilities/config';
35
import {
46
getCollection,
5-
getEngineHost
7+
getEngineHost,
68
} from '../utilities/schematics';
7-
import { tags, terminal } from '@angular-devkit/core';
8-
import { SchematicCommand } from '../models/schematic-command';
99

1010

1111
export default class GenerateCommand extends SchematicCommand {
@@ -15,7 +15,7 @@ export default class GenerateCommand extends SchematicCommand {
1515
public readonly scope = CommandScope.inProject;
1616
public arguments = ['schematic'];
1717
public options: Option[] = [
18-
...this.coreOptions
18+
...this.coreOptions,
1919
];
2020

2121
private initialized = false;

packages/@angular/cli/commands/help.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Command, Option } from '../models/command';
21
import { terminal } from '@angular-devkit/core';
2+
import { Command, Option } from '../models/command';
33

44

55
export default class HelpCommand extends Command {
@@ -18,7 +18,7 @@ export default class HelpCommand extends Command {
1818
.filter(cmd => !cmd.hidden && !cmd.unknown)
1919
.map(cmd => ({
2020
name: cmd.name,
21-
description: cmd.description
21+
description: cmd.description,
2222
}));
2323
this.logger.info(`Available Commands:`);
2424
commands.forEach(cmd => {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { CommandScope, Option } from '../models/command';
21
import { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-command';
2+
import { CommandScope, Option } from '../models/command';
33

44

55
export default class LintCommand extends ArchitectCommand {
@@ -10,7 +10,7 @@ export default class LintCommand extends ArchitectCommand {
1010
public readonly scope = CommandScope.inProject;
1111
public readonly multiTarget = true;
1212
public readonly options: Option[] = [
13-
this.configurationOption
13+
this.configurationOption,
1414
];
1515

1616
public async run(options: ArchitectCommandOptions) {

packages/@angular/cli/commands/new.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { CommandScope, Option } from '../models/command';
2-
import { getDefaultSchematicCollection } from '../utilities/config';
32
import { SchematicCommand } from '../models/schematic-command';
3+
import { getDefaultSchematicCollection } from '../utilities/config';
44

55

66
export default class NewCommand extends SchematicCommand {
@@ -18,14 +18,14 @@ export default class NewCommand extends SchematicCommand {
1818
type: Boolean,
1919
default: false,
2020
aliases: ['v'],
21-
description: 'Adds more details to output logging.'
21+
description: 'Adds more details to output logging.',
2222
},
2323
{
2424
name: 'collection',
2525
type: String,
2626
aliases: ['c'],
27-
description: 'Schematics collection to use.'
28-
}
27+
description: 'Schematics collection to use.',
28+
},
2929
];
3030

3131
private initialized = false;
@@ -41,7 +41,7 @@ export default class NewCommand extends SchematicCommand {
4141

4242
return this.getOptions({
4343
schematicName,
44-
collectionName
44+
collectionName,
4545
})
4646
.then((schematicOptions) => {
4747
this.options = this.options.concat(schematicOptions.options);
@@ -79,7 +79,7 @@ export default class NewCommand extends SchematicCommand {
7979
schematicOptions: options,
8080
debug: options.debug,
8181
dryRun: options.dryRun,
82-
force: options.force
82+
force: options.force,
8383
});
8484
}
8585

0 commit comments

Comments
 (0)