Showing 287 of 1,073 total issues
Function LazyTippy
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const LazyTippy = (props: LazyTippyProps): JSX.Element => {
const { renderReactComponents, ...tippyProps } = props
const [mounted, setMounted] = React.useState(false)
const lazyPlugin = {
- 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 IterationSummary
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function IterationSummary({
iteration,
className,
showSubmissionMethod,
showTestsStatusAsButton,
- 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 ReferenceElement
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
(
{ exercise, track, solution, renderBlurb, isSkinny, isStatic, ...props },
ref
) => {
const info = (
- 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 Solution
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const Solution = ({
privateUrl,
status,
publishedIterationHeadTestsStatus,
numViews,
- 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 FileEditorCodeMirror
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export function FileEditorCodeMirror({
language,
editorDidMount,
files: defaultFiles,
settings,
- 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 useIterationScrolling
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
export const useIterationScrolling = ({
iterations,
setIterations,
on,
}: {
- 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 handlePayment
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
const handlePayment = async (
event: React.ChangeEvent<HTMLFormElement>,
confirmPaymentFn: ConfirmPaymentFn
) => {
event.preventDefault()
Function lazyHighlightAll
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function lazyHighlightAll(): void {
if (!isLookbehindSupported()) return
function applySyntaxHighlighting() {
import('@/utils/highlight')
.then((m) => {
Function useFileRevert
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const useFileRevert = () => {
const { mutate: revertToLastIteration } = useMutation<
File[],
unknown,
Submission
Function SuccessContent
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
const SuccessContent = () => {
if (noResults)
return (
<div className="--no-results">
<GraphicalIcon icon="mentoring" category="graphics" />
Function build
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function build() {
const env = require('./.config/env.json')
require('esbuild')
.build({
entryPoints: [
Method call
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def call
{
uuid: testimonial.uuid,
content: testimonial.content,
student: {
Method call
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
def call
{
uuid: solution.uuid,
private_url: Exercism::Routes.private_solution_url(solution),
public_url: Exercism::Routes.published_solution_url(solution),
Function useTimeout
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function useTimeout(
second: number,
callback?: () => void
): [
React.Dispatch<React.SetStateAction<boolean>>,
Function renderUploadSteps
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function renderUploadSteps() {
switch (videoUploadStep) {
case 'RETRIEVE':
return (
<>
Function ExerciseCard
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ExerciseCard() {
return (
<div className="bg-backgroundColorA shadow-base rounded-8 flex gap-16 py-16 px-24">
<Skeleton.Shape shape="circle" style={{ width: 64, height: 64 }} />
<div className="flex flex-col w-100">
Function generateConfig
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
const generateConfig = (
canvas: HTMLCanvasElement
): ChartConfiguration<'radar'> => {
const borderColor = getComputedStyle(canvas).getPropertyValue(
'--chartBorderColor'
Method tabs
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
def tabs
[
link_to(
Exercism::Routes.contributing_root_path,
class: tab_class(:dashboard),
Function afterDraw
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
afterDraw: (chart: Chart<'line'>): void => {
const ctx: CanvasRenderingContext2D = chart.ctx
// 0 = index of our dataset, since we only draw one line, this is 0
const points = chart.getDatasetMeta(0).data
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
Function StudentTooltipSkeleton
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function StudentTooltipSkeleton() {
return (
<Skeleton.Wrapper className="flex flex-col w-[350px]">
<div className="flex flex-row gap-20 mb-16">
<Skeleton.Shape