Cleanup typescript and lint
This commit is contained in:
parent
1ef67ceae8
commit
9578aa0154
|
|
@ -26,7 +26,7 @@
|
||||||
"@types/node": "^18.11.18",
|
"@types/node": "^18.11.18",
|
||||||
"@types/tar-fs": "^2.0.1",
|
"@types/tar-fs": "^2.0.1",
|
||||||
"clean-modules": "^2.0.6",
|
"clean-modules": "^2.0.6",
|
||||||
"typescript": "^4.8.3"
|
"typescript": "^4.9.4"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/Sparticuz/chromium/issues"
|
"url": "https://github.com/Sparticuz/chromium/issues"
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ class Chromium {
|
||||||
const output = `${process.env.HOME}/.fonts/${url.pathname.split('/').pop()}`;
|
const output = `${process.env.HOME}/.fonts/${url.pathname.split('/').pop()}`;
|
||||||
|
|
||||||
if (existsSync(output) === true) {
|
if (existsSync(output) === true) {
|
||||||
return resolve(output.split('/').pop());
|
return resolve(output.split('/').pop() as string);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url.protocol === 'file:') {
|
if (url.protocol === 'file:') {
|
||||||
|
|
@ -86,7 +86,7 @@ class Chromium {
|
||||||
}
|
}
|
||||||
|
|
||||||
symlink(url.pathname, output, (error) => {
|
symlink(url.pathname, output, (error) => {
|
||||||
return error != null ? reject(error) : resolve(url.pathname.split('/').pop());
|
return error != null ? reject(error) : resolve(url.pathname.split('/').pop() as string);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -109,7 +109,7 @@ class Chromium {
|
||||||
|
|
||||||
response.once('end', () => {
|
response.once('end', () => {
|
||||||
stream.end(() => {
|
stream.end(() => {
|
||||||
return resolve(url.pathname.split('/').pop());
|
return resolve(url.pathname.split('/').pop() as string);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -213,7 +213,7 @@ class Chromium {
|
||||||
}
|
}
|
||||||
|
|
||||||
const result = await Promise.all(promises);
|
const result = await Promise.all(promises);
|
||||||
return result.shift();
|
return result.shift() as string;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -1,41 +1,18 @@
|
||||||
{
|
{
|
||||||
"compileOnSave": false,
|
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"alwaysStrict": true,
|
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"declarationDir": "build",
|
"declarationDir": "build",
|
||||||
"emitDecoratorMetadata": true,
|
|
||||||
"esModuleInterop": true,
|
"esModuleInterop": true,
|
||||||
"experimentalDecorators": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
"forceConsistentCasingInFileNames": true,
|
||||||
"importHelpers": false,
|
|
||||||
"inlineSourceMap": false,
|
|
||||||
"lib": ["dom", "es2020"],
|
"lib": ["dom", "es2020"],
|
||||||
"listEmittedFiles": false,
|
|
||||||
"listFiles": false,
|
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"noFallthroughCasesInSwitch": true,
|
|
||||||
"noImplicitAny": true,
|
|
||||||
"noImplicitReturns": true,
|
|
||||||
"noImplicitThis": true,
|
|
||||||
"noUnusedLocals": false,
|
|
||||||
"noUnusedParameters": false,
|
|
||||||
"outDir": "build",
|
"outDir": "build",
|
||||||
"pretty": true,
|
"pretty": true,
|
||||||
"resolveJsonModule": true,
|
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"sourceMap": true,
|
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"strictFunctionTypes": true,
|
|
||||||
"strictNullChecks": false,
|
|
||||||
"target": "es2020",
|
"target": "es2020",
|
||||||
"traceResolution": false,
|
|
||||||
"types": ["node"]
|
|
||||||
},
|
},
|
||||||
"exclude": ["build", "node_modules", "tmp"],
|
"exclude": ["build", "node_modules", "tmp"],
|
||||||
"include": ["source"],
|
"include": ["source"]
|
||||||
"typeAcquisition": {
|
|
||||||
"enable": true
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue