build: also lint mjs files (#44581)

This commit is contained in:
Samuel Attard 2024-11-06 15:46:09 -08:00 committed by GitHub
parent ea7b0a4cc8
commit e3d75b3087
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 21 additions and 18 deletions

View file

@ -1,6 +1,6 @@
import * as pdfjs from 'pdfjs-dist';
async function getPDFDoc() {
async function getPDFDoc () {
try {
const doc = await pdfjs.getDocument(process.argv[2]).promise;
const page = await doc.getPage(1);
@ -11,12 +11,13 @@ async function getPDFDoc() {
view: page.view,
textContent: items,
markInfo
}
};
console.log(JSON.stringify(pdfInfo));
process.exit();
} catch (ex) {
console.error(ex);
process.exit(1);
}
}
getPDFDoc();
getPDFDoc();