diff --git a/.eslintrc.js b/.eslintrc.js index 3c144064eb62..b5b4add538f6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,7 +24,7 @@ const restrictedImportPatterns = [ ]; module.exports = { - extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended', 'prettier', 'plugin:react-native-a11y/basic'], + extends: ['expensify', 'plugin:storybook/recommended', 'plugin:react-hooks/recommended', 'plugin:react-native-a11y/basic', 'prettier'], plugins: ['react-hooks', 'react-native-a11y'], parser: 'babel-eslint', ignorePatterns: ['!.*', 'src/vendor', '.github/actions/**/index.js', 'desktop/dist/*.js', 'dist/*.js', 'node_modules/.bin/**', 'node_modules/.cache/**', '.git/**'], @@ -46,7 +46,6 @@ module.exports = { touchables: ['PressableWithoutFeedback', 'PressableWithFeedback'], }, ], - curly: 'error', }, }, { @@ -76,6 +75,7 @@ module.exports = { patterns: restrictedImportPatterns, }, ], + curly: 'error', }, }, { @@ -162,6 +162,7 @@ module.exports = { patterns: restrictedImportPatterns, }, ], + curly: 'error', }, }, { diff --git a/src/components/MapView/MapView.tsx b/src/components/MapView/MapView.tsx index 7a2248ffafb9..d9f51e111a43 100644 --- a/src/components/MapView/MapView.tsx +++ b/src/components/MapView/MapView.tsx @@ -54,7 +54,9 @@ const MapView = forwardRef(({accessToken, style, ma }, [accessToken]); const setMapIdle = (e: MapState) => { - if (e.gestures.isGestureActive) return; + if (e.gestures.isGestureActive) { + return; + } setIsIdle(true); if (onMapReady) { onMapReady(); diff --git a/src/libs/Growl.ts b/src/libs/Growl.ts index 99c728f0a210..33d7311973cb 100644 --- a/src/libs/Growl.ts +++ b/src/libs/Growl.ts @@ -12,7 +12,9 @@ const isReadyPromise = new Promise((resolve) => { }); function setIsReady() { - if (!resolveIsReadyPromise) return; + if (!resolveIsReadyPromise) { + return; + } resolveIsReadyPromise(); } @@ -21,7 +23,9 @@ function setIsReady() { */ function show(bodyText: string, type: string, duration: number = CONST.GROWL.DURATION) { isReadyPromise.then(() => { - if (!growlRef?.current?.show) return; + if (!growlRef?.current?.show) { + return; + } growlRef.current.show(bodyText, type, duration); }); } diff --git a/src/libs/isInputAutoFilled.ts b/src/libs/isInputAutoFilled.ts index 0abe634001e4..e1b9942b0e78 100644 --- a/src/libs/isInputAutoFilled.ts +++ b/src/libs/isInputAutoFilled.ts @@ -4,7 +4,9 @@ import isSelectorSupported from './isSelectorSupported'; * Check the input is auto filled or not */ export default function isInputAutoFilled(input: Element): boolean { - if (!input?.matches) return false; + if (!input?.matches) { + return false; + } if (isSelectorSupported(':autofill')) { return input.matches(':-webkit-autofill') || input.matches(':autofill'); } diff --git a/src/libs/requireParameters.ts b/src/libs/requireParameters.ts index 098a6d114430..ebeb55e254e0 100644 --- a/src/libs/requireParameters.ts +++ b/src/libs/requireParameters.ts @@ -14,7 +14,9 @@ export default function requireParameters(parameterNames: string[], parameters: const propertiesToRedact = ['authToken', 'password', 'partnerUserSecret', 'twoFactorAuthCode']; const parametersCopy = {...parameters}; Object.keys(parametersCopy).forEach((key) => { - if (!propertiesToRedact.includes(key.toString())) return; + if (!propertiesToRedact.includes(key.toString())) { + return; + } parametersCopy[key] = ''; });