Showing 4,231 of 14,884 total issues
Function handleSearch
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleSearch = async () => {
if (!query.trim()) {
setSearchInputError(content['validation-facilities--search-required']);
return;
}
Function GetFormHelp
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const GetFormHelp = () => {
return (
<>
<p>
If you have trouble using this online form, call our MyVA411 main
Function ClaimantInformationComponent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function ClaimantInformationComponent() {
const {
gender,
dob,
userFullName: { first, last },
Function updateFormData
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateFormData = e => {
setSubmitted(true);
e.preventDefault();
const loanBeganContainsGoodValue = validateLoanBegan(
Function updateFormData
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateFormData = e => {
setSubmitted(true);
e.preventDefault();
if (unpaidBalanceError || minMonthlyPaymentError || amountOverdueError) {
Function EditPreferences
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EditPreferences = () => {
const [editListModal, setEditListModal] = useState(false);
const editPreferencesButtonRef = useRef();
const handleModalClose = useCallback(() => {
focusElement(editPreferencesButtonRef.current);
Function checkMessageValidity
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
() => {
let messageValid = true;
let signatureValid = true;
let checkboxValid = true;
Function handleDeleteDraftConfirm
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleDeleteDraftConfirm = () => {
if (savedDraft) {
setNavigationError(null);
setIsModalVisible(false);
dispatch(deleteDraft(draftId)).then(() => {
Function getFacilityPageInfo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getFacilityPageInfo(state) {
const formInfo = getCovid19VaccineFormPageInfo(state, 'vaFacility');
const data = selectCovid19VaccineFormData(state);
const newBooking = selectCovid19VaccineNewBooking(state);
Function transformFacilityV2
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transformFacilityV2(facility) {
return {
resourceType: 'Location',
id: facility.id,
vistaId: facility.vistaSite,
Function searchResults
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const searchResults = (cnt, visible = true) => {
if (cnt > 0) {
const containerClassNames = classNames(
'location-search-results-container',
'usa-grid',
Function schoolTypesCheckboxes
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function schoolTypesCheckboxes(
handleIncludedSchoolTypesChange,
options,
smallScreen,
automatedTest = false,
Function yellowRibbonReducer
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const yellowRibbonReducer = (state = initialState, action) => {
switch (action.type) {
case FETCH_RESULTS: {
return {
...state,
Function LoginAlert
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LoginAlert = () => {
const { ID_ME, LOGIN_GOV } = CSP_IDS;
const heading = `Verify your identity with Login.gov or ID.me to change your direct deposit information online`;
return (
<VaAlert status="continue" visible uswds>
Function createApplications
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createApplications = (updatedDaysAgo = 1) => {
const daysAgo = subDays(Date.now(), updatedDaysAgo);
return {
data: [
Function renderOrg
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderOrg = () => {
return (
<dl className="review">
<div className="review-row">
<dt>Name</dt>
Function subNameContent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const subNameContent = () => {
const accreditedOrganizations =
repAttributes?.accreditedOrganizations?.data;
if (isOrg) {
Function DefaultErrorMessage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DefaultErrorMessage = () => {
let InlineErrorComponent;
if (isReactComponent(errorText)) {
InlineErrorComponent = errorText;
} else if (typeof errorText === 'string') {
Function redirectOrLoad
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
redirectOrLoad(props) {
// Stop a user that's been redirected from being redirected again after
// logging in
this.shouldRedirectOrLoad = false;
Function expandArrayPages
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function expandArrayPages(pageList, data) {
const result = pageList.reduce(
(acc, nextPage) => {
const { lastArrayPath, arrayPages, currentList } = acc;
// If we see an array page and we’re starting a section or in the middle of one, just add it