department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,846 of 12,846 total issues

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

  render() {
    if (this.props.loading) {
      return <va-loading-indicator message="Loading facility..." />;
    }

    Function fleshOutRecurringEvents has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const fleshOutRecurringEvents = events => {
      if (!events) {
        return [];
      }
    
    
    Severity: Minor
    Found in src/applications/static-pages/events/helpers/index.js - About 1 hr to fix

      Function VeteranInformation has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const VeteranInformation = props => {
        const {
          data,
          goBack,
          goForward,
      Severity: Minor
      Found in src/applications/hca/components/FormPages/VeteranInformation.jsx - About 1 hr to fix

        Function DemographicViewField has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const DemographicViewField = props => {
          const { formContext, uiSchema, schema, formData, registry } = props;
          const { ObjectField } = registry.fields;
        
          if (formContext.reviewMode) {
        Severity: Minor
        Found in src/applications/hca/components/FormFields/DemographicViewField.jsx - About 1 hr to fix

          Function handleChange has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

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

            Function IdentityNotVerified has 26 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 —

              Function isBDD has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export const isBDD = formData => {
                const isBddDataFlag = Boolean(formData?.['view:isBddData']);
                const servicePeriods = formData?.serviceInformation?.servicePeriods || [];
              
                // separation date entered in the wizard
              Severity: Minor
              Found in src/applications/disability-benefits/all-claims/utils/index.jsx - About 1 hr to fix

                Function postTravelOnlyClaim has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  postTravelOnlyClaim: async (startTime, uuid, timeToComplete) => {
                    const url = '/check_in/v0/travel_claims/';
                    const headers = { 'Content-Type': 'application/json' };
                    const travelClaimData = {
                      travelClaims: {
                Severity: Minor
                Found in src/applications/check-in/api/versions/v2.js - About 1 hr to fix

                  Function ui:validations has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                            (errors, city, formData, _schema, _uiSchema, _index) => {
                              // This variable represents whether a veteran checked the "I live on a military base outside of the U.S." checkbox on the page
                              // running this validation. This is stored within `formData` as `view:livesOnMilitaryBase` (`MILITARY_BASE_PATH`), but the path
                              // thereto differs depending on the page running the validation.
                              let livesOnMilitaryBase =

                    Function FinancialHardshipViewField has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const FinancialHardshipViewField = props => {
                      const { defaultEditButton, formData } = props;
                      const { financialHardshipDocuments } = formData;
                    
                      return (

                      Function ui:validations has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                (errors, city, formData, _schema, _uiSchema, _index) => {
                                  // This variable represents whether a veteran checked the "I live on a military base outside of the U.S." checkbox on the page
                                  // running this validation. This is stored within `formData` as `view:livesOnMilitaryBase` (`MILITARY_BASE_PATH`), but the path
                                  // thereto differs depending on the page running the validation.
                                  let livesOnMilitaryBase =

                        Function prefillContactInformation has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const prefillContactInformation = data => {
                            const newData = _.omit(['veteran'], data);
                            const { veteran } = data;
                        
                            if (veteran) {

                          Function makePages has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export function makePages() {
                            const pagesList = Object.keys(ADDITIONAL_EXPOSURES)
                              .filter(itemId => itemId !== 'none' && itemId !== 'notsure')
                              .map(itemId => {
                                const pageName = `additional-exposure-${itemId}`;

                            Function submitErrorContent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const submitErrorContent = props => {
                              const submissionIdContent = props.submissionId
                                ? ` and provide this reference number ${props.submissionId}`
                                : '';
                            
                            

                              Function TerminalIllnessViewField has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const TerminalIllnessViewField = props => {
                                const { defaultEditButton, formData } = props;
                                const { terminalIllnessDocuments } = formData;
                              
                                return (

                                Function clearSpouseData has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const clearSpouseData = formData => {
                                  return {
                                    ...formData,
                                    questions: {
                                      ...formData.questions,

                                  Function fetchUser has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export function fetchUser() {
                                    return async dispatch => {
                                      dispatch({
                                        type: FETCH_USER,
                                      });
                                  Severity: Minor
                                  Found in src/applications/accredited-representative-portal/actions/user.js - About 1 hr to fix

                                    Function chapters has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        .map(chapterName => {
                                          const pages = pagesByChapter[chapterName];
                                          const expandedPages = getActiveExpandedPages(pages, formData);
                                          const chapterFormConfig = getChapterFormConfigAskVa(
                                            modifiedFormConfig,
                                    Severity: Minor
                                    Found in src/applications/ask-va/containers/ReviewPage.jsx - About 1 hr to fix

                                      Function saveDraft has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export const saveDraft = (messageData, type, id) => async dispatch => {
                                        recordEvent({
                                          // For Google Analytics
                                          event: 'secure-messaging-save-draft-type',
                                          'secure-messaging-save-draft': type,
                                      Severity: Minor
                                      Found in src/applications/mhv-secure-messaging/actions/draftDetails.js - About 1 hr to fix

                                        Function contentT30 has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            () => {
                                              return (
                                                isTranstioningFacility && (
                                                  <va-alert status="warning" class="vads-u-margin-y--2">
                                                    <h1 slot="headline">
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language