Skip to content

Commit 9604c62

Browse files
authored
chore: enforce @typescript-eslint/comma-dangle (#28991)
Enforcing `@typescript-eslint/comma-dangle` instead of the regular `eslint/comma-dangle`. This gives us additional linting on enums, generics, and tuples. Mostly, I care about the enums. https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/docs/rules/comma-dangle.md https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8 ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent b261fea commit 9604c62

File tree

120 files changed

+157
-157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

120 files changed

+157
-157
lines changed

packages/@aws-cdk/aws-cloud9-alpha/lib/environment.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export enum ConnectionType {
3838
* When using SSM, service role and instance profile aren't automatically created.
3939
* See https://docs.aws.amazon.com/cloud9/latest/user-guide/ec2-ssm.html#service-role-ssm
4040
*/
41-
CONNECT_SSM = 'CONNECT_SSM'
41+
CONNECT_SSM = 'CONNECT_SSM',
4242
}
4343

4444
/**

packages/@aws-cdk/aws-glue-alpha/lib/s3-table.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export enum TableEncryption {
3636
*
3737
* @see https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingClientSideEncryption.html
3838
*/
39-
CLIENT_SIDE_KMS = 'CSE-KMS'
39+
CLIENT_SIDE_KMS = 'CSE-KMS',
4040
}
4141

4242
export interface S3TableProps extends TableBaseProps {

packages/@aws-cdk/aws-iot-actions-alpha/lib/sns-topic-action.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export enum SnsActionMessageFormat {
1616
/**
1717
* JSON message format.
1818
*/
19-
JSON = 'JSON'
19+
JSON = 'JSON',
2020
}
2121

2222
/**

packages/@aws-cdk/aws-lambda-python-alpha/lib/packaging.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export enum DependenciesFile {
55
PIP = 'requirements.txt',
66
POETRY = 'poetry.lock',
77
PIPENV = 'Pipfile.lock',
8-
NONE = ''
8+
NONE = '',
99
}
1010

1111
export interface PackagingProps {

packages/@aws-cdk/aws-pipes-alpha/lib/pipeVariable.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export enum PipeVariable {
3535
/**
3636
* The same as aws.pipes.event, but the variable only has a value if the original payload, either from the source or returned by the enrichment, is JSON. If the pipe has an encoded field, such as the Amazon SQS body field or the Kinesis data, those fields are decoded and turned into valid JSON. Because it isn't escaped, the variable can only be used as a value for a JSON field. For more information, see Implicit body data parsing.
3737
*/
38-
EVENT_JSON = '<aws.pipes.event.json>'
38+
EVENT_JSON = '<aws.pipes.event.json>',
3939

4040
}
4141

packages/@aws-cdk/aws-redshift-alpha/lib/table.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export enum TableAction {
4949
/**
5050
* Grants all available privileges at once to the specified user or user group.
5151
*/
52-
ALL
52+
ALL,
5353
}
5454

5555
/**

packages/@aws-cdk/cdk-cli-wrapper/lib/commands/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export enum RequireApproval {
1515
/**
1616
* Only prompt for approval if there are security related changes
1717
*/
18-
BROADENING = 'broadening'
18+
BROADENING = 'broadening',
1919
}
2020

2121
/**

packages/@aws-cdk/cli-lib-alpha/lib/commands/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export enum RequireApproval {
1515
/**
1616
* Only prompt for approval if there are security related changes
1717
*/
18-
BROADENING = 'broadening'
18+
BROADENING = 'broadening',
1919
}
2020

2121
/**

packages/aws-cdk-lib/aws-apigateway/lib/integration.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ export enum ContentHandling {
260260
/**
261261
* Converts a request payload from a binary blob to a base64-encoded string.
262262
*/
263-
CONVERT_TO_TEXT = 'CONVERT_TO_TEXT'
263+
CONVERT_TO_TEXT = 'CONVERT_TO_TEXT',
264264
}
265265

