chore: added no-console rule

This commit is contained in:
alina 🌸 2023-09-07 22:25:50 +03:00
parent 4b7d7d2e35
commit aa863c6a2f
Signed by: teidesu
SSH key fingerprint: SHA256:uNeCpw6aTSU4aIObXLvHfLkDa82HWH9EiOj9AXOIRpI
6 changed files with 11 additions and 2 deletions

View file

@ -170,6 +170,7 @@ module.exports = {
'import/no-relative-packages': 'error',
'import/no-mutable-exports': 'error',
'import/no-default-export': 'error',
'no-console': ['error', { allow: ['warn', 'error'] }],
},
overrides: [
{
@ -233,6 +234,12 @@ module.exports = {
},
},
},
{
files: ['**/scripts/**'],
rules: {
'no-console': 'off',
},
},
],
settings: {
'import/resolver': {

View file

@ -1,3 +1,4 @@
/* eslint-disable no-console */
import { tl } from '@mtcute/tl'
import { TelegramClient } from '../../client'

View file

@ -276,7 +276,6 @@ export class Conversation {
if (timeout !== null) {
timer = setTimeout(() => {
console.log('timed out')
promise.reject(new MtTimeoutError(timeout))
this._queuedNewMessage.removeBy((it) => it.promise === promise)
}, timeout)

View file

@ -178,7 +178,6 @@ async function rsaPad(
const decryptedDataBigint = bufferToBigInt(decryptedData)
if (decryptedDataBigint.geq(keyModulus)) {
console.log('retrying because decrypted data is too big')
continue
}

View file

@ -31,6 +31,7 @@ export const _defaultLoggingHandler = isTty ?
fmt: string,
args: unknown[],
): void => {
// eslint-disable-next-line no-console
console.log(
BASE_FORMAT + fmt,
new Date().toISOString(),
@ -47,6 +48,7 @@ export const _defaultLoggingHandler = isTty ?
fmt: string,
args: unknown[],
): void => {
// eslint-disable-next-line no-console
console.log(
BASE_FORMAT + fmt,
new Date().toISOString(),

View file

@ -32,6 +32,7 @@ export const _defaultLoggingHandler = (
fmt: string,
args: unknown[],
): void => {
// eslint-disable-next-line no-console
console.log(
BASE_FORMAT + fmt,
new Date().toISOString(),