chore: added no-console rule
This commit is contained in:
parent
4b7d7d2e35
commit
aa863c6a2f
6 changed files with 11 additions and 2 deletions
|
@ -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': {
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable no-console */
|
||||
import { tl } from '@mtcute/tl'
|
||||
|
||||
import { TelegramClient } from '../../client'
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Reference in a new issue