diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 6aac41c7d8a4511889c78e4bff64b110e7007717..60378df1b2edad4aa7935dc7a01477caea7f4018 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1865,8 +1865,8 @@ pages: font: "フォント" fontSerif: "セリフ" fontSansSerif: "サンセリフ" - set-eye-catchig-image: "アイã‚ャッãƒç”»åƒã‚’è¨å®š" - remove-eye-catchig-image: "アイã‚ャッãƒç”»åƒã‚’削除" + set-eye-catching-image: "アイã‚ャッãƒç”»åƒã‚’è¨å®š" + remove-eye-catching-image: "アイã‚ャッãƒç”»åƒã‚’削除" choose-block: "ブãƒãƒƒã‚¯ã‚’è¿½åŠ " select-type: "種類をé¸æŠž" enter-variable-name: "変数åを決ã‚ã¦ãã ã•ã„" diff --git a/src/client/app/app.styl b/src/client/app/app.styl index a98ece7a51d1bb807cf8d6ea7588ce49d71533fd..6389aa0a875f6c8158cb0191fef555ca6ff22b5f 100644 --- a/src/client/app/app.styl +++ b/src/client/app/app.styl @@ -34,7 +34,7 @@ body .peg display block position absolute - right 0px + right 0 width 100px height 100% box-shadow 0 0 10px var(--primary), 0 0 5px var(--primary) diff --git a/src/client/app/auth/views/index.vue b/src/client/app/auth/views/index.vue index 9bf2acba72a259310eb8d0cdeb56e5f8dc7fc785..ad9b1e4e35b1da9154f9aaebc65e50945e4c0961 100644 --- a/src/client/app/auth/views/index.vue +++ b/src/client/app/auth/views/index.vue @@ -98,7 +98,7 @@ export default Vue.extend({ margin 0 auto text-align center background #fff - box-shadow 0px 4px 16px rgba(#000, 0.2) + box-shadow 0 4px 16px rgba(#000, 0.2) > .fetching margin 0 diff --git a/src/client/app/common/hotkey.ts b/src/client/app/common/hotkey.ts index b2afd57ae36f33e6a67b5de0ff09d97ed942d25e..a53d3f479e32ff0ae63e125279fd47bd5a175517 100644 --- a/src/client/app/common/hotkey.ts +++ b/src/client/app/common/hotkey.ts @@ -52,7 +52,7 @@ function match(e: KeyboardEvent, patterns: action['patterns']): boolean { pattern.ctrl == e.ctrlKey && pattern.shift == e.shiftKey && pattern.alt == e.altKey && - e.metaKey == false + !e.metaKey ); } diff --git a/src/client/app/common/scripts/should-mute-note.ts b/src/client/app/common/scripts/should-mute-note.ts index c5f1898942f0b99460e57a1bca04641e9f1fb9a4..8fd78886287d9fe3f7b94c17872ce310f0273494 100644 --- a/src/client/app/common/scripts/should-mute-note.ts +++ b/src/client/app/common/scripts/should-mute-note.ts @@ -11,9 +11,9 @@ export default function(me, settings, note) { return ( (!isMyNote && note.reply && includesMutedWords(note.reply.text)) || (!isMyNote && note.renote && includesMutedWords(note.renote.text)) || - (settings.showMyRenotes === false && isMyNote && isPureRenote) || - (settings.showRenotedMyNotes === false && isPureRenote && note.renote.userId == me.id) || - (settings.showLocalRenotes === false && isPureRenote && note.renote.user.host == null) || + (!settings.showMyRenotes && isMyNote && isPureRenote) || + (!settings.showRenotedMyNotes && isPureRenote && note.renote.userId == me.id) || + (!settings.showLocalRenotes && isPureRenote && note.renote.user.host == null) || (!isMyNote && includesMutedWords(note.text)) ); } diff --git a/src/client/app/common/views/components/analog-clock.vue b/src/client/app/common/views/components/analog-clock.vue index 4ba578a1a4858c942548fc898d1f6ffe17e5e978..5eb7ffd153c4f0fbe20b6123e7601e87a3ae7f89 100644 --- a/src/client/app/common/views/components/analog-clock.vue +++ b/src/client/app/common/views/components/analog-clock.vue @@ -80,7 +80,7 @@ export default Vue.extend({ ms(): number { return this.now.getMilliseconds() * this.smooth; - } + }, s(): number { return this.now.getSeconds(); }, diff --git a/src/client/app/common/views/components/messaging.vue b/src/client/app/common/views/components/messaging.vue index 957fd389d9a2a2c90d9d75005827fbb7fc649848..f884a599d73aafd0071021a5c47494e27b097401 100644 --- a/src/client/app/common/views/components/messaging.vue +++ b/src/client/app/common/views/components/messaging.vue @@ -202,7 +202,7 @@ export default Vue.extend({ left 0 z-index 1 width 100% - box-shadow 0 0px 2px rgba(#000, 0.2) + box-shadow 0 0 2px rgba(#000, 0.2) > .form background rgba(0, 0, 0, 0.02) diff --git a/src/client/app/common/views/components/page-editor/page-editor.vue b/src/client/app/common/views/components/page-editor/page-editor.vue index d70049121de95efb67a8f497f1f8f0590ef4efe5..baccda8a438ef5b84c664f16fde66965b23ad802 100644 --- a/src/client/app/common/views/components/page-editor/page-editor.vue +++ b/src/client/app/common/views/components/page-editor/page-editor.vue @@ -36,10 +36,10 @@ </ui-select> <div class="eyeCatch"> - <ui-button v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage()"><fa :icon="faPlus"/> {{ $t('set-eye-catchig-image') }}</ui-button> + <ui-button v-if="eyeCatchingImageId == null && !readonly" @click="setEyeCatchingImage()"><fa :icon="faPlus"/> {{ $t('set-eye-catching-image') }}</ui-button> <div v-else-if="eyeCatchingImage"> <img :src="eyeCatchingImage.url" :alt="eyeCatchingImage.name"/> - <ui-button @click="removeEyeCatchingImage()" v-if="!readonly"><fa :icon="faTrashAlt"/> {{ $t('remove-eye-catchig-image') }}</ui-button> + <ui-button @click="removeEyeCatchingImage()" v-if="!readonly"><fa :icon="faTrashAlt"/> {{ $t('remove-eye-catching-image') }}</ui-button> </div> </div> </template> diff --git a/src/client/app/common/views/components/settings/theme.vue b/src/client/app/common/views/components/settings/theme.vue index 3440aacb28cc650bfec9fcb112013e242060c3ba..b1f7b2bc497e07bad3b3953b0842290e872ff3a1 100644 --- a/src/client/app/common/views/components/settings/theme.vue +++ b/src/client/app/common/views/components/settings/theme.vue @@ -273,7 +273,7 @@ export default Vue.extend({ import_() { (this.$refs.file as any).click(); - } + }, export_() { const blob = new Blob([this.selectedThemeCode], { diff --git a/src/client/app/common/views/components/ui/input.vue b/src/client/app/common/views/components/ui/input.vue index a841ecca11954b13537699401afc602c27eb136e..dd0912f8330cf2323d3af3ab583e8450b11230cd 100644 --- a/src/client/app/common/views/components/ui/input.vue +++ b/src/client/app/common/views/components/ui/input.vue @@ -322,7 +322,7 @@ root(fill) > .value display block - width 0% + width 0 height 100% background transparent border-radius 6px diff --git a/src/client/app/common/views/components/user-list.vue b/src/client/app/common/views/components/user-list.vue index 53577bad00a1038789eacb7be72df139bd0589f1..6761886b0997ffbd26d72b93446de5963a78a1ea 100644 --- a/src/client/app/common/views/components/user-list.vue +++ b/src/client/app/common/views/components/user-list.vue @@ -166,7 +166,7 @@ export default Vue.extend({ > .follow-button position absolute top 8px - right 0px + right 0 > .more display block diff --git a/src/client/app/common/views/deck/deck.column.vue b/src/client/app/common/views/deck/deck.column.vue index fcf9c506bbcf46684e523943b01d44735ec7b324..eaa344d36f5ec8e0079e25a812234afb7cb53c3a 100644 --- a/src/client/app/common/views/deck/deck.column.vue +++ b/src/client/app/common/views/deck/deck.column.vue @@ -160,7 +160,7 @@ export default Vue.extend({ this.$emit('top'); } - if (this.$store.state.settings.fetchOnScroll !== false) { + if (this.$store.state.settings.fetchOnScroll) { const current = this.$refs.body.scrollTop + this.$refs.body.clientHeight; if (current > this.$refs.body.scrollHeight - 1) this.$emit('bottom'); } diff --git a/src/client/app/common/views/deck/deck.user-column.vue b/src/client/app/common/views/deck/deck.user-column.vue index fb50d880eba3b1f792427fe8938f9014b55a11e1..8d1b458a842865a0f4ee4414e630d459232a07ce 100644 --- a/src/client/app/common/views/deck/deck.user-column.vue +++ b/src/client/app/common/views/deck/deck.user-column.vue @@ -205,7 +205,7 @@ export default Vue.extend({ top -32px left 0 right 0 - width 0px + width 0 margin 0 auto border-top solid 16px transparent border-left solid 16px transparent diff --git a/src/client/app/common/views/directives/autocomplete.ts b/src/client/app/common/views/directives/autocomplete.ts index 7f8e409a7c734b6a2ce40afc13b888e850531506..40fe06c19a714900dbd0bfb40cc9460a89313f04 100644 --- a/src/client/app/common/views/directives/autocomplete.ts +++ b/src/client/app/common/views/directives/autocomplete.ts @@ -102,7 +102,7 @@ class Autocomplete { } } - if (isHashtag && opened == false) { + if (isHashtag && !opened) { const hashtag = text.substr(hashtagIndex + 1); if (!hashtag.includes(' ')) { this.open('hashtag', hashtag); @@ -110,7 +110,7 @@ class Autocomplete { } } - if (isEmoji && opened == false) { + if (isEmoji && !opened) { const emoji = text.substr(emojiIndex + 1); if (!emoji.includes(' ')) { this.open('emoji', emoji); diff --git a/src/client/app/common/views/pages/page/page.vue b/src/client/app/common/views/pages/page/page.vue index 29853f95b886b40b8e0fbb568d50117432763a41..29580fab64f4ceba7d0ec1bebfbe456f1cd62757 100644 --- a/src/client/app/common/views/pages/page/page.vue +++ b/src/client/app/common/views/pages/page/page.vue @@ -47,7 +47,7 @@ class Script { public interpolate(str: string) { if (str == null) return null; - return str.replace(/\{(.+?)\}/g, match => { + return str.replace(/{(.+?)}/g, match => { const v = this.vars[match.slice(1, -1).trim()]; return v == null ? 'NULL' : v.toString(); }); diff --git a/src/client/app/desktop/views/components/drive.vue b/src/client/app/desktop/views/components/drive.vue index 48443669ac28e70ba9784f5a33dd27e8ca61ae64..4b64d4f22a08d97dca738536ab038793adbf419a 100644 --- a/src/client/app/desktop/views/components/drive.vue +++ b/src/client/app/desktop/views/components/drive.vue @@ -750,12 +750,17 @@ export default Vue.extend({ bottom 0 animation-delay -1.0s - @keyframes sk-rotate { 100% { transform: rotate(360deg); }} + @keyframes sk-rotate { + 100% { + transform: rotate(360deg); + } + } @keyframes sk-bounce { 0%, 100% { transform: scale(0.0); - } 50% { + } + 50% { transform: scale(1.0); } } diff --git a/src/client/app/desktop/views/components/notes.vue b/src/client/app/desktop/views/components/notes.vue index 87fdc749de832b8bc0850a2976ebd0fc882204d0..b051ff51cfe329af567b59cde8d26acd73af31ad 100644 --- a/src/client/app/desktop/views/components/notes.vue +++ b/src/client/app/desktop/views/components/notes.vue @@ -180,7 +180,7 @@ export default Vue.extend({ this.releaseQueue(); } - if (this.$store.state.settings.fetchOnScroll !== false) { + if (this.$store.state.settings.fetchOnScroll) { const current = window.scrollY + window.innerHeight; if (current > document.body.offsetHeight - 8) this.fetchMore(); } diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue index 1f33ea01fea4e46bdd1844dbfbac2ff24d5259f6..0307ff305ee6c3db6f80abe1a9e4a8ac8f408ad9 100644 --- a/src/client/app/desktop/views/components/post-form.vue +++ b/src/client/app/desktop/views/components/post-form.vue @@ -377,7 +377,7 @@ export default Vue.extend({ }, err => { this.$root.dialog({ type: 'error', - title: this.$t('error') + title: this.$t('error'), text: err.message }); }, { diff --git a/src/client/app/desktop/views/components/window.vue b/src/client/app/desktop/views/components/window.vue index 23ccf2886221b6d461187749e6b365c77bac94dd..95d9e2feff845c12d46fba61c1607ebf35ddbb1a 100644 --- a/src/client/app/desktop/views/components/window.vue +++ b/src/client/app/desktop/views/components/window.vue @@ -480,7 +480,7 @@ export default Vue.extend({ &:focus &:not([data-is-modal]) > .body - box-shadow 0 0 0px 1px var(--primaryAlpha05), 0 2px 12px 0 var(--desktopWindowShadow) + box-shadow 0 0 0 1px var(--primaryAlpha05), 0 2px 12px 0 var(--desktopWindowShadow) > .handle $size = 8px diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue index d7af82cd8d7952088582a3cc9c35d895f18b9078..091377181b782b343b44532ce87348bf0dfb1ae3 100644 --- a/src/client/app/desktop/views/pages/welcome.vue +++ b/src/client/app/desktop/views/pages/welcome.vue @@ -352,7 +352,7 @@ export default Vue.extend({ padding 0 16px line-height 48px background var(--faceHeader) - box-shadow 0 1px 0px rgba(0, 0, 0, 0.1) + box-shadow 0 1px 0 rgba(0, 0, 0, 0.1) & + div max-height calc(100% - 48px) diff --git a/src/client/app/mios.ts b/src/client/app/mios.ts index 3ebee35804457ff360e3e4f6a7bfc4e006c24780..fb1e7e13eca3484c6476bfbb151ec6d8429cb250 100644 --- a/src/client/app/mios.ts +++ b/src/client/app/mios.ts @@ -505,7 +505,7 @@ class WindowSystem extends EventEmitter { function urlBase64ToUint8Array(base64String: string): Uint8Array { const padding = '='.repeat((4 - base64String.length % 4) % 4); const base64 = (base64String + padding) - .replace(/\-/g, '+') + .replace(/-/g, '+') .replace(/_/g, '/'); const rawData = window.atob(base64); diff --git a/src/client/app/mobile/views/components/drive.vue b/src/client/app/mobile/views/components/drive.vue index b79c0b38066dc9b5959701119ed6cf9091cbe4bb..2613cfff9903c93bf2674aff5477efa3cfa9bd07 100644 --- a/src/client/app/mobile/views/components/drive.vue +++ b/src/client/app/mobile/views/components/drive.vue @@ -83,7 +83,7 @@ export default Vue.extend({ hierarchyFolders: [], selectedFiles: [], info: null, - connection: null + connection: null, fetching: true, fetchingMoreFiles: false, @@ -385,7 +385,7 @@ export default Vue.extend({ createFolder() { this.$root.dialog({ - title: this.$t('folder-name') + title: this.$t('folder-name'), input: { default: this.folder.name } @@ -415,7 +415,7 @@ export default Vue.extend({ return; } this.$root.dialog({ - title: this.$t('folder-name') + title: this.$t('folder-name'), input: { default: this.folder.name } @@ -597,12 +597,17 @@ export default Vue.extend({ bottom 0 animation-delay -1.0s - @keyframes sk-rotate { 100% { transform: rotate(360deg); }} + @keyframes sk-rotate { + 100% { + transform: rotate(360deg); + } + } @keyframes sk-bounce { 0%, 100% { transform: scale(0.0); - } 50% { + } + 50% { transform: scale(1.0); } } diff --git a/src/client/app/mobile/views/components/notes.vue b/src/client/app/mobile/views/components/notes.vue index 5ad80c286d9cafc41e8a1121205b131148d86229..047c4c2714c81877249eb42bf75e471786c040d7 100644 --- a/src/client/app/mobile/views/components/notes.vue +++ b/src/client/app/mobile/views/components/notes.vue @@ -174,7 +174,7 @@ export default Vue.extend({ this.releaseQueue(); } - if (this.$store.state.settings.fetchOnScroll !== false) { + if (this.$store.state.settings.fetchOnScroll) { // 親è¦ç´ ㌠display none ã ã£ãŸã‚‰å¼¾ã // https://github.com/syuilo/misskey/issues/1569 // http://d.hatena.ne.jp/favril/20091105/1257403319 diff --git a/src/client/app/mobile/views/components/notifications.vue b/src/client/app/mobile/views/components/notifications.vue index b129ad54aa84f9245d1da64e8b93dc21b4f79dd4..a0edab65ec84dbdaeb35c83c6222812e230cb072 100644 --- a/src/client/app/mobile/views/components/notifications.vue +++ b/src/client/app/mobile/views/components/notifications.vue @@ -115,7 +115,7 @@ export default Vue.extend({ }, onScroll() { - if (this.$store.state.settings.fetchOnScroll !== false) { + if (this.$store.state.settings.fetchOnScroll) { // 親è¦ç´ ㌠display none ã ã£ãŸã‚‰å¼¾ã // https://github.com/syuilo/misskey/issues/1569 // http://d.hatena.ne.jp/favril/20091105/1257403319 diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index 82cbdcc5475fdb28618381f44824255f9b407baf..326ff57c1f8bae886fcd10f055703f1bfaa67004 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -295,7 +295,7 @@ export default Vue.extend({ }, err => { this.$root.dialog({ type: 'error', - title: this.$t('error') + title: this.$t('error'), text: err.message }); }, { @@ -341,7 +341,7 @@ export default Vue.extend({ post() { this.posting = true; - const viaMobile = this.$store.state.settings.disableViaMobile !== true; + const viaMobile = !this.$store.state.settings.disableViaMobile; this.$root.api('notes/create', { text: this.text == '' ? undefined : this.text, fileIds: this.files.length > 0 ? this.files.map(f => f.id) : undefined, diff --git a/src/client/app/mobile/views/components/ui.header.vue b/src/client/app/mobile/views/components/ui.header.vue index 068679567da306af0b7a6df6b9da170b9a9bcea8..b636041d6301f09180cdc05c573b772f25c4a3f8 100644 --- a/src/client/app/mobile/views/components/ui.header.vue +++ b/src/client/app/mobile/views/components/ui.header.vue @@ -49,7 +49,7 @@ export default Vue.extend({ padding 0 8px &.shadow - box-shadow 0 0px 8px rgba(0, 0, 0, 0.25) + box-shadow 0 0 8px rgba(0, 0, 0, 0.25) &, * user-select none diff --git a/src/client/app/reset.styl b/src/client/app/reset.styl index 13a4eaf8d26dc300cadb6e4750d3b3946d7994cc..8128f1ed237c5a0e36c338c018e2f5fba07ba5c7 100644 --- a/src/client/app/reset.styl +++ b/src/client/app/reset.styl @@ -1,5 +1,5 @@ input - min-width 0px + min-width 0 input:not([type]) input[type='text'] diff --git a/src/mfm/language.ts b/src/mfm/language.ts index 207400d6d653d4cbda781cb895a5a6e092aec9ce..003ae348a497ebbdf4b478edbafda98fd5a13258 100644 --- a/src/mfm/language.ts +++ b/src/mfm/language.ts @@ -129,7 +129,7 @@ export const mfmLanguage = P.createLanguage({ mention: () => { return P((input, i) => { const text = input.substr(i); - const match = text.match(/^@\w([\w-]*\w)?(?:@[\w\.\-]+\w)?/); + const match = text.match(/^@\w([\w-]*\w)?(?:@[\w.\-]+\w)?/); if (!match) return P.makeFailure(i, 'not a mention'); if (input[i - 1] != null && input[i - 1].match(/[a-z0-9]/i)) return P.makeFailure(i, 'not a mention'); return P.makeSuccess(i + match[0].length, match[0]); @@ -141,7 +141,7 @@ export const mfmLanguage = P.createLanguage({ }, hashtag: () => P((input, i) => { const text = input.substr(i); - const match = text.match(/^#([^\s\.,!\?'"#:\/\[\]ã€ã€‘]+)/i); + const match = text.match(/^#([^\s.,!?'"#:\/\[\]ã€ã€‘]+)/i); if (!match) return P.makeFailure(i, 'not a hashtag'); let hashtag = match[1]; hashtag = removeOrphanedBrackets(hashtag); diff --git a/src/mfm/prelude.ts b/src/mfm/prelude.ts index 7584389184a6891c35a7419bce4ab76365d58406..e18625bc7d4ab9f38bfe793be2e6d9bc7aaa505e 100644 --- a/src/mfm/prelude.ts +++ b/src/mfm/prelude.ts @@ -36,4 +36,4 @@ export function createTree(type: string, children: MfmForest, props: any): MfmTr return T.createTree({ type, props }, children); } -export const urlRegex = /^https?:\/\/[\w\/:%#@\$&\?!\(\)\[\]~\.,=\+\-]+/; +export const urlRegex = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+/; diff --git a/src/misc/aiscript/evaluator.ts b/src/misc/aiscript/evaluator.ts index 6beb320442c8254561afbe14e7c8b167675623f4..78b6acf35c8292feaaede5cb3a0c47241b568558 100644 --- a/src/misc/aiscript/evaluator.ts +++ b/src/misc/aiscript/evaluator.ts @@ -64,7 +64,7 @@ export class ASEvaluator { @autobind private interpolate(str: string, scope: Scope) { - return str.replace(/\{(.+?)\}/g, match => { + return str.replace(/{(.+?)}/g, match => { const v = scope.getState(match.slice(1, -1).trim()); return v == null ? 'NULL' : v.toString(); }); diff --git a/src/models/repositories/user.ts b/src/models/repositories/user.ts index 68a742d35fa78e881aa914f94062629c8fc8bd11..74f2995c5f03b670a3c5225395a5c6fe144e217e 100644 --- a/src/models/repositories/user.ts +++ b/src/models/repositories/user.ts @@ -217,7 +217,7 @@ export class UserRepository extends Repository<User> { } public isValidBirthday(birthday: string): boolean { - return typeof birthday == 'string' && /^([0-9]{4})\-([0-9]{2})-([0-9]{2})$/.test(birthday); + return typeof birthday == 'string' && /^([0-9]{4})-([0-9]{2})-([0-9]{2})$/.test(birthday); } //#endregion } diff --git a/src/server/api/endpoints/drive/files.ts b/src/server/api/endpoints/drive/files.ts index 493e14464caf1f8dac358fae46d8980803cd2105..d10c2a3ef46ce8a2642df52a53ff40aae21b6fe5 100644 --- a/src/server/api/endpoints/drive/files.ts +++ b/src/server/api/endpoints/drive/files.ts @@ -37,7 +37,7 @@ export const meta = { }, type: { - validator: $.optional.str.match(/^[a-zA-Z\/\-\*]+$/) + validator: $.optional.str.match(/^[a-zA-Z\/\-*]+$/) } }, diff --git a/src/server/api/endpoints/drive/stream.ts b/src/server/api/endpoints/drive/stream.ts index db17979a4ba5400819684322d1434eda1ec33fc6..f75c4273c344cba6825016c89379278b129bd232 100644 --- a/src/server/api/endpoints/drive/stream.ts +++ b/src/server/api/endpoints/drive/stream.ts @@ -27,7 +27,7 @@ export const meta = { }, type: { - validator: $.optional.str.match(/^[a-zA-Z\/\-\*]+$/) + validator: $.optional.str.match(/^[a-zA-Z\/\-*]+$/) } }, diff --git a/src/server/api/index.ts b/src/server/api/index.ts index 8c2b97775fce84d4b34884f8fd789d51ec0efac3..49500b2b4a32e0a312bacfbfac9567f4dd698559 100644 --- a/src/server/api/index.ts +++ b/src/server/api/index.ts @@ -52,7 +52,7 @@ for (const endpoint of endpoints) { } else { if (endpoint.name.includes('-')) { // 後方互æ›æ€§ã®ãŸã‚ - router.post(`/${endpoint.name.replace(/\-/g, '_')}`, handler.bind(null, endpoint)); + router.post(`/${endpoint.name.replace(/-/g, '_')}`, handler.bind(null, endpoint)); } router.post(`/${endpoint.name}`, handler.bind(null, endpoint)); } diff --git a/src/server/api/openapi/schemas.ts b/src/server/api/openapi/schemas.ts index 229d10af2ab7a7868980e666ff8599c38b891044..628bba511ffc1c6a71ce29097573e080ecba5892 100644 --- a/src/server/api/openapi/schemas.ts +++ b/src/server/api/openapi/schemas.ts @@ -18,7 +18,7 @@ export function convertSchemaToOpenApiSchema(schema: Schema) { const res: any = schema; if (schema.type === 'object' && schema.properties) { - res.required = Object.entries(schema.properties).filter(([k, v]) => v.optional !== true).map(([k]) => k); + res.required = Object.entries(schema.properties).filter(([k, v]) => !v.optional).map(([k]) => k); for (const k of Object.keys(schema.properties)) { res.properties[k] = convertSchemaToOpenApiSchema(schema.properties[k]); diff --git a/tslint.json b/tslint.json index 9715b09e8a65729838c222848e70cc70b20d2ef8..733c291f3cf11a9fa6d23e34f725d5c233566295 100644 --- a/tslint.json +++ b/tslint.json @@ -34,7 +34,7 @@ "radix": false, "ban-types": [ true, - "Object" + ["Object", "Use {} instead."] ], "ban": [ true, diff --git a/webpack.config.ts b/webpack.config.ts index 54ad648bdbbb518c1097fe21cef0256af5c6564c..5ec0a60d1a1f990a928db6f34390cafe851700e6 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -95,7 +95,7 @@ module.exports = { loader: 'css-loader' }, postcss] }, { - test: /\.(eot|woff|woff2|svg|ttf)([\?]?.*)$/, + test: /\.(eot|woff|woff2|svg|ttf)([?]?.*)$/, loader: 'url-loader' }, { test: /\.json5$/,