diff --git a/packages/angular/cli/src/command-builder/command-module.ts b/packages/angular/cli/src/command-builder/command-module.ts index 7c1b2026c7ce..7d772e50cd06 100644 --- a/packages/angular/cli/src/command-builder/command-module.ts +++ b/packages/angular/cli/src/command-builder/command-module.ts @@ -226,18 +226,12 @@ export abstract class CommandModule implements CommandModuleI ...(this.context.args.options.help ? { default: defaultVal } : {}), }; - // TODO(alanagius4): remove in a major version. - // the below is an interim workaround to handle options which have been defined in the schema with `no` prefix. let dashedName = strings.dasherize(name); + + // Handle options which have been defined in the schema with `no` prefix. if (type === 'boolean' && dashedName.startsWith('no-')) { dashedName = dashedName.slice(3); booleanOptionsWithNoPrefix.add(dashedName); - - // eslint-disable-next-line no-console - console.warn( - `Warning: '${name}' option has been declared with a 'no' prefix in the schema.` + - 'Please file an issue with the author of this package.', - ); } if (positional === undefined) { @@ -258,8 +252,7 @@ export abstract class CommandModule implements CommandModuleI } } - // TODO(alanagius4): remove in a major version. - // the below is an interim workaround to handle options which have been defined in the schema with `no` prefix. + // Handle options which have been defined in the schema with `no` prefix. if (booleanOptionsWithNoPrefix.size) { localYargs.middleware((options: Arguments) => { for (const key of booleanOptionsWithNoPrefix) { diff --git a/tests/legacy-cli/e2e/tests/misc/negated-boolean-options.ts b/tests/legacy-cli/e2e/tests/misc/negated-boolean-options.ts index 7ad94de1c907..377967785496 100644 --- a/tests/legacy-cli/e2e/tests/misc/negated-boolean-options.ts +++ b/tests/legacy-cli/e2e/tests/misc/negated-boolean-options.ts @@ -15,10 +15,4 @@ export default async function () { ['generate', './schematic-boolean-option-negated:test', '--watch'], /noWatch: false/, ); - - await execAndWaitForOutputToMatch( - 'ng', - ['generate', './schematic-boolean-option-negated:test'], - /'noWatch' option has been declared with a 'no' prefix in the schema/, - ); }