You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the git history of trailing-newline.ts you can find a mistake where I wrote '\UFEFF' instead of \uFEFF.
The rule should check every string and template literal for escaped characters that are useless.
Some background on escape sequences: https://mathiasbynens.be/notes/javascript-escapes
It doesn't need to check for useless escapes in regular expressions.
It should allow '\${' and `\${` only if followed by { to allow for escaping template literal substitutions (or suppress TSLint's no-invalid-template-strings).
Note that this information is not present in the AST node, so you need to use node.getText() to get the raw source text.
The autofixer could just remove the backslash.
The text was updated successfully, but these errors were encountered:
The rule should probably exclude tagged template literals, because the tag function can actually access the content of the original escape and may use that for some strange magic. https://tc39.github.io/proposal-template-literal-revision/
In the git history of
trailing-newline.ts
you can find a mistake where I wrote'\UFEFF'
instead of\uFEFF
.The rule should check every string and template literal for escaped characters that are useless.
Some background on escape sequences: https://mathiasbynens.be/notes/javascript-escapes
It doesn't need to check for useless escapes in regular expressions.
It should allow
'\${'
and`\${`
only if followed by{
to allow for escaping template literal substitutions (or suppress TSLint'sno-invalid-template-strings
).Note that this information is not present in the AST node, so you need to use
node.getText()
to get the raw source text.The autofixer could just remove the backslash.
The text was updated successfully, but these errors were encountered: