department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

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

  render() {
    const { form } = this.props;
    const { formId, data } = form;

    const { fullName } = data;

    Function PageFieldSummary has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const PageFieldSummary = props => {
      const { renderedProperties, defaultEditButton, updatedPage } = props;
      const { allPages } = setupPages(formConfig);
      const currentPage = allPages.filter(page => page.key === updatedPage);
      const alertPage = allPages.filter(page => page.title === 'Your question');

      Function facilityListProps has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          () => {
            const caregiverSupport = async facility => {
              const offersCaregiverSupport = facility.services?.health?.some(
                service => service.serviceId === 'caregiverSupport',
              );

        Function setupPages has 45 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const setupPages = formConfig => {
          const chapterKeys = Object.keys(formConfig?.chapters || {});
          const chapterTitles = Object.values(formConfig?.chapters || {}).map(
            value => value.title,
          );
        Severity: Minor
        Found in src/applications/ask-va/utils/reviewPageHelper.js - About 1 hr to fix

          Function MessageThread has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const MessageThread = props => {
            const { messageHistory, isDraftThread } = props;
            const accordionRef = useRef();
          
            return (

            Function retrieveMessageThread has 45 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const retrieveMessageThread = messageId => async (
              dispatch,
              getState,
            ) => {
              const isPilot = getIsPilotFromState(getState);
            Severity: Minor
            Found in src/applications/mhv-secure-messaging/actions/messages.js - About 1 hr to fix

              Function formatDescription has 45 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function formatDescription(description, location = '') {
                if (!description || !description.text) {
                  return 'DESCRIPTION:';
                }
              
              
              Severity: Minor
              Found in src/applications/vaos/utils/calendar.js - About 1 hr to fix

                Function POST /vaos/v2/appointments has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  'POST /vaos/v2/appointments': (req, res) => {
                    const {
                      practitioners = [{ identifier: [{ system: null, value: null }] }],
                    } = req.body;
                    const selectedClinic = clinicsV2.data.filter(
                Severity: Minor
                Found in src/applications/vaos/services/mocks/index.js - About 1 hr to fix

                  Function renderKicker has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const renderKicker = () => {
                      if (!displayedInputs.kicker) return null;
                      const radioButtonsLabelText = 'Eligible for kicker bonus?';
                      const kickerAmountId = 'kickerAmount';
                      const kickerFieldId = `${kickerAmountId}-field`;

                    Function renderViewButtons has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const renderViewButtons = () => {
                        if (totalRowCount > DEFAULT_ROWS_VIEWABLE) {
                          if (viewableRowCount !== totalRowCount) {
                            const remainingRowCount = totalRowCount - viewableRowCount;
                            const showNextCount =
                    Severity: Minor
                    Found in src/applications/gi/components/profile/SchoolLocations.jsx - About 1 hr to fix

                      Function default has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export default function(state = INITIAL_STATE, action) {
                        switch (action.type) {
                          case FILTERS_CHANGED:
                            return {
                              ...state,
                      Severity: Minor
                      Found in src/applications/gi/reducers/filters.js - About 1 hr to fix

                        Function notificationsReducer has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const notificationsReducer = (state = initialState, action) => {
                          switch (action.type) {
                            case NOTIFICATIONS_RECEIVED_STARTED:
                              return {
                                ...state,
                        Severity: Minor
                        Found in src/applications/personalization/common/reducers/notifications.js - About 1 hr to fix

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

                            render() {
                              let beforeText = '';
                          
                              if (this.props.beforeText && this.props.beforeText === '«') {
                                beforeText = (
                          Severity: Minor
                          Found in src/platform/forms-system/src/js/components/ProgressButton.jsx - About 1 hr to fix

                            Function PmcModalContent has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function PmcModalContent() {
                              return (
                                <>
                                  <p>
                                    <strong>Respondent Burden:</strong> Public reporting burden for this

                              Function UploadDescription has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const UploadDescription = () => {
                                const types = SUPPORTED_UPLOAD_TYPES.map(text => text.toUpperCase());
                                const list = readableList(types, 'or');
                                return (
                                  <div className="vads-u-margin-top--2">
                              Severity: Minor
                              Found in src/applications/appeals/testing/sc/content/evidenceUpload.jsx - About 1 hr to fix

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

                                export const ConfirmationPage = () => {
                                  resetStoredSubTask();
                                
                                  return (
                                    <ConfirmationDecisionReviews

                                  Function UploadDescription has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const UploadDescription = () => {
                                    const types = SUPPORTED_UPLOAD_TYPES.map(text => text.toUpperCase());
                                    const list = readableList(types, 'or');
                                    return (
                                      <div className="vads-u-margin-top--2">
                                  Severity: Minor
                                  Found in src/applications/appeals/995/content/evidenceUpload.jsx - About 1 hr to fix

                                    Function handleSubmit has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      const handleSubmit = e => {
                                        e.preventDefault();
                                    
                                        const {
                                          facilityType,
                                    Severity: Minor
                                    Found in src/applications/facility-locator/components/SearchControls.jsx - About 1 hr to fix

                                      Function setupPages has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const setupPages = () => {
                                        const chapterKeys = Object.keys(formConfig?.chapters || {});
                                        const chapterTitles = Object.values(formConfig?.chapters || {}).map(
                                          value => value.title,
                                        );
                                      Severity: Minor
                                      Found in src/applications/appeals/testing/nod-new/utils/taskListPages.js - About 1 hr to fix

                                        Function thirdPartyAppsReducer has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const thirdPartyAppsReducer = (state = initialState, action) => {
                                          switch (action.type) {
                                            case FETCH_RESULTS: {
                                              return {
                                                ...state,
                                        Severity: Minor
                                        Found in src/applications/third-party-app-directory/reducers/index.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language