department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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

export const applyFocus = (parentId, headerHasFocused, setHeaderHasFocused) => {
  if (!headerHasFocused) {
    setTimeout(() => {
      const header = document
        .getElementById(parentId)
Severity: Minor
Found in src/applications/discharge-wizard/utilities/page-setup.js - About 1 hr to fix

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

      const onContinueClick = () => {
        if (!formValue) {
          setFormError(true);
          applyErrorFocus('duw-radio');
        } else {

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

        const onContinueClick = () => {
          if (!formValue) {
            setFormError(true);
            applyErrorFocus('duw-dropdown');
          } else {

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

        const mapStateToProps = state => {
          const { MEBClaimStatus, TOEClaimStatus } = state?.data;
          let latestClaim;
        
          if (
        Severity: Minor
        Found in src/applications/education-letters/containers/InboxPage.jsx - About 1 hr to fix

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

          const DirectDepositDescription = () => {
            const displayBankInfo = useCheckPath();
          
            return (
              <div className="vads-u-margin-top--2 vads-u-margin-bottom--2">

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

            const PreferredFacilityAlert = () => {
              // use logging to track the volume of users who receive this alert
              useEffect(() => {
                return () => {
                  recordEvent({

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

              const DirectDepositDescription = () => {
                const displayBankInfo = useCheckPath();
              
                return (
                  <div className="vads-u-margin-top--2 vads-u-margin-bottom--2">

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

                const DirectDepositDescription = () => {
                  const displayBankInfo = useCheckPath();
                
                  return (
                    <div className="vads-u-margin-top--2 vads-u-margin-bottom--2">

                  Function transformForSubmit has 27 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-7959C/config/submitTransformer.js - About 1 hr to fix

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

                    const FollowUs = () => {
                      return (
                        <section>
                          <h4>Follow us</h4>
                          <ul className="va-nav-linkslist-list social">
                    Severity: Minor
                    Found in src/applications/sco/components/HubRail/ConnectWithUs/followUs.jsx - About 1 hr to fix

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

                      const verifyEnrollment = (state = initialState, action) => {
                        switch (action.type) {
                          case VERIFY_ENROLLMENT:
                            return {
                              ...state,

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

                        const App = () => {
                          return (
                            <div>
                              <div className="row">
                                <VaBreadcrumbs
                        Severity: Minor
                        Found in src/applications/sco/containers/App.jsx - About 1 hr to fix

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

                          const clinicsVisited = avs => {
                            const shortTimezone = getShortTimezone(avs);
                            const clinics = avs.clinicsVisited.map((clinic, idx) => {
                              return (
                                <div key={clinic.clinicIen}>
                          Severity: Minor
                          Found in src/applications/avs/components/YourAppointment.jsx - About 1 hr to fix

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

                            const ListBlock = props => {
                              const {
                                heading,
                                headingLevel = 3,
                                items,
                            Severity: Minor
                            Found in src/applications/avs/components/ListBlock.jsx - About 1 hr to fix

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

                              export function libraryCount() {
                                if (document.getElementById('no-results')) {
                                  document.getElementById('no-results').style.display = 'none';
                                  document.getElementById('va-pager-div').style.display = 'flex';
                                  document.getElementById('total-pages-div').style.display = 'flex';

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

                                  const WrappedComponent = props => {
                                    const { appName } = options;
                                    const { router } = props;
                                    const selectCurrentContext = useMemo(makeSelectCurrentContext, []);
                                    const { token, permissions } = useSelector(selectCurrentContext);
                                Severity: Minor
                                Found in src/applications/check-in/containers/withAuthorization.jsx - About 1 hr to fix

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

                                        async function sendPreCheckInData() {
                                          // Set pre-checkin complete and send demographics flags.
                                          const preCheckInData = { uuid: token };
                                  
                                          if (demographicsUpToDate) {
                                  Severity: Minor
                                  Found in src/applications/check-in/hooks/useSendPreCheckInData.jsx - About 1 hr to fix

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

                                        const fetchRepStatus = async () => {
                                          setIsLoading(true);
                                          setError(null);
                                    
                                          try {

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

                                        export default function FormFooter() {
                                          return (
                                            <>
                                              <div className="row">
                                                <div className="usa-width-two-thirds medium-8 columns">
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language