Merge pull request #590 from ueokande/remove-unnecessary-semi

Remove unnecessary semi
jh-changes
Shin'ya Ueoka 6 years ago committed by GitHub
commit 07897df636
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .eslintrc
  2. 57
      package-lock.json
  3. 2
      package.json
  4. 1
      src/background/domains/CompletionGroup.ts
  5. 1
      src/background/domains/CompletionItem.ts
  6. 1
      src/background/domains/GlobalMark.ts
  7. 2
      src/console/components/Console.tsx
  8. 2
      src/content/client/AddonIndicatorClient.ts
  9. 2
      src/content/client/ConsoleClient.ts
  10. 2
      src/content/client/FindClient.ts
  11. 2
      src/content/client/FindMasterClient.ts
  12. 2
      src/content/client/FollowMasterClient.ts
  13. 2
      src/content/client/FollowSlaveClient.ts
  14. 2
      src/content/client/FollowSlaveClientFactory.ts
  15. 2
      src/content/client/MarkClient.ts
  16. 2
      src/content/client/SettingClient.ts
  17. 2
      src/content/client/TabsClient.ts
  18. 2
      src/content/domains/Key.ts
  19. 1
      src/content/domains/Mark.ts
  20. 2
      src/content/presenters/ConsoleFramePresenter.ts
  21. 2
      src/content/presenters/FindPresenter.ts
  22. 2
      src/content/presenters/FocusPresenter.ts
  23. 4
      src/content/presenters/FollowPresenter.ts
  24. 2
      src/content/presenters/NavigationPresenter.ts
  25. 2
      src/content/presenters/ScrollPresenter.ts
  26. 2
      src/content/repositories/AddonEnabledRepository.ts
  27. 2
      src/content/repositories/ClipboardRepository.ts
  28. 2
      src/content/repositories/FindRepository.ts
  29. 2
      src/content/repositories/FollowKeyRepository.ts
  30. 2
      src/content/repositories/FollowMasterRepository.ts
  31. 2
      src/content/repositories/FollowSlaveRepository.ts
  32. 2
      src/content/repositories/KeymapRepository.ts
  33. 2
      src/content/repositories/MarkKeyRepository.ts
  34. 2
      src/content/repositories/MarkRepository.ts
  35. 2
      src/content/repositories/SettingRepository.ts
  36. 2
      src/settings/components/form/KeymapsForm.tsx
  37. 2
      src/settings/components/form/SearchForm.tsx
  38. 1
      src/shared/Settings.ts

@ -72,6 +72,7 @@
"quotes": ["error", "single", { "allowTemplateLiterals": true }], "quotes": ["error", "single", { "allowTemplateLiterals": true }],
"require-jsdoc": "off", "require-jsdoc": "off",
"require-unicode-regexp": "off", "require-unicode-regexp": "off",
"semi": "off",
"sort-imports": "off", "sort-imports": "off",
"sort-keys": "off", "sort-keys": "off",
"sort-vars": "off", "sort-vars": "off",
@ -80,6 +81,8 @@
"react/jsx-indent": ["error", 2], "react/jsx-indent": ["error", 2],
"react/prop-types": "off", "react/prop-types": "off",
"react/react-in-jsx-scope": "off", "react/react-in-jsx-scope": "off",
"@typescript-eslint/no-unused-vars": ["error", { args: "none" }], "@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
"@typescript-eslint/semi": ["error"]
} }
} }

57
package-lock.json generated

