Skip to content

Idea: Using RegExp Linter #2141

@pano9000

Description

@pano9000

Just noting down a quick idea for the future here:

Since a lot of this project revolves around working with RegExps, it could make sense to enforce certain RegExps rules, to ensure you have consistent RegExps, e.g. just looking at the "isMobilePhone" validator, there are quite a few different "RegExp" styles used in there for expressing some ranges, as there is no real "rule" or guideline in place currently.

One solution could be to incorporate this ESLint plugin, since ESLint is already used in this project:
https://ota-meshi.github.io/eslint-plugin-regexp/

I haven't played around with it yet, but at a first look, it does look pretty nice and extensive.
Their rules are also nicely presented: https://ota-meshi.github.io/eslint-plugin-regexp/rules/

Again, just an idea for the future here :-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions