From 40b806f7f52600c6282b6836dcfa5d584b088ee8 Mon Sep 17 00:00:00 2001 From: Frederick Engelhardt Date: Fri, 30 Apr 2021 21:03:59 -0700 Subject: [PATCH] fix flow issues (wish it was typescript) --- .../has-valid-accessibility-ignores-invert-colors.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/rules/has-valid-accessibility-ignores-invert-colors.js b/src/rules/has-valid-accessibility-ignores-invert-colors.js index f172b04..0c69392 100644 --- a/src/rules/has-valid-accessibility-ignores-invert-colors.js +++ b/src/rules/has-valid-accessibility-ignores-invert-colors.js @@ -32,11 +32,16 @@ const checkParent = ({ openingElement, parent }) => { return true; }; +type VerifyRNImageRes = { + enableLinting: boolean, + elementsToCheck: string[], +}; + /** * @description varifies that the Image asset is imported from 'react-native' otherwise exits linting */ -const verifyReactNativeImage = (text: string): boolean => { - const res = { +const verifyReactNativeImage = (text: string): VerifyRNImageRes => { + const res: VerifyRNImageRes = { enableLinting: true, elementsToCheck: defaultInvertableComponents, };