From fc1cd234d5643fde0abbd529a374e330cb4ab4b6 Mon Sep 17 00:00:00 2001 From: Shin'ya Ueoka Date: Wed, 22 May 2019 20:30:20 +0900 Subject: Use @typescript-eslint/semi rule --- .eslintrc | 3 +++ src/background/domains/CompletionGroup.ts | 1 - src/background/domains/CompletionItem.ts | 1 - src/background/domains/GlobalMark.ts | 1 - src/console/components/Console.tsx | 2 +- src/content/client/AddonIndicatorClient.ts | 2 -- src/content/client/ConsoleClient.ts | 2 -- src/content/client/FindClient.ts | 2 -- src/content/client/FindMasterClient.ts | 2 -- src/content/client/FollowMasterClient.ts | 2 -- src/content/client/FollowSlaveClient.ts | 2 -- src/content/client/FollowSlaveClientFactory.ts | 2 -- src/content/client/MarkClient.ts | 2 -- src/content/client/SettingClient.ts | 2 -- src/content/client/TabsClient.ts | 2 -- src/content/domains/Key.ts | 2 -- src/content/domains/Mark.ts | 1 - src/content/presenters/ConsoleFramePresenter.ts | 2 -- src/content/presenters/FindPresenter.ts | 2 -- src/content/presenters/FocusPresenter.ts | 2 -- src/content/presenters/FollowPresenter.ts | 4 +--- src/content/presenters/NavigationPresenter.ts | 2 -- src/content/presenters/ScrollPresenter.ts | 2 -- src/content/repositories/AddonEnabledRepository.ts | 2 -- src/content/repositories/ClipboardRepository.ts | 2 -- src/content/repositories/FindRepository.ts | 2 -- src/content/repositories/FollowKeyRepository.ts | 2 -- src/content/repositories/FollowMasterRepository.ts | 2 -- src/content/repositories/FollowSlaveRepository.ts | 2 -- src/content/repositories/KeymapRepository.ts | 2 -- src/content/repositories/MarkKeyRepository.ts | 2 -- src/content/repositories/MarkRepository.ts | 2 -- src/content/repositories/SettingRepository.ts | 2 -- src/settings/components/form/KeymapsForm.tsx | 2 +- src/settings/components/form/SearchForm.tsx | 2 +- src/shared/Settings.ts | 1 - 36 files changed, 7 insertions(+), 63 deletions(-) diff --git a/.eslintrc b/.eslintrc index a80a79c..7b35bc4 100644 --- a/.eslintrc +++ b/.eslintrc @@ -72,6 +72,7 @@ "quotes": ["error", "single", { "allowTemplateLiterals": true }], "require-jsdoc": "off", "require-unicode-regexp": "off", + "semi": "off", "sort-imports": "off", "sort-keys": "off", "sort-vars": "off", @@ -80,6 +81,8 @@ "react/jsx-indent": ["error", 2], "react/prop-types": "off", "react/react-in-jsx-scope": "off", + "@typescript-eslint/no-unused-vars": ["error", { args: "none" }], + "@typescript-eslint/semi": ["error"] } } diff --git a/src/background/domains/CompletionGroup.ts b/src/background/domains/CompletionGroup.ts index 1eea7d8..8e89bf0 100644 --- a/src/background/domains/CompletionGroup.ts +++ b/src/background/domains/CompletionGroup.ts @@ -3,5 +3,4 @@ import CompletionItem from './CompletionItem'; export default interface CompletionGroup { name: string; items: CompletionItem[]; - // eslint-disable-next-line semi } diff --git a/src/background/domains/CompletionItem.ts b/src/background/domains/CompletionItem.ts index 657efaa..96f6ee6 100644 --- a/src/background/domains/CompletionItem.ts +++ b/src/background/domains/CompletionItem.ts @@ -3,5 +3,4 @@ export default interface CompletionItem { readonly content?: string; readonly url?: string; readonly icon?: string; - // eslint-disable-next-line semi } diff --git a/src/background/domains/GlobalMark.ts b/src/background/domains/GlobalMark.ts index 1ae912e..b3fa26a 100644 --- a/src/background/domains/GlobalMark.ts +++ b/src/background/domains/GlobalMark.ts @@ -3,5 +3,4 @@ export default interface GlobalMark { readonly url: string; readonly x: number; readonly y: number; - // eslint-disable-next-line semi } diff --git a/src/console/components/Console.tsx b/src/console/components/Console.tsx index 68cc523..7da2f36 100644 --- a/src/console/components/Console.tsx +++ b/src/console/components/Console.tsx @@ -13,7 +13,7 @@ type StateProps = ReturnType; interface DispatchProps { dispatch: (action: any) => void, } -type Props = StateProps & DispatchProps +type Props = StateProps & DispatchProps; class Console extends React.Component { private input: React.RefObject; diff --git a/src/content/client/AddonIndicatorClient.ts b/src/content/client/AddonIndicatorClient.ts index afb9fa4..b5f7e6a 100644 --- a/src/content/client/AddonIndicatorClient.ts +++ b/src/content/client/AddonIndicatorClient.ts @@ -2,8 +2,6 @@ import * as messages from '../../shared/messages'; export default interface AddonIndicatorClient { setEnabled(enabled: boolean): Promise; - - // eslint-disable-next-line semi } export class AddonIndicatorClientImpl implements AddonIndicatorClient { diff --git a/src/content/client/ConsoleClient.ts b/src/content/client/ConsoleClient.ts index e7046e5..b4fbb04 100644 --- a/src/content/client/ConsoleClient.ts +++ b/src/content/client/ConsoleClient.ts @@ -3,8 +3,6 @@ import * as messages from '../../shared/messages'; export default interface ConsoleClient { info(text: string): Promise; error(text: string): Promise; - - // eslint-disable-next-line semi } export class ConsoleClientImpl implements ConsoleClient { diff --git a/src/content/client/FindClient.ts b/src/content/client/FindClient.ts index 22cd3cb..af0b427 100644 --- a/src/content/client/FindClient.ts +++ b/src/content/client/FindClient.ts @@ -4,8 +4,6 @@ export default interface FindClient { getGlobalLastKeyword(): Promise; setGlobalLastKeyword(keyword: string): Promise; - - // eslint-disable-next-line semi } export class FindClientImpl implements FindClient { diff --git a/src/content/client/FindMasterClient.ts b/src/content/client/FindMasterClient.ts index 0481ec1..9ed38dd 100644 --- a/src/content/client/FindMasterClient.ts +++ b/src/content/client/FindMasterClient.ts @@ -4,8 +4,6 @@ export default interface FindMasterClient { findNext(): void; findPrev(): void; - - // eslint-disable-next-line semi } export class FindMasterClientImpl implements FindMasterClient { diff --git a/src/content/client/FollowMasterClient.ts b/src/content/client/FollowMasterClient.ts index c841902..da75308 100644 --- a/src/content/client/FollowMasterClient.ts +++ b/src/content/client/FollowMasterClient.ts @@ -7,8 +7,6 @@ export default interface FollowMasterClient { responseHintCount(count: number): void; sendKey(key: Key): void; - - // eslint-disable-next-line semi } export class FollowMasterClientImpl implements FollowMasterClient { diff --git a/src/content/client/FollowSlaveClient.ts b/src/content/client/FollowSlaveClient.ts index 0905cd9..4360200 100644 --- a/src/content/client/FollowSlaveClient.ts +++ b/src/content/client/FollowSlaveClient.ts @@ -20,8 +20,6 @@ export default interface FollowSlaveClient { clearHints(): void; activateIfExists(tag: string, newTab: boolean, background: boolean): void; - - // eslint-disable-next-line semi } export class FollowSlaveClientImpl implements FollowSlaveClient { diff --git a/src/content/client/FollowSlaveClientFactory.ts b/src/content/client/FollowSlaveClientFactory.ts index cd331d4..166dfca 100644 --- a/src/content/client/FollowSlaveClientFactory.ts +++ b/src/content/client/FollowSlaveClientFactory.ts @@ -2,8 +2,6 @@ import FollowSlaveClient, { FollowSlaveClientImpl } from './FollowSlaveClient'; export default interface FollowSlaveClientFactory { create(window: Window): FollowSlaveClient; - - // eslint-disable-next-line semi } export class FollowSlaveClientFactoryImpl implements FollowSlaveClientFactory { diff --git a/src/content/client/MarkClient.ts b/src/content/client/MarkClient.ts index b7cf535..c6295c0 100644 --- a/src/content/client/MarkClient.ts +++ b/src/content/client/MarkClient.ts @@ -5,8 +5,6 @@ export default interface MarkClient { setGloablMark(key: string, mark: Mark): Promise; jumpGlobalMark(key: string): Promise; - - // eslint-disable-next-line semi } export class MarkClientImpl implements MarkClient { diff --git a/src/content/client/SettingClient.ts b/src/content/client/SettingClient.ts index c67f544..0850f11 100644 --- a/src/content/client/SettingClient.ts +++ b/src/content/client/SettingClient.ts @@ -3,8 +3,6 @@ import * as messages from '../../shared/messages'; export default interface SettingClient { load(): Promise; - - // eslint-disable-next-line semi } export class SettingClientImpl { diff --git a/src/content/client/TabsClient.ts b/src/content/client/TabsClient.ts index e1af078..39348df 100644 --- a/src/content/client/TabsClient.ts +++ b/src/content/client/TabsClient.ts @@ -2,8 +2,6 @@ import * as messages from '../../shared/messages'; export default interface TabsClient { openUrl(url: string, newTab: boolean, background?: boolean): Promise; - - // eslint-disable-next-line semi } export class TabsClientImpl implements TabsClient { diff --git a/src/content/domains/Key.ts b/src/content/domains/Key.ts index fbbb4bb..b25616e 100644 --- a/src/content/domains/Key.ts +++ b/src/content/domains/Key.ts @@ -4,8 +4,6 @@ export default interface Key { ctrlKey?: boolean; altKey?: boolean; metaKey?: boolean; - - // eslint-disable-next-line semi } const modifiedKeyName = (name: string): string => { diff --git a/src/content/domains/Mark.ts b/src/content/domains/Mark.ts index f1282fc..0c40988 100644 --- a/src/content/domains/Mark.ts +++ b/src/content/domains/Mark.ts @@ -1,6 +1,5 @@ export default interface Mark { x: number; y: number; - // eslint-disable-next-line semi } diff --git a/src/content/presenters/ConsoleFramePresenter.ts b/src/content/presenters/ConsoleFramePresenter.ts index 3c7477b..62db2bb 100644 --- a/src/content/presenters/ConsoleFramePresenter.ts +++ b/src/content/presenters/ConsoleFramePresenter.ts @@ -2,8 +2,6 @@ export default interface ConsoleFramePresenter { initialize(): void; blur(): void; - - // eslint-disable-next-line semi } export class ConsoleFramePresenterImpl implements ConsoleFramePresenter { diff --git a/src/content/presenters/FindPresenter.ts b/src/content/presenters/FindPresenter.ts index d9bc835..f171d2f 100644 --- a/src/content/presenters/FindPresenter.ts +++ b/src/content/presenters/FindPresenter.ts @@ -3,8 +3,6 @@ export default interface FindPresenter { find(keyword: string, backwards: boolean): boolean; clearSelection(): void; - - // eslint-disable-next-line semi } // window.find(aString, aCaseSensitive, aBackwards, aWrapAround, diff --git a/src/content/presenters/FocusPresenter.ts b/src/content/presenters/FocusPresenter.ts index 4cef5bf..7e20cd6 100644 --- a/src/content/presenters/FocusPresenter.ts +++ b/src/content/presenters/FocusPresenter.ts @@ -2,8 +2,6 @@ import * as doms from '../../shared/utils/dom'; export default interface FocusPresenter { focusFirstElement(): boolean; - - // eslint-disable-next-line semi } export class FocusPresenterImpl implements FocusPresenter { diff --git a/src/content/presenters/FollowPresenter.ts b/src/content/presenters/FollowPresenter.ts index f0d115c..0132621 100644 --- a/src/content/presenters/FollowPresenter.ts +++ b/src/content/presenters/FollowPresenter.ts @@ -69,12 +69,10 @@ export default interface FollowPresenter { clearHints(): void; getHint(tag: string): Hint | undefined; - - // eslint-disable-next-line semi } export class FollowPresenterImpl implements FollowPresenter { - private hints: Hint[] + private hints: Hint[]; constructor() { this.hints = []; diff --git a/src/content/presenters/NavigationPresenter.ts b/src/content/presenters/NavigationPresenter.ts index 66110e5..c141112 100644 --- a/src/content/presenters/NavigationPresenter.ts +++ b/src/content/presenters/NavigationPresenter.ts @@ -10,8 +10,6 @@ export default interface NavigationPresenter { openParent(): void; openRoot(): void; - - // eslint-disable-next-line semi } const REL_PATTERN: {[key: string]: RegExp} = { diff --git a/src/content/presenters/ScrollPresenter.ts b/src/content/presenters/ScrollPresenter.ts index 9286fb0..c06efca 100644 --- a/src/content/presenters/ScrollPresenter.ts +++ b/src/content/presenters/ScrollPresenter.ts @@ -106,8 +106,6 @@ export default interface ScrollPresenter { scrollToBottom(smooth: boolean): void; scrollToHome(smooth: boolean): void; scrollToEnd(smooth: boolean): void; - - // eslint-disable-next-line semi } export class ScrollPresenterImpl { diff --git a/src/content/repositories/AddonEnabledRepository.ts b/src/content/repositories/AddonEnabledRepository.ts index 4eaabb1..7921bdb 100644 --- a/src/content/repositories/AddonEnabledRepository.ts +++ b/src/content/repositories/AddonEnabledRepository.ts @@ -4,8 +4,6 @@ export default interface AddonEnabledRepository { set(on: boolean): void; get(): boolean; - - // eslint-disable-next-line semi } export class AddonEnabledRepositoryImpl implements AddonEnabledRepository { diff --git a/src/content/repositories/ClipboardRepository.ts b/src/content/repositories/ClipboardRepository.ts index 747ae6a..a046851 100644 --- a/src/content/repositories/ClipboardRepository.ts +++ b/src/content/repositories/ClipboardRepository.ts @@ -2,8 +2,6 @@ export default interface ClipboardRepository { read(): string; write(text: string): void; - - // eslint-disable-next-line semi } export class ClipboardRepositoryImpl { diff --git a/src/content/repositories/FindRepository.ts b/src/content/repositories/FindRepository.ts index 85eca40..aeb200f 100644 --- a/src/content/repositories/FindRepository.ts +++ b/src/content/repositories/FindRepository.ts @@ -2,8 +2,6 @@ export default interface FindRepository { getLastKeyword(): string | null; setLastKeyword(keyword: string): void; - - // eslint-disable-next-line semi } let current: string | null = null; diff --git a/src/content/repositories/FollowKeyRepository.ts b/src/content/repositories/FollowKeyRepository.ts index a671b5c..07ceec7 100644 --- a/src/content/repositories/FollowKeyRepository.ts +++ b/src/content/repositories/FollowKeyRepository.ts @@ -6,8 +6,6 @@ export default interface FollowKeyRepository { popKey(): void; clearKeys(): void; - - // eslint-disable-next-line semi } const current: { diff --git a/src/content/repositories/FollowMasterRepository.ts b/src/content/repositories/FollowMasterRepository.ts index a964953..da2402c 100644 --- a/src/content/repositories/FollowMasterRepository.ts +++ b/src/content/repositories/FollowMasterRepository.ts @@ -12,8 +12,6 @@ export default interface FollowMasterRepository { getCurrentNewTabMode(): boolean; getCurrentBackgroundMode(): boolean; - - // eslint-disable-next-line semi } const current: { diff --git a/src/content/repositories/FollowSlaveRepository.ts b/src/content/repositories/FollowSlaveRepository.ts index 4c2de72..42a0710 100644 --- a/src/content/repositories/FollowSlaveRepository.ts +++ b/src/content/repositories/FollowSlaveRepository.ts @@ -4,8 +4,6 @@ export default interface FollowSlaveRepository { disableFollowMode(): void; isFollowMode(): boolean; - - // eslint-disable-next-line semi } const current: { diff --git a/src/content/repositories/KeymapRepository.ts b/src/content/repositories/KeymapRepository.ts index 770ba0b..d7b5b7d 100644 --- a/src/content/repositories/KeymapRepository.ts +++ b/src/content/repositories/KeymapRepository.ts @@ -5,8 +5,6 @@ export default interface KeymapRepository { enqueueKey(key: Key): KeySequence; clear(): void; - - // eslint-disable-next-line semi } let current: KeySequence = KeySequence.from([]); diff --git a/src/content/repositories/MarkKeyRepository.ts b/src/content/repositories/MarkKeyRepository.ts index c24548a..0b24af2 100644 --- a/src/content/repositories/MarkKeyRepository.ts +++ b/src/content/repositories/MarkKeyRepository.ts @@ -10,8 +10,6 @@ export default interface MarkKeyRepository { enableJumpMode(): void; disabeJumpMode(): void; - - // eslint-disable-next-line semi } interface Mode { diff --git a/src/content/repositories/MarkRepository.ts b/src/content/repositories/MarkRepository.ts index ed5afe2..678abc4 100644 --- a/src/content/repositories/MarkRepository.ts +++ b/src/content/repositories/MarkRepository.ts @@ -4,8 +4,6 @@ export default interface MarkRepository { set(key: string, mark: Mark): void; get(key: string): Mark | null; - - // eslint-disable-next-line semi } const saved: {[key: string]: Mark} = {}; diff --git a/src/content/repositories/SettingRepository.ts b/src/content/repositories/SettingRepository.ts index 711b2a2..d718794 100644 --- a/src/content/repositories/SettingRepository.ts +++ b/src/content/repositories/SettingRepository.ts @@ -6,8 +6,6 @@ export default interface SettingRepository { set(setting: Settings): void; get(): Settings; - - // eslint-disable-next-line semi } export class SettingRepositoryImpl implements SettingRepository { diff --git a/src/settings/components/form/KeymapsForm.tsx b/src/settings/components/form/KeymapsForm.tsx index ad4d0e7..3cba0c0 100644 --- a/src/settings/components/form/KeymapsForm.tsx +++ b/src/settings/components/form/KeymapsForm.tsx @@ -15,7 +15,7 @@ class KeymapsForm extends React.Component { value: FormKeymaps.valueOf({}), onChange: () => {}, onBlur: () => {}, - } + }; render() { let values = this.props.value.toJSON(); diff --git a/src/settings/components/form/SearchForm.tsx b/src/settings/components/form/SearchForm.tsx index 67dbeba..cf78a69 100644 --- a/src/settings/components/form/SearchForm.tsx +++ b/src/settings/components/form/SearchForm.tsx @@ -15,7 +15,7 @@ class SearchForm extends React.Component { value: FormSearch.valueOf({ default: '', engines: []}), onChange: () => {}, onBlur: () => {}, - } + }; render() { let value = this.props.value.toJSON(); diff --git a/src/shared/Settings.ts b/src/shared/Settings.ts index e35094b..c1b5a51 100644 --- a/src/shared/Settings.ts +++ b/src/shared/Settings.ts @@ -19,7 +19,6 @@ export default interface Settings { search: Search; properties: Properties; blacklist: string[]; - // eslint-disable-next-line semi } const DefaultProperties: Properties = PropertyDefs.defs.reduce( -- cgit v1.2.3