UNPKG

eslint-plugin-unicorn

Version:
9 lines (6 loc) 286 B
import hasSameRange from './has-same-range.js'; const isShorthandImportLocal = (node, context) => { const {type, local, imported} = node.parent; return type === 'ImportSpecifier' && hasSameRange(local, imported, context) && local === node; }; export default isShorthandImportLocal;