department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

Function MixedLanguageDisclaimer has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const MixedLanguageDisclaimer = () => {
  const selectFeatureToggles = useMemo(makeSelectFeatureToggles, []);
  const {
    isTranslationDisclaimerSpanishEnabled,
    isTranslationDisclaimerTagalogEnabled,
Severity: Minor
Found in src/applications/check-in/components/MixedLanguageDisclaimer.jsx - About 1 hr to fix

    Function formatReadableDate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const formatReadableDate = rawDate => {
      const months = [
        'January',
        'February',
        'March',
    Severity: Minor
    Found in src/applications/toe/helpers.jsx - About 1 hr to fix

      Function setDayOfData has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          payload => {
            batch(() => {
              const {
                appointments,
                demographics,
      Severity: Minor
      Found in src/applications/check-in/hooks/useGetCheckInData.jsx - About 1 hr to fix

        Function formatReadableDate has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const formatReadableDate = rawDate => {
          const months = [
            'January',
            'February',
            'March',

          Function ViewPaymentsApp has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function ViewPaymentsApp(props) {
            return (
              <RequiredLoginView
                serviceRequired={backendServices.USER_PROFILE}
                user={props.user}

            Function DisagreeFileClaimPage has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const DisagreeFileClaimPage = () => {
              const linkText = 'Learn about the decision review process';
            
              recordEvent({
                event: 'howToWizard-alert-displayed',

              Function showSeparationLocation has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const showSeparationLocation = formData => {
                const { serviceInformation = {} } = formData || {};
                const { servicePeriods, reservesNationalGuardService } = serviceInformation;
              
                // moment(undefined) => today
              Severity: Minor
              Found in src/applications/disability-benefits/all-claims/utils/index.jsx - About 1 hr to fix

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

                  render() {
                    const pageDescription = (
                      <>
                        <h3 className="vads-u-font-size--h4">Shipping address</h3>
                        <div className="vads-u-margin-top--2">

                  Function transformSecondaryDisabilities has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    const transformSecondaryDisabilities = formData => {
                      if (!formData.newSecondaryDisabilities) {
                        return formData;
                      }
                  
                  

                    Function uiSchema has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export const uiSchema = index => {
                      const addressUI = addressUISchema(
                        `secondaryIncident${index}.sources[:index]address`,
                        null,
                        false,

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

                      export const ConfirmationPage = props => {
                        const { form } = props;
                        const { submission, data } = form;
                      
                        const { fullName } = data.veteran;

                        Function SurveyInformation has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const SurveyInformation = () => {
                          const isProduction = environment.isProduction();
                        
                          // showForm/loadForm use specific survey numbers for each environment
                          const surveyNumber = isProduction

                          Function IdentityNotVerified has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const IdentityNotVerified = () => {
                            const content = (
                              <>
                                <p className="vads-u-font-size--base">
                                  We need to make sure you’re you — and not someone pretending to be you —
                          Severity: Minor
                          Found in src/applications/vre/28-1900/components/IdentityNotVerified.jsx - About 1 hr to fix

                            Function populateForm has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              const populateForm = () => {
                                if (recipientExists(draft.recipientId)) {
                                  setSelectedRecipient(draft.recipientId);
                                } else {
                                  const newRecipient = {

                              Function NoFilterMatchWarning has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const NoFilterMatchWarning = () => {
                                const warningRef = useRef();
                                useEffect(() => {
                                  focusElement(warningRef.current);
                                });

                                Function AmOther has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const AmOther = props => {
                                  const { setWizardStatus } = props;
                                  useEffect(
                                    () => {
                                      setWizardStatus(false);
                                Severity: Minor
                                Found in src/applications/vre/28-1900/wizard/pages/other/isOther.jsx - About 1 hr to fix

                                  Function renameFolder has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export const renameFolder = (folderId, newName) => async dispatch => {
                                    try {
                                      await updateFolderName(folderId, newName);
                                      dispatch(
                                        addAlert(
                                  Severity: Minor
                                  Found in src/applications/mhv-secure-messaging/actions/folders.js - About 1 hr to fix

                                    Function getThreadList has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const getThreadList = async params => {
                                      const {
                                        folderId = 0,
                                        pageSize = 10,
                                        pageNumber = 1,
                                    Severity: Minor
                                    Found in src/applications/mhv-secure-messaging/api/SmApi.js - About 1 hr to fix

                                      Function selectAppointmentLocality has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function selectAppointmentLocality(
                                        appointment,
                                        isPendingAppointment = false,
                                      ) {
                                        const practitioner = selectPractitionerName(appointment);
                                      Severity: Minor
                                      Found in src/applications/vaos/appointment-list/redux/selectors.js - About 1 hr to fix

                                        Function LoadProvidersErrorAlert has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export default function LoadProvidersErrorAlert() {
                                          const headline = `We can’t load provider information`;
                                          return (
                                            <div id="providerSelectionFailed">
                                              <InfoAlert
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language