Showing 200 of 693 total issues
Avoid too many return
statements within this function. Open
Open
return null;
Avoid too many return
statements within this function. Open
Open
return (
<FontAwesomeIcon
title="Unknown tournament type"
icon="question-circle"
/>
Avoid too many return
statements within this function. Open
Open
return [false, 'Not valid arguments'];
Avoid too many return
statements within this function. Open
Open
return { ...acc, players: newPlayers, records: [...records, newRecord] };
Avoid too many return
statements within this function. Open
Open
return 'Round 4';
Avoid too many return
statements within this function. Open
Open
return false;
Avoid too many return
statements within this function. Open
Open
return [true];
Avoid too many return
statements within this function. Open
Open
return { ...acc, records: [...records, newRecord] };
Avoid too many return
statements within this function. Open
Open
return (
<>
<FontAwesomeIcon icon="user" />
<FontAwesomeIcon icon="sort-amount-up" />
</>
Avoid too many return
statements within this function. Open
Open
return { ...acc, chat: newChatState, records: [...records, newRecord] };
Avoid too many return
statements within this function. Open
Open
return [true, ''];
Avoid too many return
statements within this function. Open
Open
return (
<button
type="button"
className={`btn btn-orange btn-sm ${type === 'table' ? 'ml-1 px-4' : ''} rounded-lg`}
data-method="post"
Avoid too many return
statements within this function. Open
Open
return 'Round 2';
Avoid too many return
statements within this function. Open
Open
return [false, 'Only lowercase latin'];
Avoid too many return
statements within this function. Open
Open
return 'Round 1';
Avoid too many return
statements within this function. Open
Open
return null;
Avoid too many return
statements within this function. Open
Open
return [false, 'Name must be unig'];
Avoid too many return
statements within this function. Open
Open
return 0;
Function updateEditorLang
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
updateEditorLang: (state, { payload }) => {
state.activeGames = state.activeGames.map(game => {
if (game.id === payload.gameId) {
const newPlayers = game.players.map(player => (
player.id === payload.userId
- 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 TournamentStateDescription
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
function TournamentStateDescription({
state,
startsAt,
breakState,
breakDurationSeconds,
- 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"