Function login
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
export function* login(credentials = {}) {
const isSAML = auth.isSAMLAuth();
let token = null;
Function render
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
render() {
const { term, isNewTerm, hasErrored, submitGlossaryTerm } = this.props;
const {
editorHidden,
newTitle,
Function render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
render() {
const { details } = this.props;
const { shouldShowDescriptionEditor, newDescriptionContent,
shouldDisplayFullDescription } = this.state;
Function render
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
render() {
const { loading } = this.state;
const {
as: type,
className,
Function loginWatcher
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
function* loginWatcher() {
const evaluate = true;
while (evaluate) {
const isSAML = (process.env.LOGIN_MODE === 'saml');
Function focusByFirstOfHeader
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
export const focusByFirstOfHeader = (timeout = 1) => {
setTimeout(() => {
let element = document.getElementsByTagName('h1');
if (element) { element = element[1]; }
if (!element) { element = document.getElementsByTagName('h2')[0]; }
Function getProps
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
function getProps(options, roles, params = {}) {
const missingRoles = difference(options.roles, roles);
const props = {
title: options.text,
iconName: options.icon,
Function PositionInformation
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
const PositionInformation = ({ assignment }) => {
const assignmentStartDate = assignment.start_date ? formatDate(assignment.start_date) : false;
const isActive = assignment.status === 'active';
let assignmentEndDate;
if (isActive) {
Function setupDefaultValues
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
setupDefaultValues(props) {
const { skillsWasUpdated, gradeWasUpdated, qWasUpdated, bureauWasUpdated } = this.state;
const { userProfile, defaultFilters } = props;
Function ErrorMessage
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
const ErrorMessage = ({ showEmptyWarning, error }) => {
const showResponseError = isObject(error) ? error.hasErrored : error;
const isError = (showEmptyWarning || showResponseError);
let message;
Function propSort
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
export const propSort = (propName, nestedPropName) => (a, b) => {
let A = a[propName];
if (nestedPropName) { A = a[propName][nestedPropName]; }
A = A.toString().toLowerCase();
let B = b[propName];
Function ResultsCard
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
const ResultsCard = (props) => {
const options = {};
const {
id,
result,
Function render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
render() {
const { details } = this.props;
const { shouldShowWebsiteEditor, shouldShowPocEditor,
newWebsiteContent, newPocContent } = this.state;
Function difference
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
export const difference = (base, object) => transform(object, (result, value, key) => {
if (!isEqual(value, base[key])) {
result[key] = isObject(value) && isObject(base[key]) ?
difference(base[key], value) :
Merge rule .bid-count-container
with rule on line 45
.bid-count-container {