-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[New] order
: support type imports
#2021
Merged
ljharb
merged 1 commit into
import-js:master
from
geraintwhite:order-type-import-support
May 12, 2021
Merged
[New] order
: support type imports
#2021
ljharb
merged 1 commit into
import-js:master
from
geraintwhite:order-type-import-support
May 12, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 similar comment
ljharb
approved these changes
May 12, 2021
ljharb
changed the title
[Fix]
[New] May 12, 2021
order
: support type importsorder
: support type imports
ljharb
force-pushed
the
order-type-import-support
branch
from
May 12, 2021 16:23
2ee0b7b
to
1c10e79
Compare
akash1810
added a commit
to guardian/cdk
that referenced
this pull request
May 19, 2021
Not entirely sure how this got missed... See: - import-js/eslint-plugin-import#2021
akash1810
added a commit
to guardian/cdk
that referenced
this pull request
May 19, 2021
Not entirely sure how this got missed, but it looks like CI on `main` is failing because of it. See: - import-js/eslint-plugin-import#2021
akash1810
added a commit
to guardian/cdk
that referenced
this pull request
May 19, 2021
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. 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` See: - import-js/eslint-plugin-import#2021 - https://docs.npmjs.com/cli/v6/commands/npm-install#:~:text=--no-package-lock
akash1810
added a commit
to guardian/cdk
that referenced
this pull request
May 19, 2021
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: - import-js/eslint-plugin-import#2021 - https://docs.npmjs.com/cli/v6/commands/npm-install#:~:text=--no-package-lock
akash1810
added a commit
to guardian/cdk
that referenced
this pull request
May 19, 2021
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 [email protected]. > 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
added a commit
to guardian/cdk
that referenced
this pull request
May 19, 2021
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: - import-js/eslint-plugin-import#2021 - https://docs.npmjs.com/cli/v6/commands/npm-install#:~:text=--no-package-lock
akash1810
added a commit
to guardian/cdk
that referenced
this pull request
May 19, 2021
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: - import-js/eslint-plugin-import#2021 - https://docs.npmjs.com/cli/v6/commands/npm-install#:~:text=--no-package-lock
akash1810
added a commit
to guardian/cdk
that referenced
this pull request
May 19, 2021
This version of eslint-plugin-import prefers `import` statements to appear before `import type`. This change fixes these linting errors. See: - import-js/eslint-plugin-import#2021
dependabot bot
pushed a commit
to guardian/cdk
that referenced
this pull request
May 19, 2021
This version of eslint-plugin-import prefers `import` statements to appear before `import type`. This change fixes these linting errors. See: - import-js/eslint-plugin-import#2021
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #645