department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

Function NeedHelp has 43 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default function NeedHelp() {
  const isIntro = window.location.pathname.endsWith('/introduction');
  return isIntro ? (
    <>
      <p>
Severity: Minor
Found in src/applications/appeals/testing/hlr/content/NeedHelp.jsx - About 1 hr to fix

    Function board has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const board = (formValues, noDRB) => {
      if (!formValues) return null;
    
      const prevAppType =
        ['1', '4'].indexOf(formValues['10_prevApplicationType']) > -1;
    Severity: Minor
    Found in src/applications/discharge-wizard/helpers/index.jsx - About 1 hr to fix

      Function BenefitsSelection has 43 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function BenefitsSelection(props) {
        const state = useFormikContext();
      
        return (
          <>
      Severity: Minor
      Found in src/applications/burial-poc-v6/pages/BenefitsSelection.jsx - About 1 hr to fix

        Function onDownloadLinkClick has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export async function onDownloadLinkClick(event, reduxStore) {
          // This function purpose is to determine if the PDF is valid on click.
          // Once it's done, it passes information to DownloadHandler() which determines what to render.
          event.preventDefault();
        
        

          Function schema has 43 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function schema(currentSchema, userOptions) {
            const options = {
              fields: ['serviceBranch', 'dateRange'],
              required: [],
              ...userOptions,
          Severity: Minor
          Found in src/applications/edu-benefits/definitions/toursOfDuty.jsx - About 1 hr to fix

            Function createOldSchoolPage has 43 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export default function createOldSchoolPage(schema) {
              const { trainingEndDate, reasonForChange } = schema.properties;
              const { school, date } = schema.definitions;
              return {
                path: 'school-selection/old-school',
            Severity: Minor
            Found in src/applications/edu-benefits/pages/oldSchool.js - About 1 hr to fix

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

              export default function transformForSubmit(formConfig, form) {
                const transformedData = JSON.parse(
                  formsSystemTransformForSubmit(formConfig, form),
                );
              
              
              Severity: Minor
              Found in src/applications/ivc-champva/10-7959a/config/submitTransformer.js - About 1 hr to fix

                Function CollapsibleList has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const CollapsibleList = () => {
                  return (
                    <div id="SupportingFiles-collapsiblePanel">
                      <div className="input-section">
                        <div

                  Function onUpdateClicked has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const onUpdateClicked = async () => {
                      const addressState = {
                        ...stateAndZip,
                        state: stateAndZip.stateCode,
                      };

                    Function IdentityVerificationForm has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const IdentityVerificationForm = props => {
                      const { data, onLogin, onChange, onSubmit } = props;
                      const {
                        vesRecordFound,
                        hasServerError,
                    Severity: Minor
                    Found in src/applications/hca/components/IdentityPage/VerificationForm.jsx - About 1 hr to fix

                      Function WarningStatus has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const WarningStatus = () => {
                        const {
                          statusCode,
                          applicationDate,
                          enrollmentDate,

                        Function confirmationPageNextStepsParagraph has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export const confirmationPageNextStepsParagraph = formData => {
                          if (
                            hasActiveCompensationITF({ formData }) &&
                            hasActivePensionITF({ formData })
                          ) {
                        Severity: Minor
                        Found in src/applications/simple-forms/21-0966/config/helpers.js - About 1 hr to fix

                          Function IntroductionPage has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const IntroductionPage = props => {
                            const { route, router } = props;
                          
                            const startForm = useCallback(
                              () => {
                          Severity: Minor
                          Found in src/applications/caregivers/containers/IntroductionPage.jsx - About 1 hr to fix

                            Function formatAddress has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export function formatAddress(address) {
                              /* eslint-disable prefer-template */
                              const {
                                country,
                                postalCode,
                            Severity: Minor
                            Found in src/applications/ask-va/utils/helpers.js - About 1 hr to fix

                              Function VetTec has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const VetTec = () => {
                                useEffect(() => {
                                  recordEvent({
                                    event: 'howToWizard-alert-displayed',
                                    'reason-for-alert': 'help with VET TEC program debt',
                              Severity: Minor
                              Found in src/applications/financial-status-report/wizard/pages/VetTec.jsx - About 1 hr to fix

                                Function getBenefitOptionText has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function getBenefitOptionText(
                                  option,
                                  value,
                                  isVeteran,
                                  awardEffectiveDate,
                                Severity: Minor
                                Found in src/applications/letters/utils/helpers.jsx - About 1 hr to fix

                                  Function sortMessages has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      data => {
                                        return data.sort((a, b) => {
                                          if (
                                            [SENT_DATE_DESCENDING.value, DRAFT_DATE_DESCENDING.value].includes(
                                              sortOrder,

                                    Function updateFacilitySortMethod has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function updateFacilitySortMethod(sortMethod, uiSchema) {
                                      return async (dispatch, getState) => {
                                        let location = null;
                                        const { facilities } = selectCovid19VaccineNewBooking(getState());
                                        const calculatedDistanceFromCurrentLocation = facilities.some(
                                    Severity: Minor
                                    Found in src/applications/vaos/covid-19-vaccine/redux/actions.js - About 1 hr to fix

                                      Function fetchRequestDetails has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function fetchRequestDetails(id) {
                                        return async (dispatch, getState) => {
                                          try {
                                            const state = getState();
                                            let request = selectAppointmentById(state, id, [
                                      Severity: Minor
                                      Found in src/applications/vaos/appointment-list/redux/actions.js - About 1 hr to fix

                                        Function getPageContent has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          getPageContent() {
                                            const { claim } = this.props;
                                        
                                            // Return null if the claim/ claim.attributes dont exist
                                            if (!claimAvailable(claim)) {
                                        Severity: Minor
                                        Found in src/applications/claims-status/containers/OverviewPage.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language