department-of-veterans-affairs/vets-website

View on GitHub

Showing 12,717 of 12,717 total issues

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

  render() {
    const buttonClasses = classNames(
      this.props.cssClass,
      { 'va-btn-withicon': this.props.icon },
      'va-dropdown-trigger',

    Function generateFooterContent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const generateFooterContent = async (
      doc,
      parent,
      data,
      config,
    Severity: Minor
    Found in src/platform/pdf/templates/utils.js - About 1 hr to fix

      Function SsnField has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function SsnField(fieldProps) {
        const props = vaTextInputFieldMapping(fieldProps);
      
        const [val, setVal] = useState(props.value);
        const [displayVal, setDisplayVal] = useState(props.value);
      Severity: Minor
      Found in src/platform/forms-system/src/js/web-component-fields/SsnField.jsx - About 1 hr to fix

        Function checkAutoSession has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export async function checkAutoSession(
          loggedIn,
          ssoeTransactionId,
          profile = {},
        ) {
        Severity: Minor
        Found in src/platform/utilities/sso/index.js - About 1 hr to fix

          Function VaRadioField has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function VaRadioField(props) {
            const mappedProps = vaRadioFieldMapping(props);
            const enumOptions =
              Array.isArray(props.childrenProps.schema.enum) &&
              optionsList(props.childrenProps.schema);

            Function vaRadioFieldMapping has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

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

              Function recalculateSchemaAndData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function recalculateSchemaAndData(initialState) {
                return Object.keys(initialState.pages).reduce((state, pageKey) => {
                  // on each data change, we need to do the following steps
                  // Recalculate any required fields, based on the new data
                  const page = state.pages[pageKey];
              Severity: Minor
              Found in src/platform/forms-system/src/js/state/helpers.js - About 1 hr to fix

                Function fileUiSchema has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export default function fileUiSchema(label, userOptions = {}) {
                  return {
                    'ui:title': label,
                    'ui:field': FileField,
                    'ui:options': {
                Severity: Minor
                Found in src/platform/forms-system/src/js/definitions/file.js - About 1 hr to fix

                  Function TextNotificationsDisclaimer has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function TextNotificationsDisclaimer() {
                    return (
                      <>
                        <h4>What to know about text notifications</h4>
                        <ul>

                    Function CustomEmailField has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function CustomEmailField(props) {
                      function handleChange(event) {
                        if (props?.showMebEnhancements08) {
                          if (props.email !== event) {
                            props.setFormData({

                      Function mainTransform has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const mainTransform = formData => {
                          const informalConference = showNewHlrContent(formData)
                            ? formData.informalConferenceChoice === 'yes'
                            : ['me', 'rep'].includes(formData.informalConference);
                          const attributes = {
                      Severity: Minor
                      Found in src/applications/appeals/996/config/submit-transformer.js - About 1 hr to fix

                        Function onContinueClick has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          const onContinueClick = async () => {
                            const year = yearInput || new Date().getFullYear();
                        
                            if (dependentsInput && year && zipCodeInput) {
                              setSubmitting(true);
                        Severity: Minor
                        Found in src/applications/income-limits/containers/ReviewPage.jsx - About 1 hr to fix

                          Function strongCaseTips has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            const strongCaseTips = () => {
                              if (specialReason) {
                                const { name, type } = reasonsObj[reason];
                                return (
                                  <>

                            Function enrollmentStatus has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function enrollmentStatus(state = ENROLLMENT_STATUS_INIT_STATE, action) {
                              const { response = {}, type } = action;
                              const {
                                FETCH_ENROLLMENT_STATUS_STARTED,
                                FETCH_ENROLLMENT_STATUS_SUCCEEDED,
                            Severity: Minor
                            Found in src/applications/ezr/reducers/enrollment-status.js - About 1 hr to fix

                              Function FinancialStatusWarning has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              const FinancialStatusWarning = () => {
                                const THIS_YEAR = LAST_YEAR + 1;
                                const NEXT_YEAR = THIS_YEAR + 1;
                                return (
                                  <va-alert

                                Function LoginAlert has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                const LoginAlert = () => {
                                  const { ID_ME, LOGIN_GOV } = CSP_IDS;
                                  const heading = `Verify your identity with Login.gov or ID.me to change your direct deposit information online`;
                                  return (
                                    <VaAlert status="continue" visible uswds>
                                Severity: Minor
                                Found in src/applications/verify-your-enrollment/components/LoginAlert.jsx - About 1 hr to fix

                                  Function fileUiSchema has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  export default function fileUiSchema(label, userOptions = {}) {
                                    return {
                                      'ui:title': label,
                                      'ui:field': FileField,
                                      'ui:options': {
                                  Severity: Minor
                                  Found in src/applications/pre-need/definitions/file.js - About 1 hr to fix

                                    Function GetFormHelp has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export default function GetFormHelp() {
                                      // Is the current page a confirmation page under a CHAMPVA form?
                                      const isChampvaConfirmation = /.*champva.*confirmation(\/)?$/.test(
                                        window.location.href,
                                      );
                                    Severity: Minor
                                    Found in src/applications/ivc-champva/shared/components/GetFormHelp.jsx - About 1 hr to fix

                                      Function uploadWithInfoComponent has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function uploadWithInfoComponent(fileList, category, resources) {
                                        return {
                                          uiSchema: {
                                            ...acceptableFileList(fileList || []),
                                            'view:additionalResources': {

                                        Function withAuthorization has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const withAuthorization = (Component, options) => {
                                          const WrappedComponent = props => {
                                            const { appName } = options;
                                            const { router } = props;
                                            const selectCurrentContext = useMemo(makeSelectCurrentContext, []);
                                        Severity: Minor
                                        Found in src/applications/check-in/containers/withAuthorization.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language