Showing 172 of 172 total issues
Function MonthYearInput
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
const MonthYearInput = ({ value, onChange }) => {
const [inputValue, setInputValue] = useState('');
const [isError, setIsError] = useState(false);
const formatMonthYear = (date) => {
- 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 AgendaItemHistory
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
const AgendaItemHistory = (props) => {
const sorts = AGENDA_ITEM_HISTORY_FILTERS;
const perdet = get(props, 'match.params.id');
const isCDO = get(props, 'isCDO');
const viewType = get(props, 'viewType');
- 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 render
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { cycle } = this.props;
const { data, date, date$, editActive, isLoading, hasErrored, hasUpdated } = this.state;
const cycle$$ = {
- 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 NewAssignmentCycle
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const NewAssignmentCycle = (props) => {
const { onSave } = props;
const [assignmentCycle, setAssignmentCycle] = useState('');
const [cycleCategory, setCycleCategory] = 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 ManageBidSeasons
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
const ManageBidSeasons = () => {
const dispatch = useDispatch();
const ManageBidSeasonsDataLoading = useSelector(state => state.bidSeasonsFetchDataLoading);
const ManageBidSeasonsData = useSelector(state => state.bidSeasons);
- 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 OrgStats
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const OrgStats = () => {
const dispatch = useDispatch();
// ================= DATA RETRIEVAL =================
const userSelections = useSelector(state => state.orgStatsSelections);
- 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 BidStepIcon
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const BidStepIcon = ({ isComplete, needsAction, isCurrent, number,
hasRescheduledTooltip, tooltipTitle, tooltipText,
handshakeRegisterWithAnotherBidder}, { condensedView }) => (
<span className={isComplete ? 'icon-complete' : 'icon-incomplete'}>
{ !isComplete
- 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 HandshakeStatus
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const HandshakeStatus = props => {
const [handshake, setHandshake] = useState(props.handshake);
useEffect(() => {
setHandshake(props.handshake);
- 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 HandshakeBureauButton
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const HandshakeBureauButton = props => {
const { positionID, personID, bidCycle, positionHasHsReg } = props;
const [handshake, setHandshake] = useState(props.handshake);
const [activePerdet, setActivePerdet] = useState(props.activePerdet);
- 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 render
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { isProjectedVacancy, isTandemSearch } = this.context;
const { fetchPostAutocomplete, postSearchResults, filters } = this.props;
const { showTandem2 } = this.state;
- 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 ChecklistModal
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const ChecklistModal = props => {
const {
checkList, submitBtnText, cancelBtnText,
onSubmit, rowDivider, titleDivider, onCheck,
} = 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"
Further reading
Function CycleClassifications
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
const CycleClassifications = () => {
const dispatch = useDispatch();
useEffect(() => {
dispatch(cycleClassificationsFetchData());
- 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 formatVice
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const formatVice = (viceObj) => {
const first = viceObj?.emp_first_name;
const last = viceObj?.emp_last_name;
const vice = (first || last)
? `${first ? `${first} ` : ''}${last || ''}`
- 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 renderSelectionList
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const renderSelectionList = ({ items, selected, ...rest }) => {
let codeOrText = 'code';
if (items?.[0]?.text) codeOrText = 'text';
// only Item Actions/Statuses need to use 'desc_text'
if (items?.[0]?.desc_text) codeOrText = 'desc_text';
- 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 render
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { bid, isUnregister, userName } = this.props;
const { readOnly } = this.context;
const position = get(bid, 'position_info.position');
const positionTitle = get(position, 'title') || NO_POSITION_TITLE;
- 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 (isNew) {
/* eslint-disable quote-props */
sections.subheading = [
{ 'Position Number': pos_results?.pos_num_text || NO_POSITION_NUMBER },
{ 'Position Title': pos_results?.pos_title_desc || NO_POSITION_TITLE },
Function BiddingTool
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const BiddingTool = (props) => {
const id = props.match?.params?.id ?? false;
const location = props.location?.pathname;
const appendedLocation = () => {
- 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 Languages
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const Languages = props => {
const { languagesArray, useWrapper, showHeader } = props;
const languagesArray$ = languagesArray || [];
const getTestDate = (langObj) => {
- 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 render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { bid, acceptBid, condensedView, declineBid, priorityExists, submitBid, deleteBid,
registerHandshake, showBidCount, userProfile, useCDOView, userId,
unregisterHandshake, showRibbons, isCollapsible } = this.props;
// determine whether we render an alert on top of the card
- 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 Classifications
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
const Classifications = props => {
const {
classifications,
clientClassifications,
updateUserClassifications,
- 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"