Skip to content

Commit

Permalink
lib: use focused ESLint disabling in util.js
Browse files Browse the repository at this point in the history
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: nodejs#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>
  • Loading branch information
Trott committed Jun 1, 2018
1 parent cbd82a9 commit 6cda5a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]*)$/;

Expand Down

0 comments on commit 6cda5a9

Please sign in to comment.