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-relative-packages': 'error',
|
||||||
'import/no-mutable-exports': 'error',
|
'import/no-mutable-exports': 'error',
|
||||||
'import/no-default-export': 'error',
|
'import/no-default-export': 'error',
|
||||||
|
'no-console': ['error', { allow: ['warn', 'error'] }],
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
|
@ -233,6 +234,12 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
files: ['**/scripts/**'],
|
||||||
|
rules: {
|
||||||
|
'no-console': 'off',
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
settings: {
|
settings: {
|
||||||
'import/resolver': {
|
'import/resolver': {
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
/* eslint-disable no-console */
|
||||||
import { tl } from '@mtcute/tl'
|
import { tl } from '@mtcute/tl'
|
||||||
|
|
||||||
import { TelegramClient } from '../../client'
|
import { TelegramClient } from '../../client'
|
||||||
|
|
|
@ -276,7 +276,6 @@ export class Conversation {
|
||||||
|
|
||||||
if (timeout !== null) {
|
if (timeout !== null) {
|
||||||
timer = setTimeout(() => {
|
timer = setTimeout(() => {
|
||||||
console.log('timed out')
|
|
||||||
promise.reject(new MtTimeoutError(timeout))
|
promise.reject(new MtTimeoutError(timeout))
|
||||||
this._queuedNewMessage.removeBy((it) => it.promise === promise)
|
this._queuedNewMessage.removeBy((it) => it.promise === promise)
|
||||||
}, timeout)
|
}, timeout)
|
||||||
|
|
|
@ -178,7 +178,6 @@ async function rsaPad(
|
||||||
const decryptedDataBigint = bufferToBigInt(decryptedData)
|
const decryptedDataBigint = bufferToBigInt(decryptedData)
|
||||||
|
|
||||||
if (decryptedDataBigint.geq(keyModulus)) {
|
if (decryptedDataBigint.geq(keyModulus)) {
|
||||||
console.log('retrying because decrypted data is too big')
|
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,7 @@ export const _defaultLoggingHandler = isTty ?
|
||||||
fmt: string,
|
fmt: string,
|
||||||
args: unknown[],
|
args: unknown[],
|
||||||
): void => {
|
): void => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(
|
console.log(
|
||||||
BASE_FORMAT + fmt,
|
BASE_FORMAT + fmt,
|
||||||
new Date().toISOString(),
|
new Date().toISOString(),
|
||||||
|
@ -47,6 +48,7 @@ export const _defaultLoggingHandler = isTty ?
|
||||||
fmt: string,
|
fmt: string,
|
||||||
args: unknown[],
|
args: unknown[],
|
||||||
): void => {
|
): void => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(
|
console.log(
|
||||||
BASE_FORMAT + fmt,
|
BASE_FORMAT + fmt,
|
||||||
new Date().toISOString(),
|
new Date().toISOString(),
|
||||||
|
|
|
@ -32,6 +32,7 @@ export const _defaultLoggingHandler = (
|
||||||
fmt: string,
|
fmt: string,
|
||||||
args: unknown[],
|
args: unknown[],
|
||||||
): void => {
|
): void => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
console.log(
|
console.log(
|
||||||
BASE_FORMAT + fmt,
|
BASE_FORMAT + fmt,
|
||||||
new Date().toISOString(),
|
new Date().toISOString(),
|
||||||
|
|
Loading…
Reference in a new issue