securityos/node_modules/eslint-plugin-unicorn/rules/fix/replace-template-element.js

12 lines
254 B
JavaScript

'use strict';
const replaceTemplateElement = (fixer, node, replacement) => {
const {range: [start, end], tail} = node;
return fixer.replaceTextRange(
[start + 1, end - (tail ? 1 : 2)],
replacement,
);
};
module.exports = replaceTemplateElement;