From 6ca5cf34fd1d91caab2b023546687418677bf25d Mon Sep 17 00:00:00 2001 From: Tim Brayshaw Date: Wed, 11 Sep 2019 12:59:20 +0100 Subject: [PATCH 1/2] Ignore some typescript lint warnings. --- src/hoc/component.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/hoc/component.tsx b/src/hoc/component.tsx index 7643cd0..e58625e 100644 --- a/src/hoc/component.tsx +++ b/src/hoc/component.tsx @@ -45,7 +45,9 @@ interface RequiredFromOriginalComponentProps { disabled: boolean; id: string; label: React.ReactNode; + /* eslint-disable @typescript-eslint/no-explicit-any */ componentRef: React.RefObject; + /* eslint-enable @typescript-eslint/no-explicit-any */ } /** @@ -60,6 +62,7 @@ interface RequiredFromOriginalComponentProps { * the form, while retaining the ability to override the prop on a per-component * basis. */ +// eslint-disable-next-line @typescript-eslint/explicit-function-return-type const withFRC = ( Component: | React.ComponentClass From 00696d65e5eb4e7056f0dc4a9fb370d609d78771 Mon Sep 17 00:00:00 2001 From: Tim Brayshaw Date: Wed, 11 Sep 2019 13:00:54 +0100 Subject: [PATCH 2/2] Fix eslint issues. --- src/components/checkbox-group.tsx | 6 ++++-- src/components/select.tsx | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/checkbox-group.tsx b/src/components/checkbox-group.tsx index 9258347..bf9c222 100644 --- a/src/components/checkbox-group.tsx +++ b/src/components/checkbox-group.tsx @@ -72,7 +72,7 @@ class CheckboxGroup extends React.Component { }`; const controls = [] as JSX.Element[]; - for(let i = 0; i < options.length; i++) { + for (let i = 0; i < options.length; i++) { const checkbox = options[i]; const checked = value.indexOf(checkbox.value) !== -1; const isDisabled = checkbox.disabled || disabled; @@ -97,7 +97,9 @@ class CheckboxGroup extends React.Component { - {isLast && showErrors ? : null} + {isLast && showErrors ? ( + + ) : null} ); controls.push(control); diff --git a/src/components/select.tsx b/src/components/select.tsx index 65bf1fb..9c84190 100644 --- a/src/components/select.tsx +++ b/src/components/select.tsx @@ -67,7 +67,9 @@ class Select extends React.Component { const control = (