mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
lib: use focused ESLint disabling in util.js
Instead of disabling all ESLint rules for two lines that require a violation of no-control-regex, disable only the no-control-regex rule. PR-URL: https://github.com/nodejs/node/pull/21041 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
261ef1d242
commit
a30bf55e69
1 file changed
+3
-2
+3
-2
@@ -87,10 +87,11 @@ const errorToString = Error.prototype.toString;
|
||||
let CIRCULAR_ERROR_MESSAGE;
|
||||
let internalDeepEqual;
|
||||
|
||||
/* eslint-disable */
|
||||
/* eslint-disable no-control-regex */
|
||||
const strEscapeSequencesRegExp = /[\x00-\x1f\x27\x5c]/;
|
||||
const strEscapeSequencesReplacer = /[\x00-\x1f\x27\x5c]/g;
|
||||
/* eslint-enable */
|
||||
/* eslint-enable no-control-regex */
|
||||
|
||||
const keyStrRegExp = /^[a-zA-Z_][a-zA-Z_0-9]*$/;
|
||||
const numberRegExp = /^(0|[1-9][0-9]*)$/;
|
||||
|
||||
|
||||
Reference in new issue
Block a user