Skip to content

Commit 0c53765

Browse files
authored
chore(eslint): no padded lines for blocks and switches (#33203)
Enforce `padded-lines` against blocks and switches. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent ef06f40 commit 0c53765

File tree

580 files changed

+446
-2355
lines changed

Some content is hidden

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

580 files changed

+446
-2355
lines changed

packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts

-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ async function main() {
127127
...passWithNoTests ? ['--passWithNoTests'] : [],
128128
...args['test-file'] ? [args['test-file']] : [],
129129
], path.resolve(__dirname, '..', '..', 'resources', 'integ.jest.config.js'));
130-
131130
} finally {
132131
await packageSource.cleanup();
133132
}

packages/@aws-cdk-testing/cli-integ/lib/cli/stage-distribution.ts

-5
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ async function main() {
5252
type: 'string',
5353
requiresArg: true,
5454
}), async (args) => {
55-
5655
await validateDirectory(args);
5756
const repo = await (args.name ? TestRepository.newWithName(args.name) : TestRepository.newRandom());
5857
const usageDir = UsageDir.default();
@@ -71,7 +70,6 @@ async function main() {
7170
requiresArg: true,
7271
demandOption: true,
7372
}), async (args) => {
74-
7573
const repo = TestRepository.existing(args.name);
7674
const usageDir = UsageDir.default();
7775

@@ -99,7 +97,6 @@ async function main() {
9997
default: true,
10098
requiresArg: false,
10199
}), async (args) => {
102-
103100
await validateDirectory(args);
104101
const repo = await TestRepository.newRandom();
105102
const usageDir = UsageDir.default();
@@ -114,7 +111,6 @@ async function main() {
114111
shell: true,
115112
show: 'always',
116113
});
117-
118114
} finally {
119115
if (args.cleanup) {
120116
await repo.delete();
@@ -128,7 +124,6 @@ async function main() {
128124
type: 'string',
129125
requiresArg: true,
130126
}), async (args) => {
131-
132127
const usageDir = UsageDir.default();
133128

134129
let repositoryName = args.name;

packages/@aws-cdk-testing/cli-integ/lib/with-aws.ts

-3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export function withAws<A extends TestContext>(
3737
disableBootstrap: boolean = false,
3838
): (context: A) => Promise<void> {
3939
return async (context: A) => {
40-
4140
if (atmosphereEnabled()) {
4241
const atmosphere = new AtmosphereClient(atmosphereEndpoint());
4342
const allocation = await atmosphere.acquire({ pool: atmospherePool(), requester: context.name });
@@ -59,7 +58,6 @@ export function withAws<A extends TestContext>(
5958
} finally {
6059
await atmosphere.release(allocation.id, outcome);
6160
}
62-
6361
} else {
6462
return regionPool().using(async (region) => {
6563
const aws = await AwsClients.forRegion(region, context.output);
@@ -68,7 +66,6 @@ export function withAws<A extends TestContext>(
6866
return block({ ...context, disableBootstrap, aws });
6967
});
7068
}
71-
7269
};
7370
}
7471

packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts

-5
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,6 @@ export class TestFixture extends ShellHelper {
331331
public readonly output: NodeJS.WritableStream,
332332
public readonly aws: AwsClients,
333333
public readonly randomString: string) {
334-
335334
super(integTestDir, output);
336335

337336
this.packages = packageSourceInSubprocess();
@@ -566,11 +565,9 @@ export class TestFixture extends ShellHelper {
566565
* Cleanup leftover stacks and bootstrapped resources
567566
*/
568567
public async dispose(success: boolean) {
569-
570568
// when using the atmosphere service, it does resource cleanup on our behalf
571569
// so we don't have to wait for it.
572570
if (!atmosphereEnabled()) {
573-
574571
const stacksToDelete = await this.deleteableStacks(this.stackNamePrefix);
575572

576573
this.sortBootstrapStacksToTheEnd(stacksToDelete);
@@ -603,7 +600,6 @@ export class TestFixture extends ShellHelper {
603600
for (const bucket of this.bucketsToDelete) {
604601
await this.aws.deleteBucket(bucket);
605602
}
606-
607603
}
608604

609605
// If the tests completed successfully, happily delete the fixture
@@ -644,7 +640,6 @@ export class TestFixture extends ShellHelper {
644640

645641
private sortBootstrapStacksToTheEnd(stacks: Stack[]) {
646642
stacks.sort((a, b) => {
647-
648643
if (!a.StackName || !b.StackName) {
649644
throw new Error('Stack names do not exists. These are required for sorting the bootstrap stacks.');
650645
}

packages/@aws-cdk-testing/cli-integ/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,4 @@
8787
"publishConfig": {
8888
"tag": "latest"
8989
}
90-
}
90+
}

packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/bootstrapping.integtest.ts

-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@ integTest('can remove customPermissionsBoundary', withoutBootstrap(async (fixtur
372372
throw new Error('Role not found');
373373
}
374374
expect(role.Role.PermissionsBoundary).toBeUndefined();
375-
376375
} finally {
377376
if (policyArn) {
378377
await fixture.aws.iam.send(new DeletePolicyCommand({ PolicyArn: policyArn }));

packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts

-4
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,6 @@ integTest(
12641264
integTest(
12651265
'cdk diff doesnt show resource metadata changes',
12661266
withDefaultFixture(async (fixture) => {
1267-
12681267
// GIVEN - small initial stack with default resource metadata
12691268
await fixture.cdkDeploy('metadata');
12701269

@@ -1284,7 +1283,6 @@ integTest(
12841283
integTest(
12851284
'cdk diff shows resource metadata changes with --no-change-set',
12861285
withDefaultFixture(async (fixture) => {
1287-
12881286
// GIVEN - small initial stack with default resource metadata
12891287
await fixture.cdkDeploy('metadata');
12901288

@@ -2838,7 +2836,6 @@ integTest(
28382836
);
28392837

28402838
integTest('cdk notices are displayed correctly', withDefaultFixture(async (fixture) => {
2841-
28422839
const cache = {
28432840
expiration: 4125963264000, // year 2100 so we never overwrite the cache
28442841
notices: [
@@ -2872,7 +2869,6 @@ integTest('cdk notices are displayed correctly', withDefaultFixture(async (fixtu
28722869

28732870
// assert dynamic environments are resolved
28742871
expect(output).toContain(`AffectedEnvironments:<aws://${await fixture.aws.account()}/${fixture.aws.region}>`);
2875-
28762872
}));
28772873

28782874
integTest('requests go through a proxy when configured',

packages/@aws-cdk-testing/cli-integ/tests/init-javascript/init-javascript.integtest.ts

-1
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,4 @@ new TestjsStack(app, 'TestjsStack');
5555
await fs.writeJson(path.join(context.integTestDir, 'cdk.json'), cdkJson);
5656

5757
await shell.shell(['cdk', 'synth']);
58-
5958
})));

packages/@aws-cdk-testing/framework-integ/test/aws-autoscaling-hooktargets/test/integ.queue-hook.ts

-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ class TestStack extends cdk.Stack {
4343
notificationTarget: new QueueHook(queue),
4444
});
4545
this.hookName = hook.lifecycleHookName;
46-
4746
}
4847
}
4948

packages/@aws-cdk-testing/framework-integ/test/aws-codeguruprofiler/test/integ.profiler-group.ts

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class ProfilerGroupIntegrationTest extends Stack {
1818
assumedBy: new AccountRootPrincipal(),
1919
});
2020
profilingGroup.grantRead(readAppRole);
21-
2221
}
2322
}
2423

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.policy-ff.ts

-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ class TestStack extends Stack {
3636
region: 'eu-west-2',
3737
}],
3838
});
39-
4039
}
4140
}
4241

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.policy.ts

-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ class TestStack extends Stack {
3333
removalPolicy: RemovalPolicy.DESTROY,
3434
resourcePolicy: docu,
3535
});
36-
3736
}
3837
}
3938

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb-v2.warm-throughput.ts

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export class TestStack extends Stack {
3737
],
3838
removalPolicy: RemovalPolicy.DESTROY,
3939
});
40-
4140
}
4241
}
4342

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.dynamodb.warm-throughput.ts

-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ export class TestStack extends Stack {
2929
writeUnitsPerSecond: 5000,
3030
},
3131
});
32-
3332
}
3433
}
3534

Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.assets.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/aws-cdk-dynamodb-global-replicas-provisioned.template.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@
291291
{
292292
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
293293
},
294-
"/faf0712a1359d1e87541a9e7b4d1a3afc6f999593c695d9ae90698b6b51e9168.json"
294+
"/9f9e7436ed98342a4f1f0b598ef9976aa52d9ad4f145e5ef3b06928a267551fd.json"
295295
]
296296
]
297297
}

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/awscdkdynamodbglobalreplicasprovisionedawscdkawsdynamodbReplicaProviderEA32CB30.nested.template.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@
444444
"S3Bucket": {
445445
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
446446
},
447-
"S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip"
447+
"S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip"
448448
},
449449
"Description": "AWS CDK resource provider framework - onEvent (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)",
450450
"Environment": {
@@ -589,7 +589,7 @@
589589
"S3Bucket": {
590590
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
591591
},
592-
"S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip"
592+
"S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip"
593593
},
594594
"Description": "AWS CDK resource provider framework - isComplete (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)",
595595
"Environment": {
@@ -731,7 +731,7 @@
731731
"S3Bucket": {
732732
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
733733
},
734-
"S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip"
734+
"S3Key": "39472b1c2875cf306d4ba429aeccdd34cb49bcf59dbde81f7e6b6cb9deac23a6.zip"
735735
},
736736
"Description": "AWS CDK resource provider framework - onTimeout (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)",
737737
"Environment": {

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/manifest.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-dynamodb/test/integ.global-replicas-provisioned.js.snapshot/tree.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)