We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 286074a commit 306e467Copy full SHA for 306e467
rules/import-style.js
@@ -153,8 +153,8 @@ const getNamespaceIdentifier = moduleName => {
153
return specialCases[moduleName];
154
}
155
156
- // Get the last part of the path and remove extension
157
- const lastPart = moduleName.split('/').pop().split('.')[0];
+ // Trim trailing slashes and get the last part of the path and remove extension
+ const lastPart = moduleName.replace(/\/+$/, '').split('/').pop().split('.')[0];
158
159
// For scoped packages, we want the package name, not the scope
160
// @scope/package -> package
0 commit comments