diff --git a/lib/rules/no-useless-mustaches.js b/lib/rules/no-useless-mustaches.js index f4f858d9e..f4db1a008 100644 --- a/lib/rules/no-useless-mustaches.js +++ b/lib/rules/no-useless-mustaches.js @@ -142,8 +142,9 @@ module.exports = { // It doesn't autofix because another rule like indent or eol space might remove spaces. return null } + const escaped = text.replace(/ + {{ '<' }} + {{ '>' }} + {{ '&' }} + {{ '—' }} + + `, + output: ` + + `, + errors: [ + 'Unexpected mustache interpolation with a string literal value.', + 'Unexpected mustache interpolation with a string literal value.', + 'Unexpected mustache interpolation with a string literal value.', + 'Unexpected mustache interpolation with a string literal value.' + ] + }, + { + code: ` + + `, + output: ` + + `, + errors: [ + 'Unexpected mustache interpolation with a string literal value.', + 'Unexpected mustache interpolation with a string literal value.', + 'Unexpected mustache interpolation with a string literal value.', + 'Unexpected mustache interpolation with a string literal value.' + ] + }, { code: `