UNPKG

monk-import-export

Version:

Simple import & export sorting ESLint plugin

10 lines (8 loc) 441 B
import type { Node, NodeKind } from '../types/Node.types'; export function getImportExportKind(node: Node): NodeKind { // `type` and `typeof` imports, as well as `type` exports (there are no // `typeof` exports). In Flow, import specifiers can also have a kind. Default // to "value" (like TypeScript) to make regular imports/exports come after the // type imports/exports. return node.importKind || node.exportKind || 'value'; }