Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

chore(eslint): forbid modules importing from core #556

Merged
merged 7 commits into from
Oct 2, 2021
Merged

Conversation

clarkdo
Copy link
Member

@clarkdo clarkdo commented Sep 23, 2021

❓ Type of change

  • Enhancement (improving an existing functionality like performance)

πŸ“š Description

Related to #555 (comment), modules in nuxt3 package should not import code from app and core directly, this pr is adding an eslint rule for preventing the unexpected importing.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@clarkdo clarkdo requested a review from pi0 September 23, 2021 16:42
@clarkdo clarkdo force-pushed the chore/module-import branch from 64ae550 to 541ccd2 Compare September 23, 2021 16:43
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Sep 23, 2021

Deploying with Β Cloudflare Pages Β Cloudflare Pages

Latest commit: 233aaf5
Status:⚑️  Build in progress...

View logs

@clarkdo clarkdo changed the title chore(test): fix external redirect link chore(eslint): forbid modules importing from core Sep 23, 2021
@pi0
Copy link
Member

pi0 commented Sep 23, 2021

This is a nice idea! Extending restriction rules, do you think it is also possible to:

  • Avoid nitro/runtime importing from it's outside
  • Avoid core/app importing from each other

@clarkdo
Copy link
Member Author

clarkdo commented Sep 23, 2021

Good point, I’ll look into it

@clarkdo
Copy link
Member Author

clarkdo commented Sep 24, 2021

NOTE: this change requires import-js/eslint-plugin-import#2219 to be released.

@pi0 pi0 merged commit eb794f3 into main Oct 2, 2021
@pi0 pi0 deleted the chore/module-import branch October 2, 2021 18:40
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants