UNPKG

@atlaskit/eslint-plugin-ui-styling-standard

Version:

The eslint plugin to enforce and educate on Atlassian's UI Styling Standard

12 lines • 426 B
import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; import { getSourceCode } from '@atlaskit/eslint-utils/context-compat'; export function getSourceLocationFromRange(context, _ref) { var _ref2 = _slicedToArray(_ref, 2), start = _ref2[0], end = _ref2[1]; var sourceCode = getSourceCode(context); return { start: sourceCode.getLocFromIndex(start), end: sourceCode.getLocFromIndex(end) }; }