Showing 671 of 671 total issues
Function read
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
@Get('/read/:path(*)')
async read(
@Res({ passthrough: true }) res: Response,
@Req() req: Request,
@Param('path') path: 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
Function presigned
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async presigned(bucket: string, dir: string, params: IPresignParams): Promise<IPresignRes> {
try {
const { tokenExpireIn, uploadMethod } = this.config;
const { expiresIn, contentLength, contentType, hash, internal } = params;
- 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 getComputedUsers
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private getComputedUsers(
field: IFieldInstance,
record: IRecord,
userMap: { [userId: string]: IUserInfoVo }
) {
- 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 updateRecords
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async updateRecords(
tableId: string,
updateRecordsRo: IUpdateRecordsRo & {
records: {
id: 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
Function sentryFlushServerSide
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const sentryFlushServerSide = async (flushAfter: number) => {
if (typeof window === 'undefined') {
try {
await sentryFlush(flushAfter);
} catch (e) {
- 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 ExpirationSelect
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ExpirationSelect = (props: IExpirationSelect) => {
const { onChange } = props;
const [isCustom, setIsCustom] = useState<boolean>(false);
const [date, setDate] = useState<Date>();
const { t } = useTranslation('token');
- 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 Account
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const Account: React.FC = () => {
const { user: sessionUser, refresh, refreshAvatar } = useSession();
const { t } = useTranslation('common');
const updateUserAvatarMutation = useMutation(updateUserAvatar, {
- 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 OAuthAppDecisionPage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const OAuthAppDecisionPage = () => {
const router = useRouter();
const { user } = useSession();
const transactionId = router.query.transaction_id as string;
const getPreviewUrl = usePreviewUrl();
- 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 NumberFormatting
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const NumberFormatting: React.FC<IProps> = (props) => {
const { formatting = defaultNumberFormatting, onChange } = props;
const { type, precision } = formatting;
const { t } = useTranslation(['table']);
- 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 NotificationsManage
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const NotificationsManage: React.FC = () => {
const queryClient = useQueryClient();
const notification = useNotification();
const { t } = useTranslation('common');
- 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 SearchCommand
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const SearchCommand = (props: ISearchCommand) => {
const { onChange, value } = props;
const { t } = useTranslation('common');
const fields = useFields();
const fieldStaticGetter = useFieldStaticGetter();
- 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"