Showing 12,844 of 12,844 total issues
Function ConfirmationPage
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const ConfirmationPage = () => {
resetStoredSubTask();
return (
<ConfirmationDecisionReviews
Function VeteranInformation
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function VeteranInformation(props) {
const state = useFormikContext();
return (
<>
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { form } = this.props;
const { submission, formId } = form;
const appliedForVaEducationBenefits = _.get(
Function mapStateToProps
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const mapStateToProps = (state, ownProps) => {
const { fieldName } = ownProps;
const { transaction, transactionRequest } = selectVAPServiceTransaction(
state,
Function ResultsList
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
const ResultsList = props => {
const searchResultTitle = useRef();
const { inProgress, searchResults, query } = props;
Function noDisabilityRatingContent
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
const noDisabilityRatingContent = errorCode => {
let content;
let status;
if (isServerError(errorCode)) {
Function AppContent
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function AppContent() {
const [data, setData] = useState({});
const [hasError, setHasError] = useState(false);
const [isRequestDone, setIsRequestDone] = useState(false);
Function EmergencyContact
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
const EmergencyContact = props => {
const { router } = props;
const { t } = useTranslation();
const selectVeteranData = useMemo(makeSelectVeteranData, []);
Function MultipleAppointmentBody
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
const MultipleAppointmentBody = props => {
const {
error,
appointments,
selectedAppointment,
Function TravelPayClaimFilters
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function TravelPayClaimFilters(props) {
const {
statusesToFilterBy,
checkedStatusFilters,
onStatusFilterChange,
Function updateFormData
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
const updateFormData = e => {
e.preventDefault();
if (!isValidCurrency(grossMonthlyIncome.value)) {
setIncomeError(true);
Function captureError
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function captureError(
err,
skipRecordEvent = false,
customTitle,
extraData,
Function generateProgressNoteContent
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const generateProgressNoteContent = record => {
const content = {
details: {
header: 'Details',
items: [
Function DynamicRadioWidget
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function DynamicRadioWidget(props) {
const { formData, onChange } = props;
let organizationList = null;
let upperContent = null;
const organizations =
Function notQualifiedWarning
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function notQualifiedWarning() {
return (
<div className="usa-alert usa-alert-warning usa-content not-qualified">
<div className="usa-alert-body">
<h2>You don't qualify</h2>
Function createRichTextDetailItem
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
const createRichTextDetailItem = async (doc, config, x, item) => {
let titleText = item.title ?? '';
const content = [];
if (titleText) {
- 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 focusElement
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function focusElement(selectorOrElement, options = {}, root) {
function applyFocus(el) {
if (el) {
// Use getAttribute to grab the "tabindex" attribute (returns string), not
// the "tabIndex" property (returns number). Focusable elements will
- 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 {
route,
params,
form,
- 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 validatePages
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export function validatePages(orderedPageTypes) {
const pageTypes = {};
for (const pageType of orderedPageTypes) {
if (pageType === 'intro') {
if (pageTypes.intro || pageTypes.summary || pageTypes.item) {
- 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 checkResponses
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
export const checkResponses = (formResponses, displayConditionsForPath) => {
const questionRequirements = Object.keys(displayConditionsForPath);
for (const questionShortName of questionRequirements) {
const formResponse = formResponses?.[questionShortName];
- 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"