mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 09:50:42 +00:00
chore: apply core lint cleanups
This commit is contained in:
@@ -456,7 +456,8 @@ export function collectForbiddenPackPaths(paths: Iterable<string>): string[] {
|
||||
return [...paths]
|
||||
.filter(
|
||||
(path) =>
|
||||
forbiddenPrefixes.some((prefix) => path.startsWith(prefix)) || /node_modules\//.test(path),
|
||||
forbiddenPrefixes.some((prefix) => path.startsWith(prefix)) ||
|
||||
path.includes("node_modules/"),
|
||||
)
|
||||
.toSorted((left, right) => left.localeCompare(right));
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
|
||||
const logLevel = process.env.OPENCLAW_BUILD_VERBOSE ? "info" : "warn";
|
||||
const extraArgs = process.argv.slice(2);
|
||||
const INEFFECTIVE_DYNAMIC_IMPORT_RE = /\[INEFFECTIVE_DYNAMIC_IMPORT\]/;
|
||||
const INEFFECTIVE_DYNAMIC_IMPORT_MARKER = "[INEFFECTIVE_DYNAMIC_IMPORT]";
|
||||
const UNRESOLVED_IMPORT_RE = /\[UNRESOLVED_IMPORT\]/;
|
||||
const ANSI_ESCAPE_RE = new RegExp(String.raw`\u001B\[[0-9;]*m`, "g");
|
||||
const HASHED_ROOT_JS_RE = /^(?<base>.+)-[A-Za-z0-9_-]+\.js$/u;
|
||||
@@ -170,7 +170,7 @@ export function createTsdownOutputScanner(params = {}) {
|
||||
return {
|
||||
append(chunk) {
|
||||
const text = Buffer.isBuffer(chunk) ? chunk.toString("utf8") : String(chunk);
|
||||
if (INEFFECTIVE_DYNAMIC_IMPORT_RE.test(text)) {
|
||||
if (text.includes(INEFFECTIVE_DYNAMIC_IMPORT_MARKER)) {
|
||||
hasIneffectiveDynamicImport = true;
|
||||
}
|
||||
scanLines(text);
|
||||
|
||||
Reference in New Issue
Block a user