department-of-veterans-affairs/vets-website

View on GitHub

Showing 3,736 of 12,833 total issues

Function exports has 50 lines of code (exceeds 25 allowed). Consider refactoring.
Open

module.exports = function(chai, utils) {
  const axe = require('axe-core');
  const { Assertion } = chai;

  utils.addMethod(chai.Assertion.prototype, 'accessible', function(
Severity: Minor
Found in src/platform/testing/unit/axe-plugin.js - About 2 hrs to fix

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

      render() {
        if (!this.props.user.login.currentlyLoggedIn) return null;
        const { savedStatus } = this.props.form;
        const { formConfig } = this.props;
        const appType = formConfig?.customText?.appType || APP_TYPE_DEFAULT;
    Severity: Minor
    Found in src/platform/forms/save-in-progress/SaveFormLink.jsx - About 2 hrs to fix

      Function VAPServiceTransaction has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function VAPServiceTransaction(props) {
        const {
          id,
          isModalOpen,
          children,

        Function fetchDebtLetters has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const fetchDebtLetters = async (dispatch, debtLettersActive) => {
          dispatch(fetchDebtsInitiated());
          try {
            const options = {
              method: 'GET',
        Severity: Minor
        Found in src/applications/combined-debt-portal/combined/actions/debts.js - About 2 hrs to fix

          Function returnAllCare has 50 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const returnAllCare = async params => {
            const { address, bounds, locationType, page, center, radius } = params;
            const isUrgentCare = locationType === LocationType.URGENT_CARE;
            const vaData = await LocatorApi.searchWithBounds(
              address,
          Severity: Minor
          Found in src/applications/facility-locator/actions/locations/fetchLocations.js - About 2 hrs to fix

            Function DecisionReviewPage has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            const DecisionReviewPage = () => {
              useEffect(() => {
                setTimeout(() => {
                  focusElement('#main h2');
                });
            Severity: Minor
            Found in src/applications/appeals/testing/sc/subtask/pages/other.jsx - About 2 hrs to fix

              Function DecisionReviewPage has 50 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const DecisionReviewPage = () => {
                useEffect(() => {
                  setTimeout(() => {
                    focusElement('#main h2');
                  });
              Severity: Minor
              Found in src/applications/appeals/995/subtask/pages/other.jsx - About 2 hrs to fix

                Function DecisionReviewPage has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const DecisionReviewPage = () => {
                  useEffect(() => {
                    setTimeout(() => {
                      focusElement('#main h2');
                    });
                Severity: Minor
                Found in src/applications/appeals/testing/hlr/subtask/pages/other.jsx - About 2 hrs to fix

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

                  export default function transformForSubmit(formConfig, form) {
                    const transformedData = JSON.parse(
                      formsSystemTransformForSubmit(formConfig, form),
                    );
                  
                  
                  Severity: Minor
                  Found in src/applications/ivc-champva/10-7959f-1/config/submitTransformer.js - About 2 hrs to fix

                    Function ApplicantRelationshipReviewPage has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    export function ApplicantRelationshipReviewPage(props) {
                      const { data, keyname = KEYNAME, primary = PRIMARY, secondary = SECONDARY } =
                        props || {};
                      const genOps = props.genOp || generateOptions;
                      const {

                      Function applicantInsuranceCardSchema has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      export function applicantInsuranceCardSchema(isPrimary) {
                        const keyname = isPrimary ? 'primaryInsuranceCard' : 'secondaryInsuranceCard';
                        return {
                          uiSchema: {
                            ...titleUI(

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

                          render() {
                            const {
                              data,
                              schema,
                              uiSchema,

                          Function conditionalDataLayerPush has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              const conditionalDataLayerPush = () => {
                                return (
                                  currentLocationInputString,
                                  currentSortType,
                                  currentRepresentativeType,
                          Severity: Minor
                          Found in src/applications/representative-search/containers/SearchPage.jsx - About 2 hrs to fix

                            Function submitToAPI has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const submitToAPI = (state, setState) => {
                              // if no file has been added, show an error message
                              if (state.files.length === 0) {
                                setState({
                                  ...state,

                              Function submitToAPI has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              export const submitToAPI = (state, setState) => {
                                // if no file has been added, show an error message
                                if (state.files.length === 0) {
                                  setState({
                                    ...state,
                              Severity: Minor
                              Found in src/applications/lgy/coe/status/components/DocumentUploader/submit.js - About 2 hrs to fix

                                Function InsuranceInformation has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const InsuranceInformation = props => {
                                  const {
                                    goBack,
                                    goForward,
                                    contentBeforeButtons,
                                Severity: Minor
                                Found in src/applications/hca/components/FormPages/InsuranceInformation.jsx - About 2 hrs to fix

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

                                    render() {
                                      if (this.state.loading) {
                                        return <va-loading-indicator message="Loading facilities..." />;
                                      }
                                  
                                  
                                  Severity: Minor
                                  Found in src/applications/static-pages/facilities/FacilityListWidget.jsx - About 2 hrs to fix

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

                                      render() {
                                        const { form } = this.props;
                                        const { submission, formId, data } = form;
                                    
                                        const { fullName } = data;
                                    Severity: Minor
                                    Found in src/applications/_mock-form/containers/ConfirmationPage.jsx - About 2 hrs to fix

                                      Function validateLogin has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      const validateLogin = async (
                                        lastName,
                                        dob,
                                        dobError,
                                        setLastNameError,
                                      Severity: Minor
                                      Found in src/applications/check-in/utils/validateVeteran/index.js - About 2 hrs to fix

                                        Function ViewDependentsLayout has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function ViewDependentsLayout(props) {
                                          let mainContent;
                                        
                                          if (props.loading) {
                                            mainContent = (
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language