Showing 12,848 of 12,848 total issues
Function getDaysOfTheWeek
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function getDaysOfTheWeek(momentDate, showWeekend) {
const daysToShow = [];
let dayOfWeek;
if (!showWeekend) {
- 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 CCLayout
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function CCLayout({ data: appointment }) {
const {
comment,
facility,
isPastAppointment,
- 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 RequestedAppointmentDetailsPage
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function RequestedAppointmentDetailsPage() {
const { id } = useParams();
const dispatch = useDispatch();
useEffect(
- 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 PhoneLayout
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function PhoneLayout({ data: appointment }) {
const {
clinicName,
clinicPhone,
clinicPhoneExtension,
- 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 ClaimExamLayout
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function ClaimExamLayout({ data: appointment }) {
const {
clinicName,
clinicPhysicalLocation,
clinicPhone,
- 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 AccordionItem
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function AccordionItem({
button,
children,
expanded = true,
headerClass,
- 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 compareAddressObjects
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function compareAddressObjects(obj1, obj2) {
const { hasOwnProperty } = Object.prototype;
const keys1 = Object.keys(obj1);
const keys2 = Object.keys(obj2);
- 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 makeUserObject
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function makeUserObject(options = {}) {
const services = options.services || ['vet360'];
let claims = {
ch33_bank_accounts: true,
communication_preferences: true,
- 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 UpdateErrorAlert
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export const UpdateErrorAlert = ({ className, saveError }) => {
const alertRef = React.useRef();
useEffect(
() => {
- 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 Appeal
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const Appeal = ({ appeal, name }) => {
if (!appeal.attributes) {
throw new TypeError(
'`appeal` prop is malformed; it should have an `attributes` property.',
);
- 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 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { customText } = this.props;
const appType = customText?.appType || APP_TYPE_DEFAULT;
Function scheduledDowntime
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function scheduledDowntime(state = initialState, action) {
switch (action.type) {
case RECEIVE_GLOBAL_DOWNTIME:
return {
...state,
Function asyncLoader
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function asyncLoader(getComponent, message) {
return class AsyncComponent extends React.Component {
static Component = null;
constructor(props) {
Function updateValidationKeyAndSave
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
) => async dispatch => {
dispatch({
type: ADDRESS_VALIDATION_UPDATE,
fieldName,
});
Function createExternalApplicationUrl
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const createExternalApplicationUrl = () => {
const { application, to } = getQueryParams();
if (!application) {
return null;
}
Function addressConvertNextValueToCleanData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
const addressConvertNextValueToCleanData = value => {
const {
id,
addressLine1,
addressLine2,
Function convertNextValueToCleanData
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const convertNextValueToCleanData = value => {
const {
id,
addressLine1,
addressLine2,
Function phoneUISchema
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function phoneUISchema(category) {
return {
'ui:options': {
hideLabelText: true,
showFieldLabel: false,
Function Zero
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
ComboAlert.Zero = () => {
return (
<va-alert
class="row vads-u-margin-bottom--5"
status="info"
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { facility, currentQuery, showHoursSpecialInstructions } = this.props;
if (!facility) {
return null;