department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,732 of 12,811 total issues

Function generateResultsContent has 48 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const generateResultsContent = async (doc, parent, data) => {
  const results = doc.struct('Sect', {
    title: 'Results',
  });
  parent.add(results);
Severity: Minor
Found in src/platform/pdf/templates/blue_button_report.js - About 1 hr to fix

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

    export function formatAddress(address) {
      /* eslint-disable prefer-template */
    
      const {
        addressLine1,
    Severity: Minor
    Found in src/platform/forms/address/helpers.js - About 1 hr to fix

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

        render() {
          const {
            accountLevel,
            accountState,
            errors,
      Severity: Minor
      Found in src/platform/user/authorization/containers/MHVApp.jsx - About 1 hr to fix

        Function addressValidationSuccessTwoConfirmedSuggestions has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          addressValidationSuccessTwoConfirmedSuggestions() {
            return asyncReturn(
              {
                addresses: [
                  {
        Severity: Minor
        Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 1 hr to fix

          Function mapStateToProps has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const mapStateToProps = (state, ownProps) => {
            const { fieldName } = ownProps;
          
            const { transaction, transactionRequest } = selectVAPServiceTransaction(
              state,

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

            export const ConfirmationPage = () => {
              resetStoredSubTask();
            
              return (
                <ConfirmationDecisionReviews
            Severity: Minor
            Found in src/applications/appeals/995/containers/ConfirmationPage.jsx - About 1 hr to fix

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

              export const ConfirmationPage = () => {
                resetStoredSubTask();
              
                return (
                  <ConfirmationDecisionReviews
              Severity: Minor
              Found in src/applications/appeals/testing/sc/containers/ConfirmationPage.jsx - About 1 hr to fix

                Function VeteranInformation has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

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

                    render() {
                      const { form } = this.props;
                      const { submission, formId } = form;
                  
                      const appliedForVaEducationBenefits = _.get(
                  Severity: Minor
                  Found in src/applications/edu-benefits/0994/containers/ConfirmationPage.jsx - About 1 hr to fix

                    Function mapStateToProps has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const mapStateToProps = (state, ownProps) => {
                      const { fieldName } = ownProps;
                    
                      const { transaction, transactionRequest } = selectVAPServiceTransaction(
                        state,

                      Function ResultsList has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const ResultsList = props => {
                        const searchResultTitle = useRef();
                      
                        const { inProgress, searchResults, query } = props;
                      
                      

                        Function AppContent has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function AppContent() {
                          const [data, setData] = useState({});
                          const [hasError, setHasError] = useState(false);
                          const [isRequestDone, setIsRequestDone] = useState(false);
                        
                        
                        Severity: Minor
                        Found in src/applications/rated-disabilities/components/AppContent.jsx - About 1 hr to fix

                          Function noDisabilityRatingContent has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const noDisabilityRatingContent = errorCode => {
                            let content;
                            let status;
                          
                            if (isServerError(errorCode)) {

                            Function MultipleAppointmentBody has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            const MultipleAppointmentBody = props => {
                              const {
                                error,
                                appointments,
                                selectedAppointment,

                              Function EmergencyContact has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const EmergencyContact = props => {
                                const { router } = props;
                                const { t } = useTranslation();
                              
                                const selectVeteranData = useMemo(makeSelectVeteranData, []);

                                Function TravelPayClaimFilters has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export default function TravelPayClaimFilters(props) {
                                  const {
                                    statusesToFilterBy,
                                    checkedStatusFilters,
                                    onStatusFilterChange,
                                Severity: Minor
                                Found in src/applications/travel-pay/components/TravelPayClaimFilters.jsx - About 1 hr to fix

                                  Function updateFormData has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    const updateFormData = e => {
                                      e.preventDefault();
                                  
                                      if (!isValidCurrency(grossMonthlyIncome.value)) {
                                        setIncomeError(true);

                                    Function captureError has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function captureError(
                                      err,
                                      skipRecordEvent = false,
                                      customTitle,
                                      extraData,
                                    Severity: Minor
                                    Found in src/applications/vaos/utils/error.js - About 1 hr to fix

                                      Function generateProgressNoteContent has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const generateProgressNoteContent = record => {
                                        const content = {
                                          details: {
                                            header: 'Details',
                                            items: [
                                      Severity: Minor
                                      Found in src/applications/mhv-medical-records/util/pdfHelpers/notes.js - About 1 hr to fix

                                        Function DynamicRadioWidget has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export function DynamicRadioWidget(props) {
                                          const { formData, onChange } = props;
                                          let organizationList = null;
                                          let upperContent = null;
                                          const organizations =
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language