Showing 180 of 180 total issues
Avoid too many return
statements within this function. Open
return (
value.callee +
'(' +
value.params
.map((param) => generateValue(param, property, false, true))
Avoid too many return
statements within this function. Open
return 'var(--' + hyphenateProperty(value.value) + ')'
Avoid too many return
statements within this function. Open
return color(colorValue)[value.callee](percentage).string()
Avoid too many return
statements within this function. Open
return {
type: 'callee',
message: 'The function `' + callee + '` is not a valid function.',
}
Avoid too many return
statements within this function. Open
return node.value
Avoid too many return
statements within this function. Open
return color(colorValue).negate().string()
Avoid too many return
statements within this function. Open
return '(max-' + dimension + ': ' + (value - 1) + 'px)'
Avoid too many return
statements within this function. Open
return hyphenateProperty(node.value)
Avoid too many return
statements within this function. Open
return wrapInParens(
node.params
.map((value) => generateValue(value, property))
.join(inlineFns[node.callee])
)
Avoid too many return
statements within this function. Open
return wrapInString(node.value)
Avoid too many return
statements within this function. Open
return wrapInString(hyphenateProperty(node.value))
Avoid too many return
statements within this function. Open
return value.value
Avoid too many return
statements within this function. Open
return 'props.' + node.value
Avoid too many return
statements within this function. Open
return hyphenateProperty(value.value)
Function Heading
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function Heading({ level, children }) {
const { theme } = useFela()
const router = useRouter()
const id =
- 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 parseNumber
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
parseNumber(isNegative = false) {
if (this.currentToken.type === 'number') {
const integer = this.currentToken.value
const nextToken = this.getNextToken(1)
- 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 CodeBlock
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function CodeBlock({
children,
className = '',
nocopy = false,
name,
- 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 parseIdentifier
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
parseIdentifier() {
if (this.currentToken.type === 'identifier') {
const ident = this.currentToken.value
const nextToken = this.getNextToken(1)
if (nextToken.type === 'round_bracket' && nextToken.value === '(') {
- 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 generateFunction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function generateFunction(node, floatingPercentage = false) {
if (stringFns[node.callee]) {
return wrapInString(
node.callee +
'(' +
- 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 generateFunction
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function generateFunction(node, property, floatingPercentage = false) {
if (stringFns[node.callee]) {
return wrapInString(
node.callee +
'(' +
- 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"