266266
export enum IntegrationType {
@@ -298,7 +298,7 @@ export enum IntegrationType {
298298
* For integrating the API method request with API Gateway as a "loop-back"
299299
* endpoint without invoking any backend.
300300
*/
301-
MOCK = 'MOCK'
301+
MOCK = 'MOCK',
302302
}
303303

304304
export enum PassthroughBehavior {
@@ -319,7 +319,7 @@ export enum PassthroughBehavior {
319319
* templates. However if there is at least one content type defined,
320320
* unmapped content types will be rejected with the same 415 response.
321321
*/
322-
WHEN_NO_TEMPLATES = 'WHEN_NO_TEMPLATES'
322+
WHEN_NO_TEMPLATES = 'WHEN_NO_TEMPLATES',
323323
}
324324

325325
export enum ConnectionType {
@@ -331,7 +331,7 @@ export enum ConnectionType {
331331
/**
332332
* For private connections between API Gateway and a network load balancer in a VPC
333333
*/
334-
VPC_LINK = 'VPC_LINK'
334+
VPC_LINK = 'VPC_LINK',
335335
}
336336

337337
export interface IntegrationResponse {

packages/aws-cdk-lib/aws-apigateway/lib/json-schema.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export enum JsonSchemaVersion {
44
* @see https://tools.ietf.org/html/draft-zyp-json-schema-04
55
*/
66
DRAFT4 = 'http://json-schema.org/draft-04/schema#',
7-
DRAFT7 = 'http://json-schema.org/draft-07/schema#'
7+
DRAFT7 = 'http://json-schema.org/draft-07/schema#',
88
}
99

1010
export enum JsonSchemaType {
@@ -14,7 +14,7 @@ export enum JsonSchemaType {
1414
ARRAY = 'array',
1515
NUMBER = 'number',
1616
INTEGER = 'integer',
17-
STRING = 'string'
17+
STRING = 'string',
1818
}
1919

2020
/**

packages/aws-cdk-lib/aws-apigateway/lib/restapi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ export enum EndpointType {
956956
/**
957957
* For a private API and its custom domain name.
958958
*/
959-
PRIVATE = 'PRIVATE'
959+
PRIVATE = 'PRIVATE',
960960
}
961961

962962
class RootResource extends ResourceBase {

packages/aws-cdk-lib/aws-apigateway/lib/stage.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export interface StageProps extends StageOptions {
131131
export enum MethodLoggingLevel {
132132
OFF = 'OFF',
133133
ERROR = 'ERROR',
134-
INFO = 'INFO'
134+
INFO = 'INFO',
135135
}
136136

137137
export interface MethodDeploymentOptions {

packages/aws-cdk-lib/aws-apigateway/lib/usage-plan.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export interface ThrottleSettings {
3232
export enum Period {
3333
DAY = 'DAY',
3434
WEEK = 'WEEK',
35-
MONTH = 'MONTH'
35+
MONTH = 'MONTH',
3636
}
3737

3838
/**
@@ -80,7 +80,7 @@ export interface ThrottlingPerMethod {
8080
* Type of Usage Plan Key. Currently the only supported type is 'ApiKey'
8181
*/
8282
enum UsagePlanKeyType {
83-
API_KEY = 'API_KEY'
83+
API_KEY = 'API_KEY',
8484
}
8585

8686
/**

packages/aws-cdk-lib/aws-apigatewayv2/lib/http/authorizer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export enum AuthorizerPayloadVersion {
2929
VERSION_1_0 = '1.0',
3030

3131
/** Version 2.0 */
32-
VERSION_2_0 = '2.0'
32+
VERSION_2_0 = '2.0',
3333
}
3434

3535
/**

packages/aws-cdk-lib/aws-apigatewayv2/lib/http/route.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ enum HttpRouteAuthorizationType {
164164
CUSTOM = 'CUSTOM',
165165

166166
/** No authorizer */
167-
NONE = 'NONE'
167+
NONE = 'NONE',
168168
}
169169

170170
/**

packages/aws-cdk-lib/aws-apigatewayv2/lib/websocket/integration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export enum PassthroughBehavior {
5353
* templates. However if there is at least one content type defined,
5454
* unmapped content types will be rejected with the same 415 response.
5555
*/
56-
WHEN_NO_TEMPLATES = 'WHEN_NO_TEMPLATES'
56+
WHEN_NO_TEMPLATES = 'WHEN_NO_TEMPLATES',
5757
}
5858

5959
/**

packages/aws-cdk-lib/aws-applicationautoscaling/lib/step-scaling-action.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ export enum MetricAggregationType {
154154
/**
155155
* Maximum
156156
*/
157-
MAXIMUM = 'Maximum'
157+
MAXIMUM = 'Maximum',
158158
}
159159

160160
/**

packages/aws-cdk-lib/aws-appmesh/lib/service-discovery.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export enum IpPreference {
2828
* Use IPv6 when sending traffic to a local application.
2929
* First attempt to use IPv6 and fall back to IPv4 for service discovery.
3030
*/
31-
IPV6_PREFERRED = 'IPv6_PREFERRED'
31+
IPV6_PREFERRED = 'IPv6_PREFERRED',
3232
}
3333

3434
/**

packages/aws-cdk-lib/aws-appsync/lib/graphqlapi.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export enum Visibility {
272272
/**
273273
* Only accessible through a VPC
274274
*/
275-
PRIVATE = 'PRIVATE'
275+
PRIVATE = 'PRIVATE',
276276
}
277277

278278
/**

packages/aws-cdk-lib/aws-autoscaling/lib/auto-scaling-group.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2009,7 +2009,7 @@ export enum ScalingEvent {
20092009
/**
20102010
* Send a test notification to the topic
20112011
*/
2012-
TEST_NOTIFICATION = 'autoscaling:TEST_NOTIFICATION'
2012+
TEST_NOTIFICATION = 'autoscaling:TEST_NOTIFICATION',
20132013
}
20142014

20152015
/**
@@ -2134,7 +2134,7 @@ export enum ScalingProcess {
21342134
AZ_REBALANCE = 'AZRebalance',
21352135
ALARM_NOTIFICATION = 'AlarmNotification',
21362136
SCHEDULED_ACTIONS = 'ScheduledActions',
2137-
ADD_TO_LOAD_BALANCER = 'AddToLoadBalancer'
2137+
ADD_TO_LOAD_BALANCER = 'AddToLoadBalancer',
21382138
}
21392139

21402140
// Recommended list of processes to suspend from here:

packages/aws-cdk-lib/aws-autoscaling/lib/step-scaling-action.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ export enum MetricAggregationType {
142142
/**
143143
* Maximum
144144
*/
145-
MAXIMUM = 'Maximum'
145+
MAXIMUM = 'Maximum',
146146
}
147147

