Skip to content

Files

Latest commit

 

History

History
25 lines (16 loc) · 502 Bytes

unnecessary_string_escapes.md

File metadata and controls

25 lines (16 loc) · 502 Bytes

Pattern: Unnecessary string escape

Issue: -

Description

Remove unnecessary backslashes in strings.

Example of incorrect code:

'this string contains 2 \"double quotes\" ';
"this string contains 2 \'single quotes\' ";

Example of correct code:

'this string contains 2 "double quotes" ';
"this string contains 2 'single quotes' ";

Further Reading