department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,724 of 12,675 total issues

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

const SupportingFilesOrAffidavitInfo = () => {
  return (
    <>
      <p>
        You can also upload supporting files or an affidavit (a written

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

        const AuthRegistrationOnlyPage = props => {
          const { location, route, router } = props;
          const { data: formData } = useSelector(state => state.form);
          const goBack = () => {
            const { pathname } = location;
        Severity: Minor
        Found in src/applications/hca/containers/AuthRegistrationOnlyPage.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 renderOldLandingContent has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const renderOldLandingContent = () => {
              return (
                <>
                  <p>
                    You can find an accredited attorney, claims agent, or VSO in 1 of these

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

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

                            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 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 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 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 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 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
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language