style: add missing trailing commas (#9387)

This commit is contained in:
Kagami Sascha Rosylight 2022-12-22 16:01:59 +09:00 committed by GitHub
parent 9314ceae36
commit f1fd1d2585
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 320 additions and 320 deletions

View file

@ -65,7 +65,7 @@ import {
Legend,
Title,
Tooltip,
SubTitle
SubTitle,
} from 'chart.js';
import MkButton from '@/components/MkButton.vue';
import MkSelect from '@/components/form/select.vue';
@ -89,7 +89,7 @@ Chart.register(
Legend,
Title,
Tooltip,
SubTitle
SubTitle,
);
const alpha = (hex, a) => {
@ -155,13 +155,13 @@ export default defineComponent({
this.connection.on('statsLog', this.onStatsLog);
this.connection.send('requestLog', {
id: Math.random().toString().substr(2, 8),
length: 150
length: 150,
});
this.$nextTick(() => {
this.queueConnection.send('requestLog', {
id: Math.random().toString().substr(2, 8),
length: 200
length: 200,
});
});
});
@ -190,7 +190,7 @@ export default defineComponent({
borderWidth: 2,
borderColor: '#86b300',
backgroundColor: alpha('#86b300', 0.1),
data: []
data: [],
}, {
label: 'MEM (active)',
pointRadius: 0,
@ -198,7 +198,7 @@ export default defineComponent({
borderWidth: 2,
borderColor: '#935dbf',
backgroundColor: alpha('#935dbf', 0.02),
data: []
data: [],
}, {
label: 'MEM (used)',
pointRadius: 0,
@ -207,8 +207,8 @@ export default defineComponent({
borderColor: '#935dbf',
borderDash: [5, 5],
fill: false,
data: []
}]
data: [],
}],
},
options: {
aspectRatio: 3,
@ -217,14 +217,14 @@ export default defineComponent({
left: 16,
right: 16,
top: 16,
bottom: 0
}
bottom: 0,
},
},
legend: {
position: 'bottom',
labels: {
boxWidth: 16,
}
},
},
scales: {
x: {
@ -235,7 +235,7 @@ export default defineComponent({
},
ticks: {
display: false,
}
},
},
y: {
position: 'right',
@ -246,15 +246,15 @@ export default defineComponent({
},
ticks: {
display: false,
max: 100
}
}
max: 100,
},
},
},
tooltips: {
intersect: false,
mode: 'index',
}
}
},
},
}));
},
@ -271,7 +271,7 @@ export default defineComponent({
borderWidth: 2,
borderColor: '#94a029',
backgroundColor: alpha('#94a029', 0.1),
data: []
data: [],
}, {
label: 'Out',
pointRadius: 0,
@ -279,8 +279,8 @@ export default defineComponent({
borderWidth: 2,
borderColor: '#ff9156',
backgroundColor: alpha('#ff9156', 0.1),
data: []
}]
data: [],
}],
},
options: {
aspectRatio: 3,
@ -289,14 +289,14 @@ export default defineComponent({
left: 16,
right: 16,
top: 16,
bottom: 0
}
bottom: 0,
},
},
legend: {
position: 'bottom',
labels: {
boxWidth: 16,
}
},
},
scales: {
x: {
@ -306,8 +306,8 @@ export default defineComponent({
zeroLineColor: this.gridColor,
},
ticks: {
display: false
}
display: false,
},
},
y: {
position: 'right',
@ -318,14 +318,14 @@ export default defineComponent({
},
ticks: {
display: false,
}
}
},
},
},
tooltips: {
intersect: false,
mode: 'index',
}
}
},
},
}));
},
@ -342,7 +342,7 @@ export default defineComponent({
borderWidth: 2,
borderColor: '#94a029',
backgroundColor: alpha('#94a029', 0.1),
data: []
data: [],
}, {
label: 'Write',
pointRadius: 0,
@ -350,8 +350,8 @@ export default defineComponent({
borderWidth: 2,
borderColor: '#ff9156',
backgroundColor: alpha('#ff9156', 0.1),
data: []
}]
data: [],
}],
},
options: {
aspectRatio: 3,
@ -360,14 +360,14 @@ export default defineComponent({
left: 16,
right: 16,
top: 16,
bottom: 0
}
bottom: 0,
},
},
legend: {
position: 'bottom',
labels: {
boxWidth: 16,
}
},
},
scales: {
x: {
@ -377,8 +377,8 @@ export default defineComponent({
zeroLineColor: this.gridColor,
},
ticks: {
display: false
}
display: false,
},
},
y: {
position: 'right',
@ -389,14 +389,14 @@ export default defineComponent({
},
ticks: {
display: false,
}
}
},
},
},
tooltips: {
intersect: false,
mode: 'index',
}
}
},
},
}));
},
@ -458,7 +458,7 @@ export default defineComponent({
resume() {
this.paused = false;
},
}
},
});
</script>

View file

