1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-13 00:10:37 +02:00

Tools: Apply eslint rules "no-console" and "id-denylist"

This commit is contained in:
Laurent Cozic
2023-02-16 10:55:24 +00:00
parent 625689dbb1
commit 7fa1459dc3
77 changed files with 183 additions and 79 deletions

View File

@ -99,6 +99,7 @@ export default async function populateDatabase(db: any, options: Options = null)
if (!folderDepthToId[depth]) folderDepthToId[depth] = [];
folderDepthToId[depth].push(savedFolder.id);
// eslint-disable-next-line no-console
if (!options.silent) console.info(`Folders: ${i} / ${options.folderCount}`);
}
@ -108,6 +109,7 @@ export default async function populateDatabase(db: any, options: Options = null)
// 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);
// eslint-disable-next-line no-console
if (!options.silent) console.info(`Tags: ${i} / ${options.tagCount}`);
}));
@ -131,6 +133,7 @@ export default async function populateDatabase(db: any, options: Options = null)
// 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);
// eslint-disable-next-line no-console
console.info(`Notes: ${i} / ${options.noteCount}`);
}));