department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function addressDescription has 31 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  const addressDescription = () => {
    return (
      <>
        <div className="vads-u-margin-bottom--1">
          {(error || validationError) && (

    Function errorAddressAlert has 31 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const errorAddressAlert = deliveryPointValidation => {
      if (deliveryPointValidation === BAD_UNIT_NUMBER) {
        return (
          <Alert
            status="warning"

      Function rebuildGuess has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        function rebuildGuess() {
          // use Intl API when available and returning valid time zone
          try {
            var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone;
            if (intlName && intlName.length > 3) {
      Severity: Minor
      Found in src/applications/personalization/dashboard/lib/moment-tz.js - About 1 hr to fix

        Function mockGetRefreshStatus has 31 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export const mockGetRefreshStatus = () => {
          switch (scenario) {
            case 1: {
              return STALE;
            }
        Severity: Minor
        Found in src/applications/mhv-medical-records/util/testHelper.js - About 1 hr to fix

          Function AccessTroubleAlertBox has 31 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const AccessTroubleAlertBox = props => {
            const { className, alertType, documentType } = props;
            const phase0p5Flag = useSelector(
              state => state.featureToggles.mhv_integration_medical_records_to_phase_1,
            );

            Function onInputSubmit has 31 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              const onInputSubmit = event => {
                event.preventDefault();
                setFormWasSubmitted(true);
                clearGAData();
            
            
            Severity: Minor
            Found in src/applications/search/containers/SearchApp.jsx - About 1 hr to fix

              Function handleSearch has 31 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                const handleSearch = clickedPage => {
                  const newPage = clickedPage.toString();
                  setPage(newPage);
                  setFormWasSubmitted(true);
              
              
              Severity: Minor
              Found in src/applications/search/containers/SearchApp.jsx - About 1 hr to fix

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

                  render() {
                    const enrollmentData = this.props.enrollmentData || {};
                
                    const todayFormatted = formatDateLong(new Date());
                
                
                Severity: Minor
                Found in src/applications/post-911-gib-status/containers/PrintPage.jsx - About 1 hr to fix

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

                  const createImageDetailItem = async (doc, config, x, item) => {
                    let titleText = item.title ?? '';
                    const content = [];
                  
                    if (titleText) {
                  Severity: Minor
                  Found in src/platform/pdf/templates/utils.js - About 1 hr to fix

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

                      const bodyObserver = new MutationObserver(bodyMutationsList => {
                        bodyMutationsList.forEach(bodyMutation => {
                          if (bodyMutation.addedNodes.length > 0) {
                            bodyMutation.addedNodes.forEach(bodyNode => {
                              if (bodyNode.id === 'kampyleButtonContainer') {
                    Severity: Minor
                    Found in src/platform/site-wide/medallia-feedback-button.js - About 1 hr to fix

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

                      const viewportPresetHelper = (preset, orientation, options) => {
                        if (
                          isValidPreset(preset) &&
                          isValidOrientation(orientation) &&
                          isValidOptions(options)
                      Severity: Minor
                      Found in src/platform/testing/e2e/cypress/support/commands/viewportPreset.js - About 1 hr to fix

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

                        const newDraft = (req, res) => {
                          const { body, category, recipientId, subject } = req.body;
                          return res.json({
                            data: {
                              id: '3885180',
                        Severity: Minor
                        Found in src/platform/mhv/api/mocks/secure-messaging/drafts/index.js - About 1 hr to fix

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

                          function baseSet(arrayPath, value, object, level = 0) {
                            if (level >= arrayPath.length) {
                              // We're at the end of our path; time to assign
                              return value;
                            }
                          Severity: Minor
                          Found in src/platform/utilities/data/set.js - About 1 hr to fix

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

                            const saveReply = (req, res) => {
                              const { body, category, recipientId, subject } = req.body;
                              return res.json({
                                data: {
                                  id: '3885180',
                            Severity: Minor
                            Found in src/platform/mhv/api/mocks/secure-messaging/drafts/index.js - About 1 hr to fix

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

                                getEmptyState(props) {
                                  const {
                                    onEdit,
                                    hideTitle,
                                    title,
                              Severity: Minor
                              Found in src/platform/forms-system/src/js/components/SchemaForm.jsx - About 1 hr to fix

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

                                export function validatePages(orderedPageTypes) {
                                  const pageTypes = {};
                                  for (const pageType of orderedPageTypes) {
                                    if (pageType === 'intro') {
                                      if (pageTypes.intro || pageTypes.summary || pageTypes.item) {

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

                                          {this.orderedProperties.map((objectFields, index) => {
                                            if (objectFields.length > 1) {
                                              const [first, ...rest] = objectFields;
                                              const visible = rest.filter(
                                                prop => !schema.properties[prop]['ui:collapsed'],
                                  Severity: Minor
                                  Found in src/platform/forms-system/src/js/fields/ObjectField.jsx - About 1 hr to fix

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

                                    export default function vaCheckboxFieldMapping(props) {
                                      const {
                                        description,
                                        textDescription,
                                        DescriptionField,

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

                                      export default function VaSelectField(props) {
                                        let addDefaultEntry = false;
                                        const mappedProps = vaSelectFieldMapping(props);
                                        const enumOptions =
                                          (Array.isArray(props.childrenProps.schema.enum) &&

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

                                        function baseSet(arrayPath, value, object, level = 0) {
                                          if (level >= arrayPath.length) {
                                            // We're at the end of our path; time to assign
                                            return value;
                                          }
                                        Severity: Minor
                                        Found in src/platform/forms-system/src/js/utilities/data/set.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language