1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Tools: Add eslint rule prefer-await-to-then

This commit is contained in:
Laurent Cozic
2022-09-30 17:23:14 +01:00
parent cc6620a7e1
commit 44a96f347a
34 changed files with 65 additions and 0 deletions

View File

@ -45,6 +45,7 @@ class ClipperConfigScreenComponent extends React.Component {
if (confirm(_('Are you sure you want to renew the authorisation token?'))) {
void EncryptionService.instance()
.generateApiToken()
// eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied
.then((token) => {
Setting.setValue('api.token', token);
});