UNPKG

eslint-plugin-perfectionist

Version:

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

11 lines (10 loc) 337 B
'use strict' Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }) let getDecoratorName = ({ sourceCode, decorator }) => { let fullName = sourceCode.getText(decorator) if (fullName.startsWith('@')) { fullName = fullName.slice(1) } return fullName.split('(')[0] } exports.getDecoratorName = getDecoratorName