@ -203,46 +203,45 @@
} }
}, },
"@typescript-eslint/eslint-plugin": { "@typescript-eslint/eslint-plugin": {
"version": "1.7.0", "version": "1.9.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz",
"integrity": "sha512-NUSz1aTlIzzTjFFVFyzrbo8oFjHg3K/M9MzYByqbMCxeFdErhLAcGITVfXzSz+Yvp5OOpMu3HkIttB0NyKl54Q==", "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/parser": "1.7.0", "@typescript-eslint/experimental-utils": "1.9.0",
"@typescript-eslint/typescript-estree": "1.7.0", "@typescript-eslint/parser": "1.9.0",
"eslint-utils": "^1.3.1", "eslint-utils": "^1.3.1",
"functional-red-black-tree": "^1.0.1",
"regexpp": "^2.0.1", "regexpp": "^2.0.1",
"requireindex": "^1.2.0", "requireindex": "^1.2.0",
"tsutils": "^3.7.0" "tsutils": "^3.7.0"
} }
}, },
"@typescript-eslint/parser": { "@typescript-eslint/experimental-utils": {
"version": "1.7.0", "version": "1.9.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz",
"integrity": "sha512-1QFKxs2V940372srm12ovSE683afqc1jB6zF/f8iKhgLz1yoSjYeGHipasao33VXKI+0a/ob9okeogGdKGvvlg==", "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==",
"dev": true, "dev": true,
"requires": { "requires": {
"@typescript-eslint/typescript-estree": "1.7.0", "@typescript-eslint/typescript-estree": "1.9.0"
"eslint-scope": "^4.0.0", }
"eslint-visitor-keys": "^1.0.0"
}, },
"dependencies": { "@typescript-eslint/parser": {
"eslint-scope": { "version": "1.9.0",
"version": "4.0.3", "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==",
"integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
"dev": true, "dev": true,
"requires": { "requires": {
"esrecurse": "^4.1.0", "@typescript-eslint/experimental-utils": "1.9.0",
"estraverse": "^4.1.1" "@typescript-eslint/typescript-estree": "1.9.0",
} "eslint-scope": "^4.0.0",
} "eslint-visitor-keys": "^1.0.0"
} }
}, },
"@typescript-eslint/typescript-estree": { "@typescript-eslint/typescript-estree": {
"version": "1.7.0", "version": "1.9.0",
"resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.7.0.tgz", "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz",
"integrity": "sha512-K5uedUxVmlYrVkFbyV3htDipvLqTE3QMOUQEHYJaKtgzxj6r7c5Ca/DG1tGgFxX+fsbi9nDIrf4arq7Ib7H/Yw==", "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==",
"dev": true, "dev": true,
"requires": { "requires": {
"lodash.unescape": "4.0.1", "lodash.unescape": "4.0.1",
@ -2518,6 +2517,16 @@
} }
} }
}, },
"eslint-scope": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz",
"integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==",
"dev": true,
"requires": {
"esrecurse": "^4.1.0",
"estraverse": "^4.1.1"
}
},
"eslint-utils": { "eslint-utils": {
"version": "1.3.1", "version": "1.3.1",
"resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz",

@ -28,7 +28,7 @@
"@types/react-dom": "^16.8.4", "@types/react-dom": "^16.8.4",
"@types/react-redux": "^7.0.8", "@types/react-redux": "^7.0.8",
"@types/redux-promise": "^0.5.28", "@types/redux-promise": "^0.5.28",
"@typescript-eslint/eslint-plugin": "^1.7.0", "@typescript-eslint/eslint-plugin": "^1.9.0",
"chai": "^4.2.0", "chai": "^4.2.0",
"css-loader": "^2.1.1", "css-loader": "^2.1.1",
"eslint": "^5.16.0", "eslint": "^5.16.0",

@ -3,5 +3,4 @@ import CompletionItem from './CompletionItem';
export default interface CompletionGroup { export default interface CompletionGroup {
name: string; name: string;
items: CompletionItem[]; items: CompletionItem[];
// eslint-disable-next-line semi
} }

@ -3,5 +3,4 @@ export default interface CompletionItem {
readonly content?: string; readonly content?: string;
readonly url?: string; readonly url?: string;
readonly icon?: string; readonly icon?: string;
// eslint-disable-next-line semi
} }

@ -3,5 +3,4 @@ export default interface GlobalMark {
readonly url: string; readonly url: string;
readonly x: number; readonly x: number;
readonly y: number; readonly y: number;
// eslint-disable-next-line semi
} }

