From 69975c2fdd1cfa12d86eb51ce0769f17ffd826a5 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 26 Apr 2020 11:48:09 +0900 Subject: [PATCH] chore: Use kebab-case for file names --- src/mfm/{fromHtml.ts => from-html.ts} | 0 src/mfm/{toHtml.ts => to-html.ts} | 0 src/mfm/{toString.ts => to-string.ts} | 0 src/models/repositories/note.ts | 2 +- src/remote/activitypub/misc/get-note-html.ts | 2 +- src/remote/activitypub/misc/html-to-mfm.ts | 2 +- src/remote/activitypub/models/person.ts | 2 +- src/remote/activitypub/renderer/person.ts | 2 +- 8 files changed, 5 insertions(+), 5 deletions(-) rename src/mfm/{fromHtml.ts => from-html.ts} (100%) rename src/mfm/{toHtml.ts => to-html.ts} (100%) rename src/mfm/{toString.ts => to-string.ts} (100%) diff --git a/src/mfm/fromHtml.ts b/src/mfm/from-html.ts similarity index 100% rename from src/mfm/fromHtml.ts rename to src/mfm/from-html.ts diff --git a/src/mfm/toHtml.ts b/src/mfm/to-html.ts similarity index 100% rename from src/mfm/toHtml.ts rename to src/mfm/to-html.ts diff --git a/src/mfm/toString.ts b/src/mfm/to-string.ts similarity index 100% rename from src/mfm/toString.ts rename to src/mfm/to-string.ts diff --git a/src/models/repositories/note.ts b/src/models/repositories/note.ts index d29a48b7ec..3c5500f493 100644 --- a/src/models/repositories/note.ts +++ b/src/models/repositories/note.ts @@ -6,7 +6,7 @@ import { ensure } from '../../prelude/ensure'; import { SchemaType } from '../../misc/schema'; import { awaitAll } from '../../prelude/await-all'; import { convertLegacyReaction, convertLegacyReactions, decodeReaction } from '../../misc/reaction-lib'; -import { toString } from '../../mfm/toString'; +import { toString } from '../../mfm/to-string'; import { parse } from '../../mfm/parse'; import { Emoji } from '../entities/emoji'; import { concat } from '../../prelude/array'; diff --git a/src/remote/activitypub/misc/get-note-html.ts b/src/remote/activitypub/misc/get-note-html.ts index dba915fee9..6990a4ae5e 100644 --- a/src/remote/activitypub/misc/get-note-html.ts +++ b/src/remote/activitypub/misc/get-note-html.ts @@ -1,5 +1,5 @@ import { Note } from '../../../models/entities/note'; -import { toHtml } from '../../../mfm/toHtml'; +import { toHtml } from '../../../mfm/to-html'; import { parse } from '../../../mfm/parse'; export default function(note: Note) { diff --git a/src/remote/activitypub/misc/html-to-mfm.ts b/src/remote/activitypub/misc/html-to-mfm.ts index 5d3cf0b774..5cca04df21 100644 --- a/src/remote/activitypub/misc/html-to-mfm.ts +++ b/src/remote/activitypub/misc/html-to-mfm.ts @@ -1,6 +1,6 @@ import { IObject } from '../type'; import { extractApHashtagObjects } from '../models/tag'; -import { fromHtml } from '../../../mfm/fromHtml'; +import { fromHtml } from '../../../mfm/from-html'; export function htmlToMfm(html: string, tag?: IObject | IObject[]) { const hashtagNames = extractApHashtagObjects(tag).map(x => x.name).filter((x): x is string => x != null); diff --git a/src/remote/activitypub/models/person.ts b/src/remote/activitypub/models/person.ts index 91b1c5cd60..4b8fa9a551 100644 --- a/src/remote/activitypub/models/person.ts +++ b/src/remote/activitypub/models/person.ts @@ -4,7 +4,7 @@ import config from '../../../config'; import Resolver from '../resolver'; import { resolveImage } from './image'; import { isCollectionOrOrderedCollection, isCollection, IPerson, getApId, getOneApHrefNullable, IObject, isPropertyValue, IApPropertyValue } from '../type'; -import { fromHtml } from '../../../mfm/fromHtml'; +import { fromHtml } from '../../../mfm/from-html'; import { htmlToMfm } from '../misc/html-to-mfm'; import { resolveNote, extractEmojis } from './note'; import { registerOrFetchInstanceDoc } from '../../../services/register-or-fetch-instance-doc'; diff --git a/src/remote/activitypub/renderer/person.ts b/src/remote/activitypub/renderer/person.ts index af0e446ac1..56ff10319a 100644 --- a/src/remote/activitypub/renderer/person.ts +++ b/src/remote/activitypub/renderer/person.ts @@ -2,7 +2,7 @@ import renderImage from './image'; import renderKey from './key'; import config from '../../../config'; import { ILocalUser } from '../../../models/entities/user'; -import { toHtml } from '../../../mfm/toHtml'; +import { toHtml } from '../../../mfm/to-html'; import { parse } from '../../../mfm/parse'; import { getEmojis } from './note'; import renderEmoji from './emoji';