Showing 173 of 173 total issues
Function AvailableBidderStats
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const AvailableBidderStats = () => {
const [showMore, setShowMore] = useState(false);
const [selectedStat, setSelectedStat] = useState('Post');
const statOptions = [
- 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 RemarksPill
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const RemarksPill = props => {
const { remark, isEditable, updateSelection, fromAIM } = props;
const formatRemarkText = (r) => {
// we can just grab the already merged text from the BE, but it would mean
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
render() {
const { details, isProjectedVacancy, userProfile } = this.props;
const { isClient, isTandemTwo } = this.context;
const isFilled = details.status === 'FP';
const OBCUrl$ = propOrDefault(details, 'post.post_overview_url');
- 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 8 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
totalUsers,
usersList,
usersIsLoading,
- 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 getUsers
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function getUsers(page = 1, limit = 100, sort, filters, q_username, q_name) {
Function notificationsFetchData
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function notificationsFetchData(limit = 5, page = 1, ordering = '-date_created', tags = undefined, isRead = undefined, useDateRange = true) {
Function userProfileToggleFavoritePosition
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
export function userProfileToggleFavoritePosition(id, remove, refreshFavorites = false,
isPV = false, sortType, isTandem = false) {
Function getCustomLocation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export function getCustomLocation(loc: any, org: string): string {
if (!loc) return NO_POST;
// DC Post - org ex. GTM/EX/SDD
if (get(loc, 'state') === 'DC') return org || NO_POST;
// Domestic outside of DC - City, 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
Consider simplifying this complex logical expression. Open
if (vice || vacancy) {
return `${vice || ''}${(vice && vice !== 'Multiple Incumbents' && vacancy) ? ', ' : ''} ${vacancy || ''}`;
}
Consider simplifying this complex logical expression. Open
if (
(!employeeDataLoading && (employeeDataError || !hruId)) ||
(!empProfileLoading && (empProfileError || !hruId))
) {
return errorAlert;
Function toastSuccess
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function toastSuccess(toast, title, id, isUpdate, options) {
Function markNotification
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function markNotification(id, isRead = true, shouldDelete = false,
bypassTrackerUpdate = false, cb = () => {}) {
Function toastError
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function toastError(toast, title, id, isUpdate, options) {
Function toastWarning
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function toastWarning(toast, title, id, isUpdate, options) {
Function toggleBidPosition
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function toggleBidPosition(id, remove, isClient, clientId, fromTracker) {
Function modifyAgenda
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function modifyAgenda(panel, legs, personId, ef, refData) {
Function toastInfo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function toastInfo(toast, title, id, isUpdate, options) {
Function assignmentSeparationAction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
export function assignmentSeparationAction(query, perdet, id, isSeparation, onSuccess) {
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 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"