Showing 4,231 of 14,884 total issues
Function addServicePeriod
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addServicePeriod = (formData, separationDate, setFormData) => {
const updateData = newData => {
window.sessionStorage.removeItem(SAVED_SEPARATION_DATE);
setFormData({
...newData,
Function fixTreatedDisabilityNamesKey
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function fixTreatedDisabilityNamesKey(savedData) {
const formData = clone(savedData.formData);
const facilities = formData.vaTreatmentFacilities || [];
const powDisabilities = formData['view:isPow']?.powDisabilities;
if (facilities) {
Function burialUploadUI
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const burialUploadUI = content => {
const findAndFocusLastSelect = () => {
const lastSelect = [...document.querySelectorAll('select')].slice(-1);
if (lastSelect.length) {
focusElement(lastSelect[0]);
Function DisagreeFileClaimPage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DisagreeFileClaimPage = () => {
recordEvent({
event: 'howToWizard-alert-displayed',
'reason-for-alert': 'disagree with VA decision, needs a decision review',
});
Function updateFormData
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateFormData = event => {
event.preventDefault();
const inputValue = homeAcreageValue.value;
Function TotalNetWorthOverTwentyFiveThousandAlert
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const TotalNetWorthOverTwentyFiveThousandAlert = () => {
const linkText = 'Get VA Form 21P-0969 to download (opens in new tab)';
return (
<va-alert status="warning">
<p className="vads-u-margin-y--0">
Function updateSchema
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateSchema: formData => {
let mailingAddress;
const veteransAddress =
formData[veteranFields.parentObject][veteranFields.address];
if (
Function Zero
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ComboAlert.Zero = () => {
return (
<va-alert
class="row vads-u-margin-bottom--5"
status="info"
Function HouseholdExpensesChecklist
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const HouseholdExpensesChecklist = () => {
const dispatch = useDispatch();
const formData = useSelector(state => state.form.data);
const { expenses } = formData;
Function onGoForward
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onGoForward = () => {
const courtEr = courtLocation.length === 0;
const docketEr = docketNumber.length === 0;
const dateEr = dateDischarged.length === 0;
Function getLetterList
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getLetterList(dispatch, LH_MIGRATION__options, shouldUseLettersDiscrepancies = false) {
if (shouldUseLettersDiscrepancies) {
// Call the endpoint to log evss vs lighthouse letter discrepancies
apiRequest('/v0/letters_discrepancy');
}
Function saveReplyDraft
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
) => async dispatch => {
recordEvent({
// For Google Analytics
event: 'secure-messaging-save-draft-type',
'secure-messaging-save-draft': type,
Function displayType
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function displayType(errorCodes, location) {
const isPending = location.pathname.endsWith('/pending');
const isPast = location.pathname.endsWith('/past');
const isUpcoming = location.pathname.endsWith('/');
Function EditContentListOrSignatureModal
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EditContentListOrSignatureModal = props => {
const { editListModal, onClose } = props;
const fullState = useSelector(state => state);
return (
Function selectProviderSelectionInfo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function selectProviderSelectionInfo(state) {
const {
communityCareProviders,
data,
requestStatus,
Function getFacilityPageV2Info
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getFacilityPageV2Info(state) {
const formInfo = getFormPageInfo(state, 'vaFacilityV2');
const data = getFormData(state);
const newAppointment = getNewAppointment(state);
const typeOfCare = getTypeOfCare(data);
Function getLongTermAppointmentHistoryV2
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getLongTermAppointmentHistoryV2 = ((chunks = 1) => {
const batch = [];
let promise = null;
return () => {
Function getDefaultPage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getDefaultPage() {
return (
<>
<DefaultPage
backUrl={this.props.lastPage ? `/${this.props.lastPage}` : filesPath}
Function GET /vaos/v2/appointments
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
'GET /vaos/v2/appointments': (req, res) => {
// merge arrays together
const appointments = confirmedV2.data.concat(requestsV2.data, mockAppts);
const filteredAppointments = appointments.filter(appointment => {
return req.query.statuses.some(status => {
Function handleScroll
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
() => {
if (
!initialTop &&
headerRef.current &&
headerRef.current.offsetTop &&