buckaroo-it / Magento2_Hyva

This repository contains the additional module to support Hyvä React Checkout
3 stars 0 forks source link

npm run build fails to compile because of eslint errors #12

Closed ennostuurman closed 1 year ago

ennostuurman commented 1 year ago

Hyva React checkout 1.1.2

npm run build fails because of eslint errors.


 npm --prefix app/code/Hyva/CheckoutExample/reactapp run build

> build
> react-app-rewired build

Creating an optimized production build...
Failed to compile.

[eslint] 
src/paymentMethods/buckaroo/src/lib/helpers/PartialPayments/PartialPayment.js
  Line 26:6:  React Hook useEffect has missing dependencies: 'appDispatch', 'cart', and 'setCartInfo'. Either include them or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/lib/hooks/useOnSubmit.js
  Line 22:6:  React Hook useCallback has a missing dependency: 'dispatch'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Afterpay/Afterpay.jsx
  Line 104:5:  React Hook useCallback has missing dependencies: 'cart.billing_address.fullName', 'selected.code', 'submitForm', and 'validateForm'. Either include them or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Applepay/Applepay.jsx
  Line 51:6:  React Hook useEffect has a missing dependency: 'config.guid'. Either include it or remove the dependency array      react-hooks/exhaustive-deps
  Line 73:6:  React Hook useEffect has a missing dependency: 'captureFunds'. Either include it or remove the dependency array     react-hooks/exhaustive-deps
  Line 81:6:  React Hook useCallback has a missing dependency: 'selected.code'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Bancontact/Bancontact.jsx
  Line 82:5:  React Hook useCallback has missing dependencies: 'selected.code', 'submitForm', and 'validateForm'. Either include them or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Creditcard/Creditcard.jsx
  Line 87:5:  React Hook useCallback has missing dependencies: 'selected.code', 'submitForm', and 'validateForm'. Either include them or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Creditcards/Creditcards.jsx
  Line 112:5:  React Hook useCallback has missing dependencies: 'selected.code', 'submitForm', and 'validateForm'. Either include them or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Eps/Eps.jsx
  Line 48:6:  React Hook useEffect has a missing dependency: 'placeOrder'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Giftcards/GiftcardForm.jsx
  Line 40:7:  React Hook "useUpdatePartialPaymentList" is called in function "onSubmit" that is neither a React function component nor a custom React Hook function. React component names must start with an uppercase letter. React Hook names must start with the word "use"  react-hooks/rules-of-hooks

src/paymentMethods/buckaroo/src/method/Giftcards/Giftcards.jsx
  Line 29:5:   React Hook "usePartialPayment" is called conditionally. React Hooks must be called in the exact same order in every component render  react-hooks/rules-of-hooks
  Line 72:5:   React Hook useCallback has missing dependencies: 'giftcardCode' and 'showAsList'. Either include them or remove the dependency array  react-hooks/exhaustive-deps
  Line 87:6:   React Hook useEffect has a missing dependency: 'placeOrder'. Either include it or remove the dependency array                         react-hooks/exhaustive-deps
  Line 114:6:  React Hook useEffect has missing dependencies: 'cart' and 'setCartInfo'. Either include them or remove the dependency array           react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Giropay/Giropay.jsx
  Line 80:5:  React Hook useCallback has missing dependencies: 'selected.code', 'submitForm', and 'validateForm'. Either include them or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/IDeal/IDeal.jsx
  Line 79:5:  React Hook useCallback has missing dependencies: 'selected.code', 'submitForm', and 'validateForm'. Either include them or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Kbc/Kbc.jsx
  Line 48:6:  React Hook useEffect has a missing dependency: 'placeOrder'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/PayPal/PayPal.jsx
  Line 49:6:  React Hook useEffect has a missing dependency: 'placeOrder'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

src/paymentMethods/buckaroo/src/method/Transfer/Transfer.jsx
  Line 48:6:  React Hook useEffect has a missing dependency: 'placeOrder'. Either include it or remove the dependency array  react-hooks/exhaustive-deps

Search for the keywords to learn more about each error.