gil--/gatsby-starter-shopifypwa

View on GitHub

Showing 12 of 31 total issues

Function render has 95 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    render() {
        return (
            <StaticQuery
                query={graphql`
                    query settings {
Severity: Major
Found in src/components/AddToCart.js - About 3 hrs to fix

    Function render has 88 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        render() {
            const pageContent = (
                <ContextConsumer>
                    {({ set }) => {
                        return <>
    Severity: Major
    Found in src/pages/account/activate.js - About 3 hrs to fix

      Function render has 87 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          render() {
              const pageContent = (
                  <ContextConsumer>
                      {({ set }) => {
                          return <>
      Severity: Major
      Found in src/pages/account/reset.js - About 3 hrs to fix

        Function render has 86 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            render () {
                const pageContent = (
                    <ContextConsumer>
                        {({ set }) => {
                            return <>
        Severity: Major
        Found in src/pages/account/login.js - About 3 hrs to fix

          Function render has 85 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              render() {
                  const pageContent = (
                      <>
                          <h1>Sign Up</h1>
                          <Mutation mutation={CUSTOMER_CREATE}
          Severity: Major
          Found in src/pages/account/register.js - About 3 hrs to fix

            Function render has 74 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                render() {
                    return (
                        <AccountLayout>
                            <h1>Account Dashboard</h1>
                            <ContextConsumer>
            Severity: Major
            Found in src/pages/account/index.js - About 2 hrs to fix

              Function render has 71 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  render() {
                      const pageContent = (
                          <>
                              <h1>Forgot Your Password</h1>
                              <Mutation mutation={CUSTOMER_RESET}>
              Severity: Major
              Found in src/pages/account/forgotpassword.js - About 2 hrs to fix

                Function render has 66 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    render() {
                        const product = this.props.data.shopify.shop.productByHandle
                
                        let variant = this.state.selectedVariant || product.variants.edges[0].node
                        let variantImage = this.state.selectedVariantImage || product.images.edges[0].node.src
                Severity: Major
                Found in src/templates/product.js - About 2 hrs to fix

                  Function render has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      render() {
                          if (!this.props.products) {
                              return <p>Your cart is currently empty.</p>
                          }
                  
                  
                  Severity: Major
                  Found in src/components/checkout/CartTable.js - About 2 hrs to fix

                    Function render has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        render() {
                            const lineItemID = this.props.id;
                    
                            return (
                                <ContextConsumer>
                    Severity: Minor
                    Found in src/components/checkout/RemoveProduct.js - About 1 hr to fix

                      Function render has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Confirmed

                          render() {
                              const {
                                  handle,
                                  title,
                                  images,
                      Severity: Minor
                      Found in src/components/ProductBox.js - About 1 hr to fix

                        Function getMoreProducts has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            const getMoreProducts = async function (currentCursor) {
                                const productsCache = await graphql(`
                                    query getAllProducts($previousProduct: String!, $limit: Int!) {
                                        shopify {
                                            shop {
                        Severity: Minor
                        Found in gatsby-node.js - About 1 hr to fix
                          Severity
                          Category
                          Status
                          Source
                          Language