From ea701359b7d3d87a44b39305818badbb784d3709 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 24 Aug 2021 10:31:24 +0900 Subject: [PATCH] Build(deps-dev): Bump eslint-plugin-regexp from 0.13.2 to 1.0.0 (#11351) * Build(deps-dev): Bump eslint-plugin-regexp from 0.13.2 to 1.0.0 Bumps [eslint-plugin-regexp](https://github.com/ota-meshi/eslint-plugin-regexp) from 0.13.2 to 1.0.0. - [Release notes](https://github.com/ota-meshi/eslint-plugin-regexp/releases) - [Commits](https://github.com/ota-meshi/eslint-plugin-regexp/compare/v0.13.2...v1.0.0) --- updated-dependencies: - dependency-name: eslint-plugin-regexp dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Update options for `regexp/no-useless-flag` rule * Remove useless flag * Fix style Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: fisker Cheung --- .eslintrc.js | 7 ++++++- package.json | 2 +- src/language-html/print-preprocess.js | 2 +- src/language-html/printer-html.js | 2 +- yarn.lock | 18 +++++++++--------- 5 files changed, 18 insertions(+), 13 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1a36e7776..37d718c85 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -104,7 +104,12 @@ module.exports = { allows: ["dotAll"], }, ], - "regexp/no-useless-flag": "error", + "regexp/no-useless-flag": [ + "error", + { + strictTypes: false, + }, + ], "unicorn/better-regex": "error", "unicorn/explicit-length-check": "error", diff --git a/package.json b/package.json index 4935c5125..0330ef5a8 100644 --- a/package.json +++ b/package.json @@ -114,7 +114,7 @@ "eslint-plugin-jest": "24.4.0", "eslint-plugin-prettier-internal-rules": "2.0.1", "eslint-plugin-react": "7.24.0", - "eslint-plugin-regexp": "0.13.2", + "eslint-plugin-regexp": "1.0.0", "eslint-plugin-unicorn": "35.0.0", "esm-utils": "1.1.0", "execa": "5.1.1", diff --git a/src/language-html/print-preprocess.js b/src/language-html/print-preprocess.js index c38d0f0ec..7c713ec12 100644 --- a/src/language-html/print-preprocess.js +++ b/src/language-html/print-preprocess.js @@ -230,7 +230,7 @@ function extractInterpolation(ast, options) { return; } - const interpolationRegex = /{{(.+?)}}/gs; + const interpolationRegex = /{{(.+?)}}/s; ast.walk((node) => { if (!canHaveInterpolation(node)) { return; diff --git a/src/language-html/printer-html.js b/src/language-html/printer-html.js index a261fab91..7ef8de4a4 100644 --- a/src/language-html/printer-html.js +++ b/src/language-html/printer-html.js @@ -1131,7 +1131,7 @@ function printEmbeddedAttributeValue(node, originalTextToDoc, options) { ); } - const interpolationRegex = /{{(.+?)}}/gs; + const interpolationRegex = /{{(.+?)}}/s; const value = getValue(); if (interpolationRegex.test(value)) { const parts = []; diff --git a/yarn.lock b/yarn.lock index 66fcb368b..4ca7089ef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3046,16 +3046,16 @@ eslint-plugin-react@7.24.0: resolve "^2.0.0-next.3" string.prototype.matchall "^4.0.5" -eslint-plugin-regexp@0.13.2: - version "0.13.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-regexp/-/eslint-plugin-regexp-0.13.2.tgz#5f00697734bffcf07ef66394b249495deb2004e1" - integrity sha512-WbvZTnbzN5DYabMwWjig6sTH6mfOs2f6S3cPQwpn0AuD+UVgoJc2+GHi6cSHBYiT/hkwNidA1WHa/L0l5e609A== +eslint-plugin-regexp@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-regexp/-/eslint-plugin-regexp-1.0.0.tgz#ca84acf9764f8768101bdaf2e3a410530b9df187" + integrity sha512-TwNkkDS+Q5+gEaUTgEYEJzP5P8Y6c/UGxJkUsg6oc/DBWGT/5VJqCw0xhx/hhFT/HgfdABngTWKBBwtqTbjGuQ== dependencies: comment-parser "^1.1.2" eslint-utils "^3.0.0" jsdoctypeparser "^9.0.0" refa "^0.9.0" - regexp-ast-analysis "^0.2.3" + regexp-ast-analysis "^0.2.4" regexpp "^3.2.0" scslre "^0.1.6" @@ -5596,10 +5596,10 @@ regenerator-transform@^0.14.2: dependencies: "@babel/runtime" "^7.8.4" -regexp-ast-analysis@^0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/regexp-ast-analysis/-/regexp-ast-analysis-0.2.3.tgz#1a2b12c11cf2ade01671f56d4d8fcea60a64db17" - integrity sha512-K/6d90dP1DI68HHdHORj9vVxV5oWkLB8F7LeGs70EdA/h5BIqkrK8SdGy+O9Ii+AVVPprF0Ia6f5UwgI+ahIcw== +regexp-ast-analysis@^0.2.3, regexp-ast-analysis@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/regexp-ast-analysis/-/regexp-ast-analysis-0.2.4.tgz#a497a7c8bfbba51438693821e4b0e3ed43e20f1b" + integrity sha512-8L7kOZQaKPxKKAwGuUZxTQtlO3WZ+tiXy4s6G6PKL6trbOXcZoumwC3AOHHFtI/xoSbNxt7jgLvCnP1UADLWqg== dependencies: refa "^0.9.0" regexpp "^3.2.0"