mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
linting
This commit is contained in:
@ -148,18 +148,18 @@
|
||||
this.loading = true
|
||||
this.$http
|
||||
.get<string>('https://raw.githubusercontent.com/nurdism/neko/master/docs/README.md')
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
return this.$http.post('https://api.github.com/markdown', {
|
||||
text: res.data,
|
||||
mode: 'gfm',
|
||||
context: 'github/gollum',
|
||||
})
|
||||
})
|
||||
.then(res => {
|
||||
.then((res) => {
|
||||
this.$accessor.client.setAbout(res.data)
|
||||
this.loading = false
|
||||
})
|
||||
.catch(err => console.error(err))
|
||||
.catch((err) => console.error(err))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -39,10 +39,10 @@
|
||||
<template v-if="admin">
|
||||
<li class="seperator" />
|
||||
<li>
|
||||
<span @click="kick(child.data.member)" style="color: #f04747">{{ $t('context.kick') }}</span>
|
||||
<span @click="kick(child.data.member)" style="color: #f04747;">{{ $t('context.kick') }}</span>
|
||||
</li>
|
||||
<li>
|
||||
<span @click="ban(child.data.member)" style="color: #f04747">{{ $t('context.ban') }}</span>
|
||||
<span @click="ban(child.data.member)" style="color: #f04747;">{{ $t('context.ban') }}</span>
|
||||
</li>
|
||||
</template>
|
||||
</template>
|
||||
|
@ -329,7 +329,7 @@
|
||||
for (const emoji of this.list) {
|
||||
if (
|
||||
emoji.includes(this.search) || typeof this.keywords[emoji] !== 'undefined'
|
||||
? this.keywords[emoji].some(keyword => keyword.includes(this.search))
|
||||
? this.keywords[emoji].some((keyword) => keyword.includes(this.search))
|
||||
: false
|
||||
) {
|
||||
filtered.push(emoji)
|
||||
|
@ -150,7 +150,7 @@
|
||||
'cold',
|
||||
'blush',
|
||||
'sad',
|
||||
].filter(v => !this.recent.includes(v))
|
||||
].filter((v) => !this.recent.includes(v))
|
||||
}
|
||||
|
||||
get muted() {
|
||||
|
@ -64,7 +64,7 @@ function htmlTag(
|
||||
if (attributes.class && state.cssModuleNames) {
|
||||
attributes.class = attributes.class
|
||||
.split(' ')
|
||||
.map(cl => state.cssModuleNames[cl] || cl)
|
||||
.map((cl) => state.cssModuleNames[cl] || cl)
|
||||
.join(' ')
|
||||
}
|
||||
|
||||
@ -199,7 +199,7 @@ const rules: MarkdownRules = {
|
||||
},
|
||||
text: {
|
||||
...text,
|
||||
match: source => /^[\s\S]+?(?=[^0-9A-Za-z\s\u00c0-\uffff-]|\n\n|\n|\w+:\S|$)/.exec(source),
|
||||
match: (source) => /^[\s\S]+?(?=[^0-9A-Za-z\s\u00c0-\uffff-]|\n\n|\n|\w+:\S|$)/.exec(source),
|
||||
html(node, output, state) {
|
||||
if (state.escapeHTML) {
|
||||
return md.sanitizeText(node.content)
|
||||
@ -214,7 +214,7 @@ const rules: MarkdownRules = {
|
||||
},
|
||||
emoji: {
|
||||
order: md.defaultRules.strong.order,
|
||||
match: source => /^:([a-zA-z_-]*):/.exec(source),
|
||||
match: (source) => /^:([a-zA-z_-]*):/.exec(source),
|
||||
parse(capture) {
|
||||
return {
|
||||
id: capture[1],
|
||||
@ -235,7 +235,7 @@ const rules: MarkdownRules = {
|
||||
},
|
||||
emoticon: {
|
||||
order: md.defaultRules.text.order,
|
||||
match: source => /^(¯\\_\(ツ\)_\/¯)/.exec(source),
|
||||
match: (source) => /^(¯\\_\(ツ\)_\/¯)/.exec(source),
|
||||
parse(capture) {
|
||||
return {
|
||||
type: 'text',
|
||||
@ -248,7 +248,7 @@ const rules: MarkdownRules = {
|
||||
},
|
||||
spoiler: {
|
||||
order: 0,
|
||||
match: source => /^\|\|([\s\S]+?)\|\|/.exec(source),
|
||||
match: (source) => /^\|\|([\s\S]+?)\|\|/.exec(source),
|
||||
parse(capture, parse, state) {
|
||||
return {
|
||||
content: parse(capture[1], state),
|
||||
|
@ -327,7 +327,7 @@
|
||||
this.$accessor.video.setPlayable(false)
|
||||
})
|
||||
|
||||
this._video.addEventListener('error', event => {
|
||||
this._video.addEventListener('error', (event) => {
|
||||
this.$log.error(event.error)
|
||||
this.$accessor.video.setPlayable(false)
|
||||
})
|
||||
@ -352,7 +352,7 @@
|
||||
.then(() => {
|
||||
this.onResise()
|
||||
})
|
||||
.catch(err => this.$log.error)
|
||||
.catch((err) => this.$log.error)
|
||||
} catch (err) {
|
||||
this.$log.error(err)
|
||||
}
|
||||
@ -391,7 +391,7 @@
|
||||
if (this.hosting && navigator.clipboard && typeof navigator.clipboard.readText === 'function') {
|
||||
navigator.clipboard
|
||||
.readText()
|
||||
.then(text => {
|
||||
.then((text) => {
|
||||
if (this.clipboard !== text) {
|
||||
this.$accessor.remote.setClipboard(text)
|
||||
this.$accessor.remote.sendClipboard(text)
|
||||
|
Reference in New Issue
Block a user