@ -26,7 +26,7 @@ import * as os from '@/os';
export default defineComponent({
components: {
MkButton
MkButton,
},
props: ['session'],
computed: {
@ -37,12 +37,12 @@ export default defineComponent({
},
app(): any {
return this.session.app;
}
},
},
methods: {
cancel() {
os.api('auth/deny', {
token: this.session.token
token: this.session.token,
}).then(() => {
this.$emit('denied');
});
@ -50,11 +50,11 @@ export default defineComponent({
accept() {
os.api('auth/accept', {
token: this.session.token
token: this.session.token,
}).then(() => {
this.$emit('accepted');
});
}
}
},
},
});
</script>

View file

@ -28,7 +28,7 @@ function menu(ev) {
action: () => {
copyToClipboard(`:${props.emoji.name}:`);
os.success();
}
},
}], ev.currentTarget ?? ev.target);
}
</script>

View file

@ -58,8 +58,8 @@ withDefaults(defineProps<{
message: null,
primary: false,
var: null,
fn: null
}
fn: null,
},
});
</script>

View file

@ -32,7 +32,7 @@ withDefaults(defineProps<{
value: {
name: '',
width: 300,
height: 200
}
height: 200,
},
});
</script>

View file

@ -28,7 +28,7 @@ withDefaults(defineProps<{
value: any
}>(), {
value: {
name: ''
}
name: '',
},
});
</script>

View file

@ -42,8 +42,8 @@ const props = withDefaults(defineProps<{
}>(), {
value: {
children: [],
var: null
}
var: null,
},
});
const getPageBlockList = inject<(any) => any>('getPageBlockList');
@ -51,7 +51,7 @@ const getPageBlockList = inject<(any) => any>('getPageBlockList');
async function add() {
const { canceled, result: type } = await os.select({
title: i18n.ts._pages.chooseBlock,
groupedItems: getPageBlockList()
groupedItems: getPageBlockList(),
});
if (canceled) return;

View file

@ -25,8 +25,8 @@ const props = withDefaults(defineProps<{
value: any
}>(), {
value: {
fileId: null
}
fileId: null,
},
});
let file: any = $ref(null);
@ -43,7 +43,7 @@ onMounted(async () => {
await choose();
} else {
os.api('drive/files/show', {
fileId: props.value.fileId
fileId: props.value.fileId,
}).then(fileResponse => {
file = fileResponse;
});

View file

@ -31,8 +31,8 @@ const props = withDefaults(defineProps<{
}>(), {
value: {
note: null,
detailed: false
}
detailed: false,
},
});
let id: any = $ref(props.value.note);
@ -47,6 +47,6 @@ watch(id, async () => {
note = await os.api('notes/show', { noteId: props.value.note });
}, {
immediate: true
immediate: true,
});
</script>

View file

@ -28,7 +28,7 @@ withDefaults(defineProps<{
value: any
}>(), {
value: {
name: ''
}
name: '',
},
});
</script>

View file

@ -25,7 +25,7 @@ withDefaults(defineProps<{
value: {
text: '',
attachCanvasImage: false,
canvasId: ''
}
canvasId: '',
},
});
</script>

View file

@ -25,8 +25,8 @@ const props = withDefaults(defineProps<{
value: {
name: '',
title: '',
values: []
}
values: [],
},
});
let values: string = $ref(props.value.values.join('\n'));
@ -34,6 +34,6 @@ let values: string = $ref(props.value.values.join('\n'));
watch(values, () => {
props.value.values = values.split('\n');
}, {
deep: true
deep: true,
});
</script>

View file

@ -33,8 +33,8 @@ const props = withDefaults(defineProps<{
}>(), {
value: {
title: null,
children: []
}
children: [],
},
});
const getPageBlockList = inject<(any) => any>('getPageBlockList');
@ -42,7 +42,7 @@ const getPageBlockList = inject<(any) => any>('getPageBlockList');
async function rename() {
const { canceled, result: title } = await os.inputText({
title: 'Enter title',
default: props.value.title
default: props.value.title,
});
if (canceled) return;
props.value.title = title;
@ -51,7 +51,7 @@ async function rename() {
async function add() {
const { canceled, result: type } = await os.select({
title: i18n.ts._pages.chooseBlock,
groupedItems: getPageBlockList()
groupedItems: getPageBlockList(),
});
if (canceled) return;

View file

@ -22,8 +22,8 @@ withDefaults(defineProps<{
value: any
}>(), {
value: {
name: ''
}
name: '',
},
});
</script>

View file

@ -21,7 +21,7 @@ withDefaults(defineProps<{
value: any
}>(), {
value: {
name: ''
}
name: '',
},
});
</script>

View file

@ -18,8 +18,8 @@ withDefaults(defineProps<{
value: any
}>(), {
value: {
text: ''
}
text: '',
},
});
</script>

View file

@ -22,7 +22,7 @@ withDefaults(defineProps<{
value: any
}>(), {
value: {
name: ''
}
name: '',
},
});
</script>

View file

@ -18,8 +18,8 @@ withDefaults(defineProps<{
value: any
}>(), {
value: {
text: ''
}
text: '',
},
});
</script>

View file

