UNPKG
eslint-plugin-path-supervisor
Version:
latest (0.0.4)
0.0.4
0.0.3
0.0.2
0.0.1
Plugin for checking the rules of absolute and relative paths in project
eslint-plugin-path-supervisor
/
lib
/
helpers
/
getImportedModulePath.js
10 lines
(8 loc)
•
267 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
function
getImportedModulePath
(
node, alias
) {
const
importPath = node.
source
.
value
;
const
importedModulePath = alias ? importPath.
replace
(
`
${alias}
/`
,
''
) : importPath;
return
importedModulePath; }
module
.
exports
= { getImportedModulePath }