Skip to content

Commit c0e4ef1

Browse files
committed
eslint enable no-control-regex and disable only in validator
1 parent 615bd75 commit c0e4ef1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.eslintrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"error",
3232
"always"
3333
],
34-
"no-control-regex": "off",
3534
"no-console": "off",
3635
"no-unused-vars": [
3736
"error",

lib/validator/is.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
'use strict';
2+
/* eslint-disable no-control-regex */
23

34
/**
45
* Validation rules.
@@ -8,13 +9,14 @@ var rules = {
89
NCHAR: /^[\u002D\u002E\u005F\w]+$/,
910
NQCHAR: /^[\u0021\u0023-\u005B\u005D-\u007E]+$/,
1011
NQSCHAR: /^[\u0020-\u0021\u0023-\u005B\u005D-\u007E]+$/,
11-
// note: \u10000-\u10FFFF is displayed by surrogate pairs
1212
UNICODECHARNOCRLF: /^[\u0009\u0020-\u007E\u0080-\uD7FF\uE000-\uFFFD]+$/,
13-
UNICODECHARNOCRLF_EXTENDED: /[\u{10000}-\u{10FFFF}]/u,
13+
UNICODECHARNOCRLF_EXTENDED: /^[\u{10000}-\u{10FFFF}]+$/u,
1414
URI: /^[a-zA-Z][a-zA-Z0-9+.-]+:/,
1515
VSCHAR: /^[\u0020-\u007E]+$/
1616
};
1717

18+
/* eslint-enable no-control-regex */
19+
1820
/**
1921
* Export validation functions.
2022
*/

0 commit comments

Comments
 (0)