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

Enforce relative imports when importing from core #1616

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

emma-imber
Copy link
Contributor

@emma-imber emma-imber commented Oct 11, 2024

What does this change?

Adds an eslint rule to ban non-relative imports from core and replaces all instances with relative imports.

Why?

We had an issue where non relative imports were causing build failures, so moving to relative imports is sensible as our best practice.

There are a few folders we need to do this for - I'm going to split the changes into several separate PRs for my own sanity and to make reviewing (hopefully) easier. I felt like 74 files changed just from replacing imports of core was bulky enough for 1 PR without the other updates too!

@emma-imber emma-imber requested a review from a team as a code owner October 11, 2024 12:34
Copy link

changeset-bot bot commented Oct 11, 2024

🦋 Changeset detected

Latest commit: 30344f6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@guardian/commercial Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Ad load time test results

For consented, top-above-nav took on average 5254ms to load.
For consentless, top-above-nav took on average 3253ms to load.

Test conditions:

  • 5mbps download speed
  • 1.5mbps upload speed
  • 150ms latency

Copy link
Member

@arelra arelra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📈

@emma-imber emma-imber merged commit 4c04b4b into main Oct 15, 2024
13 checks passed
@emma-imber emma-imber deleted the ei/use-relative-imports branch October 15, 2024 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants