diff --git a/.eslintrc.js b/.eslintrc.js index 83de6e456..9000a76c5 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -90,6 +90,8 @@ module.exports = { // Disable because of this: https://github.com/facebook/react/issues/16265 // "react-hooks/exhaustive-deps": "warn", + 'promise/prefer-await-to-then': 'error', + // ------------------------------- // Formatting // ------------------------------- @@ -141,6 +143,7 @@ module.exports = { '@seiyab/eslint-plugin-react-hooks', // 'react-hooks', 'import', + 'promise', ], 'overrides': [ { diff --git a/package.json b/package.json index d397954ca..12442bf13 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "eslint": "^8.22.0", "eslint-interactive": "^10.0.0", "eslint-plugin-import": "^2.26.0", + "eslint-plugin-promise": "^6.0.1", "eslint-plugin-react": "^7.30.1", "fs-extra": "^8.1.0", "glob": "^7.1.6", diff --git a/packages/app-cli/app/autocompletion.js b/packages/app-cli/app/autocompletion.js index 61f2965a8..33963f7df 100644 --- a/packages/app-cli/app/autocompletion.js +++ b/packages/app-cli/app/autocompletion.js @@ -124,6 +124,7 @@ async function handleAutocompletionPromise(line) { return line; } function handleAutocompletion(str, callback) { +// eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied handleAutocompletionPromise(str).then(function(res) { callback(undefined, res); }); diff --git a/packages/app-cli/app/fuzzing.js b/packages/app-cli/app/fuzzing.js index c89dbf4d3..3c21a7aa4 100644 --- a/packages/app-cli/app/fuzzing.js +++ b/packages/app-cli/app/fuzzing.js @@ -36,6 +36,7 @@ async function createClients() { const client = createClient(clientId); promises.push(fs.remove(client.profileDir)); promises.push( + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied execCommand(client, 'config sync.target 2').then(() => { return execCommand(client, `config sync.2.path ${syncDir}`); }) @@ -2324,10 +2325,12 @@ async function main() { clients[clientId].activeCommandCount++; execRandomCommand(clients[clientId]) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .catch(error => { logger.info(`Client ${clientId}:`); logger.error(error); }) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then(r => { if (r) { logger.info(`Client ${clientId}:\n${r.trim()}`); diff --git a/packages/app-cli/app/services/plugins/PluginRunner.ts b/packages/app-cli/app/services/plugins/PluginRunner.ts index 3aa990ec1..468680c4c 100644 --- a/packages/app-cli/app/services/plugins/PluginRunner.ts +++ b/packages/app-cli/app/services/plugins/PluginRunner.ts @@ -50,6 +50,7 @@ export default class PluginRunner extends BasePluginRunner { const callId = `${pluginId}::${path}::${uuid.createNano()}`; this.activeSandboxCalls_[callId] = true; const promise = executeSandboxCall(pluginId, sandbox, `joplin.${path}`, mapEventHandlersToIds(args, this.eventHandlers_), this.eventHandler); + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied promise.finally(() => { delete this.activeSandboxCalls_[callId]; }); diff --git a/packages/app-desktop/app.ts b/packages/app-desktop/app.ts index b72cb39ee..600da6c06 100644 --- a/packages/app-desktop/app.ts +++ b/packages/app-desktop/app.ts @@ -502,6 +502,7 @@ class Application extends BaseApplication { if (Setting.value('env') === 'dev') { void AlarmService.updateAllNotifications(); } else { + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied void reg.scheduleSync(1000).then(() => { // Wait for the first sync before updating the notifications, since synchronisation // might change the notifications. diff --git a/packages/app-desktop/gui/ClipperConfigScreen.tsx b/packages/app-desktop/gui/ClipperConfigScreen.tsx index 3c9d9f142..ea831fd06 100644 --- a/packages/app-desktop/gui/ClipperConfigScreen.tsx +++ b/packages/app-desktop/gui/ClipperConfigScreen.tsx @@ -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); }); diff --git a/packages/app-desktop/gui/ResourceScreen.tsx b/packages/app-desktop/gui/ResourceScreen.tsx index 4a1f54647..1d2ec708c 100644 --- a/packages/app-desktop/gui/ResourceScreen.tsx +++ b/packages/app-desktop/gui/ResourceScreen.tsx @@ -174,9 +174,11 @@ class ResourceScreenComponent extends React.Component { return; } Resource.delete(resource.id) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .catch((error: Error) => { bridge().showErrorMessageBox(error.message); }) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .finally(() => { void this.reloadResources(this.state.sorting); }); diff --git a/packages/app-mobile/components/screens/folder.js b/packages/app-mobile/components/screens/folder.js index 38c8c9710..5e6315f32 100644 --- a/packages/app-mobile/components/screens/folder.js +++ b/packages/app-mobile/components/screens/folder.js @@ -50,6 +50,7 @@ class FolderScreenComponent extends BaseScreenComponent { lastSavedFolder: Object.assign({}, folder), }); } else { + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied Folder.load(this.props.folderId).then(folder => { this.setState({ folder: folder, diff --git a/packages/app-mobile/components/screens/notes.js b/packages/app-mobile/components/screens/notes.js index e39500858..bc4c6d747 100644 --- a/packages/app-mobile/components/screens/notes.js +++ b/packages/app-mobile/components/screens/notes.js @@ -151,10 +151,12 @@ class NotesScreenComponent extends BaseScreenComponent { } deleteFolder_onPress(folderId) { + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied dialogs.confirm(this, _('Delete notebook? All notes and sub-notebooks within this notebook will also be deleted.')).then(ok => { if (!ok) return; Folder.delete(folderId) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then(() => { this.props.dispatch({ type: 'NAV_GO', @@ -162,6 +164,7 @@ class NotesScreenComponent extends BaseScreenComponent { smartFilterId: 'c3176726992c11e9ac940492261af972', }); }) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .catch(error => { alert(error.message); }); diff --git a/packages/app-mobile/root.tsx b/packages/app-mobile/root.tsx index 128802be8..054c8a6a7 100644 --- a/packages/app-mobile/root.tsx +++ b/packages/app-mobile/root.tsx @@ -633,6 +633,7 @@ async function initialize(dispatch: Function) { // start almost immediately to get the latest data. // doWifiConnectionCheck set to true so initial sync // doesn't happen on mobile data + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied void reg.scheduleSync(1000, null, true).then(() => { // Wait for the first sync before updating the notifications, since synchronisation // might change the notifications. diff --git a/packages/app-mobile/setupQuickActions.ts b/packages/app-mobile/setupQuickActions.ts index 5559ac2ae..4edfbf852 100644 --- a/packages/app-mobile/setupQuickActions.ts +++ b/packages/app-mobile/setupQuickActions.ts @@ -39,6 +39,7 @@ export default (dispatch: Function, folderId: string) => { void Note.save({ parent_id: folderId, is_todo: isTodo, + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied }, { provisional: true }).then((newNote: any) => { dispatch({ type: 'NAV_GO', @@ -51,6 +52,7 @@ export default (dispatch: Function, folderId: string) => { DeviceEventEmitter.addListener('quickActionShortcut', handleQuickAction); + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied QuickActions.popInitialAction().then(handleQuickAction).catch((reason: any) => reg.logger().error(reason)); }; diff --git a/packages/app-mobile/utils/database-driver-react-native.js b/packages/app-mobile/utils/database-driver-react-native.js index dd9ee93e5..56e33c4e4 100644 --- a/packages/app-mobile/utils/database-driver-react-native.js +++ b/packages/app-mobile/utils/database-driver-react-native.js @@ -41,6 +41,7 @@ class DatabaseDriverReactNative { } selectAll(sql, params = null) { + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied return this.exec(sql, params).then(r => { const output = []; for (let i = 0; i < r.rows.length; i++) { diff --git a/packages/lib/BaseApplication.ts b/packages/lib/BaseApplication.ts index d05209ab5..af06f376c 100644 --- a/packages/lib/BaseApplication.ts +++ b/packages/lib/BaseApplication.ts @@ -880,6 +880,7 @@ export default class BaseApplication { if (!Setting.value('api.token')) { void EncryptionService.instance() .generateApiToken() + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then((token: string) => { Setting.setValue('api.token', token); }); diff --git a/packages/lib/BaseModel.ts b/packages/lib/BaseModel.ts index e8cc8a5c3..ab3f561a1 100644 --- a/packages/lib/BaseModel.ts +++ b/packages/lib/BaseModel.ts @@ -248,6 +248,7 @@ class BaseModel { if (options.where) sql += ` WHERE ${options.where}`; return this.db() .selectOne(sql) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then((r: any) => { return r ? r['total'] : 0; }); @@ -335,6 +336,7 @@ class BaseModel { if (params === null) params = []; return this.db() .selectOne(sql, params) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then((model: any) => { return this.filter(this.addModelMd(model)); }); @@ -344,6 +346,7 @@ class BaseModel { if (params === null) params = []; return this.db() .selectAll(sql, params) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then((models: any[]) => { return this.filterArray(this.addModelMd(models)); }); diff --git a/packages/lib/JoplinDatabase.ts b/packages/lib/JoplinDatabase.ts index 6e09cf4eb..3b6d5c65a 100644 --- a/packages/lib/JoplinDatabase.ts +++ b/packages/lib/JoplinDatabase.ts @@ -292,6 +292,7 @@ export default class JoplinDatabase extends Database { queries.push(this.wrapQuery('DELETE FROM table_fields')); return this.selectAll('SELECT name FROM sqlite_master WHERE type="table"') + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then(tableRows => { const chain = []; for (let i = 0; i < tableRows.length; i++) { @@ -303,6 +304,7 @@ export default class JoplinDatabase extends Database { if (tableName === 'notes_spellfix') continue; if (tableName === 'search_aux') continue; chain.push(() => { + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied return this.selectAll(`PRAGMA table_info("${tableName}")`).then(pragmas => { for (let i = 0; i < pragmas.length; i++) { const item = pragmas[i]; @@ -325,6 +327,7 @@ export default class JoplinDatabase extends Database { return promiseChain(chain); }) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then(() => { queries.push({ sql: 'UPDATE version SET table_fields_version = ?', params: [newVersion] }); return this.transactionExecBatch(queries); diff --git a/packages/lib/Logger.ts b/packages/lib/Logger.ts index ad8362815..89f44a5d0 100644 --- a/packages/lib/Logger.ts +++ b/packages/lib/Logger.ts @@ -231,11 +231,14 @@ class Logger { // when many log operations are being done (eg. during sync in // dev mode). let release: Function = null; + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied writeToFileMutex_.acquire().then((r: Function) => { release = r; return Logger.fsDriver().appendFile(target.path, `${line.join(': ')}\n`, 'utf8'); + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied }).catch((error: any) => { console.error('Cannot write to log file:', error); + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied }).finally(() => { if (release) release(); }); diff --git a/packages/lib/TaskQueue.ts b/packages/lib/TaskQueue.ts index 45c660232..6cf5c9709 100644 --- a/packages/lib/TaskQueue.ts +++ b/packages/lib/TaskQueue.ts @@ -70,9 +70,11 @@ export default class TaskQueue { task .callback() + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then((result: any) => { completeTask(task, result, null); }) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .catch((error: Error) => { if (!error) error = new Error('Unknown error'); completeTask(task, null, error); diff --git a/packages/lib/components/shared/note-screen-shared.js b/packages/lib/components/shared/note-screen-shared.js index 4a73f7f5e..e419f8539 100644 --- a/packages/lib/components/shared/note-screen-shared.js +++ b/packages/lib/components/shared/note-screen-shared.js @@ -102,6 +102,7 @@ shared.saveNoteButton_press = async function(comp, folderId = null, options = nu comp.setState(newState); if (isProvisionalNote) { + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied Note.updateGeolocation(note.id).then(geoNote => { const stateNote = comp.state.note; if (!stateNote || !geoNote) return; diff --git a/packages/lib/import-enex.ts b/packages/lib/import-enex.ts index 16ad8e88c..b317783bf 100644 --- a/packages/lib/import-enex.ts +++ b/packages/lib/import-enex.ts @@ -588,6 +588,7 @@ export default async function importEnex(parentFolderId: string, filePath: strin notes.push(note); if (notes.length >= 10) { + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied processNotes().catch(error => { importOptions.onError(createErrorWithNoteTitle(this, error)); }); @@ -648,6 +649,7 @@ export default async function importEnex(parentFolderId: string, filePath: strin saxStream.on('end', handleSaxStreamEvent(function() { // Wait till there is no more notes to process. const iid = shim.setInterval(() => { + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied void processNotes().then(allDone => { if (allDone) { shim.clearTimeout(iid); diff --git a/packages/lib/models/Folder.ts b/packages/lib/models/Folder.ts index 90dc1f7f5..40f6291de 100644 --- a/packages/lib/models/Folder.ts +++ b/packages/lib/models/Folder.ts @@ -55,6 +55,7 @@ export default class Folder extends BaseItem { return this.db() .selectAll(`SELECT id FROM notes WHERE ${where.join(' AND ')}`, [parentId]) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then((rows: any[]) => { const output = []; for (let i = 0; i < rows.length; i++) { @@ -759,6 +760,7 @@ export default class Folder extends BaseItem { syncDebugLog.info('Folder Save:', o); + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied return super.save(o, options).then((folder: FolderEntity) => { this.dispatch({ type: 'FOLDER_UPDATE_ONE', diff --git a/packages/lib/models/Tag.ts b/packages/lib/models/Tag.ts index a25916dc1..285ffc660 100644 --- a/packages/lib/models/Tag.ts +++ b/packages/lib/models/Tag.ts @@ -205,6 +205,7 @@ export default class Tag extends BaseItem { } } + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied return super.save(o, options).then((tag: TagEntity) => { if (options.dispatchUpdateAction) { this.dispatch({ diff --git a/packages/lib/onedrive-api-node-utils.js b/packages/lib/onedrive-api-node-utils.js index 2ca123af1..4470e869a 100644 --- a/packages/lib/onedrive-api-node-utils.js +++ b/packages/lib/onedrive-api-node-utils.js @@ -82,12 +82,14 @@ class OneDriveApiNodeUtils { this.api() .execTokenRequest(query.code, `http://localhost:${port.toString()}`) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then(() => { writeResponse(200, _('The application has been authorised - you may now close this browser tab.')); targetConsole.log(''); targetConsole.log(_('The application has been successfully authorised.')); waitAndDestroy(); }) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .catch(error => { writeResponse(400, error.message); targetConsole.log(''); diff --git a/packages/lib/promise-utils.js b/packages/lib/promise-utils.js index 5bd822181..ba2bb9182 100644 --- a/packages/lib/promise-utils.js +++ b/packages/lib/promise-utils.js @@ -4,6 +4,7 @@ function promiseChain(chain, defaultValue = null) { }); for (let i = 0; i < chain.length; i++) { const f = chain[i]; + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied output = output.then(f); } return output; diff --git a/packages/lib/registry.test.ts b/packages/lib/registry.test.ts index 5007f6d48..d847fc82b 100644 --- a/packages/lib/registry.test.ts +++ b/packages/lib/registry.test.ts @@ -49,6 +49,7 @@ describe('Registry', function() { it('should sync if do wifi check is false', done => { void reg.scheduleSync(1, null, false) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then(() =>{ expect(sync.start).toHaveBeenCalled(); done(); diff --git a/packages/lib/services/ResourceFetcher.ts b/packages/lib/services/ResourceFetcher.ts index 9436ef120..c47774522 100644 --- a/packages/lib/services/ResourceFetcher.ts +++ b/packages/lib/services/ResourceFetcher.ts @@ -181,11 +181,13 @@ export default class ResourceFetcher extends BaseService { fileApi .get(remoteResourceContentPath, { path: localResourceContentPath, target: 'file' }) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then(async () => { await Resource.setLocalState(resource, { fetch_status: Resource.FETCH_STATUS_DONE }); this.logger().debug(`ResourceFetcher: Resource downloaded: ${resource.id}`); await completeDownload(true, localResourceContentPath); }) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .catch(async (error: any) => { this.logger().error(`ResourceFetcher: Could not download resource: ${resource.id}`, error); await Resource.setLocalState(resource, { fetch_status: Resource.FETCH_STATUS_ERROR, fetch_error: error.message }); diff --git a/packages/lib/services/debug/populateDatabase.ts b/packages/lib/services/debug/populateDatabase.ts index f9d85ed87..9045e541b 100644 --- a/packages/lib/services/debug/populateDatabase.ts +++ b/packages/lib/services/debug/populateDatabase.ts @@ -77,6 +77,7 @@ export default async function populateDatabase(db: any, options: Options = null) let tagBatch = []; for (let i = 0; i < options.tagCount; i++) { const tagTitle = randomElement(wordList); // `tag${i}` + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied tagBatch.push(Tag.save({ title: tagTitle }, { dispatchUpdateAction: false }).then((savedTag: any) => { createdTagIds.push(savedTag.id); if (!options.silent) console.info(`Tags: ${i} / ${options.tagCount}`); @@ -99,6 +100,7 @@ export default async function populateDatabase(db: any, options: Options = null) const parentIndex = randomIndex(createdFolderIds); note.parent_id = createdFolderIds[parentIndex]; + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied noteBatch.push(Note.save(note, { dispatchUpdateAction: false }).then((savedNote: any) => { createdNoteIds.push(savedNote.id); console.info(`Notes: ${i} / ${options.noteCount}`); diff --git a/packages/lib/services/plugins/api/JoplinPlugins.ts b/packages/lib/services/plugins/api/JoplinPlugins.ts index 0a3fbd65d..c4a2b4a07 100644 --- a/packages/lib/services/plugins/api/JoplinPlugins.ts +++ b/packages/lib/services/plugins/api/JoplinPlugins.ts @@ -36,6 +36,7 @@ export default class JoplinPlugins { // We don't use `await` when calling onStart because the plugin might be awaiting // in that call too (for example, when opening a dialog on startup) so we don't // want to get stuck here. + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied void script.onStart({}).catch((error: any) => { // For some reason, error thrown from the executed script do not have the type "Error" // but are instead plain object. So recreate the Error object here so that it can @@ -43,6 +44,7 @@ export default class JoplinPlugins { const newError: Error = new Error(error.message); newError.stack = error.stack; logger.error(`Uncaught exception in plugin "${this.plugin.id}":`, newError); + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied }).then(() => { logger.info(`Finished running onStart handler: ${this.plugin.id} (Took ${Date.now() - startTime}ms)`); this.plugin.emit('started'); diff --git a/packages/lib/shim-init-node.js b/packages/lib/shim-init-node.js index da827ff83..dff046a02 100644 --- a/packages/lib/shim-init-node.js +++ b/packages/lib/shim-init-node.js @@ -502,7 +502,9 @@ function shimInit(options = null) { const cleanUpOnError = error => { // We ignore any unlink error as we only want to report on the main error fs.unlink(filePath) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .catch(() => {}) + // eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied .then(() => { if (file) { file.close(() => { diff --git a/packages/tools/buildServerDocker.ts b/packages/tools/buildServerDocker.ts index 4838a96cb..91b6c68c1 100644 --- a/packages/tools/buildServerDocker.ts +++ b/packages/tools/buildServerDocker.ts @@ -71,6 +71,7 @@ async function main() { } if (require.main === module) { +// eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied main().catch((error) => { console.error('Fatal error'); console.error(error); diff --git a/packages/tools/bundleDefaultPlugins.ts b/packages/tools/bundleDefaultPlugins.ts index 005d2973d..13cd19fe4 100644 --- a/packages/tools/bundleDefaultPlugins.ts +++ b/packages/tools/bundleDefaultPlugins.ts @@ -87,6 +87,7 @@ async function start(): Promise { } if (require.main === module) { +// eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied start().catch((error) => { console.error('Fatal error'); console.error(error); diff --git a/packages/tools/checkLibPaths.ts b/packages/tools/checkLibPaths.ts index 6064e262e..d811ba2af 100644 --- a/packages/tools/checkLibPaths.ts +++ b/packages/tools/checkLibPaths.ts @@ -48,6 +48,7 @@ const main = async () => { }; if (require.main === module) { +// eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied main().catch((error) => { console.error(error); process.exit(1); diff --git a/packages/tools/tagServerLatest.ts b/packages/tools/tagServerLatest.ts index abbc1a57b..e744ef155 100644 --- a/packages/tools/tagServerLatest.ts +++ b/packages/tools/tagServerLatest.ts @@ -12,6 +12,7 @@ async function main() { } if (require.main === module) { +// eslint-disable-next-line promise/prefer-await-to-then -- Old code before rule was applied main().catch((error) => { console.error('Fatal error'); console.error(error); diff --git a/yarn.lock b/yarn.lock index 7bc157cb8..fccaacf7f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15287,6 +15287,15 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-promise@npm:^6.0.1": + version: 6.0.1 + resolution: "eslint-plugin-promise@npm:6.0.1" + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + checksum: c1bb3c2e591787e97133dcaf764f908420a3a1959a3132e199db8f14d70dfa79fc9caf991ca60a4b60ae5f1f9823bc96c2e52304828a4278ef2f3964fe121de9 + languageName: node + linkType: hard + "eslint-plugin-promise@npm:~3.4.0": version: 3.4.2 resolution: "eslint-plugin-promise@npm:3.4.2" @@ -30008,6 +30017,7 @@ __metadata: eslint: ^8.22.0 eslint-interactive: ^10.0.0 eslint-plugin-import: ^2.26.0 + eslint-plugin-promise: ^6.0.1 eslint-plugin-react: ^7.30.1 fs-extra: ^8.1.0 glob: ^7.1.6