148148
/**

packages/aws-cdk-lib/aws-backup/lib/resource.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export enum TagOperation {
1717
/**
1818
* Dummy member
1919
*/
20-
DUMMY = 'dummy'
20+
DUMMY = 'dummy',
2121
}
2222

2323
/**

packages/aws-cdk-lib/aws-batch/lib/linux-parameters.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export enum TmpfsMountOption {
247247
GID = 'gid',
248248
NR_INODES = 'nr_inodes',
249249
NR_BLOCKS = 'nr_blocks',
250-
MPOL = 'mpol'
250+
MPOL = 'mpol',
251251
}
252252

253253
function renderTmpfs(tmpfs: Tmpfs): CfnJobDefinition.TmpfsProperty {

packages/aws-cdk-lib/aws-cloudformation/lib/cloud-formation-capabilities.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ export enum CloudFormationCapabilities {
3737
*
3838
* @link https://docs.aws.amazon.com/AWSCloudFormation/latest/APIReference/API_CreateStack.html
3939
*/
40-
AUTO_EXPAND = 'CAPABILITY_AUTO_EXPAND'
40+
AUTO_EXPAND = 'CAPABILITY_AUTO_EXPAND',
4141
}

packages/aws-cdk-lib/aws-cloudfront/lib/distribution.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ export enum HttpVersion {
750750
/** HTTP 2 and HTTP 3 */
751751
HTTP2_AND_3 = 'http2and3',
752752
/** HTTP 3 */
753-
HTTP3 = 'http3'
753+
HTTP3 = 'http3',
754754
}
755755

