refactor: Run lintfix (no-changelog) (#7537)

- Fix autofixable violations
- Remove unused directives
- Allow for PascalCased variables - needed for dynamically imported or
assigned classes, decorators, routers, etc.
This commit is contained in:
Iván Ovejero
2023-10-27 14:15:02 +02:00
committed by GitHub
parent 1c4ac02db5
commit 62c096710f
477 changed files with 706 additions and 1003 deletions

View File

@@ -193,8 +193,7 @@ import ResourceOwnershipSelect from '@/components/forms/ResourceOwnershipSelect.
import ResourceFiltersDropdown from '@/components/forms/ResourceFiltersDropdown.vue';
import { useSettingsStore } from '@/stores/settings.store';
import { useUsersStore } from '@/stores/users.store';
import type { N8nInput } from 'n8n-design-system';
import type { DatatableColumn } from 'n8n-design-system';
import type { N8nInput, DatatableColumn } from 'n8n-design-system';
import { useI18n } from '@/composables';
export interface IResource {
@@ -338,10 +337,7 @@ export default defineComponent({
if (this.filtersModel.sharedWith) {
matches =
matches &&
!!(
resource.sharedWith &&
resource.sharedWith.find((sharee) => sharee.id === this.filtersModel.sharedWith)
);
!!resource.sharedWith?.find((sharee) => sharee.id === this.filtersModel.sharedWith);
}
if (this.filtersModel.search) {
@@ -360,20 +356,20 @@ export default defineComponent({
return filtered.sort((a, b) => {
switch (this.sortBy) {
case 'lastUpdated':
return this.sortFns['lastUpdated']
? this.sortFns['lastUpdated'](a, b)
return this.sortFns.lastUpdated
? this.sortFns.lastUpdated(a, b)
: new Date(b.updatedAt).valueOf() - new Date(a.updatedAt).valueOf();
case 'lastCreated':
return this.sortFns['lastCreated']
? this.sortFns['lastCreated'](a, b)
return this.sortFns.lastCreated
? this.sortFns.lastCreated(a, b)
: new Date(b.createdAt).valueOf() - new Date(a.createdAt).valueOf();
case 'nameAsc':
return this.sortFns['nameAsc']
? this.sortFns['nameAsc'](a, b)
return this.sortFns.nameAsc
? this.sortFns.nameAsc(a, b)
: this.displayName(a).trim().localeCompare(this.displayName(b).trim());
case 'nameDesc':
return this.sortFns['nameDesc']
? this.sortFns['nameDesc'](a, b)
return this.sortFns.nameDesc
? this.sortFns.nameDesc(a, b)
: this.displayName(b).trim().localeCompare(this.displayName(a).trim());
default:
return this.sortFns[this.sortBy] ? this.sortFns[this.sortBy](a, b) : 0;