UNPKG

eslint-plugin-perfectionist

Version:

ESLint plugin for sorting various data such as objects, imports, types, enums, JSX props, etc.

11 lines (10 loc) 275 B
/** * Returns if a node is on a single line. * * @param node - The node to check. * @returns True if the node is on a single line, false otherwise. */ function isNodeOnSingleLine(node) { return node.loc.start.line === node.loc.end.line } export { isNodeOnSingleLine }