Showing 172 of 172 total issues
Function AddToInternalListButton
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const AddToInternalListButton = props => {
const {
refKey,
toggleAvailableBidder,
isLoading,
- 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 7 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { bid, hideDelete, showBidCount, useCDOView, bidTakenFlag } = this.props;
const { readOnly } = this.context;
const { position_info } = bid;
const position = get(bid, 'position_info.position') || {};
- 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 setDefaultValue
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
setDefaultValue(props) {
const { selection } = this.state;
const { includeFirstEmptyOption, defaultSort } = props;
if (includeFirstEmptyOption && !selection.length && (defaultSort || isString(defaultSort))) {
this.selectOption({ target: { value: defaultSort || '' } });
- 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 BidList
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const BidList = ({ bids, submitBidPosition, deleteBid, registerHandshake, isLoading, isPublic,
userId, userProfile, userProfileIsLoading, unregisterHandshake }) => {
// Push the priority bid to the top. There should only be one priority bid.
// eslint rules seem to step over themselves here between using "return" and a ternary
// eslint-disable-next-line no-confusing-arrow
- 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 BidAuditCard
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const BidAuditCard = ({ data, onEditModeSearch }) => {
const {
audit_id,
audit_desc,
cycle_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 GsaLocations
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const GsaLocations = ({ setLocation, activeAIL }) => {
const dispatch = useDispatch();
const locations = useSelector(state => state.gsaLocations);
const locationsLoading = useSelector(state => state.gsaLocationsFetchDataLoading);
const locationsErrored = useSelector(state => state.gsaLocationsFetchDataErrored);
- 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 BureauExceptions
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const BureauExceptions = () => {
const dispatch = useDispatch();
const bureauExceptionsHasErrored = useSelector(state => state.bureauExceptionsHasErrored);
const bureauExceptionsIsLoading = useSelector(state => state.bureauExceptionsIsLoading);
- 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 scrollToId
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const scrollToId = ({ el, config = {} }) => {
// Get an element's distance from the top of the page
const getElemDistance = (elem) => {
let location = 0;
if (elem.offsetParent) {
- 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 assignmentSeparationAction
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function assignmentSeparationAction(query, perdet, id, isSeparation, onSuccess) {
const type = isSeparation ? 'separations' : 'assignments';
let toastSuccessMessage = CREATE_ALT_ASSIGNMENT_SUCCESS;
let toastSuccessTitle = CREATE_ALT_ASSIGNMENT_SUCCESS_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
Function render
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
render(): React.ReactNode {
const { type, title, messages, isAriaLive, isDivided, customClassName, tinyAlert } = this.props;
// 'type' is injected into the class name
// type 'error' requires an ARIA role
- 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 scrollToId
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const scrollToId = ({ el, config = {} }: any): void => {
// Get an element's distance from the top of the page
const getElemDistance = (elem: HTMLElement) => {
let location = 0;
if (elem.offsetParent) {
- 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 OBCUrl
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const OBCUrl: React.FC<Props> = props => {
const { type = 'post', label = null, isButton = false, altStyle = false, url = {} } = props;
let text; // link text value
let url$ = get(url, 'internal');
- 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
Avoid too many return
statements within this function. Open
return [...sections.bodyPrimary, ...appendSecondary];
Avoid too many return
statements within this function. Open
return bidClassObject;
Avoid too many return
statements within this function. Open
return <Spinner type="employee-profile-preview" size="small" />;
Avoid too many return
statements within this function. Open
return bidClassObject;
Avoid too many return
statements within this function. Open
return (<FrequentPositions
positions={frequentPositions}
addFrequentPosition={addFrequentPosition}
disabled={((legCount >= 10) || readMode)}
/>);
Avoid too many return
statements within this function. Open
return sections.bodyPrimary;
Avoid too many return
statements within this function. Open
return (
<Worker workerUrl={getAssetPath('/static/js/pdf.worker.js')}>
{url && <Viewer fileUrl={url} />}
</Worker>
);
Avoid too many return
statements within this function. Open
return errorAlert;