more eslint rules and fix bugs

This commit is contained in:
nora 2023-07-31 14:50:28 +02:00
parent 12fcc4f1bb
commit 854112da3c
13 changed files with 67 additions and 29 deletions

View file

@ -44,12 +44,13 @@ function main() {
}
if (!isValidIdent(packageName)) {
console.error(`error: package name \`${packageName}\` is not a valid identifer`);
console.error(
`error: package name \`${packageName}\` is not a valid identifer`
);
process.exit(1);
}
console.log(`package name: '${packageName}'`);
withErrorHandler(input, () => {
const start = Date.now();
@ -92,7 +93,7 @@ function main() {
if (error && error.code === 1) {
console.log(stderr);
} else if (error) {
console.error(`failed to spawn wasm-tools: ${error}`);
console.error(`failed to spawn wasm-tools: ${error.message}`);
} else {
if (stderr) {
console.log(stderr);