Skip to content

Commit 113ef71

Browse files
author
Vivek Lakshmanan
authored
Merge pull request #968 from pulumi/vl/TSLint
Make recommended update to tslint.json to avoid deprecation warning
2 parents 258d3ba + 76327de commit 113ef71

File tree

6 files changed

+66
-39
lines changed

6 files changed

+66
-39
lines changed

.github/workflows/cron.yml

-4
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ jobs:
107107
- name: Install + Configure Helm
108108
run: |-
109109
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
110-
helm init -c
111110
helm repo add bitnami https://charts.bitnami.com/bitnami
112111
- name: Configure GCP credentials
113112
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -223,7 +222,6 @@ jobs:
223222
- name: Install + Configure Helm
224223
run: |-
225224
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
226-
helm init -c
227225
helm repo add bitnami https://charts.bitnami.com/bitnami
228226
- name: Configure GCP credentials
229227
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -373,7 +371,6 @@ jobs:
373371
- name: Install + Configure Helm
374372
run: |-
375373
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
376-
helm init -c
377374
helm repo add bitnami https://charts.bitnami.com/bitnami
378375
- name: Configure GCP credentials
379376
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -455,7 +452,6 @@ jobs:
455452
- name: Install + Configure Helm
456453
run: |-
457454
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
458-
helm init -c
459455
helm repo add bitnami https://charts.bitnami.com/bitnami
460456
- name: Configure GCP credentials
461457
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master

.github/workflows/run-tests-command.yml

-4
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ jobs:
133133
- name: Install + Configure Helm
134134
run: |-
135135
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
136-
helm init -c
137136
helm repo add bitnami https://charts.bitnami.com/bitnami
138137
- name: Configure GCP credentials
139138
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -253,7 +252,6 @@ jobs:
253252
- name: Install + Configure Helm
254253
run: |-
255254
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
256-
helm init -c
257255
helm repo add bitnami https://charts.bitnami.com/bitnami
258256
- name: Configure GCP credentials
259257
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -387,7 +385,6 @@ jobs:
387385
- name: Install + Configure Helm
388386
run: |-
389387
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
390-
helm init -c
391388
helm repo add bitnami https://charts.bitnami.com/bitnami
392389
- name: Configure GCP credentials
393390
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -471,7 +468,6 @@ jobs:
471468
- name: Install + Configure Helm
472469
run: |-
473470
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
474-
helm init -c
475471
helm repo add bitnami https://charts.bitnami.com/bitnami
476472
- name: Configure GCP credentials
477473
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master

.github/workflows/smoke-test-cli-command.yml

-4
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ jobs:
107107
- name: Install + Configure Helm
108108
run: |-
109109
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
110-
helm init -c
111110
helm repo add bitnami https://charts.bitnami.com/bitnami
112111
- name: Configure GCP credentials
113112
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -196,7 +195,6 @@ jobs:
196195
- name: Install + Configure Helm
197196
run: |-
198197
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
199-
helm init -c
200198
helm repo add bitnami https://charts.bitnami.com/bitnami
201199
- name: Configure GCP credentials
202200
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -328,7 +326,6 @@ jobs:
328326
- name: Install + Configure Helm
329327
run: |-
330328
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
331-
helm init -c
332329
helm repo add bitnami https://charts.bitnami.com/bitnami
333330
- name: Configure GCP credentials
334331
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -410,7 +407,6 @@ jobs:
410407
- name: Install + Configure Helm
411408
run: |-
412409
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
413-
helm init -c
414410
helm repo add bitnami https://charts.bitnami.com/bitnami
415411
- name: Configure GCP credentials
416412
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master

.github/workflows/smoke-test-provider-command.yml

-4
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ jobs:
107107
- name: Install + Configure Helm
108108
run: |-
109109
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
110-
helm init -c
111110
helm repo add bitnami https://charts.bitnami.com/bitnami
112111
- name: Configure GCP credentials
113112
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -196,7 +195,6 @@ jobs:
196195
- name: Install + Configure Helm
197196
run: |-
198197
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
199-
helm init -c
200198
helm repo add bitnami https://charts.bitnami.com/bitnami
201199
- name: Configure GCP credentials
202200
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -320,7 +318,6 @@ jobs:
320318
- name: Install + Configure Helm
321319
run: |-
322320
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
323-
helm init -c
324321
helm repo add bitnami https://charts.bitnami.com/bitnami
325322
- name: Configure GCP credentials
326323
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
@@ -402,7 +399,6 @@ jobs:
402399
- name: Install + Configure Helm
403400
run: |-
404401
curl -o- -L https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get | bash
405-
helm init -c
406402
helm repo add bitnami https://charts.bitnami.com/bitnami
407403
- name: Configure GCP credentials
408404
uses: GoogleCloudPlatform/github-actions/setup-gcloud@master

aws-ts-static-website/index.ts

+20-20
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
import * as aws from "@pulumi/aws";
44
import * as pulumi from "@pulumi/pulumi";
5-
65
import * as fs from "fs";
76
import * as mime from "mime";
87
import * as path from "path";
98

9+
1010
// Load the Pulumi program configuration. These act as the "parameters" to the Pulumi program,
1111
// so that different Pulumi Stacks can be brought up using the same code.
1212

@@ -19,10 +19,10 @@ const config = {
1919
targetDomain: stackConfig.require("targetDomain"),
2020
// (Optional) ACM certificate ARN for the target domain; must be in the us-east-1 region. If omitted, an ACM certificate will be created.
2121
certificateArn: stackConfig.get("certificateArn"),
22-
// If true create an A record for the www subdomain of targetDomain pointing to the generated cloudfront distribution.
22+
// If true create an A record for the www subdomain of targetDomain pointing to the generated cloudfront distribution.
2323
// If a certificate was generated it will support this subdomain.
24-
// default: true
25-
includeWWW: stackConfig.getBoolean("includeWWW") || true
24+
// default: true
25+
includeWWW: stackConfig.getBoolean("includeWWW") || true,
2626
};
2727

2828
// contentBucket is the S3 bucket that the website's contents will be stored in.
@@ -98,11 +98,11 @@ if (config.certificateArn === undefined) {
9898
});
9999

100100
// if config.includeWWW include required subjectAlternativeNames to support the www subdomain
101-
let certificateConfig:aws.acm.CertificateArgs = {
101+
const certificateConfig: aws.acm.CertificateArgs = {
102102
domainName: config.targetDomain,
103-
validationMethod: "DNS",
104-
subjectAlternativeNames: config.includeWWW ? [`www.${config.targetDomain}`]: []
105-
}
103+
validationMethod: "DNS",
104+
subjectAlternativeNames: config.includeWWW ? [`www.${config.targetDomain}`] : [],
105+
};
106106

107107
const certificate = new aws.acm.Certificate("certificate", certificateConfig, { provider: eastRegion });
108108

@@ -122,7 +122,7 @@ if (config.certificateArn === undefined) {
122122
});
123123

124124
// if config.includeWWW ensure we validate the www subdomain as well
125-
var subdomainCertificateValidationDomain;
125+
let subdomainCertificateValidationDomain;
126126
if (config.includeWWW) {
127127
subdomainCertificateValidationDomain = new aws.route53.Record(`${config.targetDomain}-validation2`, {
128128
name: certificate.domainValidationOptions[1].resourceRecordName,
@@ -134,8 +134,8 @@ if (config.certificateArn === undefined) {
134134
}
135135

136136
// if config.includeWWW include the validation record for the www subdomain
137-
const validationRecordFqdns = subdomainCertificateValidationDomain === undefined ?
138-
[certificateValidationDomain.fqdn] : [certificateValidationDomain.fqdn, subdomainCertificateValidationDomain.fqdn]
137+
const validationRecordFqdns = subdomainCertificateValidationDomain === undefined ?
138+
[certificateValidationDomain.fqdn] : [certificateValidationDomain.fqdn, subdomainCertificateValidationDomain.fqdn];
139139

140140
/**
141141
* This is a _special_ resource that waits for ACM to complete validation via the DNS record
@@ -155,7 +155,7 @@ if (config.certificateArn === undefined) {
155155
}
156156

157157
// if config.includeWWW include an alias for the www subdomain
158-
const distributionAliases = config.includeWWW ? [config.targetDomain, `www.${config.targetDomain}`]:[config.targetDomain]
158+
const distributionAliases = config.includeWWW ? [config.targetDomain, `www.${config.targetDomain}`] : [config.targetDomain];
159159

160160
// distributionArgs configures the CloudFront distribution. Relevant documentation:
161161
// https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-web-values-specify.html
@@ -279,11 +279,11 @@ function createWWWAliasRecord(targetDomain: string, distribution: aws.cloudfront
279279
const domainParts = getDomainAndSubdomain(targetDomain);
280280
const hostedZoneId = aws.route53.getZone({ name: domainParts.parentDomain }, { async: true }).then(zone => zone.zoneId);
281281

282-
return new aws.route53.Record(
283-
`${targetDomain}-www-alias`,
282+
return new aws.route53.Record(
283+
`${targetDomain}-www-alias`,
284284
{
285-
name: `www.${targetDomain}`,
286-
zoneId: hostedZoneId,
285+
name: `www.${targetDomain}`,
286+
zoneId: hostedZoneId,
287287
type: "A",
288288
aliases: [
289289
{
@@ -292,18 +292,18 @@ function createWWWAliasRecord(targetDomain: string, distribution: aws.cloudfront
292292
evaluateTargetHealth: true,
293293
},
294294
],
295-
}
296-
)
295+
},
296+
);
297297
}
298298

299299
const aRecord = createAliasRecord(config.targetDomain, cdn);
300-
if (config.includeWWW){
300+
if (config.includeWWW) {
301301
const cnameRecord = createWWWAliasRecord(config.targetDomain, cdn);
302302
}
303303

304304
// Export properties from this stack. This prints them at the end of `pulumi up` and
305305
// makes them easier to access from the pulumi.com.
306-
export const contentBucketUri = pulumi.interpolate `s3://${contentBucket.bucket}`;
306+
export const contentBucketUri = pulumi.interpolate`s3://${contentBucket.bucket}`;
307307
export const contentBucketWebsiteEndpoint = contentBucket.websiteEndpoint;
308308
export const cloudFrontDomain = cdn.domainName;
309309
export const targetDomainEndpoint = `https://${config.targetDomain}/`;

tslint.json

+46-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,52 @@
2727
"label-position": true,
2828
"member-access": false,
2929
"member-ordering": [
30-
true,
31-
"static-before-instance",
32-
"variables-before-functions"
30+
true,
31+
{
32+
"order": [
33+
{
34+
"name": "static field",
35+
"kinds": [
36+
"public-static-field",
37+
"protected-static-field",
38+
"private-static-field"
39+
]
40+
},
41+
{
42+
"name": "instance field",
43+
"kinds": [
44+
"public-instance-field",
45+
"protected-instance-field",
46+
"private-instance-field"
47+
]
48+
},
49+
{
50+
"name": "static method",
51+
"kinds": [
52+
"public-static-method",
53+
"private-static-method",
54+
"protected-static-method",
55+
"public-static-accessor",
56+
"protected-static-accessor",
57+
"private-static-accessor"
58+
]
59+
},
60+
{
61+
"name": "instance method",
62+
"kinds": [
63+
"public-constructor",
64+
"protected-constructor",
65+
"private-constructor",
66+
"public-instance-method",
67+
"protected-instance-method",
68+
"private-instance-method",
69+
"public-instance-accessor",
70+
"protected-instance-accessor",
71+
"private-instance-accessor"
72+
]
73+
}
74+
]
75+
}
3376
],
3477
"no-any": false,
3578
"no-arg": true,

0 commit comments

Comments
 (0)