department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function FinancialStatusWarning has 33 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const FinancialStatusWarning = () => {
  const THIS_YEAR = LAST_YEAR + 1;
  const NEXT_YEAR = THIS_YEAR + 1;
  return (
    <va-alert

    Function GetFormHelp has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function GetFormHelp() {
      // Is the current page a confirmation page under a CHAMPVA form?
      const isChampvaConfirmation = /.*champva.*confirmation(\/)?$/.test(
        window.location.href,
      );
    Severity: Minor
    Found in src/applications/ivc-champva/shared/components/GetFormHelp.jsx - About 1 hr to fix

      Function LoginAlert has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const LoginAlert = () => {
        const { ID_ME, LOGIN_GOV } = CSP_IDS;
        const heading = `Verify your identity with Login.gov or ID.me to change your direct deposit information online`;
        return (
          <VaAlert status="continue" visible uswds>
      Severity: Minor
      Found in src/applications/verify-your-enrollment/components/LoginAlert.jsx - About 1 hr to fix

        Function fileUiSchema has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function fileUiSchema(label, userOptions = {}) {
          return {
            'ui:title': label,
            'ui:field': FileField,
            'ui:options': {
        Severity: Minor
        Found in src/applications/pre-need/definitions/file.js - About 1 hr to fix

          Function collectHeadings has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            collectHeadings(element, pathPrefix = '') {
              const headings = [];
          
              // Process DOM element and add headings to the array when found
              const processElement = (el, path) => {

            Function createUpcomingAppointments has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const createUpcomingAppointments = (token, number = 4) => {
              let appointments;
              if (token === noUpcomingAppointments) {
                appointments = [];
              } else {
            Severity: Minor
            Found in src/applications/check-in/api/local-mock-api/mocks/v2/shared/get.js - About 1 hr to fix

              Function CustomEmailField has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function CustomEmailField(props) {
                function handleChange(event) {
                  if (props?.toeDupContactInfoCall) {
                    if (props.email !== event) {
                      props.setFormData({
              Severity: Minor
              Found in src/applications/toe/components/CustomEmailField.jsx - About 1 hr to fix

                Function withAuthorization has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

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

                  Function TextNotificationsDisclaimer has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function TextNotificationsDisclaimer() {
                    return (
                      <>
                        <h4>What to know about text notifications</h4>
                        <ul>

                    Function displayContent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const displayContent = (title, form526RequiredIdentifiers) => {
                      const missingIdentifiers = filterMissingIdentifiers(
                        form526RequiredIdentifiers,
                      );
                      const itsOkDisplayMessage = okMessageToDisplayText(missingIdentifiers);

                      Function homelessOrAtRisk has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        homelessOrAtRisk: formData => {
                          // Much of the logic in here to get when a field is required is duplicated from the homelessness page
                          const isHomeless =
                            formData.homelessOrAtRisk === HOMELESSNESS_TYPES.homeless;
                          const isAtRisk = formData.homelessOrAtRisk === HOMELESSNESS_TYPES.atRisk;

                        Function makeUiSchema has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function makeUiSchema(locationId) {
                          return {
                            'ui:title': ({ formData }) =>
                              detailsPageBegin(
                                gulfWar1990PageTitle,

                          Function makeUiSchema has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          function makeUiSchema(locationId) {
                            return {
                              'ui:title': ({ formData }) =>
                                detailsPageBegin(
                                  gulfWar2001PageTitle,

                            Function makeUiSchema has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function makeUiSchema(locationId) {
                              return {
                                'ui:title': ({ formData }) =>
                                  detailsPageBegin(
                                    herbicidePageTitle,

                              Function MedicalConditionDescription has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export function MedicalConditionDescription() {
                                return (
                                  <div>
                                    <p>
                                      We need to know about any medical conditions that prevent you from

                                Function removeDisability has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const removeDisability = (deletedElement, formData) => {
                                  const removeFromTreatedDisabilityNames = (disability, data) => {
                                    const path = 'vaTreatmentFacilities';
                                    const facilities = get(path, data);
                                    if (!facilities) return data;

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

                                  export const ConfirmationPage = props => {
                                    const form = useSelector(state => state.form || {});
                                    const { submission, data } = form;
                                    const preparerNameDefined =
                                      data.preparerIdentification?.preparerFullName?.first &&

                                    Function MUST_MATCH_ALERT has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export const MUST_MATCH_ALERT = (variant, onCloseEvent, formData) => {
                                      const isLoa3 = formData?.loa === 3;
                                      return (
                                        <VaAlert
                                          close-btn-aria-label="Close notification"
                                    Severity: Minor
                                    Found in src/applications/simple-forms/form-upload/config/constants.js - About 1 hr to fix

                                      Function buildChapterSortedObject has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        const buildChapterSortedObject = dataPrefix => {
                                          // check to make sure there is a keyName
                                          if (dataPrefix === null) return {};
                                      
                                          // matches prefix to fullSchema chapter object labels/keys
                                      Severity: Minor
                                      Found in src/applications/caregivers/config/submit-transformer.js - About 1 hr to fix

                                        Function getApiData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                          const getApiData = url => {
                                            if (mockTestingFlag) {
                                              const res = mockInquiries;
                                        
                                              const transformedInquiries = res.data.map(inquiry => ({
                                        Severity: Minor
                                        Found in src/applications/ask-va/containers/DashboardCards.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language