sindresorhus/eslint-plugin-unicorn

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

Open

Aperta il 11 mag 2025

Vedi su GitHub
 (1 commento) (2 reazioni) (0 assegnatari)JavaScript (5022 star) (468 fork)user submission
help wantednew rule

Descrizione

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.

Guida contributor