43081j / 43081j/eslint-plugin-lit

Extend invalid escape sequences rule to other tagged template literals

Ouverte
#179 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
TypeScript
Étoiles
138
Forks
26
Merge moyen
23 h 29 min
PR mergées (30 j)
4

Description

Template literals used as values for the `css` and `svg` tag functions are vulnerable to the same issues with invalid escape sequences as the `html` tag function.

For example the following code leads to an empty CSS result with no error or warning to indicate what's gone wrong:

```typescript
const styles = css`
p::before {
content: "\2716";
}
`;
```

I'd be in favour of expanding the `no-invalid-escape-sequences` rule to cover these other kinds of template literals.

Happy to do a PR for this with docs changes if that's helpful.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.