publiclab/plots2

View on GitHub
app/javascript/components/CommentsContainer.js

Summary

Maintainability
A
1 hr
Test Coverage

Function handleCreateComment has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const handleCreateComment = (commentId, formType) => {
    // form ID is either reply-123 or main
    const formId = formType === "reply" ? "reply-" + commentId : "main";
    console.log(state.textAreaValues);
    const commentBody = state.textAreaValues[formId];
Severity: Minor
Found in app/javascript/components/CommentsContainer.js - About 1 hr to fix

TODO found
Open

        // TODO: create multicase for "CREATE NEW COMMENT FORM" in reducers.js

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'
Open

import React, { useReducer, useState } from "react";

For more information visit Source: http://eslint.org/docs/rules/

There are no issues that match your filters.

Category
Status