Skip to content

Commit

Permalink
chore: upgrade eslint rule plugins (#32573)
Browse files Browse the repository at this point in the history
In the new monorepo, we are required to use `eslint@9` because projen forces it.

* `eslint@9` in the new repo requires `typescript-eslint@8`, and rules have disappeared from those plugins and been moved to the `@stylistic` plugin.

We therefore move to `@typescript-eslint@8` and `@stylistic` in this repo already, so that we can move the code over integrally.

* `typescript-eslint@8` requires `eslint@8`, so also upgrade `eslint` to 8 in this repo.
* `eslint@8` requires an update of `eslint-plugin-jest`

This change activated a number of rules that were being silently ignored in the past, or upgrades of rule packages work in more situations. In any case, it also includes a number of code fixes to make the new rules pass.

Notable changes:

- `toThrowError` -> `toThrow`
- `toBeCalledWith` -> `toHaveBeenCalledWith`
- Insertion of a bunch of missing semicolons

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
rix0rrr authored Dec 19, 2024
1 parent 57bba19 commit e867b94
Show file tree
Hide file tree
Showing 263 changed files with 9,245 additions and 1,728 deletions.
1 change: 0 additions & 1 deletion packages/@aws-cdk-testing/cli-integ/bin/query-github.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// eslint-disable-next-line jest/no-jest-import
import * as yargs from 'yargs';
import { fetchPreviousVersion } from '../lib/github';

Expand Down
1 change: 0 additions & 1 deletion packages/@aws-cdk-testing/cli-integ/bin/run-suite.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable no-console */
import * as path from 'path';
// eslint-disable-next-line jest/no-jest-import
import * as jest from 'jest';
import * as yargs from 'yargs';
import { ReleasePackageSourceSetup } from '../lib/package-sources/release-source';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ integTest(
await diffShouldSucceedWith({ fail: undefined, enableDiffNoFail: true });

async function diffShouldSucceedWith(props: DiffParameters) {
await expect(diff(props)).resolves.not.toThrowError();
await expect(diff(props)).resolves.not.toThrow();
}

async function diffShouldFailWith(props: DiffParameters) {
Expand Down

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/5c0f7be02b4e69e39de079b2942aa05f6c48601e5bdca08cf1a5bf5cd237965a.json"
"/d0e51246341d2567827b1fdd35281e7e5d6bcd79ba28cf4873b65a573acb4f14.json"
]
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip"
"S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip"
},
"Description": "AWS CDK resource provider framework - onEvent (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)",
"Environment": {
Expand Down Expand Up @@ -589,7 +589,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip"
"S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip"
},
"Description": "AWS CDK resource provider framework - isComplete (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)",
"Environment": {
Expand Down Expand Up @@ -731,7 +731,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "fe4094cd52f099e46f858f05efdde02f5de79288c9c783676b3fa53a494d04b5.zip"
"S3Key": "9ebfbf95d93057cd65617a9d6f72a0e7dd31520f28cf423c3afd3cbaf0662e6b.zip"
},
"Description": "AWS CDK resource provider framework - onTimeout (aws-cdk-dynamodb-global-replicas-provisioned/@aws-cdk--aws-dynamodb.ReplicaProvider/Provider)",
"Environment": {
Expand Down

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

Loading

0 comments on commit e867b94

Please sign in to comment.