diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2020-08-12 21:01:02 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-12 21:01:02 +0900 |
commit | bf6762f0c0c47a20b6a3e722711fafc6611793a9 (patch) | |
tree | 67bfdcee88c8fb2bc19277e58684dcf5d2d03be4 /src/background/completion/impl | |
parent | 6f7f501c699c53eb63ce5576cf2464ecf4cfe162 (diff) | |
parent | 7e8c99d43a402b9e025a710a00879d557ac5b071 (diff) |
Merge pull request #798 from ueokande/eslint
Improve eslint
Diffstat (limited to 'src/background/completion/impl')
-rw-r--r-- | src/background/completion/impl/BookmarkRepositoryImpl.ts | 8 | ||||
-rw-r--r-- | src/background/completion/impl/HistoryRepositoryImpl.ts | 8 | ||||
-rw-r--r-- | src/background/completion/impl/TabRepositoryImpl.ts | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/background/completion/impl/BookmarkRepositoryImpl.ts b/src/background/completion/impl/BookmarkRepositoryImpl.ts index 2bc779d..ed6c5a6 100644 --- a/src/background/completion/impl/BookmarkRepositoryImpl.ts +++ b/src/background/completion/impl/BookmarkRepositoryImpl.ts @@ -23,7 +23,7 @@ export default class CachedBookmarkRepository implements BookmarkRepository { .filter((item) => { let url = undefined; try { - url = new URL(item.url!!); + url = new URL(item.url!); } catch (e) { return false; } @@ -31,8 +31,8 @@ export default class CachedBookmarkRepository implements BookmarkRepository { }) .slice(0, COMPLETION_ITEM_LIMIT) .map((item) => ({ - title: item.title!!, - url: item.url!!, + title: item.title!, + url: item.url!, })); } @@ -41,7 +41,7 @@ export default class CachedBookmarkRepository implements BookmarkRepository { return query.split(" ").every((keyword) => { return ( item.title.toLowerCase().includes(keyword.toLowerCase()) || - item.url!!.includes(keyword) + item.url!.includes(keyword) ); }); }); diff --git a/src/background/completion/impl/HistoryRepositoryImpl.ts b/src/background/completion/impl/HistoryRepositoryImpl.ts index b1992a4..3bf064e 100644 --- a/src/background/completion/impl/HistoryRepositoryImpl.ts +++ b/src/background/completion/impl/HistoryRepositoryImpl.ts @@ -36,8 +36,8 @@ export default class CachedHistoryRepository implements HistoryRepository { .sort((x, y) => Number(y.visitCount) - Number(x.visitCount)) .slice(0, COMPLETION_ITEM_LIMIT) .map((item) => ({ - title: item.title!!, - url: item.url!!, + title: item.title!, + url: item.url!, })); } @@ -59,8 +59,8 @@ export default class CachedHistoryRepository implements HistoryRepository { return items.filter((item) => { return query.split(" ").every((keyword) => { return ( - item.title!!.toLowerCase().includes(keyword.toLowerCase()) || - item.url!!.includes(keyword) + item.title!.toLowerCase().includes(keyword.toLowerCase()) || + item.url!.includes(keyword) ); }); }); diff --git a/src/background/completion/impl/TabRepositoryImpl.ts b/src/background/completion/impl/TabRepositoryImpl.ts index 5e33e5a..a279bd4 100644 --- a/src/background/completion/impl/TabRepositoryImpl.ts +++ b/src/background/completion/impl/TabRepositoryImpl.ts @@ -30,10 +30,10 @@ export default class TabRepositoryImpl implements TabRepository { private static toEntity(tab: browser.tabs.Tab): Tab { return { - id: tab.id!!, - url: tab.url!!, + id: tab.id!, + url: tab.url!, active: tab.active, - title: tab.title!!, + title: tab.title!, faviconUrl: tab.favIconUrl, index: tab.index, }; |