-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add support for cross-imports with @x
#103
Conversation
@@ -44,7 +44,7 @@ const noPublicApiSidestep = { | |||
} | |||
|
|||
if (isSliced(dependencyLocation.layerName)) { | |||
if (dependencyLocation.segmentName !== null) { | |||
if (dependencyLocation.segmentName !== null && dependencyLocation.segmentName !== '@x') { |
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.
Shouldn't such standardized folder names be stored in some self-describing constant (that can be referenced everywhere throughout the project), rather than just a string literal?
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.
Maybe it should even be provided by feature-sliced/filesystem
, but we can temporarily add it locally for the plugin.
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.
Yeah, good point. I'll add it to the filesystem package
@@ -23,12 +23,20 @@ const noReservedFolderNames = { | |||
|
|||
for (const violatingFolder of findAllRecursively( | |||
child, | |||
(entry) => entry.type === 'folder' && conventionalSegmentNames.includes(basename(entry.path)), | |||
(entry) => entry.type === 'folder' && conventionalSegmentNames.concat('@x').includes(basename(entry.path)), |
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.
Same as no-public-api-sidestep
Excellent job! It's good that you decided to add a separate message for the There was just a single minor call out from me |
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.
Perfect, all necessary changes have been made!
Closes #29