Showing 4,231 of 14,884 total issues
Function fetchUser
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchUser() {
return async dispatch => {
dispatch({
type: FETCH_USER,
});
Function searchResults
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const searchResults = () => {
if (loading) {
return loader();
}
if (hasFacilities()) {
Function filterAndSortInquiries
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const filterAndSortInquiries = loa => {
return inquiries
.filter(
card =>
categoryFilter === 'All' ||
Function ConfirmationPage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ConfirmationPage = () => {
const { submission, data } = useSelector(state => state.form);
const { response, timestamp } = submission;
const name = data.veteranFullName;
Function clearSpouseData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const clearSpouseData = formData => {
return {
...formData,
questions: {
...formData.questions,
Function saveDraft
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const saveDraft = (messageData, type, id) => async dispatch => {
recordEvent({
// For Google Analytics
event: 'secure-messaging-save-draft-type',
'secure-messaging-save-draft': type,
Function contentT30
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
() => {
return (
isTranstioningFacility && (
<va-alert status="warning" class="vads-u-margin-y--2">
<h1 slot="headline">
Function appointmentIcon
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const appointmentIcon = appointment => {
const isPhone = isVAPhoneAppointment(appointment);
const {
isCommunityCare,
isCompAndPenAppointment,
Function transformFormToVAOSVARequest
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transformFormToVAOSVARequest(state) {
const data = getFormData(state);
const typeOfCare = getTypeOfCare(data);
return {
Function getAppointmentTimezone
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getAppointmentTimezone(appointment) {
// Appointments with timezone included in api
if (appointment?.timezone) {
const abbreviation = getTimezoneAbbrFromApi(appointment);
Function renderScholarships
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderScholarships = () => {
if (!displayedInputs.scholarships) return null;
const scholarshipsId = 'scholarships';
const scholarshipsFieldId = `${scholarshipsId}-field`;
return (
Function fetchNameAutocompleteSuggestions
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchNameAutocompleteSuggestions(name, filterFields, version) {
if (name === '' || name === null || name === undefined) {
return { type: NAME_AUTOCOMPLETE_SUCCEEDED, payload: [] };
}
Function renderTuition
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderTuition = () => {
if (!displayedInputs.tuition) return null;
const tuitionFeesId = 'tuitionFees';
const tuitionFeesFieldId = `${tuitionFeesId}-field`;
Function renderTuitionAssist
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderTuitionAssist = () => {
if (!displayedInputs.tuitionAssist) return null;
const tuitionAssistId = 'tuitionAssist';
const tuitionAssistFieldId = `${tuitionAssistId}-field`;
return (
Function getCemeteries
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getCemeteries() {
return fetch(`${environment.API_URL}/v0/preneeds/cemeteries`, {
credentials: 'include',
headers: {
'X-Key-Inflection': 'camel',
Function nationalExamsReducer
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const nationalExamsReducer = (state = INITIAL_STATE, action) => {
switch (action.type) {
case FETCH_NATIONAL_EXAMS_STARTED:
return { ...state, loading: true, error: null };
Function fetchResultsApi
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchResultsApi = async (options = {}) => {
// Derive options properties.
const city = options?.city;
const contribution_amount = options?.contributionAmount;
const mockRequest = options?.mockRequest;
Function allDependents
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function allDependents(state = initialState, action) {
switch (action.type) {
case FETCH_ALL_DEPENDENTS_SUCCESS:
if (action.response.persons && action.response.persons.length > 0) {
allPeople = splitPersons(action.response.persons);
Function uiSchema
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function uiSchema(
subHeader = veteranApplicantDetailsSubHeader,
description = '',
nameUI = nonPreparerFullMaidenNameUI,
ssnUI = ssnDashesUI,
Function deepEqual
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function deepEqual(obj1, obj2) {
if (obj1 === obj2) return true;
if (
typeof obj1 !== 'object' ||