chore: add linting

This commit is contained in:
Adhiraj Singh
2022-01-19 15:54:02 +05:30
parent f7f86e69d6
commit 8f11f0be76
49 changed files with 5800 additions and 4314 deletions

View File

@@ -1,5 +1,5 @@
import type { Contact } from "./Contact"
import type { proto } from "../../WAProto"
import type { proto } from '../../WAProto'
import type { Contact } from './Contact'
export type KeyPair = { public: Uint8Array, private: Uint8Array }
export type SignedKeyPair = { keyPair: KeyPair, signature: Uint8Array, keyId: number }

View File

@@ -1,4 +1,4 @@
import type { proto } from "../../WAProto"
import type { proto } from '../../WAProto'
/** set of statuses visible to other people; see updatePresence() in WhatsAppWeb.Send */
export type WAPresence = 'unavailable' | 'available' | 'composing' | 'recording' | 'paused'

View File

@@ -1,12 +1,10 @@
import type EventEmitter from "events"
import type EventEmitter from 'events'
import { AuthenticationCreds } from './Auth'
import { Chat, PresenceData } from './Chat'
import { Contact } from './Contact'
import { ConnectionState } from './State'
import { GroupMetadata, ParticipantAction } from './GroupMetadata'
import { MessageInfoUpdate, MessageUpdateType, WAMessage, WAMessageUpdate, WAMessageKey } from './Message'
import { MessageInfoUpdate, MessageUpdateType, WAMessage, WAMessageKey, WAMessageUpdate } from './Message'
import { ConnectionState } from './State'
export type BaileysEventMap<T> = {
/** connection state has been updated -- WS closed, opened, connecting etc. */

View File

@@ -1,4 +1,4 @@
import { Contact } from "./Contact";
import { Contact } from './Contact'
export type GroupParticipant = (Contact & { isAdmin?: boolean; isSuperAdmin?: boolean, admin?: 'admin' | 'superadmin' | null })

View File

@@ -1,6 +1,6 @@
import { CommonSocketConfig } from "./Socket"
import { CommonBaileysEventEmitter } from "./Events"
import { BinaryNode } from "../WABinary"
import { BinaryNode } from '../WABinary'
import { CommonBaileysEventEmitter } from './Events'
import { CommonSocketConfig } from './Socket'
export interface LegacyAuthenticationCreds {
clientID: string

View File

@@ -1,10 +1,9 @@
import type { ReadStream } from "fs"
import type { Logger } from "pino"
import type { URL } from "url"
import type NodeCache from "node-cache"
import type { GroupMetadata } from "./GroupMetadata"
import type { Readable } from "stream"
import type NodeCache from 'node-cache'
import type { Logger } from 'pino'
import type { Readable } from 'stream'
import type { URL } from 'url'
import { proto } from '../../WAProto'
import type { GroupMetadata } from './GroupMetadata'
// export the WAMessage Prototypes
export { proto as WAProto }

View File

@@ -1,9 +1,9 @@
import type { Agent } from "https"
import type { Logger } from "pino"
import type { URL } from "url"
import type { Agent } from 'https'
import type NodeCache from 'node-cache'
import { MediaConnInfo } from "./Message"
import type { Logger } from 'pino'
import type { URL } from 'url'
import { MediaConnInfo } from './Message'
export type WAVersion = [number, number, number]
export type WABrowserDescription = [string, string, string]

View File

@@ -1,4 +1,4 @@
import { Contact } from "./Contact"
import { Contact } from './Contact'
export type WAConnectionState = 'open' | 'connecting' | 'close'

View File

@@ -9,9 +9,8 @@ export * from './Socket'
export * from './Events'
import type NodeCache from 'node-cache'
import { AuthenticationState } from './Auth'
import { proto } from '../../WAProto'
import { AuthenticationState } from './Auth'
import { CommonSocketConfig } from './Socket'
export type SocketConfig = CommonSocketConfig<AuthenticationState> & {