department-of-veterans-affairs/vets-website

View on GitHub

Showing 4,231 of 14,884 total issues

Function AutoSSO has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function AutoSSO(props) {
  const {
    authenticatedWithOAuth,
    hasCalledKeepAlive,
    transactionId,
Severity: Minor
Found in src/platform/site-wide/user-nav/containers/AutoSSO.jsx - About 1 hr to fix

    Function overrideAnimations has 26 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    async function overrideAnimations(client) {
      const styles = `* {
         -o-transition-property: none !important;
         -moz-transition-property: none !important;
         -ms-transition-property: none !important;
    Severity: Minor
    Found in src/platform/testing/e2e-puppeteer/helpers.js - About 1 hr to fix

      Function formatDowntime has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const formatDowntime = dateTime => {
        let date;
        const timeZone = 'America/New_York';
      
        if (dateTime instanceof Object) {
      Severity: Minor
      Found in src/platform/utilities/date/index.js - About 1 hr to fix

        Function replaceSchema has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                replaceSchema: (formData, schema, _uiSchema, index, path) => {
                  if (schema.maxLength) {
                    cityMaxLength = schema.maxLength;
                  }
                  const addressPath = getAddressPath(path); // path is ['address', 'currentField']

          Function updateFormDataAddress has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export const updateFormDataAddress = (
            oldFormData,
            formData,
            path,
            index = null, // this is included in the path, but added as
          Severity: Minor
          Found in src/platform/forms-system/src/js/definitions/profileAddress.js - About 1 hr to fix

            Function updateFormDataAddress has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const updateFormDataAddress = (
              oldFormData,
              formData,
              path,
              index = null, // this is included in the path, but added as

              Function lcsSingleVsMulti has 26 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function lcsSingleVsMulti(
                userInput,
                disabilityLabels,
                threshold = THRESHOLD,
                splitreg = REGEX_SPLIT,

                Function pageAndDataState has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    (state, page) => {
                      const definitions = {
                        ...(formConfig.defaultDefinitions || {}),
                        ...page.schema.definitions,
                      };
                Severity: Minor
                Found in src/platform/forms-system/src/js/state/helpers.js - About 1 hr to fix

                  Function prefillTransformer has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  export default function prefillTransformer(pages, formData, metadata) {
                    const newFormData = formData;
                  
                    for (const addressType of ['permanentAddress', 'temporaryAddress']) {
                      if (newFormData[addressType]?.country) {

                    Function handleChange has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

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

                      Function setupMap has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const setupMap = () => {
                          const mapContainerElement = document.getElementById(mapboxGlContainer);
                          if (!mapContainerElement) {
                            return null;
                          }
                      Severity: Minor
                      Found in src/applications/facility-locator/containers/FacilitiesMap.jsx - About 1 hr to fix

                        Function VABenefitsCall has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        export default function VABenefitsCall() {
                          return (
                            <div>
                              <p className="p1">
                                <strong>To check on the status of your claim or appeal</strong>, use our{' '}
                        Severity: Minor
                        Found in src/applications/facility-locator/components/VABenefitsCall.jsx - About 1 hr to fix

                          Function requiredLocations has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          const requiredLocations = newForm => {
                            const dates = newForm
                              ? {
                                  treatmentDate: { type: 'string' },
                                  noDate: { type: 'boolean' },
                          Severity: Minor
                          Found in src/applications/appeals/995/pages/evidenceVaRecords.js - About 1 hr to fix

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

                              const mainTransform = formData => {
                                const { benefitType, additionalDocuments } = formData;
                            
                                const attributes = {
                                  // fall back to compensation; this will fix a few existing submission
                            Severity: Minor
                            Found in src/applications/appeals/995/config/submit-transformer.js - About 1 hr to fix

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

                                const mainTransform = formData => {
                                  const { benefitType, additionalDocuments } = formData;
                              
                                  const attributes = {
                                    // fall back to compensation; this will fix a few existing submission
                              Severity: Minor
                              Found in src/applications/appeals/testing/sc/config/submit-transformer.js - About 1 hr to fix

                                Function fetchUser has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                export function fetchUser() {
                                  return async dispatch => {
                                    dispatch({
                                      type: FETCH_USER,
                                    });
                                Severity: Minor
                                Found in src/applications/accreditation/21a/actions/user.js - About 1 hr to fix

                                  Function onclick has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          radio.onclick = e => {
                                            let title = e.target.attributes.name.value;
                                            if (hasVeteran && veteranLabelMap.has(title))
                                              title = veteranLabelMap.get(title);
                                            else if (nonVeteranMap.has(title)) title = nonVeteranMap.get(title);
                                  Severity: Minor
                                  Found in src/applications/pre-need/PreNeedApp.jsx - About 1 hr to fix

                                    Function getCemeteries has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    export function getCemeteries() {
                                      return fetch(`${environment.API_URL}/v0/preneeds/cemeteries`, {
                                        credentials: 'include',
                                        headers: {
                                          'X-Key-Inflection': 'camel',
                                    Severity: Minor
                                    Found in src/applications/pre-need/utils/helpers.js - About 1 hr to fix

                                      Function CustomSSNReviewPage has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      export function CustomSSNReviewPage(props) {
                                        const maskedSSN = maskSSN(props?.data?.veteranSocialSecurityNumber?.ssn);
                                        return props.data ? (
                                          <div className="form-review-panel-page">
                                            <div className="form-review-panel-page-header-row">
                                      Severity: Minor
                                      Found in src/applications/ivc-champva/10-7959f-1/helpers/CustomSSN.jsx - About 1 hr to fix

                                        Function SupportingFilesOrAffidavitInfo has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        const SupportingFilesOrAffidavitInfo = () => {
                                          return (
                                            <>
                                              <p>
                                                You can also upload supporting files or an affidavit (a written
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language