department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,846 of 12,846 total issues

Function clinicsVisited has 27 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const clinicsVisited = avs => {
  const shortTimezone = getShortTimezone(avs);
  const clinics = avs.clinicsVisited.map((clinic, idx) => {
    return (
      <div key={clinic.clinicIen}>
Severity: Minor
Found in src/applications/avs/components/YourAppointment.jsx - About 1 hr to fix

    Function libraryCount has 27 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export function libraryCount() {
      if (document.getElementById('no-results')) {
        document.getElementById('no-results').style.display = 'none';
        document.getElementById('va-pager-div').style.display = 'flex';
        document.getElementById('total-pages-div').style.display = 'flex';

      Function ListBlock has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const ListBlock = props => {
        const {
          heading,
          headingLevel = 3,
          items,
      Severity: Minor
      Found in src/applications/avs/components/ListBlock.jsx - About 1 hr to fix

        Function sendPreCheckInData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              async function sendPreCheckInData() {
                // Set pre-checkin complete and send demographics flags.
                const preCheckInData = { uuid: token };
        
                if (demographicsUpToDate) {
        Severity: Minor
        Found in src/applications/check-in/hooks/useSendPreCheckInData.jsx - About 1 hr to fix

          Function fetchRepStatus has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              const fetchRepStatus = async () => {
                setIsLoading(true);
                setError(null);
          
                try {

            Function WrappedComponent has 27 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const WrappedComponent = props => {
                const { appName } = options;
                const { router } = props;
                const selectCurrentContext = useMemo(makeSelectCurrentContext, []);
                const { token, permissions } = useSelector(selectCurrentContext);
            Severity: Minor
            Found in src/applications/check-in/containers/withAuthorization.jsx - About 1 hr to fix

              Function FormFooter has 27 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export default function FormFooter() {
                return (
                  <>
                    <div className="row">
                      <div className="usa-width-two-thirds medium-8 columns">

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

                          updateSchema: (formData, schema, uiSchema, index) => {
                            let militaryBasePath = livesOnMilitaryBasePath;
                            let countryPath = path;
                            if (typeof index === 'number') {
                              militaryBasePath = insertArrayIndex(

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

                            updateSchema: (formData, schema, uiSchema, index) => {
                              let militaryBasePath = livesOnMilitaryBasePath;
                              let countryPath = path;
                              if (typeof index === 'number') {
                                militaryBasePath = insertArrayIndex(

                    Function prefillTransformer has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const prefillTransformer = (pages, formData, metadata, state) => {
                      const { veteran = {} } = formData;
                      const { fullName, ssn, vaFileNumber, address = {} } = veteran;
                      const { profile } = state.user;
                      const {

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

                      export const ConfirmationPage = props => {
                        const form = useSelector(state => state.form || {});
                        const showNewConfirmationPage = useSelector(
                          state =>
                            toggleValues(state)[FEATURE_FLAG_NAMES.confirmationPageNew] || false,

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

                                updateSchema: (formData, schema, uiSchema) => {
                                  const { claimOwnership } = formData;
                                  let labels = { veteran: 'Veteran', 'non-veteran': 'Non-Veteran' };
                                  let title;
                        
                        
                        Severity: Minor
                        Found in src/applications/simple-forms/21-10210/pages/claimantType.js - About 1 hr to fix

                          Function transformForSubmit has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export default function transformForSubmit(formConfig, form) {
                            const transformedData = JSON.parse(
                              sharedTransformForSubmit(formConfig, form),
                            );
                            const preparerTypeIdData = {
                          Severity: Minor
                          Found in src/applications/simple-forms/20-10206/config/submit-transformer.js - About 1 hr to fix

                            Function WiderThanMobileLogoRow has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const WiderThanMobileLogoRow = () => {
                              return (
                                <div className="row va-flex usa-grid usa-grid-full va-header-logo-menu">
                                  <div className="va-header-logo-wrapper">
                                    <a

                              Function UtilityBillChecklist has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const UtilityBillChecklist = () => {
                                const dispatch = useDispatch();
                                const formData = useSelector(state => state.form.data);
                              
                                const { utilityRecords = [] } = formData;

                                Function ContactBenefits has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const ContactBenefits = () => {
                                  useEffect(() => {
                                    recordEvent({
                                      event: 'howToWizard-alert-displayed',
                                      'reason-for-alert': 'debt related to separation pay/attorney fees',
                                Severity: Minor
                                Found in src/applications/financial-status-report/wizard/pages/Benefits.jsx - About 1 hr to fix

                                  Function VRECounselorNotification has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  const VRECounselorNotification = () => {
                                    useEffect(() => {
                                      recordEvent({
                                        event: `howToWizard-alert-displayed`,
                                        'reason-for-alert': 'ineligibility - eligible for chapter 31',

                                    Function IneligibleNotice has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const IneligibleNotice = () => {
                                      useEffect(() => {
                                        recordEvent({
                                          event: `howToWizard-notice-displayed`,
                                          'reason-for-alert': 'ineligibility - not a service member or veteran',
                                    Severity: Minor
                                    Found in src/applications/vre/25-8832/wizard/pages/IneligibleNotice.jsx - About 1 hr to fix

                                      Function message has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const message = (state = initialState, action) => {
                                        switch (action.type) {
                                          case MESSAGE_MOVE_STARTED:
                                            return {
                                              ...state,
                                      Severity: Minor
                                      Found in src/applications/mhv-secure-messaging/reducers/oldReducers.js - About 1 hr to fix

                                        Function vaFacilityNext has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        async function vaFacilityNext(state, dispatch) {
                                          let eligibility = selectEligibility(state);
                                        
                                          const location = getChosenFacilityInfo(state);
                                          const cernerSiteIds = selectRegisteredCernerFacilityIds(state);
                                        Severity: Minor
                                        Found in src/applications/vaos/new-appointment/newAppointmentFlow.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language