Showing 38 of 38 total issues
Function withTranslation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function withTranslation(ns, options = {}) {
return function Extend(WrappedComponent) {
function I18nextWithTranslation({ forwardedRef, ...rest }) {
const [t, i18n, ready] = useTranslation(ns, rest);
- 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 buildTransElement
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
function buildTransElement(
extracted,
finalAttributes,
t,
closeDefaults = false,
- 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 renderNodes
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
function renderNodes(children, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) {
Function pushTranslatedJSX
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function pushTranslatedJSX(child, inner, mem, i, isVoid) {
Function buildTransElement
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
extracted,
finalAttributes,
t,
closeDefaults = false,
wasElementWithChildren = false,
Avoid too many return
statements within this function. Open
return false;
Avoid too many return
statements within this function. Open
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
import React from 'react';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
import { useTranslation } from './useTranslation';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
const { createMacro } = require('babel-plugin-macros');
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
import { useState, useEffect, useContext, useRef } from 'react';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
export { Trans } from './Trans';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
export function warn(...args) {
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
import { createElement, useMemo } from 'react';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
import React from 'react';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
import React from 'react';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
import React, { useContext } from 'react';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/
Definition for rule 'jsx-a11y/anchor-is-valid' was not found Open
import { useContext } from 'react';
- Read upRead up
- Exclude checks
For more information visit Source: http://eslint.org/docs/rules/