UNPKG

@putout/plugin-convert-template-to-string

Version:

🐊Putout plugin adds ability to find and remove useless template string

13 lines (10 loc) 320 B
export const report = () => 'Avoid using Template string with only one expression'; export const match = () => ({ '`${__a}`': (vars, path) => { const {parentPath} = path; return !parentPath.isTaggedTemplateExpression(); }, }); export const replace = () => ({ '`${__a}`': 'String(__a)', });