department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,759 of 12,759 total issues

Function ContestableIssuesWidget has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ContestableIssuesWidget = props => {
  const {
    getContestableIssues,
    contestableIssues,
    setFormData,

    Function processContestableIssues has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const processContestableIssues = contestableIssues => {
      const processDate = entry =>
        (entry.attributes?.approxDecisionDate || '').replace(REGEXP.DASH, '');
      // remove issues with no title & sort by date - see
      // https://dsva.slack.com/archives/CSKKUL36K/p1623956682119300
    Severity: Minor
    Found in src/applications/appeals/shared/utils/issues.jsx - About 1 hr to fix

      Function transform has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export function transform(formConfig, form) {
        // https://developer.va.gov/explore/appeals/docs/decision_reviews?version=current
        // match supplemental claims schema here
        const mainTransform = formData => {
          const { benefitType, additionalDocuments } = formData;
      Severity: Minor
      Found in src/applications/appeals/testing/sc/config/submit-transformer.js - About 1 hr to fix

        Function contestableIssuesReducer has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const contestableIssuesReducer = getEligibleContestableIssues => (
          state = initialState,
          action,
        ) => {
          switch (action?.type) {
        Severity: Minor
        Found in src/applications/appeals/shared/reducers/contestableIssues.js - About 1 hr to fix

          Function DependentListLoopForm has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const DependentListLoopForm = props => {
            const { children, data, page, onChange, onSubmit } = props;
            const { fullName = {} } = data || {};
          
            // build the uiSchema title attribute based on form & page data

            Function LastUpdated has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const LastUpdated = () => {
              const feedbackButtonClicked = () => {
                window.KAMPYLE_ONSITE_SDK?.showForm('17');
              };
            
            
            Severity: Minor
            Found in src/applications/sco/components/MainContent/LastUpdated.jsx - About 1 hr to fix

              Function DependentListLoopForm has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const DependentListLoopForm = props => {
                const { children, data, page, onChange, onSubmit } = props;
                const { fullName = {} } = data || {};
              
                // build the uiSchema title attribute based on form & page data

                Function getEmptyState has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  getEmptyState(props) {
                    const {
                      onEdit,
                      hideTitle,
                      title,

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

                  const ConfirmationPage = () => {
                    const { submission, data } = useSelector(state => state.form);
                    const { userFullName } = useSelector(selectProfile);
                    const loggedIn = useSelector(isLoggedIn);
                    const { response } = submission;
                  Severity: Minor
                  Found in src/applications/hca/containers/ConfirmationPage.jsx - About 1 hr to fix

                    Function libraryPagerGen has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function libraryPagerGen() {
                      const numCardsCount = libraryNumActiveCards();
                      numCards = libraryNumCards();
                      pages = Math.ceil(numCardsCount / itemsPerPage);
                      if (document.getElementById('pager-nums-insert')) {

                      Function labResults has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      const labResults = avs => {
                        if (avs.labResults?.length > 0) {
                          const labResultItems = avs.labResults.map((item, idx) => (
                            <div key={idx}>
                              {labResultValues(item.values)}
                      Severity: Minor
                      Found in src/applications/avs/components/YourHealthInformation.jsx - About 1 hr to fix

                        Function CustomPhoneNumberField has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function CustomPhoneNumberField(props) {
                          function handleChange(event) {
                            if (props?.toeDupContactInfoCall) {
                              props?.updateGlobalPhoneNumber(event);
                              if (event?.length > 9) {
                        Severity: Minor
                        Found in src/applications/toe/components/CustomPhoneNumberField.jsx - About 1 hr to fix

                          Function infoBlockMessage has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            const infoBlockMessage = () => {
                              if (appointment?.kind === 'phone') {
                                return (
                                  <span data-testid="phone-msg-confirmation">
                                    {t('your-provider-will-call-you-at-your-appointment-time')}

                            Function updateSchema has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                                updateSchema: (formData, schema, uiSchema) => {
                                                  const countryUI = uiSchema;
                                                  const addressFormData = get(
                                                    ['view:mailingAddress', 'address'],
                                                    formData,
                            Severity: Minor
                            Found in src/applications/toe/config/form.js - About 1 hr to fix

                              Function captureError has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const captureError = (error, details) => {
                                if (error instanceof Error) {
                                  Sentry.withScope(scope => {
                                    const { token } = details;
                                    if (token) {
                              Severity: Minor
                              Found in src/applications/check-in/utils/analytics/index.js - About 1 hr to fix

                                Function updateSchema has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        updateSchema: (formData, schema, uiSchema) => {
                                          const {
                                            authorizerType,
                                            thirdPartyType,
                                            personFullName,
                                Severity: Minor
                                Found in src/applications/simple-forms/21-0845/pages/infoScope.js - About 1 hr to fix

                                  Function transformForSubmit has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function transformForSubmit(formConfig, form) {
                                    let transformedData = JSON.parse(sharedTransformForSubmit(formConfig, form));
                                  
                                    const {
                                      first: veteranFirstName,
                                  Severity: Minor
                                  Found in src/applications/simple-forms/21-4142/config/submit-transformer.js - About 1 hr to fix

                                    Function drawFreeTextOption has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      drawFreeTextOption(option) {
                                        const { highlightedIndex, value, selectionMade } = this.state;
                                    
                                        if ((selectionMade && option === value) || option?.length < 1) {
                                          return null;

                                      Function MobileLogoRow has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const MobileLogoRow = () => {
                                        return (
                                          <nav className="vads-u-display--flex vads-u-flex-direction--column vads-u-margin--0 vads-u-padding--0">
                                            <div className="header-logo-row vads-u-background-color--primary-darker vads-u-display--flex vads-u-align-items--center vads-u-justify-content--space-between vads-u-padding-y--1p5 vads-u-padding-left--1p5 vads-u-padding-right--1">
                                              <a

                                        Function isSsnUnique has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        export const isSsnUnique = formData => {
                                          const {
                                            veteranSsnOrTin,
                                            primarySsnOrTin,
                                            secondaryOneSsnOrTin,
                                        Severity: Minor
                                        Found in src/applications/caregivers/utils/helpers/form-config.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language