mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-20 21:42:38 +08:00
refactor(@angular-devkit/build-angular): remove useless variable rename
This commit is contained in:
parent
0003adf757
commit
61adf9ae35
@ -37,15 +37,17 @@ async function _loadTslint() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
async function _run(config: TslintBuilderOptions, context: BuilderContext): Promise<BuilderOutput> {
|
async function _run(
|
||||||
|
options: TslintBuilderOptions,
|
||||||
|
context: BuilderContext,
|
||||||
|
): Promise<BuilderOutput> {
|
||||||
const systemRoot = context.workspaceRoot;
|
const systemRoot = context.workspaceRoot;
|
||||||
process.chdir(context.currentDirectory);
|
process.chdir(context.currentDirectory);
|
||||||
const options = config;
|
const projectName = (context.target && context.target.project) || '<???>';
|
||||||
const projectName = context.target && context.target.project || '<???>';
|
|
||||||
|
|
||||||
// Print formatter output only for non human-readable formats.
|
// Print formatter output only for non human-readable formats.
|
||||||
const printInfo = ['prose', 'verbose', 'stylish'].includes(options.format || '')
|
const printInfo =
|
||||||
&& !options.silent;
|
['prose', 'verbose', 'stylish'].includes(options.format || '') && !options.silent;
|
||||||
|
|
||||||
context.reportStatus(`Linting ${JSON.stringify(projectName)}...`);
|
context.reportStatus(`Linting ${JSON.stringify(projectName)}...`);
|
||||||
if (printInfo) {
|
if (printInfo) {
|
||||||
@ -72,8 +74,14 @@ async function _run(config: TslintBuilderOptions, context: BuilderContext): Prom
|
|||||||
|
|
||||||
let i = 0;
|
let i = 0;
|
||||||
for (const program of allPrograms) {
|
for (const program of allPrograms) {
|
||||||
const partial
|
const partial = await _lint(
|
||||||
= await _lint(projectTslint, systemRoot, tslintConfigPath, options, program, allPrograms);
|
projectTslint,
|
||||||
|
systemRoot,
|
||||||
|
tslintConfigPath,
|
||||||
|
options,
|
||||||
|
program,
|
||||||
|
allPrograms,
|
||||||
|
);
|
||||||
if (result === undefined) {
|
if (result === undefined) {
|
||||||
result = partial;
|
result = partial;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user