controllers/cart/addCart.js
Function addCart
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function addCart (req, res) {
const { errors, isValid } = validateCartInput(req.body)
const { errorEmail, isValidEmail } = validateEmail(req.body)
if (!isValid) {
return res.status(400).json(errors)
Parsing error: Invalid ecmaVersion. Open
Open
const sgMail = require('@sendgrid/mail')
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/