lint fixes

This commit is contained in:
syuilo 2022-06-23 21:46:15 +09:00
parent 4f4d2b7c53
commit 3e1248ff35

View file

@ -17,30 +17,30 @@ export default defineComponent({
props: { props: {
text: { text: {
type: String, type: String,
required: true required: true,
}, },
plain: { plain: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
nowrap: { nowrap: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
author: { author: {
type: Object, type: Object,
default: null default: null,
}, },
i: { i: {
type: Object, type: Object,
default: null default: null,
}, },
customEmojis: { customEmojis: {
required: false, required: false,
}, },
isNote: { isNote: {
type: Boolean, type: Boolean,
default: true default: true,
}, },
}, },
@ -82,7 +82,7 @@ export default defineComponent({
case 'italic': { case 'italic': {
return h('i', { return h('i', {
style: 'font-style: oblique;' style: 'font-style: oblique;',
}, genEl(token.children)); }, genEl(token.children));
} }
@ -201,13 +201,13 @@ export default defineComponent({
case 'small': { case 'small': {
return [h('small', { return [h('small', {
style: 'opacity: 0.7;' style: 'opacity: 0.7;',
}, genEl(token.children))]; }, genEl(token.children))];
} }
case 'center': { case 'center': {
return [h('div', { return [h('div', {
style: 'text-align:center;' style: 'text-align:center;',
}, genEl(token.children))]; }, genEl(token.children))];
} }
@ -231,7 +231,7 @@ export default defineComponent({
return [h(MkMention, { return [h(MkMention, {
key: Math.random(), key: Math.random(),
host: (token.props.host == null && this.author && this.author.host != null ? this.author.host : token.props.host) || host, host: (token.props.host == null && this.author && this.author.host != null ? this.author.host : token.props.host) || host,
username: token.props.username username: token.props.username,
})]; })];
} }
@ -239,7 +239,7 @@ export default defineComponent({
return [h(MkA, { return [h(MkA, {
key: Math.random(), key: Math.random(),
to: this.isNote ? `/tags/${encodeURIComponent(token.props.hashtag)}` : `/explore/tags/${encodeURIComponent(token.props.hashtag)}`, to: this.isNote ? `/tags/${encodeURIComponent(token.props.hashtag)}` : `/explore/tags/${encodeURIComponent(token.props.hashtag)}`,
style: 'color:var(--hashtag);' style: 'color:var(--hashtag);',
}, `#${token.props.hashtag}`)]; }, `#${token.props.hashtag}`)];
} }
@ -255,18 +255,18 @@ export default defineComponent({
return [h(MkCode, { return [h(MkCode, {
key: Math.random(), key: Math.random(),
code: token.props.code, code: token.props.code,
inline: true inline: true,
})]; })];
} }
case 'quote': { case 'quote': {
if (!this.nowrap) { if (!this.nowrap) {
return [h('div', { return [h('div', {
class: 'quote' class: 'quote',
}, genEl(token.children))]; }, genEl(token.children))];
} else { } else {
return [h('span', { return [h('span', {
class: 'quote' class: 'quote',
}, genEl(token.children))]; }, genEl(token.children))];
} }
} }
@ -276,7 +276,7 @@ export default defineComponent({
key: Math.random(), key: Math.random(),
emoji: `:${token.props.name}:`, emoji: `:${token.props.name}:`,
customEmojis: this.customEmojis, customEmojis: this.customEmojis,
normal: this.plain normal: this.plain,
})]; })];
} }
@ -285,7 +285,7 @@ export default defineComponent({
key: Math.random(), key: Math.random(),
emoji: token.props.emoji, emoji: token.props.emoji,
customEmojis: this.customEmojis, customEmojis: this.customEmojis,
normal: this.plain normal: this.plain,
})]; })];
} }
@ -293,7 +293,7 @@ export default defineComponent({
return [h(MkFormula, { return [h(MkFormula, {
key: Math.random(), key: Math.random(),
formula: token.props.formula, formula: token.props.formula,
block: false block: false,
})]; })];
} }
@ -301,14 +301,14 @@ export default defineComponent({
return [h(MkFormula, { return [h(MkFormula, {
key: Math.random(), key: Math.random(),
formula: token.props.formula, formula: token.props.formula,
block: true block: true,
})]; })];
} }
case 'search': { case 'search': {
return [h(MkGoogle, { return [h(MkGoogle, {
key: Math.random(), key: Math.random(),
q: token.props.query q: token.props.query,
})]; })];
} }
@ -322,5 +322,5 @@ export default defineComponent({
// Parse ast to DOM // Parse ast to DOM
return h('span', genEl(ast)); return h('span', genEl(ast));
} },
}); });