Showing 671 of 671 total issues
Function PinList
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const PinList = () => {
const [pinList, setPinList] = useState<GetPinListVo>([]);
const queryClient = useQueryClient();
const { t } = useTranslation(spaceConfig.i18nNamespaces);
- 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 UserOptions
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const UserOptions = (props: {
options: Partial<IUserFieldOptions> | undefined;
isLookup?: boolean;
cellValueType?: CellValueType;
onChange?: (options: Partial<IUserFieldOptions>) => void;
- 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 OAuthScope
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const OAuthScope = (props: {
scopes?: string[];
description?: string | ReactNode;
className?: string;
}) => {
- 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
Consider simplifying this complex logical expression. Open
if (linearRowType === LinearRowType.Group) {
const { id, depth } = linearRow;
const text = columnStatistics[columnId ?? name]?.[id];
const labelWidth = isFirstColumn
Consider simplifying this complex logical expression. Open
if (
isLink(newField) &&
isLink(oldField) &&
!isEqual(newField.options, oldField.options) &&
newField.options.foreignTableId === oldField.options.foreignTableId &&
Function draw
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
draw: (cell: IRatingCell, props: ICellRenderProps) => {
const { data, icon, color, max, readonly } = cell;
const { ctx, theme, rect, hoverCellPosition, spriteManager } = props;
const { x, y, width, height } = rect;
const [hoverX, hoverY] = hoverCellPosition ?? [0, 0];
- 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 UserEditor
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const UserEditor = (props: IUserEditorProps) => {
const { value, options, onChange, className, style, readonly, ...reset } = props;
const [open, setOpen] = useState(false);
const selectRef = useRef<HTMLButtonElement>(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
Function Container
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const Container = (props: IPageProps & { uiConfig?: IUIConfig }) => {
const { baseId, pluginInstallId, uiConfig } = props;
const [isIframeMode, setIsIframeMode] = useState(true);
const pluginBridge = usePluginBridge();
const { i18n, t } = useTranslation();
- 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 SheetView
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const SheetView = () => {
const fields = useFields({ withHidden: true, withDenied: true });
const view = useView();
const viewId = view?.id;
const tableId = useTableId();
- 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 DateEditorBase
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const DateEditorBase: ForwardRefRenderFunction<IEditorRef<string>, IDateEditorMain> = (
props,
ref
) => {
const { value, onChange, className, readonly, options, disableTimePicker = false } = props;
- 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 getVisibleCollaborators
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const getVisibleCollaborators = (
collaborators: ICollaborator,
visibleRegion: IVisibleRegion,
freezeColumnCount: number,
getCellContent: (cell: ICellItem) => ICell
- 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 insertSingle
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const insertSingle = (
insertAt: number,
totalSize: number,
getOrder: (index: number) => number,
isInsertAfter: boolean = true
- 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 CommentEditor
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const CommentEditor = (props: ICommentEditorProps) => {
const { tableId, recordId } = props;
const editorRef = useRef({
focus: noop,
blur: noop,
- 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 useGridViewStore
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const useGridViewStore = create<IGridViewState>((set) => ({
openHeaderMenu: (props) => {
set((state) => {
return {
...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
Function refineOptions
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const refineOptions = (
data: {
type: FieldType;
isLookup?: boolean;
lookupOptions?: ILookupOptionsRo;
- 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 formatNumberToString
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const formatNumberToString = (value: number | undefined, formatting: INumberFormatting) => {
if (value == null) {
return '';
}
- 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 stringLiteral
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public stringLiteral(): StringLiteralContext {
const _localctx: StringLiteralContext = new StringLiteralContext(this._ctx, this.state);
this.enterRule(_localctx, 24, Query.RULE_stringLiteral);
let _la: number;
try {
- 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 getFileIcon
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const getFileIcon = (mimetype: string) => {
if (isImage(mimetype)) {
return FileImage;
}
if (isPdf(mimetype)) {
- 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 isOp
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
public isOp(): IsOpContext {
const _localctx: IsOpContext = new IsOpContext(this._ctx, this.state);
this.enterRule(_localctx, 12, Query.RULE_isOp);
let _la: number;
try {
- 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 FilePreviewContent
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export const FilePreviewContent = (props: { container?: HTMLElement | null }) => {
const { container } = props;
const { files, currentFile, openPreview, closePreview, onPrev, onNext } =
useContext(FilePreviewContext);
const { name, fileId, src } = currentFile || {};
- 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"