Skip to content
Permalink
Browse files
docs: Mention character classes in no-useless-escape (#15421)
* docs: Mention character classes in no-useless-escape

* Make it clear which of the brackets needs escaping
  • Loading branch information
SebastianSimon committed Dec 20, 2021
1 parent 9d951ac commit 775d18138244a28ebe1cb92849cd0f4e8cd27672
Showing with 5 additions and 2 deletions.
  1. +5 −2 docs/rules/no-useless-escape.md
@@ -26,7 +26,8 @@ Examples of **incorrect** code for this rule:
`\#{foo}`;
/\!/;
/\@/;
/[\[]/;
/[a-z\-]/;
```

Examples of **correct** code for this rule:
@@ -46,7 +47,9 @@ Examples of **correct** code for this rule:
/\\/g;
/\t/g;
/\w\$\*\^\./;
/[[]/;
/[\]]/;
/[a-z-]/;
```

## When Not To Use It

0 comments on commit 775d181

Please sign in to comment.