-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
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 :-)