eslint-plugin-unicorn icon indicating copy to clipboard operation
eslint-plugin-unicorn copied to clipboard

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

Open fisker opened this issue 6 months ago • 1 comments

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.

fisker avatar May 11 '25 16:05 fisker

Accepted. We can just add it to prefer-string-raw.

sindresorhus avatar May 12 '25 03:05 sindresorhus