UNPKG

eslint-plugin-unicorn

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