diff options
| author | Haishan <[email protected]> | 2020-11-13 23:03:41 +0800 |
|---|---|---|
| committer | Haishan <[email protected]> | 2020-11-13 23:03:41 +0800 |
| commit | 3bbca8017b5de78ce982efd6d2889262bff2d7d1 (patch) | |
| tree | 19550d8ef68bca2b36a92b1c6e677bd4e6418a55 /src/components | |
| parent | 837cca81317fe7158bc1be2d07949e64d07a0293 (diff) | |
chore: remove husky and lint-staged
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/ContentHeader.tsx | 3 | ||||
| -rw-r--r-- | src/components/ErrorBoundary.tsx | 2 | ||||
| -rw-r--r-- | src/components/Field.tsx | 10 | ||||
| -rw-r--r-- | src/components/Icon.tsx | 8 | ||||
| -rw-r--r-- | src/components/Input.tsx | 11 | ||||
| -rw-r--r-- | src/components/Loading.tsx | 3 | ||||
| -rw-r--r-- | src/components/Logs.tsx | 8 | ||||
| -rw-r--r-- | src/components/Modal.tsx | 19 | ||||
| -rw-r--r-- | src/components/Rule.tsx | 9 | ||||
| -rw-r--r-- | src/components/Selection.tsx | 15 | ||||
| -rw-r--r-- | src/components/SvgGithub.tsx | 5 | ||||
| -rw-r--r-- | src/components/ToggleSwitch.tsx | 9 | ||||
| -rw-r--r-- | src/components/rules/RuleProviderItem.tsx | 1 | ||||
| -rw-r--r-- | src/components/shared/Fab.ts | 2 |
14 files changed, 55 insertions, 50 deletions
diff --git a/src/components/ContentHeader.tsx b/src/components/ContentHeader.tsx index 148a071..f786240 100644 --- a/src/components/ContentHeader.tsx +++ b/src/components/ContentHeader.tsx @@ -1,10 +1,9 @@ - import React from 'react'; import s0 from './ContentHeader.module.css'; type Props = { - title: string; + title: string; }; function ContentHeader({ title }: Props) { diff --git a/src/components/ErrorBoundary.tsx b/src/components/ErrorBoundary.tsx index 38d90e2..f95c581 100644 --- a/src/components/ErrorBoundary.tsx +++ b/src/components/ErrorBoundary.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; // import { getSentry } from '../misc/sentry'; -import { deriveMessageFromError,Err } from '../misc/errors'; +import { deriveMessageFromError, Err } from '../misc/errors'; import ErrorBoundaryFallback from './ErrorBoundaryFallback'; type Props = { diff --git a/src/components/Field.tsx b/src/components/Field.tsx index 8e2f7e3..c0b3ae5 100644 --- a/src/components/Field.tsx +++ b/src/components/Field.tsx @@ -6,11 +6,11 @@ import s from './Field.module.css'; const { useCallback } = React; type Props = { - value?: string | number; - type?: 'text' | 'number'; - onChange?: (...args: any[]) => any; - id?: string; - label?: string; + value?: string | number; + type?: 'text' | 'number'; + onChange?: (...args: any[]) => any; + id?: string; + label?: string; }; export default function Field({ id, label, value, onChange, ...props }: Props) { diff --git a/src/components/Icon.tsx b/src/components/Icon.tsx index 9922e58..5085b3a 100644 --- a/src/components/Icon.tsx +++ b/src/components/Icon.tsx @@ -2,10 +2,10 @@ import cx from 'clsx'; import React from 'react'; type Props = { - id: string; - width?: number; - height?: number; - className?: string; + id: string; + width?: number; + height?: number; + className?: string; }; const Icon = ({ id, width = 20, height = 20, className, ...props }: Props) => { diff --git a/src/components/Input.tsx b/src/components/Input.tsx index 8a8c65a..a6c44bd 100644 --- a/src/components/Input.tsx +++ b/src/components/Input.tsx @@ -1,4 +1,3 @@ - import React from 'react'; import s0 from './Input.module.css'; @@ -6,11 +5,11 @@ import s0 from './Input.module.css'; const { useState, useRef, useEffect, useCallback } = React; type InputProps = { - value?: string | number; - type?: string; - onChange?: (...args: any[]) => any; - name?: string; - placeholder?: string; + value?: string | number; + type?: string; + onChange?: (...args: any[]) => any; + name?: string; + placeholder?: string; }; export default function Input(props: InputProps) { diff --git a/src/components/Loading.tsx b/src/components/Loading.tsx index 7f83416..2db01da 100644 --- a/src/components/Loading.tsx +++ b/src/components/Loading.tsx @@ -1,10 +1,9 @@ - import React from 'react'; import s0 from './Loading.module.css'; type Props = { - height?: string; + height?: string; }; const Loading = ({ height }: Props) => { diff --git a/src/components/Logs.tsx b/src/components/Logs.tsx index d563e77..5bc1f5d 100644 --- a/src/components/Logs.tsx +++ b/src/components/Logs.tsx @@ -26,10 +26,10 @@ const colors = { }; type LogLineProps = { - time?: string; - even?: boolean; - payload?: string; - type?: string; + time?: string; + even?: boolean; + payload?: string; + type?: string; }; function LogLine({ time, even, payload, type }: LogLineProps) { diff --git a/src/components/Modal.tsx b/src/components/Modal.tsx index 885b350..cb5fea3 100644 --- a/src/components/Modal.tsx +++ b/src/components/Modal.tsx @@ -5,14 +5,21 @@ import Modal from 'react-modal'; import s0 from './Modal.module.css'; type Props = { - isOpen: boolean; - onRequestClose: (...args: any[]) => any; - children: React.ReactNode; - className?: string; - overlayClassName?: string; + isOpen: boolean; + onRequestClose: (...args: any[]) => any; + children: React.ReactNode; + className?: string; + overlayClassName?: string; }; -function ModalAPIConfig({ isOpen, onRequestClose, className, overlayClassName, children, ...otherProps }: Props) { +function ModalAPIConfig({ + isOpen, + onRequestClose, + className, + overlayClassName, + children, + ...otherProps +}: Props) { const contentCls = cx(className, s0.content); const overlayCls = cx(overlayClassName, s0.overlay); return ( diff --git a/src/components/Rule.tsx b/src/components/Rule.tsx index cf5339d..0960660 100644 --- a/src/components/Rule.tsx +++ b/src/components/Rule.tsx @@ -1,4 +1,3 @@ - import React from 'react'; import s0 from './Rule.module.css'; @@ -18,10 +17,10 @@ function getStyleFor({ proxy }) { } type Props = { - id?: number; - type?: string; - payload?: string; - proxy?: string; + id?: number; + type?: string; + payload?: string; + proxy?: string; }; function Rule({ type, payload, proxy, id }: Props) { diff --git a/src/components/Selection.tsx b/src/components/Selection.tsx index 9bcb4c8..92360c7 100644 --- a/src/components/Selection.tsx +++ b/src/components/Selection.tsx @@ -4,13 +4,18 @@ import React from 'react'; import s from './Selection.module.css'; type SelectionProps = { - OptionComponent?: (...args: any[]) => any; - optionPropsList?: any[]; - selectedIndex?: number; - onChange?: (...args: any[]) => any; + OptionComponent?: (...args: any[]) => any; + optionPropsList?: any[]; + selectedIndex?: number; + onChange?: (...args: any[]) => any; }; -export default function Selection({ OptionComponent, optionPropsList, selectedIndex, onChange, }: SelectionProps) { +export default function Selection({ + OptionComponent, + optionPropsList, + selectedIndex, + onChange, +}: SelectionProps) { return ( <div className={s.root}> {optionPropsList.map((props, idx) => { diff --git a/src/components/SvgGithub.tsx b/src/components/SvgGithub.tsx index b400b55..45828c2 100644 --- a/src/components/SvgGithub.tsx +++ b/src/components/SvgGithub.tsx @@ -1,9 +1,8 @@ - import React from 'react'; type Props = { - width?: number; - height?: number; + width?: number; + height?: number; }; export default function SvgGithub({ width = 24, height = 24 }: Props = {}) { diff --git a/src/components/ToggleSwitch.tsx b/src/components/ToggleSwitch.tsx index 62f3418..a7d8947 100644 --- a/src/components/ToggleSwitch.tsx +++ b/src/components/ToggleSwitch.tsx @@ -1,13 +1,12 @@ - import React, { useCallback, useMemo } from 'react'; import s0 from './ToggleSwitch.module.css'; type Props = { - options?: any[]; - value?: string; - name?: string; - onChange?: (...args: any[]) => any; + options?: any[]; + value?: string; + name?: string; + onChange?: (...args: any[]) => any; }; function ToggleSwitch({ options, value, name, onChange }: Props) { diff --git a/src/components/rules/RuleProviderItem.tsx b/src/components/rules/RuleProviderItem.tsx index 3b6d93d..8cd17d2 100644 --- a/src/components/rules/RuleProviderItem.tsx +++ b/src/components/rules/RuleProviderItem.tsx @@ -68,4 +68,3 @@ export function RuleProviderItem({ </div> ); } - diff --git a/src/components/shared/Fab.ts b/src/components/shared/Fab.ts index 86405f0..4e2e800 100644 --- a/src/components/shared/Fab.ts +++ b/src/components/shared/Fab.ts @@ -1,6 +1,6 @@ import './rtf.css'; -import { Action,Fab } from 'react-tiny-fab'; +import { Action, Fab } from 'react-tiny-fab'; export const position = { right: 10, |
