department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,730 of 12,800 total issues

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

export function replaceRefSchemas(schema, definitions, path = '') {
  // this can happen if you import a field that doesn’t exist from a schema
  if (!schema) {
    throw new Error(`Schema is undefined at ${path}`);
  }
Severity: Minor
Found in src/platform/forms-system/src/js/state/helpers.js - About 1 hr to fix

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

    function phoneUISchema(category) {
      const schema = {
        'ui:options': {
          hideLabelText: true,
          showFieldLabel: false,

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

        render() {
          const { location, currentQuery } = this.props;
      
          if (!location) {
            return null;
      Severity: Minor
      Found in src/applications/facility-locator/containers/ProviderDetail.jsx - About 1 hr to fix

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

          const renderFacilityTypeDropdown = () => {
            const { suppressCCP, suppressPharmacies, suppressPPMS } = props;
            const { facilityType, isValid, facilityTypeChanged } = currentQuery;
            const locationOptions = suppressPPMS
              ? nonPPMSfacilityTypeOptions
        Severity: Minor
        Found in src/applications/facility-locator/components/SearchControls.jsx - About 1 hr to fix

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

          export const TaskList = () => {
            const { chapterTitles, getChapterPagesFromChapterIndex } = setupPages(
              formConfig,
            );
          
          
          Severity: Minor
          Found in src/applications/appeals/testing/nod-new/components/TaskList.jsx - About 1 hr to fix

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

              export function applicantInsuranceSOBSchema(isPrimary) {
                const keyname = isPrimary
                  ? 'primaryInsuranceScheduleOfBenefits'
                  : 'secondaryInsuranceScheduleOfBenefits';
                return {

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

                        const ActionLink = props => {
                          const { action, appointmentId, app, startTime } = props;
                          const { t } = useTranslation();
                          const { getPreCheckinComplete } = useStorage(app);
                        
                        
                        Severity: Minor
                        Found in src/applications/check-in/components/ActionLink.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 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-v2/config/helpers.js - About 1 hr to fix

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

                                const renderAddressOption = (address, id = 'userEntered') => {
                                  const hasConfirmedSuggestions = apiData.length > 0;
                                  const { addressStreet, cityStateZip, addressCountry } = formatAddress(
                                    address,
                                  );

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

                                  const CrisisLineConnectButton = () => {
                                    const [lastFocusableElement, setLastFocusableElement] = useState(null);
                                    const [crisisModalOpened, setCrisisModalOpened] = useState(false);
                                  
                                    useEffect(

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

                                    const DeleteDraftModal = props => {
                                      const { unsavedDraft, draftSequence } = props;
                                      return (
                                        <VaModal
                                          id={`delete-draft-modal${draftSequence ? `-${draftSequence}` : ''}`}

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

                                      export function schoolTypesCheckboxes(
                                        handleIncludedSchoolTypesChange,
                                        options,
                                        smallScreen,
                                        automatedTest = false,
                                      Severity: Minor
                                      Found in src/applications/gi/containers/search/FilterBeforeResults.jsx - About 1 hr to fix

                                        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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language