diff --git a/packages/react-d3-plugin/rollup.config.mjs b/packages/react-d3-plugin/rollup.config.mjs index 44dbeb9c2..c79d847cf 100644 --- a/packages/react-d3-plugin/rollup.config.mjs +++ b/packages/react-d3-plugin/rollup.config.mjs @@ -125,7 +125,12 @@ export default [ { input: './dist/types/react-d3-plugin/lib/index.d.ts', output: [{ file: `dist/${name}.d.ts`, format: 'es' }], - external: [...defaultExternals, '@junipero/core', '@junipero/hooks', '@junipero/react'], + external: [ + ...defaultExternals, + '@junipero/core', + '@junipero/hooks', + '@junipero/react', + ], plugins: [ diff --git a/packages/react/lib/Alerts/index.tsx b/packages/react/lib/Alerts/index.tsx index dfdad0683..91bc32281 100644 --- a/packages/react/lib/Alerts/index.tsx +++ b/packages/react/lib/Alerts/index.tsx @@ -19,7 +19,12 @@ export declare type AlertsRef = { innerRef: MutableRefObject; }; -declare type AlertsTypes = 'danger' | 'default' | 'primary'| 'success' | 'warning'; +declare type AlertsTypes = + 'danger' | + 'default' | + 'primary'| + 'success' | + 'warning'; export declare interface AlertsProps extends ComponentPropsWithRef { animationTimeout?: number; @@ -71,7 +76,9 @@ const Alerts = forwardRef(({ index={alert.id ?? index} animate={alert.animate ?? animateAlert} animationTimeout={alert.animationTimeout ?? animationTimeout} - icon={alert.icon ?? icons?.[alert.type as AlertsTypes] ?? icons?.default} + icon={ + alert.icon ?? icons?.[alert.type as AlertsTypes] ?? icons?.default + } lifespan={alert.duration ?? alert.lifespan} onDismiss={onDismiss.bind(null, alert)} className={alert.type} diff --git a/packages/react/lib/AlertsControl/index.test.tsx b/packages/react/lib/AlertsControl/index.test.tsx index f610f3dbf..5d0d57e45 100644 --- a/packages/react/lib/AlertsControl/index.test.tsx +++ b/packages/react/lib/AlertsControl/index.test.tsx @@ -1,8 +1,8 @@ import { renderHook, act } from '@testing-library/react'; +import { ReactNode } from 'react'; import { useAlerts } from '../hooks'; import AlertsControl from '.'; -import { ReactNode } from 'react'; describe('useAlerts()', () => { it('should render hook', () => { diff --git a/packages/react/lib/Droppable/index.tsx b/packages/react/lib/Droppable/index.tsx index 4ac7a8ffe..c4cbdbdc1 100644 --- a/packages/react/lib/Droppable/index.tsx +++ b/packages/react/lib/Droppable/index.tsx @@ -12,6 +12,7 @@ import { classNames } from '@junipero/core'; import PropTypes from 'prop-types'; import { ForwardedProps } from '../utils'; + export declare type DraggingPositionType = 'before' | 'after'; export declare interface DroppableProps extends ComponentPropsWithRef { className?: string; @@ -22,18 +23,19 @@ export declare interface DroppableProps extends ComponentPropsWithRef { onDragLeave?(e: DragEvent): void; } -const Droppable = forwardRef(({ - className, - children, - disabled = false, - onDrop, - onDragOver, - onDragLeave, - ...rest -}: DroppableProps, ref) => { +const Droppable = forwardRef((props: DroppableProps, ref) => { const [dragging, setDragging] = useState(false); const [stack, setStack] = useState(0); const [draggingPos, setDraggingPos] = useState(null); + const { + className, + children, + disabled = false, + onDrop, + onDragOver, + onDragLeave, + ...rest + } = props; useEffect(() => { if (stack <= 0) { @@ -115,7 +117,7 @@ const Droppable = forwardRef(({ onDrop: onDrop_, onDragOver: onDragOver_, }); -}); // TODO find a way to put ForwardedProps back +}) as ForwardedProps; Droppable.displayName = 'Droppable'; Droppable.propTypes = { diff --git a/packages/react/lib/RadioField/index.tsx b/packages/react/lib/RadioField/index.tsx index edb5008a6..c436396e1 100644 --- a/packages/react/lib/RadioField/index.tsx +++ b/packages/react/lib/RadioField/index.tsx @@ -100,7 +100,9 @@ const RadioField = forwardRef(({ valid: state.valid, })); - const isChecked = (option: any) => parseValue(option) === parseValue(state.value); + const isChecked = ( + option: any + ) => parseValue(option) === parseValue(state.value); const onChange_ = (option: any) => { if (disabled || option.disabled) { diff --git a/packages/react/lib/TextField/index.tsx b/packages/react/lib/TextField/index.tsx index 61b94449e..516755df4 100644 --- a/packages/react/lib/TextField/index.tsx +++ b/packages/react/lib/TextField/index.tsx @@ -17,7 +17,12 @@ import PropTypes from 'prop-types'; import { useFieldControl } from '../hooks'; import { MockState } from '../utils'; -export declare type TextFieldChangeEvent = { value: string | number; valid: boolean; dirty: boolean } + +export declare type TextFieldChangeEvent = { + value: string | number; + valid: boolean; + dirty: boolean +} export declare type TextFieldRef = { dirty: boolean; focused: boolean; @@ -127,7 +132,9 @@ const TextField = forwardRef(({ return !isNaN(parsedValue) ? parsedValue : value_; }; - const onChange_ = (e: ChangeEvent) => { + const onChange_ = ( + e: ChangeEvent + ) => { /* html input disabled attribute will prevent onChange if present anyway */ /* istanbul ignore next: just in case */ if (disabled) {