Showing 93 of 241 total issues
Function createFormulaParser
has a Cognitive Complexity of 51 (exceeds 5 allowed). Consider refactoring. Open
export const createFormulaParser = (sheetsMap: ISheetsMap): FormulaParser =>
new FormulaParser({
onCell: ({ sheet, row: rowIndex, col: columnIndex }) => {
let value: string | number | null = null
- Read upRead up
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
File formula.ts
has 479 lines of code (exceeds 250 allowed). Consider refactoring. Open
import uniqid from 'uniqid'
import {
ISheetName,
ISheetsMap,
IDependentReferences,
File SheetNavigation.tsx
has 402 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {
useCallback,
FunctionComponent,
useRef,
RefObject,
File parser.ts
has 382 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Workbook,
Worksheet,
CellRichTextValue,
WorksheetView,
File Sheet.tsx
has 357 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, {
FunctionComponent,
useCallback,
useMemo,
KeyboardEvent,
Function MERGE_AREA
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export const MERGE_AREA = (
state: IExcelState,
action: PayloadAction<IGeneralActionPayload & { activeCell: ICell }>
): IExcelState => {
const data = nSelectActiveSheetData(state)
- Read upRead up
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
File area.ts
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
IPosition,
ISelectionArea,
IRange,
IArea,
Function deletePositions
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const deletePositions = (
sheetName: ISheetName,
positions: IPosition[],
sheetsMap: ISheetsMap,
dependents: IDependentReferences,
Function selectFactoryIsStyle
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export const selectFactoryIsStyle = (
editorStyle: DraftInlineStyleType,
inlineStyleEqFn: IInlineStyleEqFn
) =>
createSelector(
- Read upRead up
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 isCellEqualOtherCell
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export const isCellEqualOtherCell = (
cell: ICell,
otherCell: ICell
): boolean => {
if (cell === otherCell || (cell === undefined && otherCell === undefined))
- Read upRead up
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 computeSelectionAreaBottomRightStyle
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const computeSelectionAreaBottomRightStyle: IComputeSelectionAreaStyle = (
columnWidths: IColumnWidths,
columnOffsets: IColumnOffsets,
rowHeights: IRowHeights,
rowOffsets: IRowOffsets,
Function updateActiveCellRef
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const updateActiveCellRef = (
sheetName: ISheetName,
position: IPosition,
sheetsMap: ISheetsMap,
dependents: IDependentReferences,
File mouse.ts
has 296 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { PayloadAction } from '@reduxjs/toolkit'
import { EditorState } from 'draft-js'
import {
IPosition,
IExcelState,
Function EditorCell
has 77 lines of code (exceeds 25 allowed). Consider refactoring. Open
const EditorCell: FunctionComponent = () => {
const dispatch = useDispatch()
const {
isEditMode,
Function computeSelectionAreaBottomLeftStyle
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const computeSelectionAreaBottomLeftStyle: IComputeSelectionAreaStyle = (
columnWidths: IColumnWidths,
columnOffsets: IColumnOffsets,
rowHeights: IRowHeights,
rowOffsets: IRowOffsets,
Function computeSelectionAreaBottomRightStyle
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
export const computeSelectionAreaBottomRightStyle: IComputeSelectionAreaStyle = (
columnWidths: IColumnWidths,
columnOffsets: IColumnOffsets,
rowHeights: IRowHeights,
rowOffsets: IRowOffsets,
- Read upRead up
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
File factory.ts
has 287 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable */
import { createSelector } from '@reduxjs/toolkit'
import {
normalizeRowHeightFromArray,
normalizeColumnWidthFromArray,
Function computeSelectionAreaTopRightStyle
has 72 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const computeSelectionAreaTopRightStyle: IComputeSelectionAreaStyle = (
columnWidths: IColumnWidths,
columnOffsets: IColumnOffsets,
rowHeights: IRowHeights,
rowOffsets: IRowOffsets,
File ContentPane.tsx
has 284 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { FunctionComponent, useMemo, useCallback } from 'react'
import { Group, Rect, Line } from 'react-konva'
import { useDispatch } from 'react-redux'
import { IGenericPaneProps } from '../../@types/components'
import { IBlockStyles, IPosition } from '../../@types/state'
Function createValueFromEditorState
has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring. Open
export const createValueFromEditorState = (
editorState: EditorState
): Partial<ICell> => {
const richText: IRichTextValue = []
- Read upRead up
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"