lint: stricter linting rules

This commit is contained in:
Adhiraj Singh
2022-03-01 16:32:14 +05:30
parent c00c3da313
commit de7d1002a9
39 changed files with 534 additions and 526 deletions
+6 -6
View File
@@ -49,7 +49,7 @@ const makeBusinessSocket = (config: LegacySocketConfig) => {
mapProductCreate(product)
]
})
return mapProduct(result.data.product)
}
@@ -80,7 +80,7 @@ const makeBusinessSocket = (config: LegacySocketConfig) => {
{
product_id: productId,
...mapProductCreate(
{ ...update, originCountryCode: undefined },
{ ...update, originCountryCode: undefined },
false
)
}
@@ -89,7 +89,7 @@ const makeBusinessSocket = (config: LegacySocketConfig) => {
return mapProduct(result.data.product)
}
// maps product create to send to WA
const mapProductCreate = (product: ProductCreate, mapCompliance = true) => {
const result: any = {
@@ -107,10 +107,10 @@ const makeBusinessSocket = (config: LegacySocketConfig) => {
}
if(mapCompliance) {
Object.assign(result, {
compliance_category: product.originCountryCode
? undefined :
compliance_category: product.originCountryCode
? undefined :
'COUNTRY_ORIGIN_EXEMPT',
compliance_info: product.originCountryCode
compliance_info: product.originCountryCode
? { country_code_origin: product.originCountryCode }
: undefined
})