Showing 16 of 40 total issues
Function EditTaskDialog
has 380 lines of code (exceeds 25 allowed). Consider refactoring. Open
const EditTaskDialog = () => {
const theme = useTheme();
const dispatch = useDispatch();
const columns = useSelector(selectAllColumns);
const labels = useSelector(selectAllLabels);
- Create a ticketCreate a ticket
File EditTaskDialog.tsx
has 535 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useState, useEffect, useRef } from "react";
import {
Dialog,
Button,
TextField,
- Create a ticketCreate a ticket
Function EditTaskDialog
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
const EditTaskDialog = () => {
const theme = useTheme();
const dispatch = useDispatch();
const columns = useSelector(selectAllColumns);
const labels = useSelector(selectAllLabels);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function RegisterDialog
has 131 lines of code (exceeds 25 allowed). Consider refactoring. Open
const RegisterDialog = () => {
const dispatch = useDispatch();
const { register, handleSubmit, errors, setError } = useForm<FormData>();
const apiErrors = useSelector(
(state: RootState) => state.auth.registerErrors
- Create a ticketCreate a ticket
Function Profile
has 127 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Profile = () => {
const theme = useTheme();
const dispatch = useDispatch();
const userDetail = useSelector(
(state: RootState) => state.profile.userDetail
- Create a ticketCreate a ticket
Function UserAvatar
has 104 lines of code (exceeds 25 allowed). Consider refactoring. Open
const UserAvatar = () => {
const user = useSelector((state: RootState) => state.profile.userDetail);
const avatars = useSelector((state: RootState) => state.profile.avatars);
const loading = useSelector(
(state: RootState) => state.profile.avatarLoading
- Create a ticketCreate a ticket
Function LoginDialog
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
const LoginDialog = () => {
const dispatch = useDispatch();
const [open, setOpen] = useState(false);
const apiErrors = useSelector((state: RootState) => state.auth.loginErrors);
const loading = useSelector((state: RootState) => state.auth.loginLoading);
- Create a ticketCreate a ticket
Function Board
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Board = () => {
const detail = useSelector((state: RootState) => state.board.detail);
const error = useSelector((state: RootState) => state.board.detailError);
const columns = useSelector(columnSelectors.selectAll);
const tasksByColumn = useSelector((state: RootState) => state.task.byColumn);
- Create a ticketCreate a ticket
Function MemberListDialog
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const MemberListDialog = () => {
const theme = useTheme();
const dispatch = useDispatch();
const members = useSelector(selectAllMembers);
const open = useSelector((state: RootState) => state.member.memberListOpen);
- Create a ticketCreate a ticket
Function UserMenu
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
const UserMenu = () => {
const user = useSelector((state: RootState) => state.auth.user);
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
const dispatch = useDispatch();
const history = useHistory();
- Create a ticketCreate a ticket
File CreateTaskDialog.tsx
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Confirmed
import React, { useEffect, useState } from "react";
import {
Dialog,
TextField,
Button,
- Create a ticketCreate a ticket
Function extraReducers
has 61 lines of code (exceeds 25 allowed). Consider refactoring. Open
extraReducers: (builder) => {
builder.addCase(fetchBoardById.fulfilled, (state, action) => {
const byColumn: TasksByColumn = {};
const byId: TasksById = {};
for (const col of action.payload.columns) {
- Create a ticketCreate a ticket
Function ColumnTitle
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const ColumnTitle = ({ id, title, tasksCount, ...props }: Props) => {
const dispatch = useDispatch();
const [anchorEl, setAnchorEl] = React.useState<HTMLButtonElement | null>(
null
);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function extraReducers
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
extraReducers: (builder) => {
builder.addCase(fetchAllBoards.pending, (state) => {
state.fetchLoading = true;
state.fetchError = null;
state.detailError = undefined;
- Create a ticketCreate a ticket
Function BoardName
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
const BoardName = ({ id, name, isOwner, ...props }: Props) => {
const dispatch = useDispatch();
const [pendingName, setPendingName] = useState<string>(name);
const [editing, setEditing] = useState<boolean>(false);
const nameTextAreaRef = useRef<HTMLTextAreaElement>(null);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function MemberDialog
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const MemberDialog = ({ board }: Props) => {
const theme = useTheme();
const dispatch = useDispatch();
const memberId = useSelector((state: RootState) => state.member.dialogMember);
const members = useSelector(selectMembersEntities);
- Read upRead up
- Create a ticketCreate a ticket
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"