refactor(editor): Stricter linting for promises and async functions (no-changelog) (#4642)

This commit is contained in:
Michael Kret
2023-05-10 18:10:03 +03:00
committed by GitHub
parent 1b1dc0e655
commit ed3bc154b0
114 changed files with 351 additions and 344 deletions

View File

@@ -186,12 +186,12 @@ export default mixins(genericHelpers, debounceHelper).extend({
window.open(route.href, '_blank');
return;
} else {
this.$router.push({ name: page, params: { id } });
void this.$router.push({ name: page, params: { id } });
}
},
updateSearch() {
this.updateQueryParam(this.search, this.categories.join(','));
this.loadWorkflowsAndCollections(false);
void this.loadWorkflowsAndCollections(false);
},
updateSearchTracking(search: string, categories: number[]) {
if (!search) {
@@ -222,13 +222,13 @@ export default mixins(genericHelpers, debounceHelper).extend({
},
openNewWorkflow() {
this.uiStore.nodeViewInitialized = false;
this.$router.push({ name: VIEWS.NEW_WORKFLOW });
void this.$router.push({ name: VIEWS.NEW_WORKFLOW });
},
onSearchInput(search: string) {
this.loadingWorkflows = true;
this.loadingCollections = true;
this.search = search;
this.callDebounced('updateSearch', { debounceTime: 500, trailing: true });
void this.callDebounced('updateSearch', { debounceTime: 500, trailing: true });
if (search.length === 0) {
this.trackSearch();
@@ -274,7 +274,7 @@ export default mixins(genericHelpers, debounceHelper).extend({
delete query.search;
}
this.$router.replace({ query });
void this.$router.replace({ query });
},
async onLoadMore() {
if (this.workflows.length >= this.totalWorkflows) {
@@ -372,9 +372,9 @@ export default mixins(genericHelpers, debounceHelper).extend({
},
async mounted() {
setPageTitle('n8n - Templates');
this.loadCategories();
this.loadWorkflowsAndCollections(true);
this.usersStore.showPersonalizationSurvey();
void this.loadCategories();
void this.loadWorkflowsAndCollections(true);
void this.usersStore.showPersonalizationSurvey();
setTimeout(() => {
// Check if there is scroll position saved in route and scroll to it