| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,12 @@ new RuleTester({ | |||
| 20 | 20 | code: 'require("common")\n' + | |
| 21 | 21 | 'require("assert")' | |
| 22 | 22 | }, | |
| 23 | + { | ||
| 24 | + code: 'import "../../../../common/index.mjs";', | ||
| 25 | + languageOptions: { | ||
| 26 | + sourceType: 'module', | ||
| 27 | + }, | ||
| 28 | + }, | ||
| 23 | 29 | ], | |
| 24 | 30 | invalid: [ | |
| 25 | 31 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -22,7 +22,7 @@ module.exports = { | |||
| 22 | 22 | * @returns {string} module name | |
| 23 | 23 | */ | |
| 24 | 24 | function getModuleName(str) { | |
| 25 | - if (str === '../common/index.mjs') { | ||
| 25 | + if (str.startsWith('../') && str.endsWith('/common/index.mjs')) { | ||
| 26 | 26 | return 'common'; | |
| 27 | 27 | } | |
| 28 | 28 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments