chore: fix some lints automatically (#8788)
* chore: fix some lints automatically Fixed lints that were automatically fixable with `eslint --fix`. * fix type * workaround for empty interface lint
This commit is contained in:
@ -27,8 +27,7 @@ type CaptchaContainer = {
|
||||
};
|
||||
|
||||
declare global {
|
||||
interface Window extends CaptchaContainer {
|
||||
}
|
||||
interface Window extends CaptchaContainer { }
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
|
@ -71,7 +71,7 @@ function onMouseover() {
|
||||
}
|
||||
|
||||
function onMouseout() {
|
||||
hover.value = false
|
||||
hover.value = false;
|
||||
}
|
||||
|
||||
function onDragover(ev: DragEvent) {
|
||||
@ -204,7 +204,7 @@ function deleteFolder() {
|
||||
defaultStore.set('uploadFolder', null);
|
||||
}
|
||||
}).catch(err => {
|
||||
switch(err.id) {
|
||||
switch (err.id) {
|
||||
case 'b0fc8a17-963c-405d-bfbc-859a487295e1':
|
||||
os.alert({
|
||||
type: 'error',
|
||||
|
@ -143,7 +143,7 @@ const fetching = ref(true);
|
||||
|
||||
const ilFilesObserver = new IntersectionObserver(
|
||||
(entries) => entries.some((entry) => entry.isIntersecting) && !fetching.value && moreFiles.value && fetchMoreFiles()
|
||||
)
|
||||
);
|
||||
|
||||
watch(folder, () => emit('cd', folder.value));
|
||||
|
||||
@ -332,7 +332,7 @@ function deleteFolder(folderToDelete: Misskey.entities.DriveFolder) {
|
||||
// 削除時に親フォルダに移動
|
||||
move(folderToDelete.parentId);
|
||||
}).catch(err => {
|
||||
switch(err.id) {
|
||||
switch (err.id) {
|
||||
case 'b0fc8a17-963c-405d-bfbc-859a487295e1':
|
||||
os.alert({
|
||||
type: 'error',
|
||||
@ -607,7 +607,7 @@ function onContextmenu(ev: MouseEvent) {
|
||||
onMounted(() => {
|
||||
if (defaultStore.state.enableInfiniteScroll && loadMoreFiles.value) {
|
||||
nextTick(() => {
|
||||
ilFilesObserver.observe(loadMoreFiles.value?.$el)
|
||||
ilFilesObserver.observe(loadMoreFiles.value?.$el);
|
||||
});
|
||||
}
|
||||
|
||||
@ -628,7 +628,7 @@ onMounted(() => {
|
||||
onActivated(() => {
|
||||
if (defaultStore.state.enableInfiniteScroll) {
|
||||
nextTick(() => {
|
||||
ilFilesObserver.observe(loadMoreFiles.value?.$el)
|
||||
ilFilesObserver.observe(loadMoreFiles.value?.$el);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -24,7 +24,7 @@ const props = withDefaults(defineProps<{
|
||||
defaultOpen: boolean;
|
||||
}>(), {
|
||||
defaultOpen: false,
|
||||
})
|
||||
});
|
||||
|
||||
let opened = $ref(props.defaultOpen);
|
||||
let openedAtLeastOnce = $ref(props.defaultOpen);
|
||||
|
@ -14,7 +14,7 @@ export default defineComponent({
|
||||
data() {
|
||||
return {
|
||||
value: this.modelValue,
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
value() {
|
||||
|
@ -66,7 +66,7 @@ export default defineComponent({
|
||||
.then(response => response.json())
|
||||
.then(f => {
|
||||
ok(f);
|
||||
})
|
||||
});
|
||||
});
|
||||
});
|
||||
os.promiseDialog(promise);
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import { defineComponent, defineAsyncComponent } from 'vue';
|
||||
import MkDriveFileThumbnail from './drive-file-thumbnail.vue'
|
||||
import MkDriveFileThumbnail from './drive-file-thumbnail.vue';
|
||||
import * as os from '@/os';
|
||||
|
||||
export default defineComponent({
|
||||
@ -114,19 +114,19 @@ export default defineComponent({
|
||||
this.menu = os.popupMenu([{
|
||||
text: this.$ts.renameFile,
|
||||
icon: 'fas fa-i-cursor',
|
||||
action: () => { this.rename(file) }
|
||||
action: () => { this.rename(file); }
|
||||
}, {
|
||||
text: file.isSensitive ? this.$ts.unmarkAsSensitive : this.$ts.markAsSensitive,
|
||||
icon: file.isSensitive ? 'fas fa-eye-slash' : 'fas fa-eye',
|
||||
action: () => { this.toggleSensitive(file) }
|
||||
action: () => { this.toggleSensitive(file); }
|
||||
}, {
|
||||
text: this.$ts.describeFile,
|
||||
icon: 'fas fa-i-cursor',
|
||||
action: () => { this.describe(file) }
|
||||
action: () => { this.describe(file); }
|
||||
}, {
|
||||
text: this.$ts.attachCancel,
|
||||
icon: 'fas fa-times-circle',
|
||||
action: () => { this.detachMedia(file.id) }
|
||||
action: () => { this.detachMedia(file.id); }
|
||||
}], ev.currentTarget ?? ev.target).then(() => this.menu = null);
|
||||
}
|
||||
}
|
||||
|
@ -442,7 +442,7 @@ function onCompositionEnd(ev: CompositionEvent) {
|
||||
}
|
||||
|
||||
async function onPaste(ev: ClipboardEvent) {
|
||||
for (const { item, i } of Array.from(ev.clipboardData.items).map((item, i) => ({item, i}))) {
|
||||
for (const { item, i } of Array.from(ev.clipboardData.items).map((item, i) => ({ item, i }))) {
|
||||
if (item.kind === 'file') {
|
||||
const file = item.getAsFile();
|
||||
const lio = file.name.lastIndexOf('.');
|
||||
|
@ -222,7 +222,7 @@ export default defineComponent({
|
||||
|
||||
return {
|
||||
chartEl,
|
||||
}
|
||||
};
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
@ -52,7 +52,7 @@ export default defineComponent({
|
||||
flag: true,
|
||||
radio: 'misskey',
|
||||
mfm: `Hello world! This is an @example mention. BTW you are @${this.$i ? this.$i.username : 'guest'}.\nAlso, here is ${config.url} and [example link](${config.url}). for more details, see https://example.com.\nAs you know #misskey is open-source software.`
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
@ -159,7 +159,7 @@ function queryKey() {
|
||||
|
||||
function onSubmit() {
|
||||
signing = true;
|
||||
console.log('submit')
|
||||
console.log('submit');
|
||||
if (!totpLogin && user && user.twoFactorEnabled) {
|
||||
if (window.PublicKeyCredential && user.securityKeys) {
|
||||
os.api('signin', {
|
||||
@ -222,7 +222,7 @@ function loginFailed(err) {
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
console.log(err)
|
||||
console.log(err);
|
||||
os.alert({
|
||||
type: 'error',
|
||||
title: i18n.ts.loginFailed,
|
||||
|
@ -111,7 +111,7 @@ export default defineComponent({
|
||||
ToSAgreement: false,
|
||||
hCaptchaResponse: null,
|
||||
reCaptchaResponse: null,
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
computed: {
|
||||
|
@ -96,11 +96,11 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function calcCircleScale(boxW, boxH, circleCenterX, circleCenterY) {
|
||||
const origin = {x: circleCenterX, y: circleCenterY};
|
||||
const dist1 = distance({x: 0, y: 0}, origin);
|
||||
const dist2 = distance({x: boxW, y: 0}, origin);
|
||||
const dist3 = distance({x: 0, y: boxH}, origin);
|
||||
const dist4 = distance({x: boxW, y: boxH }, origin);
|
||||
const origin = { x: circleCenterX, y: circleCenterY };
|
||||
const dist1 = distance({ x: 0, y: 0 }, origin);
|
||||
const dist2 = distance({ x: boxW, y: 0 }, origin);
|
||||
const dist3 = distance({ x: 0, y: boxH }, origin);
|
||||
const dist4 = distance({ x: boxW, y: boxH }, origin);
|
||||
return Math.max(dist1, dist2, dist3, dist4) * 2;
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ onMounted(() => {
|
||||
}
|
||||
fixed.value = (type.value === 'drawer') || (getFixedContainer(props.src) != null);
|
||||
|
||||
await nextTick()
|
||||
await nextTick();
|
||||
|
||||
align();
|
||||
}, { immediate: true, });
|
||||
|
@ -63,7 +63,7 @@ const setPosition = () => {
|
||||
}
|
||||
|
||||
return [left, top];
|
||||
}
|
||||
};
|
||||
|
||||
const calcPosWhenBottom = () => {
|
||||
let left: number;
|
||||
@ -84,7 +84,7 @@ const setPosition = () => {
|
||||
}
|
||||
|
||||
return [left, top];
|
||||
}
|
||||
};
|
||||
|
||||
const calcPosWhenLeft = () => {
|
||||
let left: number;
|
||||
@ -105,7 +105,7 @@ const setPosition = () => {
|
||||
}
|
||||
|
||||
return [left, top];
|
||||
}
|
||||
};
|
||||
|
||||
const calcPosWhenRight = () => {
|
||||
let left: number;
|
||||
@ -126,7 +126,7 @@ const setPosition = () => {
|
||||
}
|
||||
|
||||
return [left, top];
|
||||
}
|
||||
};
|
||||
|
||||
const calc = (): {
|
||||
left: number;
|
||||
@ -172,7 +172,7 @@ const setPosition = () => {
|
||||
}
|
||||
|
||||
return null as never;
|
||||
}
|
||||
};
|
||||
|
||||
const { left, top, transformOrigin } = calc();
|
||||
el.value.style.transformOrigin = transformOrigin;
|
||||
|
@ -90,7 +90,7 @@ fetch(`/url?url=${encodeURIComponent(requestUrl.href)}&lang=${requestLang}`).the
|
||||
sitename = info.sitename;
|
||||
fetching = false;
|
||||
player = info.player;
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
function adjustTweetHeight(message: any) {
|
||||
|
Reference in New Issue
Block a user