💼 This rule is enabled in the ✅ recommended
config.
🔧 This rule is automatically fixable by the --fix
CLI option.
String.raw
can be used to avoid escaping \
.
const file = "C:\\windows\\style\\path\\to\\file.js";
const regexp = new RegExp('foo\\.bar');
const file = String.raw`C:\windows\style\path\to\file.js`;
const regexp = new RegExp(String.raw`foo\.bar`);