Skip to content

regexp/prefer-d: Add an option for whole \ds #341

@RunDevelopment

Description

@RunDevelopment

Description
I think that the range 0-9 can be more readable than \d in some situations. E.g. [0-9a-f] vs [\da-f].

I think we should an option that makes it so that only whole character classes that are equal to \d or \D are reported. So [0-9] will be reported but [0-9a-f] won't.

What do you think @ota-meshi?

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions