fix(client): fix lint issues in scripts (#8621)

This commit is contained in:
Andreas Nedbal 2022-05-07 07:19:15 +02:00 committed by GitHub
parent ad860905c6
commit a975a0971c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 75 additions and 85 deletions

View file

@ -83,8 +83,8 @@ export function getNoteMenu(props: {
function togglePin(pin: boolean): void {
os.apiWithDialog(pin ? 'i/pin' : 'i/unpin', {
noteId: appearNote.id
}, undefined, null, e => {
if (e.id === '72dab508-c64d-498f-8740-a8eec1ba385a') {
}, undefined, null, res => {
if (res.id === '72dab508-c64d-498f-8740-a8eec1ba385a') {
os.alert({
type: 'error',
text: i18n.ts.pinLimitExceeded
@ -209,7 +209,7 @@ export function getNoteMenu(props: {
text: i18n.ts.clip,
action: () => clip()
},
(appearNote.userId != $i.id) ? statePromise.then(state => state.isWatching ? {
(appearNote.userId !== $i.id) ? statePromise.then(state => state.isWatching ? {
icon: 'fas fa-eye-slash',
text: i18n.ts.unwatch,
action: () => toggleWatch(false)
@ -227,7 +227,7 @@ export function getNoteMenu(props: {
text: i18n.ts.muteThread,
action: () => toggleThreadMute(true)
}),
appearNote.userId == $i.id ? ($i.pinnedNoteIds || []).includes(appearNote.id) ? {
appearNote.userId === $i.id ? ($i.pinnedNoteIds || []).includes(appearNote.id) ? {
icon: 'fas fa-thumbtack',
text: i18n.ts.unpin,
action: () => togglePin(false)
@ -246,7 +246,7 @@ export function getNoteMenu(props: {
}]
: []
),*/
...(appearNote.userId != $i.id ? [
...(appearNote.userId !== $i.id ? [
null,
{
icon: 'fas fa-exclamation-circle',
@ -261,9 +261,9 @@ export function getNoteMenu(props: {
}]
: []
),
...(appearNote.userId == $i.id || $i.isModerator || $i.isAdmin ? [
...(appearNote.userId === $i.id || $i.isModerator || $i.isAdmin ? [
null,
appearNote.userId == $i.id ? {
appearNote.userId === $i.id ? {
icon: 'fas fa-edit',
text: i18n.ts.deleteAndEdit,
action: delEdit