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: #21041
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Vse Mozhet Byt <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Weijia Wang <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • 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.