department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,839 of 12,839 total issues

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

function createMutationObserverCallback() {
  // Find native header, footer, etc based on page path
  const DEPRECATED_SELECTOR_CONFIG = [
    {
      path: /.*/,
Severity: Minor
Found in src/applications/proxy-rewrite/proxy-rewrite-entry.jsx - About 1 hr to fix

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

    const certificateOfEligibility = (state = initialState, action) => {
      switch (action.type) {
        case UPDATE_LOGGEDIN_STATUS:
          return { ...state, profileIsUpdating: false };
        case SKIP_AUTOMATIC_COE_CHECK:
    Severity: Minor
    Found in src/applications/lgy/coe/shared/reducers/index.js - About 1 hr to fix

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

      const certificateOfEligibility = (state = initialState, action) => {
        switch (action.type) {
          case UPDATE_LOGGEDIN_STATUS:
            return { ...state, profileIsUpdating: false };
          case SKIP_AUTOMATIC_COE_CHECK:

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

        export const handleEditPageDisplayTweaks = location => {
          const navHeader = document.querySelector('#nav-form-header');
          const chapterProgress = document.querySelector(
            '.schemaform-chapter-progress',
          );
        Severity: Minor
        Found in src/applications/_mock-form-ae-design-patterns/App.jsx - About 1 hr to fix

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

          export function libraryCurrent() {
            let increment = 1;
            let numVal;
            Array.prototype.slice.call(cards).forEach(element => {
              if (

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

              const buildHourItem = item => {
                // {day: 4, starthours: 700, endhours: 1730, comment: ""}
                if (
                  item.starthours < 0 ||
                  item.endhours < 0 ||
            Severity: Minor
            Found in src/applications/static-pages/facilities/vetCentersHours.jsx - About 1 hr to fix

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

                const fetchNearbyVetCenters = async () => {
                  const mainAddress = props.mainVetCenterAddress;
                  if (!mainAddress) {
                    return;
                  }

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

                const createDuplicateEvents = () => {
                  const eventA = createEvent(
                    now
                      .clone()
                      .add(5, 'days')
                Severity: Minor
                Found in src/applications/static-pages/events/helpers/event-generator.js - 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 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 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 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 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 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 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 transformSecondaryDisabilities has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

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

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