diff --git a/.eslintrc.js b/.eslintrc.js index 1632955f0bf..f1c8ade0c8d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -52,7 +52,6 @@ module.exports = { 'no-new': 'off', 'no-param-reassign': 'off', 'no-prototype-builtins': 'off', - 'no-useless-escape': 'off', radix: 'off', 'require-atomic-updates': 'off', diff --git a/src/util.ts b/src/util.ts index ec7de1ee186..f238ecd8932 100644 --- a/src/util.ts +++ b/src/util.ts @@ -453,8 +453,7 @@ export function normalizeEnsName(ensName: string): string | null { const normalized = ensNamehash.normalize(ensName.trim()); // this regex is only sufficient with the above call to ensNamehash.normalize // TODO: change 7 in regex to 3 when shorter ENS domains are live - // eslint-disable-next-line require-unicode-regexp - if (normalized.match(/^(([\w\d\-]+)\.)*[\w\d\-]{7,}\.(eth|test)$/)) { + if (normalized.match(/^(([\w\d-]+)\.)*[\w\d-]{7,}\.(eth|test)$/u)) { return normalized; } } catch (_) {