756756
/**
@@ -763,7 +763,7 @@ export enum PriceClass {
763763
/** PRICE_CLASS_100 + South Africa, Kenya, Middle East, Japan, Singapore, South Korea, Taiwan, Hong Kong, & Philippines */
764764
PRICE_CLASS_200 = 'PriceClass_200',
765765
/** All locations */
766-
PRICE_CLASS_ALL = 'PriceClass_All'
766+
PRICE_CLASS_ALL = 'PriceClass_All',
767767
}
768768

769769
/**
@@ -775,7 +775,7 @@ export enum ViewerProtocolPolicy {
775775
/** Will redirect HTTP requests to HTTPS */
776776
REDIRECT_TO_HTTPS = 'redirect-to-https',
777777
/** Both HTTP and HTTPS supported */
778-
ALLOW_ALL = 'allow-all'
778+
ALLOW_ALL = 'allow-all',
779779
}
780780

781781
/**
@@ -808,7 +808,7 @@ export enum OriginProtocolPolicy {
808808
*/
809809
export enum SSLMethod {
810810
SNI = 'sni-only',
811-
VIP = 'vip'
811+
VIP = 'vip',
812812
}
813813

814814
/**
@@ -822,7 +822,7 @@ export enum SecurityPolicyProtocol {
822822
TLS_V1_1_2016 = 'TLSv1.1_2016',
823823
TLS_V1_2_2018 = 'TLSv1.2_2018',
824824
TLS_V1_2_2019 = 'TLSv1.2_2019',
825-
TLS_V1_2_2021 = 'TLSv1.2_2021'
825+
TLS_V1_2_2021 = 'TLSv1.2_2021',
826826
}
827827

828828
/**

packages/aws-cdk-lib/aws-cloudfront/lib/web-distribution.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export interface S3OriginConfig {
339339
export enum CloudFrontAllowedMethods {
340340
GET_HEAD = 'GH',
341341
GET_HEAD_OPTIONS = 'GHO',
342-
ALL = 'ALL'
342+
ALL = 'ALL',
343343
}
344344

345345
/**

packages/aws-cdk-lib/aws-cloudwatch-actions/lib/ec2.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export enum Ec2InstanceAction {
2121
/**
2222
* Reboot the instance
2323
*/
24-
REBOOT = 'reboot'
24+
REBOOT = 'reboot',
2525
}
2626

2727
/**

packages/aws-cdk-lib/aws-cloudwatch-actions/lib/ssm.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export enum OpsItemSeverity {
2121
/**
2222
* Set the severity to low
2323
*/
24-
LOW = '4'
24+
LOW = '4',
2525
}
2626

2727
/**
@@ -47,7 +47,7 @@ export enum OpsItemCategory {
4747
/**
4848
* Set the category to security
4949
*/
50-
SECURITY = 'Security'
50+
SECURITY = 'Security',
5151
}
5252

5353
/**

packages/aws-cdk-lib/aws-cloudwatch/lib/alarm.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ export enum TreatMissingData {
9696
/**
9797
* The alarm does not consider missing data points when evaluating whether to change state
9898
*/
99-
MISSING = 'missing'
99+
MISSING = 'missing',
100100
}
101101

102102
/**

packages/aws-cdk-lib/aws-cloudwatch/lib/graph.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ export enum Shading {
810810
/**
811811
* Add shading below the annotation
812812
*/
813-
BELOW = 'below'
813+
BELOW = 'below',
814814
}
815815

816816
/**
@@ -830,7 +830,7 @@ export enum VerticalShading {
830830
/**
831831
* Add shading after the annotation
832832
*/
833-
AFTER = 'after'
833+
AFTER = 'after',
834834
}
835835

836836
/**
@@ -881,7 +881,7 @@ export enum LegendPosition {
881881
/**
882882
* Add shading below the annotation
883883
*/
884-
HIDDEN = 'hidden'
884+
HIDDEN = 'hidden',
885885
}
886886

887887
function mapAnnotation(yAxis: string): ((x: HorizontalAnnotation) => any) {

packages/aws-cdk-lib/aws-cloudwatch/lib/text.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export enum TextWidgetBackground {
1111
/**
1212
* Transparent background
1313
*/
14-
TRANSPARENT = 'transparent'
14+
TRANSPARENT = 'transparent',
1515
}
1616

1717
/**

0 commit comments

Comments
 (0)