Aplicar Pint e formatação de frontend; delimitar o âmbito do lint

Só formatação automática (pint, vp check --fix), sem alterar comportamento.
Excluídos da formatação os registos e artefactos com bytes fixos: docs/,
integrations/, storage/, tmp/, output/, resources/data/, tests/Fixtures/,
compras-release.json e AGENTS*.md. Scripts operacionais, integrations e
auxiliares de teste ficam fora do lint (usam new Function; limpeza na fase 2).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 23:01:42 +02:00
co-authored by Claude Opus 5.5
parent 9f719695e3
commit ec934455e7
148 changed files with 9455 additions and 2413 deletions
+19 -5
View File
@@ -1,11 +1,23 @@
import fs from 'node:fs/promises';
import assert from 'node:assert/strict';
const source = await fs.readFile('scripts/supplier-evaluation-check.mjs', 'utf8');
const common = source.slice(source.indexOf('const base ='), source.indexOf('const author ='))
.replace('async function request(path, method = \'GET\', data, inertia = true)', 'async function request(path, method = \'GET\', data, inertia = true, extraHeaders = {})')
const source = await fs.readFile(
'scripts/supplier-evaluation-check.mjs',
'utf8',
);
const common = source
.slice(source.indexOf('const base ='), source.indexOf('const author ='))
.replace(
"async function request(path, method = 'GET', data, inertia = true)",
"async function request(path, method = 'GET', data, inertia = true, extraHeaders = {})",
)
.replace('headers: {', 'headers: { ...extraHeaders,');
assert.ok(common.includes('extraHeaders = {}'));
await new Function('fs','assert','return (async()=>{'+common+`
await new Function(
'fs',
'assert',
'return (async()=>{' +
common +
`
const records=[];
for(const role of ['admin','procurement','finance','warehouse']) {
const viewer=client(); await viewer.enter(role);
@@ -30,4 +42,6 @@ await new Function('fs','assert','return (async()=>{'+common+`
business_commands:false,accounts_or_grants_changed:false,sgf_changed:false,visual_review:false,
coverage:'Existing synthetic requisition 2: scoped detail, partial audit pagination and full CSV access.'},null,2));
console.log('Paginação parcial do histórico conferida sem comandos de negócio no piloto.');
`+'})()')(fs,assert);
` +
'})()',
)(fs, assert);