department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,839 of 12,839 total issues

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

  constructor(props) {
    super(props);

    // Throw an error if there’s no viewField (should be React component)
    if (!isReactComponent(this.props.uiSchema['ui:options'].viewField)) {
Severity: Minor
Found in src/platform/forms-system/src/js/fields/ArrayField.jsx - About 1 hr to fix

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

      render() {
        const props = this.props;
    
        if (props.formContext.reviewMode) {
          return (
    Severity: Minor
    Found in src/platform/forms-system/src/js/widgets/ArrayCountWidget.jsx - About 1 hr to fix

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

        pageBuilder.summaryPage = pageConfig => {
          const requiredOpts = ['title', 'path', 'uiSchema', 'schema'];
          verifyRequiredPropsPageConfig('summaryPage', requiredOpts, pageConfig);
      
          const summaryPageProps = {

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

              objectFields => {
                const [first, ...rest] = objectFields;
                // expand under functionality is controlled in the reducer by setting ui:collapsed, so
                // we can check if its expanded by seeing if there are any visible "children"
                const visible = rest.filter(
        Severity: Minor
        Found in src/platform/forms-system/src/js/review/ObjectField.jsx - About 1 hr to fix

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

          export function setDismissedHCANotification(status, statusEffectiveAt) {
            return (dispatch, getState) => {
              const hasPreviouslyDismissedNotification = !!dismissedHCANotificationDate(
                getState(),
              );
          Severity: Minor
          Found in src/platform/user/profile/actions/hca.js - About 1 hr to fix

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

              addressValidationSuccessSingleBadUnitNumber() {
                return asyncReturn(
                  {
                    addresses: [
                      {
            Severity: Minor
            Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 1 hr to fix

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

              const mapStateToProps = (state, ownProps) => {
                const { transaction } = ownProps;
                const {
                  addressFromUser,
                  addressValidationError,

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

                  addressValidationSuccessSingleMissingUnitNumber() {
                    return asyncReturn(
                      {
                        addresses: [
                          {
                Severity: Minor
                Found in src/platform/user/profile/vap-svc/util/local-vapsvc.js - About 1 hr to fix

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

                  export default function useArticleData() {
                    const [articles, setArticles] = useState(null);
                    const [errorMessage, setErrorMessage] = useState(null);
                  
                    useEffect(
                  Severity: Minor
                  Found in src/applications/resources-and-support/hooks/useArticleData.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/fry-dea/helpers.jsx - About 1 hr to fix

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

                      export function createMilitaryClaimant(submissionForm) {
                        // Access formField and viewComponent sources for userFullName and dateOfBirth
                        const formFieldUserFullName =
                          submissionForm['view:userFullName']?.userFullName;
                        const viewComponentUserFullName = submissionForm?.userFullName;

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

                                    updateSchema: (formData, schema, uiSchema) => {
                                      const countryUI = uiSchema;
                                      const addressFormData = get(
                                        ['view:mailingAddress', 'address'],
                                        formData,

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

                            export const buildMarker = (type, values) => {
                              if (type === 'location') {
                                const { loc, attrs } = values;
                                const markerElement = document.createElement('span');
                                markerElement.className = 'i-pin-card-map';
                            Severity: Minor
                            Found in src/applications/facility-locator/utils/helpers.jsx - About 1 hr to fix

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

                              export const getRep = formData => {
                                if (formData.informalConference !== 'rep') {
                                  return null;
                                }
                                const phoneNumber = (formData?.informalConferenceRep?.phone || '').replace(
                              Severity: Minor
                              Found in src/applications/appeals/996/utils/submit.js - About 1 hr to fix

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

                                  const formatServiceType = rawServiceType => {
                                    if (facilityType === LocationType.URGENT_CARE) {
                                      if (!rawServiceType) {
                                        return urgentCareServices.AllUrgentCare;
                                      }

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

                                  export function transform(formConfig, form) {
                                    // https://dev-developer.va.gov/explore/appeals/docs/decision_reviews?version=current
                                    // https://github.com/department-of-veterans-affairs/vets-api/blob/master/modules/appeals_api/config/schemas/10182.json
                                    const mainTransform = formData => {
                                      const result = {
                                  Severity: Minor
                                  Found in src/applications/appeals/10182/config/submit-transformer.js - About 1 hr to fix

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

                                    export const getForm4142 = formData => {
                                      const {
                                        evidencePrivacyAgreementAccepted = true,
                                        limitedConsent = '',
                                      } = formData;
                                    Severity: Minor
                                    Found in src/applications/appeals/testing/sc/utils/submit.js - About 1 hr to fix

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

                                      function Table() {
                                        return (
                                          <div className="custom-table">
                                            <table className="usa-table" role="presentation">
                                              <tbody>
                                      Severity: Minor
                                      Found in src/applications/edu-benefits/feedback-tool/components/Table.jsx - About 1 hr to fix

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

                                          applicantInformation: formData => {
                                            if (_.isEmpty(_.get(formData, 'applicantFullName.first', {}))) {
                                              recordEvent({
                                                event: 'edu-0994--response-missing',
                                                'missing-field-question':
                                        Severity: Minor
                                        Found in src/applications/edu-benefits/0994/analytics-functions.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language