0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00
logto/.scripts/merge-eslint-reports.js

15 lines
441 B
JavaScript
Raw Normal View History

const fs = require('fs');
const directories = fs.readdirSync('./packages');
const reports = directories
// Filter out docs temporarily
2022-10-11 02:43:51 -05:00
.filter((dir) => !['docs', 'create'].includes(dir))
.map((dir) => fs.readFileSync(`./packages/${dir}/report.json`, { encoding: 'utf-8' }));
const merged = [];
for (const report of reports) {
merged.push(...JSON.parse(report));
}
fs.writeFileSync('./eslint_report.json', JSON.stringify(merged));