UNPKG

eslint-plugin-path-supervisor

Version:

Plugin for checking the rules of absolute and relative paths in project

12 lines (9 loc) 295 B
const path = require('path'); function getCurrentFilePath(context) { const currentFilePath = context.getFilename(); const normalizedPath = path.toNamespacedPath(currentFilePath); return normalizedPath.split('\\').join('/'); } module.exports = { getCurrentFilePath }