From 074eb4b2147b402cd2a67851a9ffe7b5fc303bcc Mon Sep 17 00:00:00 2001 From: Akash Askoolum Date: Wed, 19 May 2021 07:52:57 +0100 Subject: [PATCH] chore: Fix import order linting error I think this is failing because we do not observe a lockfile in the [integration-test project](https://github.com/guardian/cdk/blob/9b9a91bc03f507ba4d688024b4fc8059a617f9d0/integration-test/script/ci#L5-L8). As `eslint-plugin-import`'s version includes `^`, we cannot guarantee what version gets used in CI. We hadn't seen it locally as we don't do a fresh install. If you delete integration-test/node_modules and lint the integration-test project, the error can be seen. Options: - Use pinned versions in the integration-test project (I'm not sure if dependabot works with pinned dependency versions) - Do not lint the integration-test project - Use a lockfile and install @guardian/cdk into the integration-test project with `--no-package-lock` (not sure if this is possible as @guardian/cdk will remain in `package.json`) See: - https://github.com/benmosher/eslint-plugin-import/pull/2021 - https://docs.npmjs.com/cli/v6/commands/npm-install#:~:text=--no-package-lock --- integration-test/src/integration-test-stack.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/src/integration-test-stack.ts b/integration-test/src/integration-test-stack.ts index 58262b4561..be3e10f416 100644 --- a/integration-test/src/integration-test-stack.ts +++ b/integration-test/src/integration-test-stack.ts @@ -1,6 +1,6 @@ +import { GuDistributionBucketParameter, GuStack } from "@guardian/cdk/lib/constructs/core"; import type { App } from "@aws-cdk/core"; import type { GuStackProps } from "@guardian/cdk/lib/constructs/core"; -import { GuDistributionBucketParameter, GuStack } from "@guardian/cdk/lib/constructs/core"; export class IntegrationTestStack extends GuStack { constructor(scope: App, id: string, props: GuStackProps) {