department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

const DecisionReviewPage = () => {
  useEffect(() => {
    setTimeout(() => {
      focusElement('#main h2');
    });
Severity: Minor
Found in src/applications/appeals/996/subtask/pages/other.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 ResultsList has 48 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

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

              const renderValue = (key, value) => {
                // Skip undefined values
                if (value === undefined) {
                  return null;
                }

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

                    export const useDefaultFormData = () => {
                      const { totalRating } = useSelector(state => state.disabilityRating);
                      const { data: formData } = useSelector(state => state.form);
                      const featureToggles = useSelector(selectFeatureToggles);
                      const { dob: veteranDob } = useSelector(selectProfile);
                    Severity: Minor
                    Found in src/applications/hca/hooks/useDefaultFormData.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 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 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 calculateIncome has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const calculateIncome = (
                                  enhancedFSRActive,
                                  employmentRecords = [],
                                  addlIncRecords = [],
                                  socialSecurity = {},
                                Severity: Minor
                                Found in src/applications/financial-status-report/utils/calculateIncome.js - 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 getAllExpenses has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const getAllExpenses = formData => {
                                      const {
                                        expenses: {
                                          creditCardBills = [],
                                          expenseRecords = [],
                                    Severity: Minor
                                    Found in src/applications/financial-status-report/utils/calculateExpenses.js - About 1 hr to fix

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

                                        const ProviderAddress = props => {
                                          const { address, showDirections = false, directionsName, phone } = props;
                                          return (
                                            <address data-testid="address-block">
                                              <p className="vads-u-margin--0">
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language