Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add missing eslint comments in prefer-regex-literals examples #12858

Merged
merged 1 commit into from Feb 3, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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