@ -31,24 +31,24 @@ export default defineComponent({
props: {
expanded: {
type: Boolean,
default: true
default: true,
},
removable: {
type: Boolean,
default: true
default: true,
},
draggable: {
type: Boolean,
default: false
default: false,
},
error: {
required: false,
default: null
default: null,
},
warn: {
required: false,
default: null
}
default: null,
},
},
emits: ['toggle', 'remove'],
data() {
@ -63,8 +63,8 @@ export default defineComponent({
},
remove() {
this.$emit('remove');
}
}
},
},
});
</script>

View file

@ -78,17 +78,17 @@ export default defineComponent({
props: {
getExpectedType: {
required: false,
default: null
default: null,
},
modelValue: {
required: true
required: true,
},
title: {
required: false
required: false,
},
removable: {
required: false,
default: false
default: false,
},
hpml: {
required: true,
@ -101,8 +101,8 @@ export default defineComponent({
},
draggable: {
required: false,
default: false
}
default: false,
},
},
data() {
@ -131,11 +131,11 @@ export default defineComponent({
handler() {
this.modelValue.value.slots = this.slots.split('\n').map(x => ({
name: x,
type: null
type: null,
}));
},
deep: true
}
deep: true,
},
},
created() {
@ -150,7 +150,7 @@ export default defineComponent({
const id = uuid();
this.modelValue.value = {
slots: [],
expression: { id, type: null }
expression: { id, type: null },
};
return;
}
@ -194,13 +194,13 @@ export default defineComponent({
const emptySlotIndex = args.findIndex(x => x.type === null);
if (emptySlotIndex !== -1 && emptySlotIndex < args.length) {
this.warn = {
slot: emptySlotIndex
slot: emptySlotIndex,
};
} else {
this.warn = null;
}
}, {
deep: true
deep: true,
});
this.$watch(() => this.hpml.variables, () => {
@ -208,7 +208,7 @@ export default defineComponent({
this.error = this.hpml.typeCheck(this.modelValue);
}
}, {
deep: true
deep: true,
});
},
@ -216,7 +216,7 @@ export default defineComponent({
async changeType() {
const { canceled, result: type } = await os.select({
title: this.$ts._pages.selectType,
groupedItems: this.getScriptBlockList(this.getExpectedType ? this.getExpectedType() : null)
groupedItems: this.getScriptBlockList(this.getExpectedType ? this.getExpectedType() : null),
});
if (canceled) return;
this.modelValue.type = type;
@ -224,8 +224,8 @@ export default defineComponent({
_getExpectedType(slot: number) {
return this.hpml.getExpectedType(this.modelValue, slot);
}
}
},
},
});
</script>

View file

@ -82,7 +82,7 @@ export default defineComponent({
os.api('hashtags/list', {
sort: '+mentionedLocalUsers',
limit: 8
limit: 8,
}).then(tags => {
this.tags = tags;
});
@ -91,13 +91,13 @@ export default defineComponent({
methods: {
signin() {
os.popup(XSigninDialog, {
autoSet: true
autoSet: true,
}, {}, 'closed');
},
signup() {
os.popup(XSignupDialog, {
autoSet: true
autoSet: true,
}, {}, 'closed');
},
@ -107,24 +107,24 @@ export default defineComponent({
icon: 'ti ti-info-circle',
action: () => {
os.pageWindow('/about');
}
},
}, {
text: this.$ts.aboutMisskey,
icon: 'ti ti-info-circle',
action: () => {
os.pageWindow('/about-misskey');
}
},
}, null, {
text: this.$ts.help,
icon: 'ti ti-question-circle',
action: () => {
window.open(`https://misskey-hub.net/help.md`, '_blank');
}
},
}], ev.currentTarget ?? ev.target);
},
number
}
number,
},
});
</script>

View file

@ -102,7 +102,7 @@ export default defineComponent({
os.api('hashtags/list', {
sort: '+mentionedLocalUsers',
limit: 8
limit: 8,
}).then(tags => {
this.tags = tags;
});
@ -111,13 +111,13 @@ export default defineComponent({
methods: {
signin() {
os.popup(XSigninDialog, {
autoSet: true
autoSet: true,
}, {}, 'closed');
},
signup() {
os.popup(XSignupDialog, {
autoSet: true
autoSet: true,
}, {}, 'closed');
},
@ -127,24 +127,24 @@ export default defineComponent({
icon: 'ti ti-info-circle',
action: () => {
os.pageWindow('/about');
}
},
}, {
text: this.$ts.aboutMisskey,
icon: 'ti ti-info-circle',
action: () => {
os.pageWindow('/about-misskey');
}
},
}, null, {
text: this.$ts.help,
icon: 'ti ti-question-circle',
action: () => {
window.open(`https://misskey-hub.net/help.md`, '_blank');
}
},
}], ev.currentTarget ?? ev.target);
},
number
}
number,
},
});
</script>

View file

@ -32,7 +32,7 @@ export default defineComponent({
components: {
XReactionsViewer,
XMediaList,
XPoll
XPoll,
},
data() {
@ -52,7 +52,7 @@ export default defineComponent({
if (this.$refs.scroll.clientHeight > window.innerHeight) {
this.isScrolling = true;
}
}
},
});
</script>