@ -13,7 +13,7 @@ type StateProps = ReturnType<typeof mapStateToProps>;
interface DispatchProps { interface DispatchProps {
dispatch: (action: any) => void, dispatch: (action: any) => void,
} }
type Props = StateProps & DispatchProps type Props = StateProps & DispatchProps;
class Console extends React.Component<Props> { class Console extends React.Component<Props> {
private input: React.RefObject<Input>; private input: React.RefObject<Input>;

@ -2,8 +2,6 @@ import * as messages from '../../shared/messages';
export default interface AddonIndicatorClient { export default interface AddonIndicatorClient {
setEnabled(enabled: boolean): Promise<void>; setEnabled(enabled: boolean): Promise<void>;
// eslint-disable-next-line semi
} }
export class AddonIndicatorClientImpl implements AddonIndicatorClient { export class AddonIndicatorClientImpl implements AddonIndicatorClient {

@ -3,8 +3,6 @@ import * as messages from '../../shared/messages';
export default interface ConsoleClient { export default interface ConsoleClient {
info(text: string): Promise<void>; info(text: string): Promise<void>;
error(text: string): Promise<void>; error(text: string): Promise<void>;
// eslint-disable-next-line semi
} }
export class ConsoleClientImpl implements ConsoleClient { export class ConsoleClientImpl implements ConsoleClient {

@ -4,8 +4,6 @@ export default interface FindClient {
getGlobalLastKeyword(): Promise<string | null>; getGlobalLastKeyword(): Promise<string | null>;
setGlobalLastKeyword(keyword: string): Promise<void>; setGlobalLastKeyword(keyword: string): Promise<void>;
// eslint-disable-next-line semi
} }
export class FindClientImpl implements FindClient { export class FindClientImpl implements FindClient {

@ -4,8 +4,6 @@ export default interface FindMasterClient {
findNext(): void; findNext(): void;
findPrev(): void; findPrev(): void;
// eslint-disable-next-line semi
} }
export class FindMasterClientImpl implements FindMasterClient { export class FindMasterClientImpl implements FindMasterClient {

@ -7,8 +7,6 @@ export default interface FollowMasterClient {
responseHintCount(count: number): void; responseHintCount(count: number): void;
sendKey(key: Key): void; sendKey(key: Key): void;
// eslint-disable-next-line semi
} }
export class FollowMasterClientImpl implements FollowMasterClient { export class FollowMasterClientImpl implements FollowMasterClient {

@ -20,8 +20,6 @@ export default interface FollowSlaveClient {
clearHints(): void; clearHints(): void;
activateIfExists(tag: string, newTab: boolean, background: boolean): void; activateIfExists(tag: string, newTab: boolean, background: boolean): void;
// eslint-disable-next-line semi
} }
export class FollowSlaveClientImpl implements FollowSlaveClient { export class FollowSlaveClientImpl implements FollowSlaveClient {

@ -2,8 +2,6 @@ import FollowSlaveClient, { FollowSlaveClientImpl } from './FollowSlaveClient';
export default interface FollowSlaveClientFactory { export default interface FollowSlaveClientFactory {
create(window: Window): FollowSlaveClient; create(window: Window): FollowSlaveClient;
// eslint-disable-next-line semi
} }
export class FollowSlaveClientFactoryImpl implements FollowSlaveClientFactory { export class FollowSlaveClientFactoryImpl implements FollowSlaveClientFactory {

@ -5,8 +5,6 @@ export default interface MarkClient {
setGloablMark(key: string, mark: Mark): Promise<void>; setGloablMark(key: string, mark: Mark): Promise<void>;
jumpGlobalMark(key: string): Promise<void>; jumpGlobalMark(key: string): Promise<void>;
// eslint-disable-next-line semi
} }
export class MarkClientImpl implements MarkClient { export class MarkClientImpl implements MarkClient {

@ -3,8 +3,6 @@ import * as messages from '../../shared/messages';
export default interface SettingClient { export default interface SettingClient {
load(): Promise<Settings>; load(): Promise<Settings>;
// eslint-disable-next-line semi
} }
export class SettingClientImpl { export class SettingClientImpl {

@ -2,8 +2,6 @@ import * as messages from '../../shared/messages';
export default interface TabsClient { export default interface TabsClient {
openUrl(url: string, newTab: boolean, background?: boolean): Promise<void>; openUrl(url: string, newTab: boolean, background?: boolean): Promise<void>;
// eslint-disable-next-line semi
} }
export class TabsClientImpl implements TabsClient { export class TabsClientImpl implements TabsClient {

@ -4,8 +4,6 @@ export default interface Key {
ctrlKey?: boolean; ctrlKey?: boolean;
altKey?: boolean; altKey?: boolean;
metaKey?: boolean; metaKey?: boolean;
// eslint-disable-next-line semi
} }
const modifiedKeyName = (name: string): string => { const modifiedKeyName = (name: string): string => {

@ -1,6 +1,5 @@
export default interface Mark { export default interface Mark {
x: number; x: number;
y: number; y: number;
// eslint-disable-next-line semi
} }

@ -2,8 +2,6 @@ export default interface ConsoleFramePresenter {
initialize(): void; initialize(): void;
blur(): void; blur(): void;
// eslint-disable-next-line semi
} }
export class ConsoleFramePresenterImpl implements ConsoleFramePresenter { export class ConsoleFramePresenterImpl implements ConsoleFramePresenter {

@ -3,8 +3,6 @@ export default interface FindPresenter {
find(keyword: string, backwards: boolean): boolean; find(keyword: string, backwards: boolean): boolean;
clearSelection(): void; clearSelection(): void;
// eslint-disable-next-line semi
} }
// window.find(aString, aCaseSensitive, aBackwards, aWrapAround, // window.find(aString, aCaseSensitive, aBackwards, aWrapAround,

@ -2,8 +2,6 @@ import * as doms from '../../shared/utils/dom';
export default interface FocusPresenter { export default interface FocusPresenter {
focusFirstElement(): boolean; focusFirstElement(): boolean;
// eslint-disable-next-line semi
} }
export class FocusPresenterImpl implements FocusPresenter { export class FocusPresenterImpl implements FocusPresenter {

@ -69,12 +69,10 @@ export default interface FollowPresenter {
clearHints(): void; clearHints(): void;
getHint(tag: string): Hint | undefined; getHint(tag: string): Hint | undefined;
// eslint-disable-next-line semi
} }
export class FollowPresenterImpl implements FollowPresenter { export class FollowPresenterImpl implements FollowPresenter {
private hints: Hint[] private hints: Hint[];
constructor() { constructor() {
this.hints = []; this.hints = [];

@ -10,8 +10,6 @@ export default interface NavigationPresenter {
openParent(): void; openParent(): void;
openRoot(): void; openRoot(): void;
// eslint-disable-next-line semi
} }
const REL_PATTERN: {[key: string]: RegExp} = { const REL_PATTERN: {[key: string]: RegExp} = {

@ -106,8 +106,6 @@ export default interface ScrollPresenter {
scrollToBottom(smooth: boolean): void; scrollToBottom(smooth: boolean): void;
scrollToHome(smooth: boolean): void; scrollToHome(smooth: boolean): void;
scrollToEnd(smooth: boolean): void; scrollToEnd(smooth: boolean): void;
// eslint-disable-next-line semi
} }
export class ScrollPresenterImpl { export class ScrollPresenterImpl {

@ -4,8 +4,6 @@ export default interface AddonEnabledRepository {
set(on: boolean): void; set(on: boolean): void;
get(): boolean; get(): boolean;
// eslint-disable-next-line semi
} }
export class AddonEnabledRepositoryImpl implements AddonEnabledRepository { export class AddonEnabledRepositoryImpl implements AddonEnabledRepository {

@ -2,8 +2,6 @@ export default interface ClipboardRepository {
read(): string; read(): string;
write(text: string): void; write(text: string): void;
// eslint-disable-next-line semi
} }
export class ClipboardRepositoryImpl { export class ClipboardRepositoryImpl {

@ -2,8 +2,6 @@ export default interface FindRepository {
getLastKeyword(): string | null; getLastKeyword(): string | null;
setLastKeyword(keyword: string): void; setLastKeyword(keyword: string): void;
// eslint-disable-next-line semi
} }
let current: string | null = null; let current: string | null = null;

@ -6,8 +6,6 @@ export default interface FollowKeyRepository {
popKey(): void; popKey(): void;
clearKeys(): void; clearKeys(): void;
// eslint-disable-next-line semi
} }
const current: { const current: {

@ -12,8 +12,6 @@ export default interface FollowMasterRepository {
getCurrentNewTabMode(): boolean; getCurrentNewTabMode(): boolean;
getCurrentBackgroundMode(): boolean; getCurrentBackgroundMode(): boolean;
// eslint-disable-next-line semi
} }
const current: { const current: {

@ -4,8 +4,6 @@ export default interface FollowSlaveRepository {
disableFollowMode(): void; disableFollowMode(): void;
isFollowMode(): boolean; isFollowMode(): boolean;
// eslint-disable-next-line semi
} }
const current: { const current: {

@ -5,8 +5,6 @@ export default interface KeymapRepository {
enqueueKey(key: Key): KeySequence; enqueueKey(key: Key): KeySequence;
clear(): void; clear(): void;
// eslint-disable-next-line semi
} }
let current: KeySequence = KeySequence.from([]); let current: KeySequence = KeySequence.from([]);

@ -10,8 +10,6 @@ export default interface MarkKeyRepository {
enableJumpMode(): void; enableJumpMode(): void;
disabeJumpMode(): void; disabeJumpMode(): void;
// eslint-disable-next-line semi
} }
interface Mode { interface Mode {

@ -4,8 +4,6 @@ export default interface MarkRepository {
set(key: string, mark: Mark): void; set(key: string, mark: Mark): void;
get(key: string): Mark | null; get(key: string): Mark | null;
// eslint-disable-next-line semi
} }
const saved: {[key: string]: Mark} = {}; const saved: {[key: string]: Mark} = {};

@ -6,8 +6,6 @@ export default interface SettingRepository {
set(setting: Settings): void; set(setting: Settings): void;
get(): Settings; get(): Settings;
// eslint-disable-next-line semi
} }
export class SettingRepositoryImpl implements SettingRepository { export class SettingRepositoryImpl implements SettingRepository {

@ -15,7 +15,7 @@ class KeymapsForm extends React.Component<Props> {
value: FormKeymaps.valueOf({}), value: FormKeymaps.valueOf({}),
onChange: () => {}, onChange: () => {},
onBlur: () => {}, onBlur: () => {},
} };
render() { render() {
let values = this.props.value.toJSON(); let values = this.props.value.toJSON();

@ -15,7 +15,7 @@ class SearchForm extends React.Component<Props> {
value: FormSearch.valueOf({ default: '', engines: []}), value: FormSearch.valueOf({ default: '', engines: []}),
onChange: () => {}, onChange: () => {},
onBlur: () => {}, onBlur: () => {},
} };
render() { render() {
let value = this.props.value.toJSON(); let value = this.props.value.toJSON();

@ -19,7 +19,6 @@ export default interface Settings {
search: Search; search: Search;
properties: Properties; properties: Properties;
blacklist: string[]; blacklist: string[];
// eslint-disable-next-line semi
} }
const DefaultProperties: Properties = PropertyDefs.defs.reduce( const DefaultProperties: Properties = PropertyDefs.defs.reduce(