Skip to content

Commit

Permalink
disable ESlint rules conflicting with Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
ByScripts committed Jun 10, 2024
1 parent a8fa573 commit 7f631e8
Show file tree
Hide file tree
Showing 20 changed files with 39 additions and 61 deletions.
8 changes: 4 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ module.exports = {
'vue/attribute-hyphenation': 'error',
'vue/component-definition-name-casing': 'error',
'vue/first-attribute-linebreak': 'error',
'vue/html-closing-bracket-newline': 'error',
'vue/html-closing-bracket-newline': 'off', // Conflicts with Prettier
'vue/html-closing-bracket-spacing': 'error',
'vue/html-end-tags': 'error',
'vue/html-indent': 'error',
'vue/html-indent': 'off', // Conflicts with Prettier
'vue/html-quotes': 'error',
'vue/html-self-closing': 'error',
'vue/max-attributes-per-line': ['error', { singleline: 3, multiline: 1 }],
'vue/html-self-closing': ['error', { html: { void: 'always', normal: 'always', component: 'always' } }],
'vue/max-attributes-per-line': 'off', // Conflicts with Prettier
'vue/multiline-html-element-content-newline': 'error',
'vue/mustache-interpolation-spacing': 'error',
'vue/no-multi-spaces': 'error',
Expand Down
9 changes: 2 additions & 7 deletions @xen-orchestra/lite/src/components/AppHeader.vue
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
<template>
<header class="app-header">
<UiIcon
v-if="isMobile"
ref="navigationTrigger"
:icon="faBars"
class="toggle-navigation"
/>
<UiIcon v-if="isMobile" ref="navigationTrigger" :icon="faBars" class="toggle-navigation" />
<RouterLink :to="{ name: 'home' }">
<img v-if="isMobile" alt="XO Lite" src="../assets/logo.svg">
<img v-if="isMobile" alt="XO Lite" src="../assets/logo.svg" />
<TextLogo v-else />
</RouterLink>
<slot />
Expand Down
9 changes: 2 additions & 7 deletions @xen-orchestra/lite/src/components/AppLogin.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="app-login form-container">
<form @submit.prevent="handleSubmit">
<img alt="XO Lite" src="../assets/logo-title.svg">
<img alt="XO Lite" src="../assets/logo-title.svg" />
<PoolOverrideWarning />
<p v-if="isHostIsSlaveErr(error)" class="error">
<UiIcon :icon="faExclamationCircle" />
Expand All @@ -10,12 +10,7 @@
</p>
<template v-else>
<FormInputWrapper>
<FormInput
v-model="login"
name="login"
readonly
type="text"
/>
<FormInput v-model="login" name="login" readonly type="text" />
</FormInputWrapper>
<FormInput
ref="passwordRef"
Expand Down
4 changes: 2 additions & 2 deletions @xen-orchestra/lite/src/components/CollectionFilterRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="collection-filter-row">
<span class="or">{{ $t('or') }}</span>
<FormWidget v-if="newFilter.isAdvanced" class="form-widget-advanced">
<input v-model="newFilter.content">
<input v-model="newFilter.content" />
</FormWidget>
<template v-else>
<FormWidget :before="currentFilterIcon">
Expand All @@ -29,7 +29,7 @@
</select>
</FormWidget>
<FormWidget v-else-if="hasValueInput" :after="valueInputAfter" :before="valueInputBefore">
<input v-model="newFilter.builder.value">
<input v-model="newFilter.builder.value" />
</FormWidget>
</template>
<UiActionButton v-if="!newFilter.isAdvanced" :icon="faPencil" @click="enableAdvancedMode" />
Expand Down
4 changes: 2 additions & 2 deletions @xen-orchestra/lite/src/components/CollectionTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
<thead>
<tr>
<td v-if="isSelectable">
<input v-model="areAllSelected" type="checkbox">
<input v-model="areAllSelected" type="checkbox" />
</td>
<slot name="head-row" />
</tr>
</thead>
<tbody>
<tr v-for="item in filteredAndSortedCollection" :key="item.$ref">
<td v-if="isSelectable">
<input v-model="selected" :value="item.$ref" type="checkbox">
<input v-model="selected" :value="item.$ref" type="checkbox" />
</td>
<slot :item name="body-row" />
</tr>
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/NoDataError.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="no-data">
<img alt="No data" class="img" src="@/assets/undraw-bug-fixing.svg">
<img alt="No data" class="img" src="@/assets/undraw-bug-fixing.svg" />
<p class="text-error typo h4-medium">{{ $t('error-no-data') }}</p>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/NoResult.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="no-result">
<img alt="" class="img" src="@/assets/no-result.svg">
<img alt="" class="img" src="@/assets/no-result.svg" />
<p class="text-info">{{ $t('no-result') }}</p>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/PoolOverrideWarning.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<I18nT keypath="you-are-currently-on">
<strong>{{ masterSessionStorage }}</strong>
</I18nT>
<br>
<br />
{{ $t('click-to-return-default-pool') }}
</p>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
<div>Optional string prop: {{ imOptional }}</div>
<div>Optional string prop with default: {{ imOptionalWithDefault }}</div>
Input for default v-model:
<input :value="modelValue" @input="emit('update:modelValue', ($event.target as HTMLInputElement)?.value)">
<input :value="modelValue" @input="emit('update:modelValue', ($event.target as HTMLInputElement)?.value)" />
Input for v-model:customModel:
<input :value="customModel" @input="emit('update:customModel', ($event.target as HTMLInputElement)?.value)">
<input :value="customModel" @input="emit('update:customModel', ($event.target as HTMLInputElement)?.value)" />
Event with no arguments:
<button type="button" @click="emit('click')">Click me</button>
Event with argument:
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/form/FormCheckbox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
:type="type === 'radio' ? 'radio' : 'checkbox'"
class="input"
v-bind="$attrs"
>
/>
<span class="fake-checkbox">
<UiIcon :fixed-width="false" :icon class="icon" />
</span>
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/form/FormInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
:required
class="input"
v-bind="$attrs"
>
/>
<span v-if="before !== undefined" class="before">
<template v-if="typeof before === 'string'">{{ before }}</template>
<UiIcon v-else :icon="before" class="before" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<UiButton @click="start">{{ $t('load-now') }}</UiButton>
</div>
<div>
<img alt="" src="@/assets/server-status.svg">
<img alt="" src="@/assets/server-status.svg" />
</div>
</div>
<NoDataError v-else-if="hasError" />
Expand All @@ -23,9 +23,9 @@
</div>
<div v-else-if="alarms.length === 0" class="no-alarm">
<div>
<img alt="" src="@/assets/server-status.svg">
<img alt="" src="@/assets/server-status.svg" />
</div>
<p class="text typo h4-medium">{{ $t('all-good') }}<br>{{ $t('no-alarm-triggered') }}</p>
<p class="text typo h4-medium">{{ $t('all-good') }}<br />{{ $t('no-alarm-triggered') }}</p>
</div>
<div v-else class="table-container">
<UiTable>
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/ui/UiCardComingSoon.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<UiCard class="ui-card-coming-soon">
<UiCardTitle>{{ title }}</UiCardTitle>
<div class="content">
<img alt="" src="@/assets/under-construction.svg">
<img alt="" src="@/assets/under-construction.svg" />
</div>
<div class="content">{{ $t('coming-soon') }}</div>
</UiCard>
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/ui/UiSeparator.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<hr class="ui-separator">
<hr class="ui-separator" />
</template>

<style lang="postcss" scoped>
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/components/ui/UiStatusPanel.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="ui-status-panel">
<img :src="imageSource" alt="" class="image">
<img :src="imageSource" alt="" class="image" />
<p v-if="title !== undefined" class="title typo h2-black">{{ title }}</p>
<p v-if="subtitle !== undefined" class="subtitle typo h3-medium">{{ subtitle }}</p>
<slot />
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/views/ObjectNotFoundView.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<img alt="Not found" src="../assets/object-not-found.svg">
<img alt="Not found" src="../assets/object-not-found.svg" />
<p class="text">{{ $t('object-not-found', { id }) }}</p>
<UiButton @click="router.push({ name: 'home' })">{{ $t('back-pool-dashboard') }}</UiButton>
</div>
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/lite/src/views/PageNotFoundView.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<img alt="Not found" src="../assets/page-not-found.svg">
<img alt="Not found" src="../assets/page-not-found.svg" />
<p class="numeric">404</p>
<p class="text">{{ $t('page-not-found') }}</p>
<UiButton @click="router.push({ name: 'home' })">{{ $t('back-pool-dashboard') }}</UiButton>
Expand Down
6 changes: 3 additions & 3 deletions @xen-orchestra/lite/src/views/settings/SettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@
:class="{ selected: colorMode === colorModeOption }"
@click="colorMode = colorModeOption"
>
<img v-if="colorModeOption === 'light'" src="@/assets/color-mode-light.svg" alt="Color mode light">
<img v-else-if="colorModeOption === 'dark'" src="@/assets/color-mode-dark.svg" alt="Color mode dark">
<img v-else src="@/assets/color-mode-auto.svg" alt="Color mode auto">
<img v-if="colorModeOption === 'light'" src="@/assets/color-mode-light.svg" alt="Color mode light" />
<img v-else-if="colorModeOption === 'dark'" src="@/assets/color-mode-dark.svg" alt="Color mode dark" />
<img v-else src="@/assets/color-mode-auto.svg" alt="Color mode auto" />
<span>
<UiIcon v-if="colorMode === colorModeOption" :icon="faCheck" />
{{ $t(`theme-${colorModeOption}`) }}
Expand Down
28 changes: 8 additions & 20 deletions @xen-orchestra/lite/src/views/xoa-deploy/XoaDeployView.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<TitleBar :icon="faDownload">{{ $t('deploy-xoa') }}</TitleBar>
<div v-if="deploying" class="status">
<img src="@/assets/xo.svg" width="300" alt="Xen Orchestra">
<img src="@/assets/xo.svg" width="300" alt="Xen Orchestra" />

<!-- Error -->
<template v-if="error !== undefined">
Expand Down Expand Up @@ -40,12 +40,7 @@
<UiIcon :icon="faExclamationCircle" />
{{ $t('keep-page-open') }}
</p>
<UiButton
:disabled="vmRef === undefined"
color="error"
level="secondary"
@click="cancel()"
>
<UiButton :disabled="vmRef === undefined" color="error" level="secondary" @click="cancel()">
{{ $t('cancel') }}
</UiButton>
</template>
Expand Down Expand Up @@ -146,31 +141,24 @@
:label="$t('admin-password')"
learn-more-url="https://xen-orchestra.com/docs/xoa.html#default-xo-account"
>
<FormInput
v-model="xoaPwd"
type="password"
required
:placeholder="$t('password')"
/>
<FormInput v-model="xoaPwd" type="password" required :placeholder="$t('password')" />
</FormInputWrapper>
<FormInputWrapper
:label="$t('admin-password-confirm')"
learn-more-url="https://xen-orchestra.com/docs/xoa.html#default-xo-account"
>
<FormInput
v-model="xoaPwdConfirm"
type="password"
required
:placeholder="$t('password')"
/>
<FormInput v-model="xoaPwdConfirm" type="password" required :placeholder="$t('password')" />
</FormInputWrapper>
</div>
</FormSection>

<FormSection :label="$t('xoa-ssh-account')">
<div class="row">
<FormInputWrapper :label="$t('ssh-account')">
<label><span>{{ $t('disabled') }}</span><FormToggle v-model="enableSshAccount" /><span>{{ $t('enabled') }}</span></label>
<label
><span>{{ $t('disabled') }}</span
><FormToggle v-model="enableSshAccount" /><span>{{ $t('enabled') }}</span></label
>
</FormInputWrapper>
</div>
<div class="row">
Expand Down
2 changes: 1 addition & 1 deletion @xen-orchestra/web/src/pages/dev/token.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="token">
<form @submit.prevent="handleSubmit">
Enter XO 5 token:
<input v-model="token">
<input v-model="token" />
<button type="submit">Register token</button>
</form>

Expand Down

0 comments on commit 7f631e8

Please sign in to comment.