Skip to content

Rule Change: require-unicode-regexp supports v flag #17199

Closed
@sosukesuzuki

Description

What rule do you want to change?

require-unicode-regexp

What change to do you want to make?

Generate more warnings

How do you think the change should be implemented?

A new option

Example code

/^[👍]$/v.test("👍")

What does the rule currently do for this code?

Cannot parse. And even if it could be parsed, it would probably generate a warning.

What will the rule do after it's changed?

There are two change requests:

  • v flag is a superset of u flag so that this rule will not warn if v flag is enabled
  • Add an option like requireVFlag. When this option is enabled, ESLint warns if v flag is disabled, even if u flag is enabled.

Participation

  • I am willing to submit a pull request to implement this change.

Additional comments

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    archived due to ageThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintruleRelates to ESLint's core rules

    Type

    No type

    Projects

    • Status

      Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions