build: also lint mjs files (#44581)
This commit is contained in:
parent
ea7b0a4cc8
commit
e3d75b3087
5 changed files with 21 additions and 18 deletions
7
spec/fixtures/api/pdf-reader.mjs
vendored
7
spec/fixtures/api/pdf-reader.mjs
vendored
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue