department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

Function FormApp has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function FormApp(props) {
  const {
    children,
    hasSavedForm,
    isLoading,
Severity: Minor
Found in src/applications/vre/28-1900/containers/FormApp.jsx - About 1 hr to fix

    Function WizardContainer has 47 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const WizardContainer = props => {
      const { setWizardStatus } = props;
      useEffect(() => {
        focusElement('.va-nav-breadcrumbs-list');
      }, []);
    Severity: Minor
    Found in src/applications/vre/25-8832/containers/WizardContainer.jsx - About 1 hr to fix

      Function VeteranInformationViewComponent has 47 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const VeteranInformationViewComponent = props => {
        const { profile } = props;
        const {
          gender,
          dob,

        Function openFacilityPage has 47 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function openFacilityPage() {
          return async (dispatch, getState) => {
            try {
              const initialState = getState();
              const newBooking = selectCovid19VaccineNewBooking(initialState);
        Severity: Minor
        Found in src/applications/vaos/covid-19-vaccine/redux/actions.js - About 1 hr to fix

          Function threadsReducer has 47 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const threadsReducer = (state = initialState, action) => {
            switch (action.type) {
              case Actions.Thread.GET_LIST:
                return {
                  ...state,
          Severity: Minor
          Found in src/applications/mhv-secure-messaging/reducers/threads.js - About 1 hr to fix

            Function getICSTokens has 47 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export function getICSTokens(buffer) {
              const map = new Map();
              let tokens = buffer.split('\r\n');
            
              // Split tokens into key/value pairs using lookbehind since it is possible
            Severity: Minor
            Found in src/applications/vaos/utils/calendar.js - About 1 hr to fix

              Function getGridData has 47 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function getGridData(appointment) {
                const { isCommunityCare, isVideo } = appointment?.vaos || {};
                const isPhone = isVAPhoneAppointment(appointment);
                const { serviceType } = appointment?.vaos.apiData || {};
              
              

                Function getBreadcrumbList has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const getBreadcrumbList = () => {
                    const isPast = location.pathname.includes('/past');
                    const isPending = location.pathname.includes('/pending');
                
                    const BREADCRUMB_BASE = [
                Severity: Minor
                Found in src/applications/vaos/components/Breadcrumbs.jsx - About 1 hr to fix

                  Function verifyDependents has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function verifyDependents(state = initialState, action) {
                    switch (action.type) {
                      case DEPENDENCY_VERIFICATION_CALL_SUCCESS:
                        return {
                          ...state,

                    Function buildMedicationInformationPDF has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const buildMedicationInformationPDF = list => {
                      const listOfHeaders = ['h2', 'h3'];
                      const sections = [
                        ...list
                          .filter(listItem => listOfHeaders.includes(listItem.type))
                    Severity: Minor
                    Found in src/applications/mhv-medications/util/pdfConfigs.js - About 1 hr to fix

                      Function sortFunc has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const sortFunc = (a, b) => {
                          if (sortField === 'SENT_DATE') {
                            if (sortOrder === 'DESC') {
                              return compareDesc(
                                new Date(a.attributes.sentDate),
                      Severity: Minor
                      Found in src/platform/mhv/api/mocks/secure-messaging/threads/index.js - About 1 hr to fix

                        Function ClientError has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function ClientError(props) {
                          const { buttonText, formConfig, onBack, onSubmit, testId } = props;
                          const { Element } = Scroll;
                          const scrollToError = () => {
                            scrollTo('errorScrollElement', getScrollOptions());

                          Function ValidationError has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function ValidationError(props) {
                            const { appType, buttonText, formConfig, onBack, onSubmit, testId } = props;
                            let ariaDescribedBy = null;
                            // If no ariaDescribedBy is passed down from form.js,
                            // a null value will properly not render the aria label.

                            Function ConfirmationPage has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const ConfirmationPage = () => {
                              resetStoredSubTask();
                            
                              return (
                                <ConfirmationDecisionReviews
                            Severity: Minor
                            Found in src/applications/appeals/996/containers/ConfirmationPage.jsx - About 1 hr to fix

                              Function GET /covid_vaccine/v0/facilities/:zip has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                'GET /covid_vaccine/v0/facilities/:zip': (req, res) => {
                                  return res.status(200).json({
                                    data: [
                                      {
                                        id: 'vha_516',

                                Function render has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  render() {
                                    const { form } = this.props;
                                    const { formId, data, submission } = form;
                                    const submitDate = new Date(submission?.timestamp);
                                
                                
                                Severity: Minor
                                Found in src/applications/edu-benefits/10215/containers/ConfirmationPage.jsx - About 1 hr to fix

                                  Function render has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    render() {
                                      const { form } = this.props;
                                      const { submission, formId, data } = form;
                                      const submitDate = new Date(submission?.timestamp);
                                      const { fullName } = data;
                                  Severity: Minor
                                  Found in src/applications/edu-benefits/10216/containers/ConfirmationPage.jsx - About 1 hr to fix

                                    Function benefitsEligibilityUpdate has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const benefitsEligibilityUpdate = benefitsEligibilityBox => {
                                      const uiSchema = {
                                        'ui:description': benefitsEligibilityBox,
                                        'view:selectedBenefits': {
                                          'ui:title': 'Select the benefit that is the best match for you.',

                                      Function combineEnrollmentsWithStartMonth has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const combineEnrollmentsWithStartMonth = enrollmentPeriods => {
                                        const isArray = Array.isArray(enrollmentPeriods);
                                      
                                        const trackDate = [];
                                        const combineMonths = {};
                                      Severity: Minor
                                      Found in src/applications/verify-your-enrollment/helpers.jsx - About 1 hr to fix

                                        Function genSearchAreaFromCenter has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const genSearchAreaFromCenter = query => {
                                          const { lat, lng, currentBounds } = query;
                                          return dispatch => {
                                            const types = MAPBOX_QUERY_TYPES;
                                            mbxClient
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language