diff options
author | Shin'ya Ueoka <ueokande@i-beam.org> | 2019-12-22 11:10:36 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-22 11:10:36 +0900 |
commit | b1a6f374dca078dee2406ebe049715b826e37ca2 (patch) | |
tree | 5367c48648e2018f55f12d847baba94559e10040 /src/content/repositories | |
parent | b2dcdedad729ff7087867da50e20578f9fc8fb29 (diff) | |
parent | da72c2ddd916d79d134662e3985b53a4ac78af7a (diff) |
Merge pull request #690 from ueokande/eslint-and-prettier
Eslint and prettier
Diffstat (limited to 'src/content/repositories')
-rw-r--r-- | src/content/repositories/AddonEnabledRepository.ts | 2 | ||||
-rw-r--r-- | src/content/repositories/ClipboardRepository.ts | 10 | ||||
-rw-r--r-- | src/content/repositories/MarkKeyRepository.ts | 2 | ||||
-rw-r--r-- | src/content/repositories/MarkRepository.ts | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/content/repositories/AddonEnabledRepository.ts b/src/content/repositories/AddonEnabledRepository.ts index 7921bdb..ce3f521 100644 --- a/src/content/repositories/AddonEnabledRepository.ts +++ b/src/content/repositories/AddonEnabledRepository.ts @@ -1,4 +1,4 @@ -let enabled: boolean = false; +let enabled = false; export default interface AddonEnabledRepository { set(on: boolean): void; diff --git a/src/content/repositories/ClipboardRepository.ts b/src/content/repositories/ClipboardRepository.ts index a046851..8219835 100644 --- a/src/content/repositories/ClipboardRepository.ts +++ b/src/content/repositories/ClipboardRepository.ts @@ -6,7 +6,7 @@ export default interface ClipboardRepository { export class ClipboardRepositoryImpl { read(): string { - let textarea = window.document.createElement('textarea'); + const textarea = window.document.createElement('textarea'); window.document.body.append(textarea); textarea.style.position = 'fixed'; @@ -14,8 +14,8 @@ export class ClipboardRepositoryImpl { textarea.contentEditable = 'true'; textarea.focus(); - let ok = window.document.execCommand('paste'); - let value = textarea.textContent!!; + const ok = window.document.execCommand('paste'); + const value = textarea.textContent!!; textarea.remove(); if (!ok) { @@ -26,7 +26,7 @@ export class ClipboardRepositoryImpl { } write(text: string): void { - let input = window.document.createElement('input'); + const input = window.document.createElement('input'); window.document.body.append(input); input.style.position = 'fixed'; @@ -34,7 +34,7 @@ export class ClipboardRepositoryImpl { input.value = text; input.select(); - let ok = window.document.execCommand('copy'); + const ok = window.document.execCommand('copy'); input.remove(); if (!ok) { diff --git a/src/content/repositories/MarkKeyRepository.ts b/src/content/repositories/MarkKeyRepository.ts index 0b24af2..18c3e23 100644 --- a/src/content/repositories/MarkKeyRepository.ts +++ b/src/content/repositories/MarkKeyRepository.ts @@ -17,7 +17,7 @@ interface Mode { jumpMode: boolean; } -let current: Mode = { +const current: Mode = { setMode: false, jumpMode: false, }; diff --git a/src/content/repositories/MarkRepository.ts b/src/content/repositories/MarkRepository.ts index 678abc4..afa980a 100644 --- a/src/content/repositories/MarkRepository.ts +++ b/src/content/repositories/MarkRepository.ts @@ -14,7 +14,7 @@ export class MarkRepositoryImpl implements MarkRepository { } get(key: string): Mark | null { - let v = saved[key]; + const v = saved[key]; if (!v) { return null; } |