department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function employmentHistoryPage has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function employmentHistoryPage(
  schema,
  usePostMilitaryJob = true,
) {
  let nonMilitaryJobs = schema.definitions.nonMilitaryJobs;
Severity: Minor
Found in src/applications/edu-benefits/pages/employmentHistory.js - About 1 hr to fix

    Function ErrorsReducer has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const ErrorsReducer = (state = INITIAL_STATE, action) => {
      switch (action.type) {
        case CLEAR_ERROR: {
          const { errorType } = action.payload;
    
    
    Severity: Minor
    Found in src/applications/representative-search/reducers/errors.js - About 1 hr to fix

      Function MoreInformation has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const MoreInformation = props => {
        const { avs } = props;
        const { clinicalServices, clinicsVisited, moreHelpAndInformation } = avs;
      
        const renderClinicalService = service => {
      Severity: Minor
      Found in src/applications/avs/components/MoreInformation.jsx - About 1 hr to fix

        Function phoneUISchema has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function phoneUISchema(category) {
          const schema = {
            'ui:options': {
              hideLabelText: true,
              showFieldLabel: false,
        Severity: Minor
        Found in src/applications/toe/schema.js - About 1 hr to fix

          Function AppointmentBlock has 39 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const AppointmentBlock = props => {
            const { appointments, page, router } = props;
            const selectApp = useMemo(makeSelectApp, []);
            const { app } = useSelector(selectApp);
            const { t } = useTranslation();
          Severity: Minor
          Found in src/applications/check-in/components/AppointmentBlock.jsx - About 1 hr to fix

            Function isInsideListLoopReturn has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const isInsideListLoopReturn = (
              chapter,
              outerField,
              uiTitle,
              formChapter,
            Severity: Minor
            Found in src/applications/disability-benefits/686c-674/config/helpers.js - About 1 hr to fix

              Function ResponseSentPage has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const ResponseSentPage = () => {
                const alertRef = useRef(null);
              
                useEffect(
                  () => {
              Severity: Minor
              Found in src/applications/ask-va/containers/ResponseSentPage.jsx - About 1 hr to fix

                Function postFormData has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  const postFormData = (url, data) => {
                    setIsDisabled(true);
                    const options = {
                      method: 'POST',
                      body: JSON.stringify(data),
                Severity: Minor
                Found in src/applications/ask-va/containers/ReviewPage.jsx - About 1 hr to fix

                  Function PreferredDatesSection has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function PreferredDatesSection(props) {
                    const history = useHistory();
                    const { home, ccRequestDateTime, requestDateTime } = useSelector(
                      getNewAppointmentFlow,
                    );

                    Function useGetReferralById has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const useGetReferralById = id => {
                      const [referralNotFound, setReferralNotFound] = useState(false);
                      const [currentReferral, setCurrentReferral] = useState(null);
                      const dispatch = useDispatch();
                      const { isInCCPilot } = useIsInCCPilot();

                      Function generateFamilyHistoryContent has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export const generateFamilyHistoryContent = record => {
                        return {
                          title: record.relationship,
                          details: [
                            {

                        Function emailForm has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function emailForm(state = initialState, action) {
                          switch (action.type) {
                            case VIC_SET_EMAIL:
                              return {
                                ...state,
                        Severity: Minor
                        Found in src/applications/veteran-id-card/reducers/emailForm.js - About 1 hr to fix

                          Function ConditionListItem has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const ConditionListItem = props => {
                            const { record } = props;
                          
                            return (
                              <va-card

                            Function generateTreatmentFacilitiesContent has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const generateTreatmentFacilitiesContent = record => {
                              return {
                                title: record.facilityName,
                                details: [
                                  {

                              Function createBreadcrumbs has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const createBreadcrumbs = (location, prescription, currentPage) => {
                                const { pathname } = location;
                                const defaultBreadcrumbs = [
                                  {
                                    href: medicationsUrls.VA_HOME,
                              Severity: Minor
                              Found in src/applications/mhv-medications/util/helpers.js - About 1 hr to fix

                                Function generateFeatureToggles has 39 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const generateFeatureToggles = (toggles = {}) => {
                                  const {
                                    mhvLandingPagePersonalization = true,
                                    mhvMedicationsToVaGovRelease = true,
                                    mhvMedicationsDisplayRefillContent = true,
                                Severity: Minor
                                Found in src/applications/mhv-medications/mocks/api/feature-toggles/index.js - About 1 hr to fix

                                  Function addFocusBehaviorToCrisisLineModal has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function addFocusBehaviorToCrisisLineModal() {
                                    const overlay = document.getElementById('modal-crisisline');
                                    const modal = document.querySelector('.va-crisis-panel.va-modal-inner');
                                    const tabbableElements = getTabbableElements(modal);
                                    let openControl;
                                  Severity: Minor
                                  Found in src/platform/site-wide/accessible-VCL-modal.js - About 1 hr to fix

                                    Function startSitewideComponents has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export default function startSitewideComponents(commonStore) {
                                      // New navigation menu
                                      if (document.querySelector('#vetnav')) {
                                        require('./legacy/mega-menu');
                                      }
                                    Severity: Minor
                                    Found in src/platform/site-wide/index.js - About 1 hr to fix

                                      Function HealthcareModalContent has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export default function HealthcareModalContent() {
                                        return (
                                          <>
                                            <p>
                                              <strong>Respondent Burden:</strong> This information is collected in

                                        Function titleUI has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const titleUI = (titleOption, descriptionOption) => {
                                          const {
                                            title,
                                            description,
                                            headerLevel,
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language