Add `no-useless-string-literal`
ota-meshi opened this issue · comments
Yosuke Ota commented
Description
no-useless-string-literal
rule reports the string alternatives of a single character.
They can be placed outside \q{...}
.
/* ✗ BAD */
var foo = /[\q{a}]/v // => /[a]/v
var foo = /[\q{a|bc}]/v // => /[a\q{bc}]/v
/* ✓ GOOD */
var foo = /[\q{ab|}]/v