Stop ignoring console errors
This commit is contained in:
parent
83e18900a9
commit
3d5ce44aa3
|
@ -22,7 +22,7 @@ module.exports = {
|
|||
'no-bitwise': 'off',
|
||||
'no-underscore-dangle': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'no-console': 'off',
|
||||
'no-console': ['error', { allow: ['warn', 'error'] }],
|
||||
'@typescript-eslint/no-this-alias': 'off',
|
||||
'import/prefer-default-export': 'off',
|
||||
'@typescript-eslint/no-empty-function': 'off',
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { inspect } from 'node:util';
|
||||
|
||||
export function logDeepObject(object: Record<any, any>) {
|
||||
// This is the dev cli, so we can use console.log
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(inspect(object, { showHidden: false, depth: null, colors: true }));
|
||||
}
|
||||
|
|
|
@ -41,6 +41,8 @@ async function runBrowserScraping(
|
|||
args: ['--no-sandbox', '--disable-setuid-sandbox'],
|
||||
});
|
||||
const page = await browser.newPage();
|
||||
// This is the dev cli, so we can use console.log
|
||||
// eslint-disable-next-line no-console
|
||||
page.on('console', (message) => console.log(`${message.type().slice(0, 3).toUpperCase()} ${message.text()}`));
|
||||
await page.goto(server.resolvedUrls.local[0]);
|
||||
await page.waitForFunction('!!window.scrape', { timeout: 5000 });
|
||||
|
|
Loading…
Reference in New Issue