Files
2022-04-18 10:34:55 +03:00

16 lines
426 B
JavaScript
Executable File

const runner = require("ts-prune/lib/runner");
const {ignore} = require('./ignore-files');
const error = [];
runner.run({ project: 'tsconfig.dev.json' }, (text) => {
if (ignore.every(ign => !text.includes(ign))) {
error.push(text);
}
});
setTimeout(() => {
if (error.length) {
throw new Error(`Присутствует не используемый код: \n${error.join('\n')}`);
}
}, 0);