test(gates): the repo-root scripts are linted and format-checked
scripts/check-node-modules.mjs and gen-changelog.mjs run in check and release but sat outside every lane: the eslint and prettier lanes run from frontend/, and an ESLint config cannot reach past its own directory. A contract test now holds them to the js-configs bar (recommended rules under Node, the frontend's Prettier style); an unused variable and the old formatting are each red. 0 lint hits; both files reformatted. Registered in docs/gates.md.
This commit is contained in:
@@ -27,7 +27,9 @@ for (const [path, entry] of Object.entries(lock.packages ?? {})) {
|
||||
}
|
||||
const installed = JSON.parse(readFileSync(manifest, "utf8")).version;
|
||||
if (installed !== entry.version)
|
||||
problems.push(`mismatch ${path.slice(13)}: installed ${installed}, lock pins ${entry.version}`);
|
||||
problems.push(
|
||||
`mismatch ${path.slice(13)}: installed ${installed}, lock pins ${entry.version}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (problems.length) {
|
||||
@@ -37,4 +39,6 @@ if (problems.length) {
|
||||
console.error("Fix: cd frontend && npm ci");
|
||||
process.exit(1);
|
||||
}
|
||||
console.log(`node_modules matches package-lock.json (${Object.keys(lock.packages).length - 1} entries)`);
|
||||
console.log(
|
||||
`node_modules matches package-lock.json (${Object.keys(lock.packages).length - 1} entries)`,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user