refactor(@angular/cli): improved code quality

removed unused parameter and improved code quality
This commit is contained in:
alkavats1 2022-03-30 19:34:25 +05:30 committed by Alan Agius
parent af8dd62b74
commit 28721c3e64
6 changed files with 8 additions and 9 deletions

View File

@ -87,7 +87,6 @@ const packages = require('./packages').packages;
if (!__dirname.match(new RegExp(`\\${path.sep}node_modules\\${path.sep}`))) {
// We mock the module loader so that we can fake our packages when running locally.
const Module = require('module');
const oldLoad = Module._load;
const oldResolve = Module._resolveFilename;
Module._resolveFilename = function (request, parent) {

View File

@ -27,7 +27,7 @@ export class AnalyticsCommandModule extends CommandModule implements CommandModu
command = 'analytics';
describe =
'Configures the gathering of Angular CLI usage metrics. See https://angular.io/cli/usage-analytics-gathering';
longDescriptionPath?: string | undefined;
longDescriptionPath?: string;
builder(localYargs: Argv): Argv {
const subcommands = [

View File

@ -20,7 +20,7 @@ export class AnalyticsInfoCommandModule
{
command = 'info';
describe = 'Prints analytics gathering and reporting configuration in the console.';
longDescriptionPath?: string | undefined;
longDescriptionPath?: string;
builder(localYargs: Argv): Argv {
return localYargs.strict();

View File

@ -26,7 +26,7 @@ abstract class AnalyticsSettingModule
extends CommandModule<AnalyticsCommandArgs>
implements CommandModuleImplementation<AnalyticsCommandArgs>
{
longDescriptionPath?: string | undefined;
longDescriptionPath?: string;
builder(localYargs: Argv): Argv<AnalyticsCommandArgs> {
return localYargs

View File

@ -28,7 +28,7 @@ export class DocCommandModule
aliases = ['d'];
describe =
'Opens the official Angular documentation (angular.io) in a browser, and searches for a given keyword.';
longDescriptionPath?: string | undefined;
longDescriptionPath?: string;
builder(localYargs: Argv): Argv<DocCommandArgs> {
return localYargs

View File

@ -17,19 +17,19 @@ export class E2eCommandModule
multiTarget = true;
override missingErrorTarget = tags.stripIndents`
Cannot find "e2e" target for the specified project.
You should add a package that implements end-to-end testing capabilities.
For example:
Cypress: ng add @cypress/schematic
Nightwatch: ng add @nightwatch/schematics
WebdriverIO: ng add @wdio/schematics
More options will be added to the list as they become available.
`;
command = 'e2e [project]';
aliases = ['e'];
describe = 'Builds and serves an Angular application, then runs end-to-end tests.';
longDescriptionPath?: string | undefined;
longDescriptionPath?: string;
}