chore: Enable linting in scripts.

This commit is contained in:
cpojer
2026-01-31 21:29:14 +09:00
parent 0ffc251704
commit 1838ab019b
21 changed files with 314 additions and 124 deletions

View File

@@ -6,7 +6,6 @@ type PackageJson = {
version?: string;
};
const root = resolve(".");
const rootPackagePath = resolve("package.json");
const rootPackage = JSON.parse(readFileSync(rootPackagePath, "utf8")) as PackageJson;
const targetVersion = rootPackage.version;
@@ -25,9 +24,13 @@ const changelogged: string[] = [];
const skipped: string[] = [];
function ensureChangelogEntry(changelogPath: string, version: string): boolean {
if (!existsSync(changelogPath)) return false;
if (!existsSync(changelogPath)) {
return false;
}
const content = readFileSync(changelogPath, "utf8");
if (content.includes(`## ${version}`)) return false;
if (content.includes(`## ${version}`)) {
return false;
}
const entry = `## ${version}\n\n### Changes\n- Version alignment with core OpenClaw release numbers.\n\n`;
if (content.startsWith("# Changelog\n\n")) {
const next = content.replace("# Changelog\n\n", `# Changelog\n\n${entry}`);