introduce lint for client

Resolve #7998
This commit is contained in:
syuilo
2021-11-18 23:32:43 +09:00
parent c850cef711
commit 73b5c12927
40 changed files with 817 additions and 153 deletions

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-bolt"></i> {{ $ts._pages.blocks.button }}</template>
@ -38,6 +39,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkSelect from '@/components/form/select.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-paint-brush"></i> {{ $ts._pages.blocks.canvas }}</template>
@ -20,6 +21,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkInput from '@/components/form/input.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-bolt"></i> {{ $ts._pages.blocks.counter }}</template>
@ -18,6 +19,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkInput from '@/components/form/input.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-question"></i> {{ $ts._pages.blocks.if }}</template>
<template #func>
@ -25,6 +26,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent, defineAsyncComponent } from 'vue';
import { v4 as uuid } from 'uuid';
import XContainer from '../page-editor.container.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-image"></i> {{ $ts._pages.blocks.image }}</template>
<template #func>
@ -14,6 +15,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkDriveFileThumbnail from '@/components/drive-file-thumbnail.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-sticky-note"></i> {{ $ts._pages.blocks.note }}</template>
@ -16,6 +17,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkInput from '@/components/form/input.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-bolt"></i> {{ $ts._pages.blocks.numberInput }}</template>
@ -18,6 +19,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkInput from '@/components/form/input.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-paper-plane"></i> {{ $ts._pages.blocks.post }}</template>
@ -11,6 +12,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkTextarea from '@/components/form/textarea.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-bolt"></i> {{ $ts._pages.blocks.radioButton }}</template>
@ -12,6 +13,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkTextarea from '@/components/form/textarea.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-sticky-note"></i> {{ value.title }}</template>
<template #func>
@ -17,6 +18,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent, defineAsyncComponent } from 'vue';
import { v4 as uuid } from 'uuid';
import XContainer from '../page-editor.container.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-bolt"></i> {{ $ts._pages.blocks.switch }}</template>
@ -11,6 +12,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkSwitch from '@/components/form/switch.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-bolt"></i> {{ $ts._pages.blocks.textInput }}</template>
@ -11,6 +12,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkInput from '@/components/form/input.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-align-left"></i> {{ $ts._pages.blocks.text }}</template>
@ -9,6 +10,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import * as os from '@/os';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-bolt"></i> {{ $ts._pages.blocks.textareaInput }}</template>
@ -11,6 +12,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import MkTextarea from '@/components/form/textarea.vue';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer @remove="() => $emit('remove')" :draggable="true">
<template #header><i class="fas fa-align-left"></i> {{ $ts._pages.blocks.textarea }}</template>
@ -9,6 +10,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineComponent } from 'vue';
import XContainer from '../page-editor.container.vue';
import * as os from '@/os';

View File

@ -1,4 +1,5 @@
<template>
<!-- eslint-disable vue/no-mutating-props -->
<XContainer :removable="removable" @remove="() => $emit('remove')" :error="error" :warn="warn" :draggable="draggable">
<template #header><i v-if="icon" :class="icon"></i> <template v-if="title">{{ title }} <span class="turmquns" v-if="typeText">({{ typeText }})</span></template><template v-else-if="typeText">{{ typeText }}</template></template>
<template #func>
@ -56,6 +57,7 @@
</template>
<script lang="ts">
/* eslint-disable vue/no-mutating-props */
import { defineAsyncComponent, defineComponent } from 'vue';
import { v4 as uuid } from 'uuid';
import XContainer from './page-editor.container.vue';

View File

@ -217,6 +217,7 @@ export default defineComponent({
if (page.value.startsWith('registry/value/system/')) {
return defineAsyncComponent(() => import('./registry.value.vue'));
}
return null;
});
watch(component, () => {

View File

@ -148,7 +148,7 @@ export default defineComponent({
const themesCount = installedThemes.value.length;
watch(syncDeviceDarkMode, () => {
if (syncDeviceDarkMode) {
if (syncDeviceDarkMode.value) {
defaultStore.set('darkMode', isDeviceDarkmode());
}
});

View File

@ -12,7 +12,7 @@
:initial-local-only="localOnly"
:reply="reply"
:renote="renote"
:visible-users="visibleUsers"
:initial-visible-users="visibleUsers"
@posted="state = 'posted'"
class="_panel"
/>

View File

@ -12,7 +12,7 @@
<XMediaList :media-list="note.files"/>
</div>
<div v-if="note.poll">
<XPoll :note="note" :readOnly="true" />
<XPoll :note="note" :readOnly="true"/>
</div>
</div>
<XReactionsViewer :note="note" ref="reactionsViewer"/>