mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-07 12:07:07 +03:00
@@ -27,5 +27,6 @@ module.exports = {
|
|||||||
"indent": ["warn", 4, { "SwitchCase": 1 }],
|
"indent": ["warn", 4, { "SwitchCase": 1 }],
|
||||||
"object-curly-spacing": ["warn", "always"],
|
"object-curly-spacing": ["warn", "always"],
|
||||||
"require-await": "warn",
|
"require-await": "warn",
|
||||||
|
"no-console": "error"
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { getCommit } from "./utils/getCommit";
|
|||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
process.on("unhandledRejection", (error: any) => {
|
process.on("unhandledRejection", (error: any) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.dir(error?.stack);
|
console.dir(error?.stack);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ class Logger {
|
|||||||
if (levelStr.length === 4) {
|
if (levelStr.length === 4) {
|
||||||
levelStr += " "; // ensure logs are aligned
|
levelStr += " "; // ensure logs are aligned
|
||||||
}
|
}
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(colors.Dim, `${levelStr} ${new Date().toISOString()}: `, color, str, colors.Reset);
|
console.log(colors.Dim, `${levelStr} ${new Date().toISOString()}: `, color, str, colors.Reset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user