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:
Johann150
2022-06-10 07:36:55 +02:00
committed by GitHub
parent a683a7092d
commit 5e29528ad4
58 changed files with 92 additions and 88 deletions

View File

@ -159,7 +159,7 @@ const remoteMenu = (emoji, ev: MouseEvent) => {
}, {
text: i18n.ts.import,
icon: 'fas fa-plus',
action: () => { im(emoji) }
action: () => { im(emoji); }
}], ev.currentTarget ?? ev.target);
};

View File

@ -132,7 +132,7 @@ export default defineComponent({
overviewHeight: '1fr',
queueHeight: '1fr',
paused: false,
}
};
},
computed: {

View File

@ -20,7 +20,7 @@ import * as symbols from '@/symbols';
import * as config from '@/config';
import { i18n } from '@/i18n';
const connection = markRaw(stream.useChannel('queueStats'))
const connection = markRaw(stream.useChannel('queueStats'));
function clear() {
os.confirm({
@ -41,7 +41,7 @@ onMounted(() => {
length: 200
});
});
})
});
onBeforeUnmount(() => {
connection.dispose();

View File

@ -32,7 +32,7 @@ export default defineComponent({
computed: {
name(): string {
const el = document.createElement('div');
el.textContent = this.app.name
el.textContent = this.app.name;
return el.innerHTML;
},
app(): any {

View File

@ -58,7 +58,7 @@ export default defineComponent({
tags: emojiTags,
selectedTags: new Set(),
searchEmojis: null,
}
};
},
watch: {

View File

@ -127,7 +127,7 @@ function getStatus(instance) {
if (instance.isSuspended) return 'suspended';
if (instance.isNotResponding) return 'error';
return 'alive';
};
}
defineExpose({
[symbols.PAGE_INFO]: {

View File

@ -71,7 +71,7 @@ export default defineComponent({
description: null,
title: null,
isSensitive: false,
}
};
},
watch: {

View File

@ -123,11 +123,11 @@ export default defineComponent({
os.popupMenu([{
text: this.$ts.messagingWithUser,
icon: 'fas fa-user',
action: () => { this.startUser() }
action: () => { this.startUser(); }
}, {
text: this.$ts.messagingWithGroup,
icon: 'fas fa-users',
action: () => { this.startGroup() }
action: () => { this.startGroup(); }
}], ev.currentTarget ?? ev.target);
},

View File

@ -200,7 +200,7 @@ export default defineComponent({
text: this.text,
file: this.file
}
}
};
localStorage.setItem('message_drafts', JSON.stringify(drafts));
},

View File

@ -341,7 +341,7 @@ export default defineComponent({
preview_rainbow: `$[rainbow 🍮] $[rainbow.speed=5s 🍮]`,
preview_sparkle: `$[sparkle 🍮]`,
preview_rotate: `$[rotate 🍮]`,
}
};
},
});
</script>

View File

@ -32,7 +32,7 @@ defineExpose({
icon: 'fas fa-satellite',
bg: 'var(--bg)'
}
})
});
</script>
<style lang="scss" scoped>

View File

@ -114,7 +114,7 @@ export default defineComponent({
readonly: this.readonly,
getScriptBlockList: this.getScriptBlockList,
getPageBlockList: this.getPageBlockList
}
};
},
props: {

View File

@ -100,7 +100,7 @@ async function run() {
text: error.message
});
}
};
}
function highlighter(code) {
return highlight(code, languages.js, 'javascript');

View File

@ -142,7 +142,7 @@ function registerKey() {
registration.value = null;
key.lastUsed = new Date();
os.success();
})
});
}
function unregisterKey(key) {

View File

@ -45,7 +45,7 @@ const init = async () => {
accounts.value = response;
console.log(accounts.value);
});
}
};
function menu(account, ev) {
os.popupMenu([{

View File

@ -52,7 +52,7 @@ const pagination = {
params: {
sort: '+lastUsedAt'
}
}
};
function revoke(token) {
os.api('i/revoke-token', { tokenId: token.id }).then(() => {

View File

@ -120,7 +120,7 @@ const darkThemeId = computed({
return darkTheme.value.id;
},
set(id) {
ColdDeviceStorage.set('darkTheme', themes.value.find(x => x.id === id))
ColdDeviceStorage.set('darkTheme', themes.value.find(x => x.id === id));
}
});
const lightTheme = ColdDeviceStorage.ref('lightTheme');
@ -129,7 +129,7 @@ const lightThemeId = computed({
return lightTheme.value.id;
},
set(id) {
ColdDeviceStorage.set('lightTheme', themes.value.find(x => x.id === id))
ColdDeviceStorage.set('lightTheme', themes.value.find(x => x.id === id));
}
});
const darkMode = computed(defaultStore.makeGetterSetter('darkMode'));

View File

@ -75,7 +75,7 @@ async function save() {
// check each line if it is a RegExp or not
for (let i = 0; i < lines.length; i++) {
const line = lines[i]
const line = lines[i];
const regexp = line.match(/^\/(.+)\/(.*)$/);
if (regexp) {
// check that the RegExp is valid

View File

@ -56,7 +56,7 @@ export default defineComponent({
localOnly: null as boolean | null,
files: [] as Misskey.entities.DriveFile[],
visibleUsers: [] as Misskey.entities.User[],
}
};
},
async created() {

View File

@ -68,7 +68,7 @@
import { watch } from 'vue';
import { toUnicode } from 'punycode/';
import tinycolor from 'tinycolor2';
import { v4 as uuid} from 'uuid';
import { v4 as uuid } from 'uuid';
import JSON5 from 'json5';
import FormButton from '@/components/ui/button.vue';

View File

@ -20,7 +20,7 @@
<script lang="ts">
export default {
name: 'MkTimelinePage',
}
};
</script>
<script lang="ts" setup>

View File

@ -41,7 +41,7 @@ export default defineComponent({
password: '',
submitting: false,
host,
}
};
},
methods: {

View File

@ -39,7 +39,7 @@ export default defineComponent({
return {
notes: [],
isScrolling: false,
}
};
},
created() {