diff options
| author | Johann150 <johann.galle@protonmail.com> | 2022-06-10 07:36:55 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-10 14:36:55 +0900 |
| commit | 5e29528ad4d75174b4a8ebd462f0ff830c5b1c43 (patch) | |
| tree | 72a1d0a6532bf5b0c74f289f2dc772b0f8090cfa /packages/client/src/scripts | |
| parent | enhance(federation): use ActivityPub defined property in favour of proprietar... (diff) | |
| download | sharkey-5e29528ad4d75174b4a8ebd462f0ff830c5b1c43.tar.gz sharkey-5e29528ad4d75174b4a8ebd462f0ff830c5b1c43.tar.bz2 sharkey-5e29528ad4d75174b4a8ebd462f0ff830c5b1c43.zip | |
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
Diffstat (limited to 'packages/client/src/scripts')
| -rw-r--r-- | packages/client/src/scripts/format-time-string.ts | 6 | ||||
| -rw-r--r-- | packages/client/src/scripts/get-note-menu.ts | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/get-user-menu.ts | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/hpml/evaluator.ts | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/physics.ts | 6 | ||||
| -rw-r--r-- | packages/client/src/scripts/theme-editor.ts | 2 | ||||
| -rw-r--r-- | packages/client/src/scripts/theme.ts | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/packages/client/src/scripts/format-time-string.ts b/packages/client/src/scripts/format-time-string.ts index bfb2c397ae..fb4718c007 100644 --- a/packages/client/src/scripts/format-time-string.ts +++ b/packages/client/src/scripts/format-time-string.ts @@ -13,7 +13,7 @@ const defaultLocaleStringFormats: {[index: string]: string} = { function formatLocaleString(date: Date, format: string): string { return format.replace(/\{\{(\w+)(:(\w+))?\}\}/g, (match: string, kind: string, unused?, option?: string) => { if (['weekday', 'era', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeZoneName'].includes(kind)) { - return date.toLocaleString(window.navigator.language, {[kind]: option ? option : defaultLocaleStringFormats[kind]}); + return date.toLocaleString(window.navigator.language, { [kind]: option ? option : defaultLocaleStringFormats[kind] }); } else { return match; } @@ -24,8 +24,8 @@ export function formatDateTimeString(date: Date, format: string): string { return format .replace(/yyyy/g, date.getFullYear().toString()) .replace(/yy/g, date.getFullYear().toString().slice(-2)) - .replace(/MMMM/g, date.toLocaleString(window.navigator.language, { month: 'long'})) - .replace(/MMM/g, date.toLocaleString(window.navigator.language, { month: 'short'})) + .replace(/MMMM/g, date.toLocaleString(window.navigator.language, { month: 'long' })) + .replace(/MMM/g, date.toLocaleString(window.navigator.language, { month: 'short' })) .replace(/MM/g, (`0${date.getMonth() + 1}`).slice(-2)) .replace(/M/g, (date.getMonth() + 1).toString()) .replace(/dd/g, (`0${date.getDate()}`).slice(-2)) diff --git a/packages/client/src/scripts/get-note-menu.ts b/packages/client/src/scripts/get-note-menu.ts index aeb09ef97a..78749ad6bb 100644 --- a/packages/client/src/scripts/get-note-menu.ts +++ b/packages/client/src/scripts/get-note-menu.ts @@ -22,7 +22,7 @@ export function getNoteMenu(props: { props.note.poll == null ); - let appearNote = isRenote ? props.note.renote as misskey.entities.Note : props.note; + const appearNote = isRenote ? props.note.renote as misskey.entities.Note : props.note; function del(): void { os.confirm({ diff --git a/packages/client/src/scripts/get-user-menu.ts b/packages/client/src/scripts/get-user-menu.ts index 1d2b761117..091338efd6 100644 --- a/packages/client/src/scripts/get-user-menu.ts +++ b/packages/client/src/scripts/get-user-menu.ts @@ -148,7 +148,7 @@ export function getUserMenu(user) { userId: user.id }).then(() => { user.isFollowed = !user.isFollowed; - }) + }); } let menu = [{ diff --git a/packages/client/src/scripts/hpml/evaluator.ts b/packages/client/src/scripts/hpml/evaluator.ts index 0469a31cbb..8106687b61 100644 --- a/packages/client/src/scripts/hpml/evaluator.ts +++ b/packages/client/src/scripts/hpml/evaluator.ts @@ -36,7 +36,7 @@ export class Hpml { if (this.opts.enableAiScript) { this.aiscript = markRaw(new AiScript({ ...createAiScriptEnv({ storageKey: 'pages:' + this.page.id - }), ...initAiLib(this)}, { + }), ...initAiLib(this) }, { in: (q) => { return new Promise(ok => { os.inputText({ diff --git a/packages/client/src/scripts/physics.ts b/packages/client/src/scripts/physics.ts index 36e476b6f9..9e657906c2 100644 --- a/packages/client/src/scripts/physics.ts +++ b/packages/client/src/scripts/physics.ts @@ -41,9 +41,9 @@ export function physics(container: HTMLElement) { const groundThickness = 1024; const ground = Matter.Bodies.rectangle(containerCenterX, containerHeight + (groundThickness / 2), containerWidth, groundThickness, { - isStatic: true, - restitution: 0.1, - friction: 2 + isStatic: true, + restitution: 0.1, + friction: 2 }); //const wallRight = Matter.Bodies.rectangle(window.innerWidth+50, window.innerHeight/2, 100, window.innerHeight, wallopts); diff --git a/packages/client/src/scripts/theme-editor.ts b/packages/client/src/scripts/theme-editor.ts index 3d69d2836a..2c917e280d 100644 --- a/packages/client/src/scripts/theme-editor.ts +++ b/packages/client/src/scripts/theme-editor.ts @@ -1,4 +1,4 @@ -import { v4 as uuid} from 'uuid'; +import { v4 as uuid } from 'uuid'; import { themeProps, Theme } from './theme'; diff --git a/packages/client/src/scripts/theme.ts b/packages/client/src/scripts/theme.ts index e2b272405a..dec9fb355c 100644 --- a/packages/client/src/scripts/theme.ts +++ b/packages/client/src/scripts/theme.ts @@ -42,7 +42,7 @@ export const getBuiltinThemesRef = () => { const builtinThemes = ref<Theme[]>([]); getBuiltinThemes().then(themes => builtinThemes.value = themes); return builtinThemes; -} +}; let timeout = null; |