UNPKG

eslint-plugin-perfectionist

Version:

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

19 lines (18 loc) 618 B
import { isPropertyOrAccessorNode } from './is-property-or-accessor-node.js' import { AST_NODE_TYPES } from '@typescript-eslint/utils' /** * Checks whether a node is a property or accessor node with an * ArrowFunctionExpression value. * * @param node - The AST node to check. * @returns True if the node is a property or accessor node with an * ArrowFunctionExpression value, false otherwise. */ function isArrowFunctionNode(node) { return ( isPropertyOrAccessorNode(node) && node.value !== null && node.value.type === AST_NODE_TYPES.ArrowFunctionExpression ) } export { isArrowFunctionNode }