Skip to content

Commit 6a1d409

Browse files
chore(deps): update dependency eslint-plugin-regexp to v2 (#15521)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fisker <[email protected]>
1 parent f4d93d3 commit 6a1d409

6 files changed

Lines changed: 52 additions & 61 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"eslint-plugin-n": "16.3.1",
134134
"eslint-plugin-prettier-internal-rules": "2.0.1",
135135
"eslint-plugin-react": "7.33.2",
136-
"eslint-plugin-regexp": "1.15.0",
136+
"eslint-plugin-regexp": "2.1.1",
137137
"eslint-plugin-unicorn": "49.0.0",
138138
"esm-utils": "4.2.1",
139139
"execa": "7.2.0",

src/language-css/clean.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ function clean(ast, newObj, parent) {
140140
newObj.value
141141
) {
142142
newObj.value = newObj.value.replaceAll(
143-
/([\d+.Ee-]+)([A-Za-z]*)/g,
143+
/([\d+.e-]+)([a-z]*)/gi,
144144
(match, numStr, unit) => {
145145
const num = Number(numStr);
146146
return Number.isNaN(num) ? match : num + unit.toLowerCase();
@@ -208,7 +208,7 @@ function clean(ast, newObj, parent) {
208208
clean.ignoredProperties = ignoredProperties;
209209

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

214214
export default clean;

src/language-css/print/misc.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ function printUnit(unit) {
99
}
1010

1111
const STRING_REGEX = /(["'])(?:(?!\1)[^\\]|\\.)*\1/gs;
12-
const NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:[Ee][+-]?\d+)?/g;
13-
const STANDARD_UNIT_REGEX = /[A-Za-z]+/g;
14-
const WORD_PART_REGEX = /[$@]?[A-Z_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/g;
12+
const NUMBER_REGEX = /(?:\d*\.\d+|\d+\.?)(?:e[+-]?\d+)?/gi;
13+
const STANDARD_UNIT_REGEX = /[a-z]+/gi;
14+
const WORD_PART_REGEX = /[$@]?[_a-z\u0080-\uFFFF][\w\u0080-\uFFFF-]*/gi;
1515
const ADJUST_NUMBERS_REGEX = new RegExp(
1616
STRING_REGEX.source +
1717
"|" +
18+
// eslint-disable-next-line regexp/no-misleading-capturing-group
1819
`(${WORD_PART_REGEX.source})?` +
1920
`(${NUMBER_REGEX.source})` +
2021
`(${STANDARD_UNIT_REGEX.source})?`,
21-
"g",
22+
"gi",
2223
);
2324

2425
function adjustStrings(value, options) {

src/language-html/constants.evaluate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const getCssStyleTags = (property) =>
1313
}
1414

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

1919
return tagNames.map((tagName) => [tagName, style.value]);

src/language-html/embed/vue-bindings.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function isVueEventBindingExpression(eventBindingValue) {
2020
const fnExpRE = /^(?:[\w$]+|\([^)]*\))\s*=>|^function\s*\(/;
2121
// simple member expression chain (a, a.b, a['b'], a["b"], a[0], a[b])
2222
const simplePathRE =
23-
/^[$A-Z_a-z][\w$]*(?:\.[$A-Z_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$A-Z_a-z][\w$]*])*$/;
23+
/^[$_a-z][\w$]*(?:\.[$_a-z][\w$]*|\['[^']*']|\["[^"]*"]|\[\d+]|\[[$_a-z][\w$]*])*$/i;
2424

2525
// https://github.com/vuejs/vue/blob/v2.5.17/src/compiler/helpers.js#L104
2626
const value = eventBindingValue.trim();

yarn.lock

Lines changed: 42 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,10 +1069,10 @@ __metadata:
10691069
languageName: node
10701070
linkType: hard
10711071

1072-
"@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":
1073-
version: 4.6.2
1074-
resolution: "@eslint-community/regexpp@npm:4.6.2"
1075-
checksum: a3c341377b46b54fa228f455771b901d1a2717f95d47dcdf40199df30abc000ba020f747f114f08560d119e979d882a94cf46cfc51744544d54b00319c0f2724
1072+
"@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":
1073+
version: 4.10.0
1074+
resolution: "@eslint-community/regexpp@npm:4.10.0"
1075+
checksum: 2a6e345429ea8382aaaf3a61f865cae16ed44d31ca917910033c02dc00d505d939f10b81e079fa14d43b51499c640138e153b7e40743c4c094d9df97d4e56f7b
10761076
languageName: node
10771077
linkType: hard
10781078

@@ -2859,10 +2859,10 @@ __metadata:
28592859
languageName: node
28602860
linkType: hard
28612861

2862-
"comment-parser@npm:^1.1.2":
2863-
version: 1.3.1
2864-
resolution: "comment-parser@npm:1.3.1"
2865-
checksum: 421e6a113a3afd548500e7174ab46a2049dccf92e82bbaa3b209031b1bdf97552aabfa1ae2a120c0b62df17e1ba70e0d8b05d68504fee78e1ef974c59bcfe718
2862+
"comment-parser@npm:^1.4.0":
2863+
version: 1.4.1
2864+
resolution: "comment-parser@npm:1.4.1"
2865+
checksum: e0f6f60c5139689c4b1b208ea63e0730d9195a778e90dd909205f74f00b39eb0ead05374701ec5e5c29d6f28eb778cd7bc41c1366ab1d271907f1def132d6bf1
28662866
languageName: node
28672867
linkType: hard
28682868

@@ -3781,21 +3781,20 @@ __metadata:
37813781
languageName: node
37823782
linkType: hard
37833783

3784-
"eslint-plugin-regexp@npm:1.15.0":
3785-
version: 1.15.0
3786-
resolution: "eslint-plugin-regexp@npm:1.15.0"
3784+
"eslint-plugin-regexp@npm:2.1.1":
3785+
version: 2.1.1
3786+
resolution: "eslint-plugin-regexp@npm:2.1.1"
37873787
dependencies:
37883788
"@eslint-community/eslint-utils": ^4.2.0
3789-
"@eslint-community/regexpp": ^4.4.0
3790-
comment-parser: ^1.1.2
3791-
grapheme-splitter: ^1.0.4
3792-
jsdoctypeparser: ^9.0.0
3793-
refa: ^0.11.0
3794-
regexp-ast-analysis: ^0.6.0
3795-
scslre: ^0.2.0
3789+
"@eslint-community/regexpp": ^4.9.1
3790+
comment-parser: ^1.4.0
3791+
jsdoc-type-pratt-parser: ^4.0.0
3792+
refa: ^0.12.1
3793+
regexp-ast-analysis: ^0.7.1
3794+
scslre: ^0.3.0
37963795
peerDependencies:
3797-
eslint: ">=6.0.0"
3798-
checksum: 6f5c6588b4463e11999d2fc70c9348e7cf250867a4889bdfcdef10d867cc317ba159b2053f833d43cf1141bc9b4956504647a8e251a84e4d010ad72cecf4d68e
3796+
eslint: ">=8.44.0"
3797+
checksum: 154e3eecc94805421857b58b9208c5b876c5af66947643ec8b2ea3fa25c0e2cc0531822676f221c040976a93200ec19c087106bdbf33aac61ddca3283407ec11
37993798
languageName: node
38003799
linkType: hard
38013800

@@ -4521,13 +4520,6 @@ __metadata:
45214520
languageName: node
45224521
linkType: hard
45234522

4524-
"grapheme-splitter@npm:^1.0.4":
4525-
version: 1.0.4
4526-
resolution: "grapheme-splitter@npm:1.0.4"
4527-
checksum: 0c22ec54dee1b05cd480f78cf14f732cb5b108edc073572c4ec205df4cd63f30f8db8025afc5debc8835a8ddeacf648a1c7992fe3dcd6ad38f9a476d84906620
4528-
languageName: node
4529-
linkType: hard
4530-
45314523
"graphemer@npm:^1.4.0":
45324524
version: 1.4.0
45334525
resolution: "graphemer@npm:1.4.0"
@@ -5873,12 +5865,10 @@ __metadata:
58735865
languageName: node
58745866
linkType: hard
58755867

5876-
"jsdoctypeparser@npm:^9.0.0":
5877-
version: 9.0.0
5878-
resolution: "jsdoctypeparser@npm:9.0.0"
5879-
bin:
5880-
jsdoctypeparser: bin/jsdoctypeparser
5881-
checksum: d9fd932fc657ee8df93b112ceb23f0c27862da7302c27325101d3700110d78d264f9ef08837ed84e7dd47b83657ffb323b47b1942b237111055cefb647b4a8ba
5868+
"jsdoc-type-pratt-parser@npm:^4.0.0":
5869+
version: 4.0.0
5870+
resolution: "jsdoc-type-pratt-parser@npm:4.0.0"
5871+
checksum: af0629c9517e484be778d8564440fec8de5b7610e0c9c88a3ba4554321364faf72b46689c8d8845faa12c0718437a9ed97e231977efc0f2d50e8a2dbad807eb3
58825872
languageName: node
58835873
linkType: hard
58845874

@@ -7203,7 +7193,7 @@ __metadata:
72037193
eslint-plugin-n: 16.3.1
72047194
eslint-plugin-prettier-internal-rules: 2.0.1
72057195
eslint-plugin-react: 7.33.2
7206-
eslint-plugin-regexp: 1.15.0
7196+
eslint-plugin-regexp: 2.1.1
72077197
eslint-plugin-unicorn: 49.0.0
72087198
esm-utils: 4.2.1
72097199
espree: 9.6.1
@@ -7424,12 +7414,12 @@ __metadata:
74247414
languageName: node
74257415
linkType: hard
74267416

7427-
"refa@npm:^0.11.0":
7428-
version: 0.11.0
7429-
resolution: "refa@npm:0.11.0"
7417+
"refa@npm:^0.12.0, refa@npm:^0.12.1":
7418+
version: 0.12.1
7419+
resolution: "refa@npm:0.12.1"
74307420
dependencies:
7431-
"@eslint-community/regexpp": ^4.5.0
7432-
checksum: 2b86c348dca15dde99f906bd08d64d6f08a7587e57789ed0a634065b60d8800c65d73b19e0d97ff79306591b9db8f15f4ef726026522d08da27da4ce278872be
7421+
"@eslint-community/regexpp": ^4.8.0
7422+
checksum: 845cef54786884d5f09558dd600cec20ee354ebbcabd206503d5cc5d63d22bb69dee8b66bf8411de622693fc5c2b9d42b9cf1e5e6900c538ee333eefb5cc1b41
74337423
languageName: node
74347424
linkType: hard
74357425

@@ -7447,13 +7437,13 @@ __metadata:
74477437
languageName: node
74487438
linkType: hard
74497439

7450-
"regexp-ast-analysis@npm:^0.6.0":
7451-
version: 0.6.0
7452-
resolution: "regexp-ast-analysis@npm:0.6.0"
7440+
"regexp-ast-analysis@npm:^0.7.0, regexp-ast-analysis@npm:^0.7.1":
7441+
version: 0.7.1
7442+
resolution: "regexp-ast-analysis@npm:0.7.1"
74537443
dependencies:
7454-
"@eslint-community/regexpp": ^4.5.0
7455-
refa: ^0.11.0
7456-
checksum: 13db2add3a824d7795f1606b48131a048a5c26b47413078f232351bbcf8204ef09f4d717ec6c4c1524248ab7b37fd16bcbe9f3aa0c8bec5cb6c3a51416fc6274
7444+
"@eslint-community/regexpp": ^4.8.0
7445+
refa: ^0.12.1
7446+
checksum: c1c47fea637412d8362a9358b1b2952a6ab159daaede2244c05e79c175844960259c88e30072e4f81a06e5ac1c80f590b14038b17bc8cff09293f752cf843b1c
74577447
languageName: node
74587448
linkType: hard
74597449

@@ -7728,14 +7718,14 @@ __metadata:
77287718
languageName: node
77297719
linkType: hard
77307720

7731-
"scslre@npm:^0.2.0":
7732-
version: 0.2.0
7733-
resolution: "scslre@npm:0.2.0"
7721+
"scslre@npm:^0.3.0":
7722+
version: 0.3.0
7723+
resolution: "scslre@npm:0.3.0"
77347724
dependencies:
7735-
"@eslint-community/regexpp": ^4.5.0
7736-
refa: ^0.11.0
7737-
regexp-ast-analysis: ^0.6.0
7738-
checksum: 6e1df2eddf33e4559a19614fb78401bc16efb56f3af65e4bb7c11b71581ab22962c5e66c6a622f53370cbd6967061c94fe34dad11c1a47dc60712332d7d12fa4
7725+
"@eslint-community/regexpp": ^4.8.0
7726+
refa: ^0.12.0
7727+
regexp-ast-analysis: ^0.7.0
7728+
checksum: a89d4fe5dbf632cae14cc1e53c9d18012924cc88d6615406ad90190d2b9957fc8db16994c2023235af1b6a6c25290b089eb4c26e47d21b05073b933be5ca9d33
77397729
languageName: node
77407730
linkType: hard
77417731

0 commit comments

Comments
 (0)