Showing 56 of 274 total issues
Avoid too many return
statements within this function. Open
return
Avoid too many return
statements within this function. Open
return <Fragment>
<GifList {...{gifs, gifUrl, setGifUrl, selectedGifIndex, setSelectedGifIndex, category, isCustomGif}} />
</Fragment>
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return 0;
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
|| RichText.contentBtwTags(textHTML, cursorPos, END_TAG_AT, 1).length !== cursorPos.focusOffset-1) return 0
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
return 0
Avoid too many return
statements within this function. Open
if (indexOfSelection === -1 ) return
Function ShoutoutButton
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const ShoutoutButton = ({ data, setData, num = 0, isMove = false, hideShoutout}) => {
if (hideShoutout) return null;
const [ shoutOutForm, setShoutOutForm ] = useState(false)
const [ blink, setBlink ] = useState('')
- 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 closePickerCallback
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const closePickerCallback = (modalRef, showEmojiPicker, setShowEmojiPicker, setPickerPosition) => {
useEffect(() => {
function handleClickOutside(event) {
if (modalRef.current && !modalRef.current.contains(event.target)) {
setShowEmojiPicker(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 ResultsManager
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const ResultsManager = ({ data, setData, steps, draft, service, nextTimePeriod}) => {
const [showResultsManager, setShowResultsManager] = useState(false);
const navigate = useNavigate()
const slug = useParams().slug
- 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 Recognition
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const Recognition = ({data, setData, saveDataToDb, steps, service, draft}) => {
const [ shoutOutForm, setShoutOutForm ] = useState( { status: false, editObj: {}} )
const [ isModal, setIsModal ] = useState(false)
const [idShoutout, setIdShoutout] = useState()
const [isDraft, setIsDraft] = useState(draft)
- 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 AnimatedEmotion
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const AnimatedEmotion = ({word, category, addBlur = false, count = 1}) => {
const shift = Math.round(Math.random() * 10)/10
const minOpacity = (shift - 0.3) > 0 ? (shift - 0.3) : 0.1
const springProps = useSpring({
from: { fontSize: `${shift ** 2}rem`, opacity: minOpacity },
- 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 EmotionType
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const EmotionType = ({data, setData, saveDataToDb, steps, service, draft}) => {
const {isLoading, error} = service
const {category} = data.emotion
const [selectedType, setSelectedType] = useState(category);
const [emotion, setEmotion] = useState({word: data.emotion.word, category: data.emotion.category});
- 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"