eslint-plugin-i18next: Bug: template literals are being ignored

The plugin correctly processes single-quoted and double-quoted strings, such as:

'Hello' // warning
"Hello" // warning

but wrongly ignores template literals:

`Hello` // no warning

Template literals are often allowed in internationalization packages and even if not, they might as well be equivalent to normal strings (i.e. to not contain substitution).

Please consider adding the processing of template literals.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 17 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Hi again @edvardchen , unfortunately I’ve found a bug. I can’t add a rule to ignore strings with backticks. Also I’ve tried to add className to ignoreAttributes and didn’t help me 😦

<div className={`media-screen ${dragClassName}`}> 

Also, what I’ve found is that CONSTANT also is validating

const CONST_STRING = `dsa${test}dsa`;

Therefore I guess that backtrics validations skips all kind of ignore rules.

I think we have to reopen the issue.