Remove @typescript-eslint/require-await rule exception

[MAILPOET-3201]
This commit is contained in:
Pavel Dohnal
2020-11-16 09:13:56 +01:00
committed by Veljko V
parent e78bafecb3
commit 455572fac3
2 changed files with 5 additions and 2 deletions

View File

@@ -40,7 +40,6 @@
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/require-await": "off",
"@typescript-eslint/camelcase": "off",
// PropTypes
"react/prop-types": 0,

View File

@@ -7,7 +7,11 @@ import { GlobalContext } from 'context';
const mailPoetApiVersion = (window as any).mailpoet_api_version as string;
const handleSave = async (address: string | null) => MailPoet.Ajax.post({
/**
* @param {string|null} address
* @returns {Promise}
*/
const handleSave = (address: string | null) => MailPoet.Ajax.post({
api_version: mailPoetApiVersion,
endpoint: 'settings',
action: 'setAuthorizedFromAddress',