sindresorhus/eslint-plugin-unicorn

Rule proposal: opposite of `prefer-string-raw`

Fermée

#2 652 ouverte le 11 mai 2025

 (1 commentaire) (2 réactions) (0 personne assignée)JavaScript (468 forks)user submission
help wantednew rule

Métriques du dépôt

Stars
 (5 022 étoiles)
Métriques de merge PR
 (Merge moyen 4h 30m) (26 PRs mergées en 30 j)

Description

Description

During refactoring, some strings may not need String.raw anymore, should use a string literal instead.

Examples

// ❌
String.raw`a`

// ✅
'a'

Proposed rule name

no-string-raw

Additional Info

Not sure if we want to add a separate rule, or just add to prefer-string-raw.

Guide contributeur