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

@@ -142,7 +142,7 @@
<script lang="ts">
import { defineComponent } from 'vue';
import { convertToDisplayDate } from '@/utils';
import { convertToDisplayDate, capitalizeFirstLetter } from '@/utils';
import { useToast, useMessage } from '@/composables';
import type {
ILdapConfig,
@@ -156,7 +156,6 @@ import { MODAL_CONFIRM } from '@/constants';
import humanizeDuration from 'humanize-duration';
import { ElTable, ElTableColumn } from 'element-plus';
import { capitalizeFirstLetter } from '@/utils';
import InfiniteLoading from 'v3-infinite-loading';
import { mapStores } from 'pinia';
import { useUsersStore } from '@/stores/users.store';
@@ -217,7 +216,7 @@ export default defineComponent({
return this.usersStore.currentUser;
},
isLDAPFeatureEnabled(): boolean {
return this.settingsStore.settings.enterprise.ldap === true;
return this.settingsStore.settings.enterprise.ldap;
},
},
methods: {
@@ -304,7 +303,7 @@ export default defineComponent({
let saveForm = true;
try {
if (this.adConfig.loginEnabled === true && newConfiguration.loginEnabled === false) {
if (this.adConfig.loginEnabled && !newConfiguration.loginEnabled) {
const confirmAction = await this.confirm(
this.$locale.baseText('settings.ldap.confirmMessage.beforeSaveForm.message'),
this.$locale.baseText('settings.ldap.confirmMessage.beforeSaveForm.headline'),
@@ -399,11 +398,11 @@ export default defineComponent({
this.loginEnabled = this.adConfig.loginEnabled;
this.syncEnabled = this.adConfig.synchronizationEnabled;
const whenLoginEnabled: IFormInput['shouldDisplay'] = (values) =>
values['loginEnabled'] === true;
values.loginEnabled === true;
const whenSyncAndLoginEnabled: IFormInput['shouldDisplay'] = (values) =>
values['synchronizationEnabled'] === true && values['loginEnabled'] === true;
values.synchronizationEnabled === true && values.loginEnabled === true;
const whenAdminBindingAndLoginEnabled: IFormInput['shouldDisplay'] = (values) =>
values['bindingType'] === 'admin' && values['loginEnabled'] === true;
values.bindingType === 'admin' && values.loginEnabled === true;
this.formInputs = [
{
name: 'loginEnabled',
@@ -484,7 +483,7 @@ export default defineComponent({
required: false,
},
shouldDisplay(values): boolean {
return values['connectionSecurity'] !== 'none' && values['loginEnabled'] === true;
return values.connectionSecurity !== 'none' && values.loginEnabled === true;
},
},
{