department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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 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 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 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 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 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 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 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 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

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

                          export function groupTimelineActivity(events) {
                            const phases = {};
                            let activity = [];
                          
                            const phaseEvents = events
                          Severity: Minor
                          Found in src/applications/claims-status/utils/helpers.js - About 1 hr to fix

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

                            const generateDocsFiled = docsFiled => {
                              return docsFiled.map(document => {
                                if (document.id && document.status) {
                                  return {
                                    requestTypeText: `Request type: ${document.displayName}`,

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

                                const handleCompareUpdate = e => {
                                  if (e.target.checked && !compareChecked) {
                                    if (compare.search.loaded.length === 3) {
                                      recordEvent({
                                        event: 'gibct-form-change',
                              Severity: Minor
                              Found in src/applications/gi/containers/ProfilePageHeader.jsx - About 1 hr to fix

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

                                    const handleScroll = () => {
                                      const topOffset =
                                        document
                                          .getElementById('estimate-your-benefits-accordion')
                                          ?.getBoundingClientRect().top -
                                Severity: Minor
                                Found in src/applications/gi/containers/CalculateYourBenefits.jsx - About 1 hr to fix

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

                                  const vetTecCheckbox = (
                                    vettec,
                                    preferredProvider,
                                    handleVetTecChange,
                                    handlePreferredProviderChange,
                                  Severity: Minor
                                  Found in src/applications/gi/containers/FilterYourResults.jsx - About 1 hr to fix

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

                                    export function addStatusToIssues(issues) {
                                      return issues.map(issue => {
                                        let status = '';
                                        switch (issue.lastAction) {
                                          case ISSUE_STATUS.fieldGrant:
                                    Severity: Minor
                                    Found in src/applications/claims-status/utils/appeals-v2-helpers.jsx - About 1 hr to fix

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

                                        const renderMilitaryDetails = () => {
                                          const name = 'Your military details';
                                      
                                          return (
                                            <AccordionItem

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

                                          render() {
                                            return (
                                              <div className="calculator-form">
                                                <p>Use the fields below to update your benefits.</p>
                                                {this.renderApprovedProgramsSelector()}
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language