Showing 34 of 233 total issues
Function QuestionTextarea
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const QuestionTextarea = ({ question }) => {
const {
register,
formState: { errors }
} = useFormContext()
- 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 QuestionPhone
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
const QuestionPhone = ({ isMobile, isoCode, question, useForm, ...props }) => {
const {
formState: { errors },
clearErrors,
setError,
- 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 QuestionGender
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const QuestionGender = ({ question, useForm, language, ...props }) => {
const {
formState: { errors },
control,
trigger,
- 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 QuestionCountry
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const QuestionCountry = ({
component,
question,
useForm,
countryAndRegionsData,
- 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 (
theme &&
theme.forms &&
theme.forms.select &&
theme.forms.select[property]
Consider simplifying this complex logical expression. Open
if (
theme &&
theme.forms &&
theme.forms.select &&
theme.forms.select[property]
Function Markdown
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const Markdown = React.forwardRef(({ modalLabel, ...props }, ref) => {
const MarkDownLink = ({ href, children }) => {
const modalName = href.startsWith('#') && href.toString().substr(1)
return (
<Link
- 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 buildCountryOptions
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const buildCountryOptions = (config, language) => {
const priorityOptions = config?.priorityOptions || []
const whitelist = config?.whitelist || []
const blacklist = config?.blacklist || []
const flag = config?.flag || 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 DropdownIndicator
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const DropdownIndicator = (props) => {
const { menuIsOpen, arrows } = props.selectProps
if (arrows && (arrows.up || arrows.down)) {
const { up, down, width, height } = arrows
- 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 Phone
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const Phone = ({
control,
setError,
clearErrors,
defaultCountry,
- 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 QuestionAge
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const QuestionAge = ({ question, useForm, language, ...props }) => {
const {
formState: { errors },
setValue,
trigger,
- 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 QuestionCounty
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const QuestionCounty = ({ question, useForm, ...props }) => {
const {
formState: { errors },
trigger,
control,
- 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 QuestionCountrySubdivision
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const QuestionCountrySubdivision = ({
question,
...props
}) => {
const {
- 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 QuestionCountryV2
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const QuestionCountryV2 = ({
question,
language,
...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"