From 4e7a4543b85c3929e925300d2888d67c9bb24541 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Wed, 20 May 2020 16:04:46 -0700 Subject: [PATCH] style(dev-infra): correct tslint failures in dev-infra directory (#37233) Fixes tslint failures in dev-infra directory as the directory is now part of the tslint enforced files. PR Close #37233 --- .../component_benchmark/protractor-perf.conf.js | 2 +- dev-infra/benchmark/driver-utilities/index.ts | 2 +- dev-infra/pr/discover-new-conflicts/cli.ts | 8 ++++++++ dev-infra/pr/merge/cli.ts | 2 +- dev-infra/pr/merge/config.ts | 10 +++------- dev-infra/pr/merge/strategies/api-merge.ts | 2 +- dev-infra/pr/merge/strategies/autosquash-merge.ts | 8 ++++++++ dev-infra/pr/merge/strategies/commit-message-filter.js | 7 +++++++ dev-infra/ts-circular-dependencies/config.ts | 2 +- dev-infra/utils/github.ts | 5 +++-- dev-infra/utils/ts-node.ts | 2 +- 11 files changed, 35 insertions(+), 15 deletions(-) diff --git a/dev-infra/benchmark/component_benchmark/protractor-perf.conf.js b/dev-infra/benchmark/component_benchmark/protractor-perf.conf.js index 6f05c226c8..8ccf197b54 100644 --- a/dev-infra/benchmark/component_benchmark/protractor-perf.conf.js +++ b/dev-infra/benchmark/component_benchmark/protractor-perf.conf.js @@ -36,7 +36,7 @@ exports.config = { showColors: true, defaultTimeoutInterval: 90000, print: function(msg) { - console.log(msg); + console.info(msg); }, }, useAllAngular2AppRoots: true diff --git a/dev-infra/benchmark/driver-utilities/index.ts b/dev-infra/benchmark/driver-utilities/index.ts index 3afa6dbf48..979bdf3500 100644 --- a/dev-infra/benchmark/driver-utilities/index.ts +++ b/dev-infra/benchmark/driver-utilities/index.ts @@ -1,6 +1,6 @@ /** * @license - * Copyright Google Inc. All Rights Reserved. + * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license diff --git a/dev-infra/pr/discover-new-conflicts/cli.ts b/dev-infra/pr/discover-new-conflicts/cli.ts index 3b8d7dabb9..672afb3c14 100644 --- a/dev-infra/pr/discover-new-conflicts/cli.ts +++ b/dev-infra/pr/discover-new-conflicts/cli.ts @@ -1,3 +1,11 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + import {Arguments, Argv} from 'yargs'; import {error} from '../../utils/console'; diff --git a/dev-infra/pr/merge/cli.ts b/dev-infra/pr/merge/cli.ts index 1981fc48f9..b1d30223d6 100644 --- a/dev-infra/pr/merge/cli.ts +++ b/dev-infra/pr/merge/cli.ts @@ -17,7 +17,7 @@ export function buildMergeCommand(yargs: Argv) { return yargs.help().strict().option('github-token', { type: 'string', description: 'Github token. If not set, token is retrieved from the environment variables.' - }) + }); } /** Handles the merge command. i.e. performs the merge of a specified pull request. */ diff --git a/dev-infra/pr/merge/config.ts b/dev-infra/pr/merge/config.ts index 5476c611d9..08abfa29cc 100644 --- a/dev-infra/pr/merge/config.ts +++ b/dev-infra/pr/merge/config.ts @@ -38,7 +38,7 @@ export interface MergeRemote { /** Name of the repository. */ name: string; /** Whether SSH should be used for merging pull requests. */ - useSsh?: boolean + useSsh?: boolean; } /** @@ -87,15 +87,11 @@ export function loadAndValidateConfig(): {config?: MergeConfigWithRemote, errors const config: Partial = getConfig(); if (config.merge === undefined) { - return { - errors: ['No merge configuration found. Set the `merge` configuration.'] - } + return {errors: ['No merge configuration found. Set the `merge` configuration.']}; } if (typeof config.merge !== 'function') { - return { - errors: ['Expected merge configuration to be defined lazily through a function.'] - } + return {errors: ['Expected merge configuration to be defined lazily through a function.']}; } const mergeConfig = config.merge(); diff --git a/dev-infra/pr/merge/strategies/api-merge.ts b/dev-infra/pr/merge/strategies/api-merge.ts index 2da887e9d2..ca8106a6d5 100644 --- a/dev-infra/pr/merge/strategies/api-merge.ts +++ b/dev-infra/pr/merge/strategies/api-merge.ts @@ -153,7 +153,7 @@ export class GithubApiMergeStrategy extends MergeStrategy { * strategy, we cannot start an interactive rebase because we merge using the Github API. * The Github API only allows modifications to PR title and body for squash merges. */ - async _promptCommitMessageEdit(pullRequest: PullRequest, mergeOptions: PullsMergeParams) { + private async _promptCommitMessageEdit(pullRequest: PullRequest, mergeOptions: PullsMergeParams) { const commitMessage = await this._getDefaultSquashCommitMessage(pullRequest); const {result} = await prompt<{result: string}>({ type: 'editor', diff --git a/dev-infra/pr/merge/strategies/autosquash-merge.ts b/dev-infra/pr/merge/strategies/autosquash-merge.ts index f4abffb1f5..198eda3daf 100644 --- a/dev-infra/pr/merge/strategies/autosquash-merge.ts +++ b/dev-infra/pr/merge/strategies/autosquash-merge.ts @@ -1,3 +1,11 @@ +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ + import {join} from 'path'; import {PullRequestFailure} from '../failures'; import {PullRequest} from '../pull-request'; diff --git a/dev-infra/pr/merge/strategies/commit-message-filter.js b/dev-infra/pr/merge/strategies/commit-message-filter.js index 228c6076c5..5503b5b1e3 100755 --- a/dev-infra/pr/merge/strategies/commit-message-filter.js +++ b/dev-infra/pr/merge/strategies/commit-message-filter.js @@ -1,4 +1,11 @@ #!/usr/bin/env node +/** + * @license + * Copyright Google LLC All Rights Reserved. + * + * Use of this source code is governed by an MIT-style license that can be + * found in the LICENSE file at https://angular.io/license + */ /** * Script that can be passed as commit message filter to `git filter-branch --msg-filter`. diff --git a/dev-infra/ts-circular-dependencies/config.ts b/dev-infra/ts-circular-dependencies/config.ts index afd336f6af..86c7d1f1d0 100644 --- a/dev-infra/ts-circular-dependencies/config.ts +++ b/dev-infra/ts-circular-dependencies/config.ts @@ -20,7 +20,7 @@ export interface CircularDependenciesTestConfig { /** Path to the golden file that is used for checking and approving. */ goldenFile: string; /** Glob that resolves source files which should be checked. */ - glob: string + glob: string; /** * Optional module resolver function that can be used to resolve modules * to absolute file paths. diff --git a/dev-infra/utils/github.ts b/dev-infra/utils/github.ts index 68767ac980..04cd93ed97 100644 --- a/dev-infra/utils/github.ts +++ b/dev-infra/utils/github.ts @@ -28,7 +28,7 @@ const graphql = unauthenticatedGraphql.defaults({ /** Get a PR from github */ export async function getPr( - prSchema: PrSchema, number: number, {owner, name}: GithubConfig) { + prSchema: PrSchema, prNumber: number, {owner, name}: GithubConfig) { const PR_QUERY = params( { $number: 'Int!', // The PR number @@ -41,7 +41,8 @@ export async function getPr( }) }); - const result = await graphql(graphqlQuery(PR_QUERY), {number, owner, name}) as typeof PR_QUERY; + const result = + await graphql(graphqlQuery(PR_QUERY), {number: prNumber, owner, name}) as typeof PR_QUERY; return result.repository.pullRequest; } diff --git a/dev-infra/utils/ts-node.ts b/dev-infra/utils/ts-node.ts index b21518ccfb..f8bb140794 100644 --- a/dev-infra/utils/ts-node.ts +++ b/dev-infra/utils/ts-node.ts @@ -1,6 +1,6 @@ /** * @license - * Copyright Google Inc. All Rights Reserved. + * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license