yumechi-no-kuni/packages/client/src
Johann150 804fa33535
refactor: improve code quality (#8751)
* remove unnecessary if

`Array.prototype.some` already returns a boolean so an if to return
true or false is completely unnecessary in this case.

* perf: use count instead of find

When using `count` instead of `findOneBy`, the data is not
unnecessarily loaded.

* remove duplicate null check

The variable is checked for null in the lines above and the function
returns if so. Therefore, it can not be null at this point.

* simplify `getJsonSchema`

Because the assigned value is `null` and the used keys are only
shallow, use of `nestedProperty.set` seems inappropriate. Because the
value is not read, the initial for loop can be replaced by a `for..in`
loop.

Since all keys will be assigned `null`, the condition of the ternary
expression in the nested function will always be true. Therefore the
recursion case will never happen. With this the nested function can be
eliminated.

* remove duplicate condition

The code above already checks `dragging` and returns if it is truthy.
Checking it again later is therefore unnecessary.

To make this more obvious the `return` is removed in favour of using
an if...else construct.

* remove impossible "unknown" time

The `ago` variable will always be a number and all non-negative numbers
are already covered by other cases, the negative case is handled with
`future` so there is no case when `unkown` could be achieved.
2022-05-29 15:15:52 +09:00
..
components refactor: improve code quality (#8751) 2022-05-29 15:15:52 +09:00
directives refactor: use Vite to build instead of webpack (#8575) 2022-05-01 22:51:07 +09:00
filters fix lints (#8737) 2022-05-26 22:53:09 +09:00
pages Fix theme import (#8749) 2022-05-28 21:59:23 +09:00
scripts Fix theme import (#8749) 2022-05-28 21:59:23 +09:00
themes 🎨 2022-03-01 23:58:28 +09:00
types enhance: メニュー関連をComposition API化、switchアイテム追加 (#8215) 2022-01-30 14:11:52 +09:00
ui refactor: improve code quality (#8751) 2022-05-29 15:15:52 +09:00
widgets feat(tests): add e2e tests for widgets (#8735) 2022-05-28 14:28:12 +09:00
account.ts fix lints (#8737) 2022-05-26 22:53:09 +09:00
config.ts
const.ts enhance: MediaListでは、サーバーで許可された形式しか表示しないように (#8113) 2022-01-27 00:08:48 +09:00
emojilist.json Supports Unicode Emoji 14.0 (#8699) 2022-05-25 16:35:30 +09:00
events.ts
i18n.ts
init.ts fix lints (#8737) 2022-05-26 22:53:09 +09:00
instance.ts fix lints (#8737) 2022-05-26 22:53:09 +09:00
menu.ts refactor(client): better semantics 2022-01-28 11:53:12 +09:00
os.ts fix lints (#8737) 2022-05-26 22:53:09 +09:00
pizzax.ts refactor(client): specify global scope 2022-01-16 10:14:14 +09:00
plugin.ts fix 2021-11-18 23:36:04 +09:00
router.ts refactor: use Vite to build instead of webpack (#8575) 2022-05-01 22:51:07 +09:00
store.ts refactor: use Vite to build instead of webpack (#8575) 2022-05-01 22:51:07 +09:00
stream.ts 非ログイン時にエラーを吐くconsole.logを除去 (#8119) 2022-01-06 20:07:11 +09:00
style.scss 🎨 2022-01-14 01:44:08 +09:00
symbols.ts
theme-store.ts fix lints (#8737) 2022-05-26 22:53:09 +09:00