department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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 getEvidence has 44 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const getEvidence = formData => {
      const evidenceSubmission = {
        evidenceType: [],
      };
      const showNewFormContent = showScNewForm(formData);
    Severity: Minor
    Found in src/applications/appeals/995/utils/submit.js - About 1 hr to fix

      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 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

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

            const OmbInfo = () => {
              const resBurden = 10;
            
              return (
                <va-omb-info
            Severity: Minor
            Found in src/applications/edu-benefits/10282/components/OmbInfo.jsx - About 1 hr to fix

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

              function mockSearchResults() {
                return {
                  data: [
                    {
                      distance: 1.25,
              Severity: Minor
              Found in src/applications/representative-search/actions/index.js - About 1 hr to fix

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

                export const MailingAddressInfoPageTaskYellow = () => {
                  const mailingAddress = useSelector(selectVAPMailingAddress);
                
                  const showSuccessAlert = window.sessionStorage.getItem(
                    'onReviewPageContactInfoEdit',

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

                  function enrollmentStatus(state = ENROLLMENT_STATUS_INIT_STATE, action) {
                    const { response = {}, type } = action;
                    const {
                      FETCH_ENROLLMENT_STATUS_STARTED,
                      FETCH_ENROLLMENT_STATUS_SUCCEEDED,
                  Severity: Minor
                  Found in src/applications/hca/reducers/enrollment-status.js - About 1 hr to fix

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

                          facility => {
                            const processed = processPhoneNumber(facility.attributes.phone.main);
                            const phone = processed.processed ? (
                              <va-telephone
                                contact={processed.phone}

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

                          () => {
                            api.v2
                              .getPreCheckInData(token, reload)
                              .then(json => {
                                if (json.error) {
                      Severity: Minor
                      Found in src/applications/check-in/hooks/useGetCheckInData.jsx - About 1 hr to fix

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

                                updateSchema: (formData, schema, uiSchema) => {
                                  const { thirdPartyType, personFullName, organizationName } = formData;
                                  let thirdPartyName = 'the third-party';
                                  let labelString = '';
                        
                        
                        Severity: Minor
                        Found in src/applications/simple-forms/21-0845/pages/securityQuestion.js - About 1 hr to fix

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

                          const MakePayment = () => {
                            useEffect(() => {
                              recordEvent({
                                event: 'howToWizard-alert-displayed',
                                'reason-for-alert': 'make a payment on a debt',

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

                            const PageFieldSummary = props => {
                              const { renderedProperties, defaultEditButton, title, updatedPage } = props;
                              const { allPages } = setupPages(formConfig);
                              const currentPage = allPages.filter(page => page.key === updatedPage);
                              const alertPage = allPages.filter(page => page.title === title);
                            Severity: Minor
                            Found in src/applications/ask-va/components/PageFieldSummary.jsx - About 1 hr to fix

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

                              const POARequestSearchPage = () => {
                                const poaRequests = useLoaderData();
                                const searchStatus = useSearchParams()[0].get('status');
                              
                                return (

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

                                export const alertsReducer = (state = initialState, action) => {
                                  switch (action.type) {
                                    case Actions.Alerts.CLOSE_ALERT:
                                      // Set visibility to false and set ALL alerts to inactive.
                                      return {
                                Severity: Minor
                                Found in src/applications/mhv-secure-messaging/reducers/alerts.js - About 1 hr to fix

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

                                  function parseTestFile(features, code) {
                                    const stack = [];
                                    const ast = parser.parse(code, { sourceType: 'module', plugins: ['jsx'] });
                                    traverse.default(ast, {
                                      enter(path) {
                                  Severity: Minor
                                  Found in src/applications/vaos/scripts/gherkin.js - About 1 hr to fix

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

                                    export default function ScheduleCernerPage() {
                                      const dispatch = useDispatch();
                                      const facility = useSelector(getChosenFacilityInfo);
                                    
                                      const history = useHistory();

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

                                      export function submitRequest(id, cstClaimPhasesEnabled = false) {
                                        return dispatch => {
                                          dispatch({
                                            type: SUBMIT_DECISION_REQUEST,
                                          });
                                      Severity: Minor
                                      Found in src/applications/claims-status/actions/index.js - About 1 hr to fix

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

                                        export default function(state = INITIAL_STATE, action) {
                                          const newState = {
                                            ...state,
                                          };
                                        
                                        
                                        Severity: Minor
                                        Found in src/applications/gi/reducers/licenseCertificationSearch.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language