Skip to content

Commit

Permalink
chore(deps): update dependency eslint-plugin-regexp to v2 (#15521)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: fisker <lionkay@gmail.com>
  • Loading branch information
renovate[bot] and fisker committed Nov 12, 2023
1 parent f4d93d3 commit 6a1d409
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 61 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
"eslint-plugin-n": "16.3.1",
"eslint-plugin-prettier-internal-rules": "2.0.1",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-regexp": "1.15.0",
"eslint-plugin-regexp": "2.1.1",
"eslint-plugin-unicorn": "49.0.0",
"esm-utils": "4.2.1",
"execa": "7.2.0",
Expand Down
4 changes: 2 additions & 2 deletions src/language-css/clean.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ function clean(ast, newObj, parent) {
newObj.value
) {
newObj.value = newObj.value.replaceAll(
/([\d+.Ee-]+)([A-Za-z]*)/g,
/([\d+.e-]+)([a-z]*)/gi,
(match, numStr, unit) => {
const num = Number(numStr);
return Number.isNaN(num) ? match : num + unit.toLowerCase();
Expand Down Expand Up @@ -208,7 +208,7 @@ function clean(ast, newObj, parent) {
clean.ignoredProperties = ignoredProperties;

function cleanCSSStrings(value) {
return value.replaceAll("'", '"').replaceAll(/\\([^\dA-Fa-f])/g, "$1");
return value.replaceAll("'", '"').replaceAll(/\\([^\da-f])/gi, "$1");
}

export default clean;
9 changes: 5 additions & 4 deletions src/language-css/print/misc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,17 @@ function printUnit(unit) {
}

const STRING_REGEX = /(["'])(?:(?!\1)[^\\]|\\.)*\1/gs;
const NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[Ee][+-]?\d+)?/g;
const STANDARD_UNIT_REGEX = /[A-Za-z]+/g;
const WORD_PART_REGEX = /[$@]?[A-Z_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/g;
const NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:e[+-]?\d+)?/gi;
const STANDARD_UNIT_REGEX = /[a-z]+/gi;
const WORD_PART_REGEX = /[$@]?[_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/gi;
const ADJUST_NUMBERS_REGEX = new RegExp(
STRING_REGEX.source +
"|" +
// eslint-disable-next-line regexp/no-misleading-capturing-group
`(${WORD_PART_REGEX.source})?` +
`(${NUMBER_REGEX.source})` +
`(${STANDARD_UNIT_REGEX.source})?`,
"g",
"gi",
);

function adjustStrings(value, options) {
Expand Down
2 changes: 1 addition & 1 deletion src/language-html/constants.evaluate.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getCssStyleTags = (property) =>
}

const tagNames = selectors.filter((selector) =>
/^[\dA-Za-z]+$/.test(selector),
/^[\da-z]+$/i.test(selector),
);

return tagNames.map((tagName) => [tagName, style.value]);
Expand Down
2 changes: 1 addition & 1 deletion src/language-html/embed/vue-bindings.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function isVueEventBindingExpression(eventBindingValue) {
const fnExpRE = /^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/;
// simple member expression chain (a, a.b, a['b'], a["b"], a[0], a[b])
const simplePathRE =
/^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$A-Z_a-z][\w$]*])*$/;
/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$_a-z][\w$]*])*$/i;

// https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/helpers.js#L104
const value = eventBindingValue.trim();
Expand Down
94 changes: 42 additions & 52 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1069,10 +1069,10 @@ __metadata:
languageName: node
linkType: hard

"@eslint-community/regexpp@npm:^4.4.0, @eslint-community/regexpp@npm:^4.5.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1":
version: 4.6.2
resolution: "@eslint-community/regexpp@npm:4.6.2"
checksum: a3c341377b46b54fa228f455771b901d1a2717f95d47dcdf40199df30abc000ba020f747f114f08560d119e979d882a94cf46cfc51744544d54b00319c0f2724
"@eslint-community/regexpp@npm:^4.5.0, @eslint-community/regexpp@npm:^4.5.1, @eslint-community/regexpp@npm:^4.6.1, @eslint-community/regexpp@npm:^4.8.0, @eslint-community/regexpp@npm:^4.9.1":
version: 4.10.0
resolution: "@eslint-community/regexpp@npm:4.10.0"
checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b
languageName: node
linkType: hard

Expand Down Expand Up @@ -2859,10 +2859,10 @@ __metadata:
languageName: node
linkType: hard

"comment-parser@npm:^1.1.2":
version: 1.3.1
resolution: "comment-parser@npm:1.3.1"
checksum: 421e6a113a3afd548500e7174ab46a2049dccf92e82bbaa3b209031b1bdf97552aabfa1ae2a120c0b62df17e1ba70e0d8b05d68504fee78e1ef974c59bcfe718
"comment-parser@npm:^1.4.0":
version: 1.4.1
resolution: "comment-parser@npm:1.4.1"
checksum: e0f6f60c5139689c4b1b208ea63e0730d9195a778e90dd909205f74f00b39eb0ead05374701ec5e5c29d6f28eb778cd7bc41c1366ab1d271907f1def132d6bf1
languageName: node
linkType: hard

Expand Down Expand Up @@ -3781,21 +3781,20 @@ __metadata:
languageName: node
linkType: hard

"eslint-plugin-regexp@npm:1.15.0":
version: 1.15.0
resolution: "eslint-plugin-regexp@npm:1.15.0"
"eslint-plugin-regexp@npm:2.1.1":
version: 2.1.1
resolution: "eslint-plugin-regexp@npm:2.1.1"
dependencies:
"@eslint-community/eslint-utils": ^4.2.0
"@eslint-community/regexpp": ^4.4.0
comment-parser: ^1.1.2
grapheme-splitter: ^1.0.4
jsdoctypeparser: ^9.0.0
refa: ^0.11.0
regexp-ast-analysis: ^0.6.0
scslre: ^0.2.0
"@eslint-community/regexpp": ^4.9.1
comment-parser: ^1.4.0
jsdoc-type-pratt-parser: ^4.0.0
refa: ^0.12.1
regexp-ast-analysis: ^0.7.1
scslre: ^0.3.0
peerDependencies:
eslint: ">=6.0.0"
checksum: 6f5c6588b4463e11999d2fc70c9348e7cf250867a4889bdfcdef10d867cc317ba159b2053f833d43cf1141bc9b4956504647a8e251a84e4d010ad72cecf4d68e
eslint: ">=8.44.0"
checksum: 154e3eecc94805421857b58b9208c5b876c5af66947643ec8b2ea3fa25c0e2cc0531822676f221c040976a93200ec19c087106bdbf33aac61ddca3283407ec11
languageName: node
linkType: hard

Expand Down Expand Up @@ -4521,13 +4520,6 @@ __metadata:
languageName: node
linkType: hard

"grapheme-splitter@npm:^1.0.4":
version: 1.0.4
resolution: "grapheme-splitter@npm:1.0.4"
checksum: 0c22ec54dee1b05cd480f78cf14f732cb5b108edc073572c4ec205df4cd63f30f8db8025afc5debc8835a8ddeacf648a1c7992fe3dcd6ad38f9a476d84906620
languageName: node
linkType: hard

"graphemer@npm:^1.4.0":
version: 1.4.0
resolution: "graphemer@npm:1.4.0"
Expand Down Expand Up @@ -5873,12 +5865,10 @@ __metadata:
languageName: node
linkType: hard

"jsdoctypeparser@npm:^9.0.0":
version: 9.0.0
resolution: "jsdoctypeparser@npm:9.0.0"
bin:
jsdoctypeparser: bin/jsdoctypeparser
checksum: d9fd932fc657ee8df93b112ceb23f0c27862da7302c27325101d3700110d78d264f9ef08837ed84e7dd47b83657ffb323b47b1942b237111055cefb647b4a8ba
"jsdoc-type-pratt-parser@npm:^4.0.0":
version: 4.0.0
resolution: "jsdoc-type-pratt-parser@npm:4.0.0"
checksum: af0629c9517e484be778d8564440fec8de5b7610e0c9c88a3ba4554321364faf72b46689c8d8845faa12c0718437a9ed97e231977efc0f2d50e8a2dbad807eb3
languageName: node
linkType: hard

Expand Down Expand Up @@ -7203,7 +7193,7 @@ __metadata:
eslint-plugin-n: 16.3.1
eslint-plugin-prettier-internal-rules: 2.0.1
eslint-plugin-react: 7.33.2
eslint-plugin-regexp: 1.15.0
eslint-plugin-regexp: 2.1.1
eslint-plugin-unicorn: 49.0.0
esm-utils: 4.2.1
espree: 9.6.1
Expand Down Expand Up @@ -7424,12 +7414,12 @@ __metadata:
languageName: node
linkType: hard

"refa@npm:^0.11.0":
version: 0.11.0
resolution: "refa@npm:0.11.0"
"refa@npm:^0.12.0, refa@npm:^0.12.1":
version: 0.12.1
resolution: "refa@npm:0.12.1"
dependencies:
"@eslint-community/regexpp": ^4.5.0
checksum: 2b86c348dca15dde99f906bd08d64d6f08a7587e57789ed0a634065b60d8800c65d73b19e0d97ff79306591b9db8f15f4ef726026522d08da27da4ce278872be
"@eslint-community/regexpp": ^4.8.0
checksum: 845cef54786884d5f09558dd600cec20ee354ebbcabd206503d5cc5d63d22bb69dee8b66bf8411de622693fc5c2b9d42b9cf1e5e6900c538ee333eefb5cc1b41
languageName: node
linkType: hard

Expand All @@ -7447,13 +7437,13 @@ __metadata:
languageName: node
linkType: hard

"regexp-ast-analysis@npm:^0.6.0":
version: 0.6.0
resolution: "regexp-ast-analysis@npm:0.6.0"
"regexp-ast-analysis@npm:^0.7.0, regexp-ast-analysis@npm:^0.7.1":
version: 0.7.1
resolution: "regexp-ast-analysis@npm:0.7.1"
dependencies:
"@eslint-community/regexpp": ^4.5.0
refa: ^0.11.0
checksum: 13db2add3a824d7795f1606b48131a048a5c26b47413078f232351bbcf8204ef09f4d717ec6c4c1524248ab7b37fd16bcbe9f3aa0c8bec5cb6c3a51416fc6274
"@eslint-community/regexpp": ^4.8.0
refa: ^0.12.1
checksum: c1c47fea637412d8362a9358b1b2952a6ab159daaede2244c05e79c175844960259c88e30072e4f81a06e5ac1c80f590b14038b17bc8cff09293f752cf843b1c
languageName: node
linkType: hard

Expand Down Expand Up @@ -7728,14 +7718,14 @@ __metadata:
languageName: node
linkType: hard

"scslre@npm:^0.2.0":
version: 0.2.0
resolution: "scslre@npm:0.2.0"
"scslre@npm:^0.3.0":
version: 0.3.0
resolution: "scslre@npm:0.3.0"
dependencies:
"@eslint-community/regexpp": ^4.5.0
refa: ^0.11.0
regexp-ast-analysis: ^0.6.0
checksum: 6e1df2eddf33e4559a19614fb78401bc16efb56f3af65e4bb7c11b71581ab22962c5e66c6a622f53370cbd6967061c94fe34dad11c1a47dc60712332d7d12fa4
"@eslint-community/regexpp": ^4.8.0
refa: ^0.12.0
regexp-ast-analysis: ^0.7.0
checksum: a89d4fe5dbf632cae14cc1e53c9d18012924cc88d6615406ad90190d2b9957fc8db16994c2023235af1b6a6c25290b089eb4c26e47d21b05073b933be5ca9d33
languageName: node
linkType: hard

Expand Down

0 comments on commit 6a1d409

Please sign in to comment.