Skip to content

Commit

Permalink
fix(@angular/cli): remove mention of 'ng update' from lint warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Lyding authored and hansl committed Mar 24, 2017
1 parent b25aef2 commit be0762b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
7 changes: 1 addition & 6 deletions packages/@angular/cli/tasks/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as ts from 'typescript';
import { requireProjectModule } from '../utilities/require-project-module';
import { CliConfig } from '../models/config';
import { LintCommandOptions } from '../commands/lint';
import { oneLine } from 'common-tags';

interface CliLintConfig {
files?: (string | string[]);
Expand All @@ -21,11 +20,7 @@ export default Task.extend({
const lintConfigs: CliLintConfig[] = CliConfig.fromProject().config.lint || [];

if (lintConfigs.length === 0) {
ui.writeLine(chalk.yellow(oneLine`
No lint config(s) found.
If this is not intended, run "ng update".
`));

ui.writeLine(chalk.yellow('No lint configuration(s) found.'));
return Promise.resolve(0);
}

Expand Down
14 changes: 2 additions & 12 deletions tests/e2e/tests/lint/lint-no-config-section.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,13 @@ export default function () {
.then(() => ng('set', 'lint', '[]'))
.then(() => ng('lint'))
.then(({ stdout }) => {
if (!stdout.match(/No lint config\(s\) found\./)) {
if (!stdout.match(/No lint configuration\(s\) found\./)) {
throw new Error(oneLine`
Expected to match "No lint configs found."
Expected to match "No lint configuration(s) found."
in ${stdout}.
`);
}

return stdout;
})
.then((output) => {
if (!output.match(/If this is not intended, run "ng update"\./)) {
throw new Error(oneLine`
Expected to match "If this is not intended, run "ng update"."
in ${output}.
`);
}

return output;
});
}

0 comments on commit be0762b

Please sign in to comment.