-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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: prevent importing theme components with relative paths #7674
Conversation
|
||
.docusaurus-mt-lg { | ||
/* Docusaurus-specific utility class */ | ||
:global(.docusaurus-mt-lg) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not really liking this solitary utility class 🤪 maybe we should just duplicate the rule everywhere 🤷♂️
@@ -16,7 +16,7 @@ import { | |||
import BlogLayout from '@theme/BlogLayout'; | |||
import TagsListByLetter from '@theme/TagsListByLetter'; | |||
import type {Props} from '@theme/BlogTagsListPage'; | |||
import SearchMetadata from '../SearchMetadata'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now catched with error
/Users/sebastienlorber/Desktop/projects/docusaurus/packages/docusaurus-theme-classic/src/theme/BlogTagsListPage/index.tsx
19:1 error '../SearchMetadata' import is restricted from being used by a pattern no-restricted-imports
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
Size Change: +52 B (0%) Total Size: 802 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wanted to do the same 👍
Pre-flight checklist
Motivation
ESLint should detect when using relative component imports between theme components
Also, we want to ensure consistent naming/usage of CSS module files
Test Plan
CI
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs