department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

        export const sendMessage = (message, attachments) => async dispatch => {
          try {
            await createMessage(message, attachments);
            dispatch(
              addAlert(
        Severity: Minor
        Found in src/applications/mhv-secure-messaging/actions/messages.js - About 1 hr to fix

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

          const LandingPageAuth = () => {
            const dispatch = useDispatch();
            const fullState = useSelector(state => state);
            const inbox = useSelector(state => state.sm.folders?.folder);
            const [prefLink, setPrefLink] = useState('');

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

                export const recipientsReducer = (state = initialState, action) => {
                  switch (action.type) {
                    case Actions.AllRecipients.GET_LIST: {
                      const {
                        associatedTriageGroups,
                Severity: Minor
                Found in src/applications/mhv-secure-messaging/reducers/recipients.js - About 1 hr to fix

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

                  export function openFacilityPage() {
                    return async (dispatch, getState) => {
                      try {
                        const initialState = getState();
                        const newBooking = selectCovid19VaccineNewBooking(initialState);
                  Severity: Minor
                  Found in src/applications/vaos/covid-19-vaccine/redux/actions.js - About 1 hr to fix

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

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

                        function mapStateToProps(state) {
                          const claimsState = state.disability.status;
                          const claimsV2Root = claimsState.claimsV2; // this is where all the meat is for v2
                        
                          const services = getBackendServices(state);
                        Severity: Minor
                        Found in src/applications/claims-status/containers/YourClaimsPageV2.jsx - About 1 hr to fix

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

                            render() {
                              const { events, missingEvents } = this.props;
                              const { expanded } = this.state;
                              let pastEventsList = [];
                              if (events.length) {
                          Severity: Minor
                          Found in src/applications/claims-status/components/appeals-v2/Timeline.jsx - About 1 hr to fix

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

                            const RatingsAbout = () => {
                              return (
                                <div className="vads-u-padding-top--4 about-ratings">
                                  <div className="mobile-lg:vads-u-font-size--h3 vads-u-padding-bottom--1p5 vads-u-font-weight--bold vads-u-font-family--serif small-screen-font">
                                    About ratings

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

                                render() {
                                  if (isEmpty(this.props.calculated)) {
                                    return (
                                      <VaLoadingIndicator
                                        data-testid="loading-indicator"
                              Severity: Minor
                              Found in src/applications/gi/containers/VetTecEstimateYourBenefits.jsx - About 1 hr to fix

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

                                  const renderViewButtons = () => {
                                    if (totalRowCount > DEFAULT_ROWS_VIEWABLE) {
                                      if (viewableRowCount !== totalRowCount) {
                                        const remainingRowCount = totalRowCount - viewableRowCount;
                                        const showNextCount =
                                Severity: Minor
                                Found in src/applications/gi/components/profile/SchoolLocations.jsx - 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 generateRows has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    const generateRows = signInServiceName => {
                                      const { link, label: buttonText } =
                                        SERVICE_PROVIDERS[signInServiceName] || {};
                                      return [
                                        {

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

                                      function ViewDependentsList(props) {
                                        let mainContent;
                                        const manageDependentsToggle = props?.manageDependentsToggle ?? null;
                                        if (props.loading) {
                                          mainContent = (

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

                                        const LabsAndTestsListItem = props => {
                                          const { record } = props;
                                        
                                          return (
                                            <va-card
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language