department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

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

export default function Submitted(props) {
  const { formConfig, onBack, onSubmit } = props;
  let ariaDescribedBy = null;
  // If no ariaDescribedBy is passed down from form.js,
  // a null value will properly not render the aria label.
Severity: Minor
Found in src/platform/forms-system/src/js/review/submit-states/Submitted.jsx - About 1 hr to fix

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

    export default function SSNWidget(props) {
      const [val, setVal] = useState(props.value);
      const [displayVal, setDisplayVal] = useState(props.value);
    
      const handleChange = value => {
    Severity: Minor
    Found in src/platform/forms-system/src/js/widgets/VAFileNumberWidget.jsx - About 1 hr to fix

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

      export const formatReadableDate = (rawDate, minimumDateDigits = 1) => {
        const months = [
          'January',
          'February',
          'March',
      Severity: Minor
      Found in src/applications/my-education-benefits/helpers.js - About 1 hr to fix

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

        function CustomPhoneNumberField(props) {
          function handleChange(event) {
            if (props?.showMebEnhancements08) {
              props?.updateGlobalPhoneNumber(event);
              if (event?.length > 9) {

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

          export const recordPanEvent = (mapCenter, currentQuery) => {
            const { searchCoords, searchArea } = currentQuery;
          
            return new Promise((resolve, _) => {
              let distanceMoved;
          Severity: Minor
          Found in src/applications/facility-locator/utils/analytics.js - About 1 hr to fix

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

            export function transform(formConfig, form) {
              // https://developer.va.gov/explore/appeals/docs/decision_reviews?version=current
              // match supplemental claims schema here
              const mainTransform = formData => {
                const { benefitType, additionalDocuments } = formData;
            Severity: Minor
            Found in src/applications/appeals/testing/sc/config/submit-transformer.js - About 1 hr to fix

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

              export const MobileLogoRow = () => {
                return (
                  <nav className="vads-u-display--flex vads-u-flex-direction--column vads-u-margin--0 vads-u-padding--0">
                    <div className="header-logo-row vads-u-background-color--primary-darker vads-u-display--flex vads-u-align-items--center vads-u-justify-content--space-between vads-u-padding-y--1p5 vads-u-padding-left--1p5 vads-u-padding-right--1">
                      <a

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

                const contestableIssuesReducer = getEligibleContestableIssues => (
                  state = initialState,
                  action,
                ) => {
                  switch (action?.type) {
                Severity: Minor
                Found in src/applications/appeals/shared/reducers/contestableIssues.js - About 1 hr to fix

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

                  export const processContestableIssues = contestableIssues => {
                    const processDate = entry =>
                      (entry.attributes?.approxDecisionDate || '').replace(REGEXP.DASH, '');
                    // remove issues with no title & sort by date - see
                    // https://dsva.slack.com/archives/CSKKUL36K/p1623956682119300
                  Severity: Minor
                  Found in src/applications/appeals/shared/utils/issues.jsx - About 1 hr to fix

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

                    export function transform(formConfig, form) {
                      // https://developer.va.gov/explore/appeals/docs/decision_reviews?version=current
                      // match supplemental claims schema here
                      const mainTransform = formData => {
                        const { benefitType, additionalDocuments } = formData;
                    Severity: Minor
                    Found in src/applications/appeals/995/config/submit-transformer.js - About 1 hr to fix

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

                      const DependentListLoopForm = props => {
                        const { children, data, page, onChange, onSubmit } = props;
                        const { fullName = {} } = data || {};
                      
                        // build the uiSchema title attribute based on form & page data

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

                        const DependentListLoopForm = props => {
                          const { children, data, page, onChange, onSubmit } = props;
                          const { fullName = {} } = data || {};
                        
                          // build the uiSchema title attribute based on form & page data

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

                            getEmptyState(props) {
                              const {
                                onEdit,
                                hideTitle,
                                title,

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

                            export const createFormConfig = (form, options) => {
                              const { chapters, formId, ombInfo, title } = form;
                              const { rootUrl, trackingPrefix } = options;
                              const subTitle = `VA Form ${formId}`;
                            
                            

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

                                getEmptyState(props) {
                                  const {
                                    onEdit,
                                    hideTitle,
                                    title,

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

                                export function libraryPagerGen() {
                                  const numCardsCount = libraryNumActiveCards();
                                  numCards = libraryNumCards();
                                  pages = Math.ceil(numCardsCount / itemsPerPage);
                                  if (document.getElementById('pager-nums-insert')) {

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

                                  const labResults = avs => {
                                    if (avs.labResults?.length > 0) {
                                      const labResultItems = avs.labResults.map((item, idx) => (
                                        <div key={idx}>
                                          {labResultValues(item.values)}
                                  Severity: Minor
                                  Found in src/applications/avs/components/YourHealthInformation.jsx - About 1 hr to fix

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

                                    const ConfirmationPage = () => {
                                      const { submission, data } = useSelector(state => state.form);
                                      const { userFullName } = useSelector(selectProfile);
                                      const loggedIn = useSelector(isLoggedIn);
                                      const { response } = submission;
                                    Severity: Minor
                                    Found in src/applications/hca/containers/ConfirmationPage.jsx - About 1 hr to fix

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

                                                          updateSchema: (formData, schema, uiSchema) => {
                                                            const countryUI = uiSchema;
                                                            const addressFormData = get(
                                                              ['view:mailingAddress', 'address'],
                                                              formData,
                                      Severity: Minor
                                      Found in src/applications/toe/config/form.js - About 1 hr to fix

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

                                        export default function HelpTextContent() {
                                          const BTSSS_PORTAL_URL = 'https://dvagov-btsss.dynamics365portals.us/';
                                        
                                          return (
                                            <div>
                                        Severity: Minor
                                        Found in src/applications/travel-pay/components/HelpText.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language