diff options
-rw-r--r-- | src/components/auth/Invite.tsx | 2 | ||||
-rw-r--r-- | src/components/auth/Locked.tsx | 2 | ||||
-rw-r--r-- | src/components/auth/Login.tsx | 2 | ||||
-rw-r--r-- | src/components/auth/Password.tsx | 2 | ||||
-rw-r--r-- | src/components/auth/Signup.tsx | 2 | ||||
-rw-r--r-- | src/components/settings/services/EditServiceForm.tsx | 3 | ||||
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.tsx | 3 | ||||
-rw-r--r-- | src/components/settings/user/EditUserForm.tsx | 2 | ||||
-rw-r--r-- | src/components/ui/input/index.tsx | 2 | ||||
-rw-r--r-- | src/components/ui/select/index.tsx | 2 | ||||
-rw-r--r-- | src/components/ui/textarea/index.tsx | 7 | ||||
-rw-r--r-- | src/features/workspaces/components/EditWorkspaceForm.tsx | 3 | ||||
-rw-r--r-- | src/webview/recipe.ts | 4 |
13 files changed, 20 insertions, 16 deletions
diff --git a/src/components/auth/Invite.tsx b/src/components/auth/Invite.tsx index 7723ea1ac..4ab5157a8 100644 --- a/src/components/auth/Invite.tsx +++ b/src/components/auth/Invite.tsx | |||
@@ -117,7 +117,7 @@ class Invite extends Component<IProps, IState> { | |||
117 | 117 | ||
118 | this.setState({ showSuccessInfo: true }); | 118 | this.setState({ showSuccessInfo: true }); |
119 | }, | 119 | }, |
120 | onError: () => {}, | 120 | onError: noop, |
121 | }); | 121 | }); |
122 | } | 122 | } |
123 | 123 | ||
diff --git a/src/components/auth/Locked.tsx b/src/components/auth/Locked.tsx index 8b4e26878..00ff5a4c5 100644 --- a/src/components/auth/Locked.tsx +++ b/src/components/auth/Locked.tsx | |||
@@ -72,7 +72,7 @@ class Locked extends Component<IProps> { | |||
72 | onSuccess: form => { | 72 | onSuccess: form => { |
73 | this.props.onSubmit(form.values()); | 73 | this.props.onSubmit(form.values()); |
74 | }, | 74 | }, |
75 | onError: () => {}, | 75 | onError: noop, |
76 | }); | 76 | }); |
77 | } | 77 | } |
78 | 78 | ||
diff --git a/src/components/auth/Login.tsx b/src/components/auth/Login.tsx index 185a6ad48..0a95b0565 100644 --- a/src/components/auth/Login.tsx +++ b/src/components/auth/Login.tsx | |||
@@ -103,7 +103,7 @@ class Login extends Component<IProps> { | |||
103 | onSuccess: form => { | 103 | onSuccess: form => { |
104 | this.props.onSubmit(form.values()); | 104 | this.props.onSubmit(form.values()); |
105 | }, | 105 | }, |
106 | onError: () => {}, | 106 | onError: noop, |
107 | }); | 107 | }); |
108 | } | 108 | } |
109 | 109 | ||
diff --git a/src/components/auth/Password.tsx b/src/components/auth/Password.tsx index 53fdbf842..03adc3859 100644 --- a/src/components/auth/Password.tsx +++ b/src/components/auth/Password.tsx | |||
@@ -71,7 +71,7 @@ class Password extends Component<IProps> { | |||
71 | onSuccess: form => { | 71 | onSuccess: form => { |
72 | this.props.onSubmit(form.values()); | 72 | this.props.onSubmit(form.values()); |
73 | }, | 73 | }, |
74 | onError: () => {}, | 74 | onError: noop, |
75 | }); | 75 | }); |
76 | } | 76 | } |
77 | 77 | ||
diff --git a/src/components/auth/Signup.tsx b/src/components/auth/Signup.tsx index af14430aa..fb2a2360e 100644 --- a/src/components/auth/Signup.tsx +++ b/src/components/auth/Signup.tsx | |||
@@ -114,7 +114,7 @@ class Signup extends Component<IProps> { | |||
114 | onSuccess: form => { | 114 | onSuccess: form => { |
115 | this.props.onSubmit(form.values()); | 115 | this.props.onSubmit(form.values()); |
116 | }, | 116 | }, |
117 | onError: () => {}, | 117 | onError: noop, |
118 | }); | 118 | }); |
119 | } | 119 | } |
120 | 120 | ||
diff --git a/src/components/settings/services/EditServiceForm.tsx b/src/components/settings/services/EditServiceForm.tsx index 7104b1344..2b87dff1e 100644 --- a/src/components/settings/services/EditServiceForm.tsx +++ b/src/components/settings/services/EditServiceForm.tsx | |||
@@ -4,6 +4,7 @@ import { Link } from 'react-router-dom'; | |||
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; |
5 | import normalizeUrl from 'normalize-url'; | 5 | import normalizeUrl from 'normalize-url'; |
6 | import { mdiInformation } from '@mdi/js'; | 6 | import { mdiInformation } from '@mdi/js'; |
7 | import { noop } from 'lodash'; | ||
7 | import Form from '../../../lib/Form'; | 8 | import Form from '../../../lib/Form'; |
8 | import Tabs from '../../ui/Tabs/Tabs'; | 9 | import Tabs from '../../ui/Tabs/Tabs'; |
9 | import TabItem from '../../ui/Tabs/TabItem'; | 10 | import TabItem from '../../ui/Tabs/TabItem'; |
@@ -213,7 +214,7 @@ class EditServiceForm extends Component<IProps, IState> { | |||
213 | 214 | ||
214 | this.setState({ isValidatingCustomUrl: false }); | 215 | this.setState({ isValidatingCustomUrl: false }); |
215 | }, | 216 | }, |
216 | onError: () => {}, | 217 | onError: noop, |
217 | }); | 218 | }); |
218 | } | 219 | } |
219 | 220 | ||
diff --git a/src/components/settings/settings/EditSettingsForm.tsx b/src/components/settings/settings/EditSettingsForm.tsx index c8e7e2c45..49798dd92 100644 --- a/src/components/settings/settings/EditSettingsForm.tsx +++ b/src/components/settings/settings/EditSettingsForm.tsx | |||
@@ -4,6 +4,7 @@ import { observer } from 'mobx-react'; | |||
4 | import prettyBytes from 'pretty-bytes'; | 4 | import prettyBytes from 'pretty-bytes'; |
5 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 5 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; |
6 | import { mdiGithub, mdiOpenInNew, mdiPowerPlug } from '@mdi/js'; | 6 | import { mdiGithub, mdiOpenInNew, mdiPowerPlug } from '@mdi/js'; |
7 | import { noop } from 'lodash'; | ||
7 | import Form from '../../../lib/Form'; | 8 | import Form from '../../../lib/Form'; |
8 | import Button from '../../ui/button'; | 9 | import Button from '../../ui/button'; |
9 | import Toggle from '../../ui/toggle'; | 10 | import Toggle from '../../ui/toggle'; |
@@ -343,7 +344,7 @@ class EditSettingsForm extends Component<IProps, IState> { | |||
343 | } | 344 | } |
344 | this.props.onSubmit(values); | 345 | this.props.onSubmit(values); |
345 | }, | 346 | }, |
346 | onError: () => {}, | 347 | onError: noop, |
347 | }); | 348 | }); |
348 | } | 349 | } |
349 | 350 | ||
diff --git a/src/components/settings/user/EditUserForm.tsx b/src/components/settings/user/EditUserForm.tsx index 3b604a79f..5a2a5a83e 100644 --- a/src/components/settings/user/EditUserForm.tsx +++ b/src/components/settings/user/EditUserForm.tsx | |||
@@ -53,7 +53,7 @@ class EditUserForm extends Component<IProps> { | |||
53 | const values = form.values(); | 53 | const values = form.values(); |
54 | this.props.onSubmit(values); | 54 | this.props.onSubmit(values); |
55 | }, | 55 | }, |
56 | onError: () => {}, | 56 | onError: noop, |
57 | }); | 57 | }); |
58 | } | 58 | } |
59 | 59 | ||
diff --git a/src/components/ui/input/index.tsx b/src/components/ui/input/index.tsx index a6d401195..fe8f35607 100644 --- a/src/components/ui/input/index.tsx +++ b/src/components/ui/input/index.tsx | |||
@@ -42,7 +42,7 @@ interface IProps | |||
42 | showPasswordToggle?: boolean; | 42 | showPasswordToggle?: boolean; |
43 | data?: IData; | 43 | data?: IData; |
44 | inputClassName?: string; | 44 | inputClassName?: string; |
45 | onEnterKey?: () => {}; | 45 | onEnterKey?: () => void; |
46 | } | 46 | } |
47 | 47 | ||
48 | interface IState { | 48 | interface IState { |
diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx index b22c15320..31aa8a15f 100644 --- a/src/components/ui/select/index.tsx +++ b/src/components/ui/select/index.tsx | |||
@@ -386,7 +386,7 @@ class SelectComponent extends Component<IProps, IState> { | |||
386 | this.setState((state: IState) => ({ | 386 | this.setState((state: IState) => ({ |
387 | open: !state.open, | 387 | open: !state.open, |
388 | })) | 388 | })) |
389 | : () => {} | 389 | : noop |
390 | } | 390 | } |
391 | > | 391 | > |
392 | {selection} | 392 | {selection} |
diff --git a/src/components/ui/textarea/index.tsx b/src/components/ui/textarea/index.tsx index d4ea424be..89e85ac11 100644 --- a/src/components/ui/textarea/index.tsx +++ b/src/components/ui/textarea/index.tsx | |||
@@ -2,6 +2,7 @@ import classnames from 'classnames'; | |||
2 | import { Component, createRef, TextareaHTMLAttributes } from 'react'; | 2 | import { Component, createRef, TextareaHTMLAttributes } from 'react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 3 | import injectSheet, { WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { noop } from 'lodash'; | ||
5 | import { IFormField } from '../typings/generic'; | 6 | import { IFormField } from '../typings/generic'; |
6 | 7 | ||
7 | import Error from '../error'; | 8 | import Error from '../error'; |
@@ -24,9 +25,9 @@ interface IProps | |||
24 | 25 | ||
25 | class TextareaComponent extends Component<IProps> { | 26 | class TextareaComponent extends Component<IProps> { |
26 | static defaultProps = { | 27 | static defaultProps = { |
27 | onChange: () => {}, | 28 | onChange: noop, |
28 | onBlur: () => {}, | 29 | onBlur: noop, |
29 | onFocus: () => {}, | 30 | onFocus: noop, |
30 | showLabel: true, | 31 | showLabel: true, |
31 | disabled: false, | 32 | disabled: false, |
32 | rows: 5, | 33 | rows: 5, |
diff --git a/src/features/workspaces/components/EditWorkspaceForm.tsx b/src/features/workspaces/components/EditWorkspaceForm.tsx index a860ac2e8..d902d29be 100644 --- a/src/features/workspaces/components/EditWorkspaceForm.tsx +++ b/src/features/workspaces/components/EditWorkspaceForm.tsx | |||
@@ -3,6 +3,7 @@ import { observer } from 'mobx-react'; | |||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; |
4 | import { Link } from 'react-router-dom'; | 4 | import { Link } from 'react-router-dom'; |
5 | import withStyles, { WithStylesProps } from 'react-jss'; | 5 | import withStyles, { WithStylesProps } from 'react-jss'; |
6 | import { noop } from 'lodash'; | ||
6 | import Infobox from '../../../components/ui/infobox/index'; | 7 | import Infobox from '../../../components/ui/infobox/index'; |
7 | import Input from '../../../components/ui/input'; | 8 | import Input from '../../../components/ui/input'; |
8 | import Button from '../../../components/ui/button'; | 9 | import Button from '../../../components/ui/button'; |
@@ -127,7 +128,7 @@ class EditWorkspaceForm extends Component<IProps> { | |||
127 | const values = f.values(); | 128 | const values = f.values(); |
128 | onSave(values); | 129 | onSave(values); |
129 | }, | 130 | }, |
130 | onError: async () => {}, | 131 | onError: noop, |
131 | }); | 132 | }); |
132 | } | 133 | } |
133 | 134 | ||
diff --git a/src/webview/recipe.ts b/src/webview/recipe.ts index b3a4a6b56..dc3f39401 100644 --- a/src/webview/recipe.ts +++ b/src/webview/recipe.ts | |||
@@ -1,11 +1,11 @@ | |||
1 | /* eslint-disable global-require */ | 1 | /* eslint-disable global-require */ |
2 | /* eslint-disable import/no-dynamic-require */ | 2 | /* eslint-disable import/no-dynamic-require */ |
3 | /* eslint-disable import/first */ | 3 | /* eslint-disable import/first */ |
4 | import { noop, debounce } from 'lodash'; | ||
4 | import { contextBridge, ipcRenderer } from 'electron'; | 5 | import { contextBridge, ipcRenderer } from 'electron'; |
5 | import { join } from 'path'; | 6 | import { join } from 'path'; |
6 | import { autorun, computed, makeObservable, observable } from 'mobx'; | 7 | import { autorun, computed, makeObservable, observable } from 'mobx'; |
7 | import { pathExistsSync, readFileSync } from 'fs-extra'; | 8 | import { pathExistsSync, readFileSync } from 'fs-extra'; |
8 | import { debounce } from 'lodash'; | ||
9 | import { | 9 | import { |
10 | disable as disableDarkMode, | 10 | disable as disableDarkMode, |
11 | enable as enableDarkMode, | 11 | enable as enableDarkMode, |
@@ -53,7 +53,7 @@ import Service from '../models/Service'; | |||
53 | // As the message API is not actually needed, we'll add this shim sendMessage | 53 | // As the message API is not actually needed, we'll add this shim sendMessage |
54 | // function in order for darkreader to continue working | 54 | // function in order for darkreader to continue working |
55 | // @ts-ignore | 55 | // @ts-ignore |
56 | window.chrome.runtime.sendMessage = () => {}; | 56 | window.chrome.runtime.sendMessage = noop; |
57 | 57 | ||
58 | const debug = require('../preload-safe-debug')('Ferdium:Plugin'); | 58 | const debug = require('../preload-safe-debug')('Ferdium:Plugin'); |
59 | 59 | ||