department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function appointmentDetails has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const appointmentDetails = testId => {
    return (
      <div data-testid={testId}>
        <div
          className="vads-u-margin-top--1p5 vads-u-margin-bottom--1"

    Function addRequiredDescriptionsToDisabilitiesBDD has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const addRequiredDescriptionsToDisabilitiesBDD = formData => {
        if (!isBDDForm || !formData.newDisabilities) {
          return formData;
        }
    
    

      Function makeUiSchema has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function makeUiSchema(itemId) {
        return {
          'ui:title': ({ formData }) =>
            detailsPageBegin(
              additionalExposuresPageTitle,

        Function postApiData has 35 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            url => {
              const localStorageFiles = localStorage.getItem('askVAFiles');
              const parsedLocalStoragefiles = JSON.parse(localStorageFiles);
              const transformedResponse = {
                ...sendReply,
        Severity: Minor
        Found in src/applications/ask-va/containers/ResponseInboxPage.jsx - About 1 hr to fix

          Function App has 35 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const App = () => {
            const {
              TOGGLE_NAMES: { accreditedRepresentativePortalFrontend: appToggleKey },
              useToggleLoadingValue,
              useToggleValue,

            Function newFolder has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const newFolder = folderName => async dispatch => {
              try {
                const response = await createFolder(folderName);
            
                dispatch({
            Severity: Minor
            Found in src/applications/mhv-secure-messaging/actions/folders.js - About 1 hr to fix

              Function foldersReducer has 35 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Function ActionButtons has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function ActionButtons(props) {
                  const { eligibleForRequests, facilityId } = props;
                  const history = useHistory();
                  const dispatch = useDispatch();
                  const { requestDateTime } = useSelector(getNewAppointmentFlow);

                  Function initialSchema has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      initialSchema() {
                        let newSchema = initialSchema;
                  
                        if (filteredClinics.length === 1) {
                          const clinic = filteredClinics[0];

                    Function makeHeaderLabel has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      const makeHeaderLabel = () => {
                        const removed = [];
                        const added = [];
                    
                        loaded.forEach(loadedCode => {
                    Severity: Minor
                    Found in src/applications/gi/containers/CompareDrawer.jsx - About 1 hr to fix

                      Function getTab has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const getTab = (tabName, label) => {
                          const activeTab = tabName === tab;
                          const tabClasses = classNames(
                            {
                              'active-search-tab': activeTab,
                      Severity: Minor
                      Found in src/applications/gi/components/search/SearchTabs.jsx - About 1 hr to fix

                        Function clearAllFilters has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const clearAllFilters = () => {
                            dispatchFilterChange({
                              ...filters,
                              schools: true,
                              excludedSchoolTypes: [
                        Severity: Minor
                        Found in src/applications/gi/components/ClearFiltersBtn.jsx - About 1 hr to fix

                          Function InfoDisclaimer has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const InfoDisclaimer = () => {
                            return (
                              <div className="border-bottom vads-u-margin-top--3 vads-u-margin-bottom--2 ">
                                <p
                                  className="vads-u-font-family--sans vads-u-color--gray-dark"
                          Severity: Minor
                          Found in src/applications/gi/updated-gi/components/InfoDisclaimer.jsx - About 1 hr to fix

                            Function AccreditationModalContent has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export default function AccreditationModalContent() {
                              return (
                                <>
                                  <p>
                                    The goal of accreditation is to ensure the education provided by

                              Function MockAuthButton has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export default function MockAuthButton() {
                                const [authType, setAuthType] = useState(CSP_IDS.LOGIN_GOV);
                                const [mockLoginError, setMockLoginError] = useState('');
                                return [environments.LOCALHOST, environments.VAGOVDEV].includes(
                                  environment.getRawBuildtype(),
                              Severity: Minor
                              Found in src/applications/login/components/MockAuthButton.jsx - About 1 hr to fix

                                Function BenefitsProfileWrapper has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const BenefitsProfileWrapper = () => {
                                  const { loading, latestAddress } = useData();
                                  const applicantName = latestAddress?.veteranName;
                                  const { profile } = useSelector(state => state.user || {});
                                  const {

                                  Function SignInEmailAlert has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const SignInEmailAlert = () => {
                                    const { label } = useSignInServiceProvider();
                                  
                                    const [dismissed, setDismissed] = useSessionStorage(
                                      'dismissedCredentialAlerts',

                                    Function genAndDownloadCCD has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const genAndDownloadCCD = (firstName, lastName) => async dispatch => {
                                      dispatch({ type: Actions.Downloads.GENERATE_CCD });
                                      try {
                                        // GET LIST OF CCDs
                                        const generate = await generateCCD();
                                    Severity: Minor
                                    Found in src/applications/mhv-medical-records/actions/downloads.js - About 1 hr to fix

                                      Function generatePdf has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          async () => {
                                            try {
                                              setDownloadStarted(true);
                                              dispatch(clearAlerts());
                                      
                                      

                                        Function AddressAuthorizationPolicy has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const AddressAuthorizationPolicy = props => {
                                          const { formData } = props;
                                        
                                          return (
                                            <div className="vads-u-margin-y--3">
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language