mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
style: fixed and relaxed style lint
This commit is contained in:
@@ -6,4 +6,5 @@ coverage
|
||||
src/WABinary/index.ts
|
||||
WAProto
|
||||
WASignalGroup
|
||||
Example/test.ts
|
||||
Example/test.ts
|
||||
docs
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
{
|
||||
"extends": "@adiwajshing"
|
||||
"extends": "@adiwajshing",
|
||||
"rules": {
|
||||
"@typescript-eslint/no-explicit-any": [
|
||||
"warn",
|
||||
{
|
||||
"ignoreRestArgs": true
|
||||
}
|
||||
],
|
||||
"no-restricted-syntax": [
|
||||
"warn",
|
||||
{
|
||||
"selector": "TSEnumDeclaration",
|
||||
"message": "Don't declare enums, use literals instead"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -505,7 +505,7 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
}
|
||||
|
||||
const buttonType = getButtonType(message)
|
||||
if(buttonType){
|
||||
if(buttonType) {
|
||||
(stanza.content as BinaryNode[]).push({
|
||||
tag: 'biz',
|
||||
attrs: { },
|
||||
@@ -576,17 +576,18 @@ export const makeMessagesSocket = (config: SocketConfig) => {
|
||||
}
|
||||
|
||||
const getButtonArgs = (message: proto.IMessage): BinaryNode['attrs'] => {
|
||||
if(message.templateMessage){
|
||||
if(message.templateMessage) {
|
||||
// TODO: Add attributes
|
||||
return {}
|
||||
} else if(message.listMessage) {
|
||||
const type = message.listMessage.listType
|
||||
if(!type){
|
||||
throw new Boom("Expected list type inside message")
|
||||
if(!type) {
|
||||
throw new Boom('Expected list type inside message')
|
||||
}
|
||||
return {v: '2', type: ListType[type].toLowerCase()};
|
||||
|
||||
return { v: '2', type: ListType[type].toLowerCase() }
|
||||
} else {
|
||||
return {};
|
||||
return {}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user