Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Remove linting from integration-test project #569

Merged
merged 2 commits into from May 19, 2021

Conversation

akash1810
Copy link
Member

An alternative to #564.

What does this change?

Version 2.23.2 of eslint-plugin-import prefers to import statements
above import type.

We do not have a lockfile for the integration-test project because:

Ignore package-lock.json to avoid the following error when reinstalling dependencies:
npm ERR! notarget No matching version found for eslint-plugin-custom-rules@1.0.0.
This is because we're installing @guardian/cdk from file, which is in turn installing eslint-plugin-custom-rules from file.

Combined this with the version of eslint-plugin-import is defined with ^, linting is non-deterministic* and we only saw an import order linting error locally after removing node_modules.

There are a couple of ways to improve this:

  • Work out how to use a lockfile in the integration-test
  • Remove linting and hope the other dependencies using ^ versions are OK

This change removes linting, with the justification that:

  • This project is never consumed by anyone
  • This project doesn't run anywhere
  • This project doesn't get updated too often
  • Understanding the original lockfile issues is a time sink

See:

*Well, the entire build of integration-test is non-deterministic!

Does this change require changes to existing projects or CDK CLI?

No.

Does this change require changes to the library documentation?

No.

How to test

CI should pass.

How can we measure success?

CI passes on all branches; Dependabot branches are currently failing.

Have we considered potential risks?

n/a

Version 2.23.2 of `eslint-plugin-import` prefers to `import` statements
above `import type`.

We do not have a lockfile for the `integration-test` project because:

> Ignore package-lock.json to avoid the following error when reinstalling dependencies:
> npm ERR! notarget No matching version found for eslint-plugin-custom-rules@1.0.0.
> This is because we're installing @guardian/cdk from file, which is in turn installing eslint-plugin-custom-rules from file.

Combined this with the version of `eslint-plugin-import` is defined with `^`,
linting is non-deterministic* and we only saw an import order linting error locally
after removing `node_modules`.

There are a couple of ways to improve this:
  - Work out how to use a lockfile in the integration-test
  - Remove linting and hope the other dependencies using `^` versions are OK

This change removes linting, with the justification that:
  - This project is never consumed by anyone
  - This project doesn't run anywhere
  - This project doesn't get updated too often
  - Understanding the original lockfile issues is a time sink

See:
  - import-js/eslint-plugin-import#2021
  - #564

* Well, the entire build of integration-test is non-deterministic!
@akash1810 akash1810 requested a review from a team May 19, 2021 10:12
@akash1810 akash1810 enabled auto-merge May 19, 2021 10:17
@akash1810 akash1810 merged commit 6c91976 into main May 19, 2021
@akash1810 akash1810 deleted the aa-rm-lint-integration-test-project branch May 19, 2021 10:18
akash1810 added a commit that referenced this pull request May 19, 2021
akash1810 added a commit that referenced this pull request May 19, 2021
We previously had issues with lockfiles in CI for the integration-test project.
This caused a few issues and led to the changes in #569.

This change reverts those commits and adds a lockfile.
That is, I'm not sure what the previous issues were, but they don't seem to
exist anymore and we can use lockfiles in CI and gain deterministic builds.
akash1810 added a commit that referenced this pull request May 19, 2021
We previously had issues with lockfiles in CI for the `integration-test` project.
This caused a few issues and led to the changes in #569.

This change reverts those commits and adds a lockfile.
That is, I'm not sure what the previous issues were, but they don't seem to
exist anymore and we can use lockfiles in CI and gain deterministic builds.
@github-actions
Copy link
Contributor

🎉 This PR is included in version 15.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants