Enable require-unicode-regexp and regexp/strict rule (#16408)

This commit is contained in:
fisker Cheung authored and GitHub committed 2024-06-18 07:52:54 +09:00
1 parent 22dad9c1a8
commit c03a12ad2b
127 files changed
+370 -357

No files matched your search

+2 -2
View File
@@ -8,7 +8,7 @@ import { PROJECT_ROOT, writeFile } from "../utils/index.js";
import UNUSED_SPECIFIERS from "./typescript-unused-specifiers.js";
function* getModules(text) {
const parts = text.split(/(?<=\n)(\/\/ src\/\S+\n)/);
const parts = text.split(/(?<=\n)(\/\/ src\/\S+\n)/u);
let start = parts[0].length;
@@ -152,7 +152,7 @@ function getExports(entry) {
const exports = lines
.map((line) => {
const match = line.match(
/^\s*(?<specifier>.*?): \(\) => (?<variable>.*?),?$/,
/^\s*(?<specifier>.*?): \(\) => (?<variable>.*?),?$/u,
);
if (!match) {