Skip to content

Commit

Permalink
Docs: add missing eslint comments in prefer-regex-literals examples (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjermanovic committed Feb 3, 2020
1 parent 7d551ab commit d6c313d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/rules/prefer-regex-literals.md
Expand Up @@ -45,6 +45,8 @@ dynamically generated regular expressions.
Examples of **incorrect** code for this rule:

```js
/*eslint prefer-regex-literals: "error"*/

new RegExp("abc");

new RegExp("abc", "u");
Expand All @@ -63,6 +65,8 @@ new RegExp(String.raw`^\d\.$`);
Examples of **correct** code for this rule:

```js
/*eslint prefer-regex-literals: "error"*/

/abc/;

/abc/u;
Expand Down

0 comments on commit d6c313d

Please sign in to comment.