From 07e401ebf95a88418008aa5b45090685cc97d024 Mon Sep 17 00:00:00 2001 From: Scott Bloch-Wehba-Seaward Date: Fri, 4 May 2018 14:24:31 -0400 Subject: [PATCH] fix(artifacts): method-syntax functions cant be used as constructors (#5269) --- .../config/triggers/artifacts/base64/base64.artifact.ts | 2 +- .../config/triggers/artifacts/base64/defaultBase64.artifact.ts | 2 +- .../config/triggers/artifacts/custom/custom.artifact.ts | 2 +- .../config/triggers/artifacts/docker/defaultDocker.artifact.ts | 2 +- .../config/triggers/artifacts/docker/docker.artifact.ts | 2 +- .../config/triggers/artifacts/gcs/defaultGcs.artifact.ts | 2 +- .../src/pipeline/config/triggers/artifacts/gcs/gcs.artifact.ts | 2 +- .../config/triggers/artifacts/github/defaultGithub.artifact.ts | 2 +- .../config/triggers/artifacts/github/github.artifact.ts | 2 +- .../pipeline/config/triggers/artifacts/s3/defaultS3.artifact.ts | 2 +- .../src/pipeline/config/triggers/artifacts/s3/s3.artifact.ts | 2 +- tslint.json | 1 + 12 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/base64.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/base64.artifact.ts index 39eeb817cdf..f88f1ef2f08 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/base64.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/base64.artifact.ts @@ -14,7 +14,7 @@ module(BASE64_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConfigProvid key: 'base64', isDefault: false, isMatch: true, - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 'embedded/base64'; diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/defaultBase64.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/defaultBase64.artifact.ts index 9c4c42fb402..eccbdba11b8 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/defaultBase64.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/base64/defaultBase64.artifact.ts @@ -21,7 +21,7 @@ module(DEFAULT_BASE64_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConf key: 'default.base64', isDefault: true, isMatch: false, - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 'embedded/base64'; diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/custom/custom.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/custom/custom.artifact.ts index ebeeccf7cb1..309843b6fce 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/custom/custom.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/custom/custom.artifact.ts @@ -19,7 +19,7 @@ module(CUSTOM_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]) key: 'custom', isDefault: true, isMatch: true, - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; }, diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/docker/defaultDocker.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/docker/defaultDocker.artifact.ts index d7cb9b388c8..e0a84dd4c75 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/docker/defaultDocker.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/docker/defaultDocker.artifact.ts @@ -13,7 +13,7 @@ module(DEFAULT_DOCKER_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConf isMatch: false, description: 'A Docker image to be deployed.', key: 'default.docker', - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 'docker/image'; diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/docker/docker.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/docker/docker.artifact.ts index 621164cb445..a9c46eb41ba 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/docker/docker.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/docker/docker.artifact.ts @@ -12,7 +12,7 @@ module(DOCKER_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConfigProvid isMatch: true, description: 'A Docker image to be deployed.', key: 'docker', - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 'docker/image'; diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/gcs/defaultGcs.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/gcs/defaultGcs.artifact.ts index b98d470f80a..de71e432726 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/gcs/defaultGcs.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/gcs/defaultGcs.artifact.ts @@ -13,7 +13,7 @@ module(DEFAULT_GCS_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConfigP key: 'default.gcs', isDefault: true, isMatch: false, - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 'gcs/object'; diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/gcs/gcs.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/gcs/gcs.artifact.ts index 43c23fcef42..b8636e24a29 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/gcs/gcs.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/gcs/gcs.artifact.ts @@ -12,7 +12,7 @@ module(GCS_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConfigProvider: key: 'gcs', isDefault: false, isMatch: true, - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 'gcs/object'; diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/github/defaultGithub.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/github/defaultGithub.artifact.ts index 2864048757a..79f8c436009 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/github/defaultGithub.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/github/defaultGithub.artifact.ts @@ -12,7 +12,7 @@ module(DEFAULT_GITHUB_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConf key: 'default.github', isDefault: true, isMatch: false, - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 'github/file'; diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/github/github.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/github/github.artifact.ts index aaccb5b8d18..cb1a778f5b9 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/github/github.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/github/github.artifact.ts @@ -12,7 +12,7 @@ module(GITHUB_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConfigProvid key: 'github', isDefault: false, isMatch: true, - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 'github/file'; diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/s3/defaultS3.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/s3/defaultS3.artifact.ts index 7a198065971..0f8e47bcc1c 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/s3/defaultS3.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/s3/defaultS3.artifact.ts @@ -13,7 +13,7 @@ module(DEFAULT_S3_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConfigPr key: 'default.s3', isDefault: true, isMatch: false, - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 's3/object'; diff --git a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/s3/s3.artifact.ts b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/s3/s3.artifact.ts index fdbeb75174f..16ffda768f1 100644 --- a/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/s3/s3.artifact.ts +++ b/app/scripts/modules/core/src/pipeline/config/triggers/artifacts/s3/s3.artifact.ts @@ -12,7 +12,7 @@ module(S3_ARTIFACT, [PIPELINE_CONFIG_PROVIDER]).config((pipelineConfigProvider: key: 's3', isDefault: false, isMatch: true, - controller(artifact: IArtifact) { + controller: function(artifact: IArtifact) { 'ngInject'; this.artifact = artifact; this.artifact.type = 's3/object'; diff --git a/tslint.json b/tslint.json index a4415265ce1..c880c0265cd 100644 --- a/tslint.json +++ b/tslint.json @@ -44,6 +44,7 @@ "no-var-keyword": true, "object-curly-spacing": "always", "object-literal-sort-keys": false, + "object-literal-shorthand": false, "one-line": [true, "check-catch", "check-else", "check-open-brace", "check-whitespace"], "prefer-const": [true, { "destructuring": "all" }], "quotemark": [true, "single", "avoid-escape", "jsx-double"],