controllers/cart/getCart.js
Function getCart
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function getCart (req, res) {
try {
const cartId = req.params.cart_id
const cart = await Cart.findById({ _id: cartId })
if (!cart) {
Parsing error: Invalid ecmaVersion. Open
Open
const Cart = require('../../models/cart')
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/