Add regex eslint plugin, fix lints (#59371)

This commit is contained in:
Jake Bailey
2024-08-13 14:16:53 -07:00
committed by GitHub
parent a5e0385edf
commit 195203e971
47 changed files with 236 additions and 92 deletions

View File

@@ -112,7 +112,7 @@ function getPrereleasePatch(tag, plainPatch) {
// but we'd prefer to just remove separators and limit ourselves to YYYYMMDD.
// UTC time will always be implicit here.
const now = new Date();
const timeStr = now.toISOString().replace(/:|T|\.|-/g, "").slice(0, 8);
const timeStr = now.toISOString().replace(/[:T.-]/g, "").slice(0, 8);
return `${plainPatch}-${tag}.${timeStr}`;
}