Showing 4,231 of 14,884 total issues
Function captureError
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const captureError = (error, details) => {
if (error instanceof Error) {
Sentry.withScope(scope => {
const { token } = details;
if (token) {
Function CustomPhoneNumberField
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function CustomPhoneNumberField(props) {
function handleChange(event) {
if (props?.toeDupContactInfoCall) {
props?.updateGlobalPhoneNumber(event);
if (event?.length > 9) {
Function updateSchema
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateSchema: (formData, schema, uiSchema) => {
const countryUI = uiSchema;
const addressFormData = get(
['mailingAddressInput', 'address'],
formData,
Function infoBlockMessage
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const infoBlockMessage = () => {
if (appointment?.kind === 'phone') {
return (
<span data-testid="phone-msg-confirmation">
{t('your-provider-will-call-you-at-your-appointment-time')}
Function drawFreeTextOption
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
drawFreeTextOption(option) {
const { highlightedIndex, value, selectionMade } = this.state;
if ((selectionMade && option === value) || option?.length < 1) {
return null;
Function transformForSubmit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformForSubmit(formConfig, form) {
const remarksFormData = form.data.remarks;
const remarksUiSchema =
formConfig.chapters.additionalInformationChapter.pages.remarks.uiSchema;
Function updateSchema
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateSchema: (formData, schema, uiSchema) => {
const {
authorizerType,
thirdPartyType,
personFullName,
Function prefillTransformer
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function prefillTransformer(pages, formData, metadata) {
// TODO: once backend prefill is implemented, refactor to
// remove test-data with incoming prefill data
const { preparerType } = formData;
const newFormData = {
Function isSsnUnique
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const isSsnUnique = formData => {
const {
veteranSsnOrTin,
primarySsnOrTin,
secondaryOneSsnOrTin,
Function calculateExpenses
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const calculateExpenses = async () => {
if (!otherExpenses?.length || !gmtData?.isEligibleForStreamlined) return;
try {
const response = await getMonthlyExpensesAPI(data);
Function MobileLogoRow
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 calculateExpenses
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const calculateExpenses = async () => {
if (!gmtData?.isEligibleForStreamlined) return;
try {
const response = await getMonthlyExpensesAPI(data);
Function renameFolder
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const renameFolder = (folderId, newName) => async dispatch => {
try {
await updateFolderName(folderId, newName);
await dispatch(getFolders());
await dispatch(retrieveFolder(folderId));
Function enter
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
enter(path) {
if (isBlock(path)) {
const parent = stack[stack.length - 1];
const block = {
type: !parent ? 'Feature' : 'Background',
Function useGetPatientRelationships
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useGetPatientRelationships() {
const dispatch = useDispatch();
const featureOHDirectSchedule = useOHDirectScheduling();
const {
Function renderErrorMessages
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
renderErrorMessages() {
const {
claimsLoading,
appealsLoading,
stemClaimsLoading,
Function transformForSubmit
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function transformForSubmit(formConfig, form) {
const formCopy = {
...form,
data: {
...form.data,
Function default
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function(state = INITIAL_STATE, action) {
switch (action.type) {
case FETCH_CONSTANTS_STARTED:
return {
...state,
Function disclaimerText
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const disclaimerText = () => {
return (
<>
<div>
<p>
Function deleteConnectedApp
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function deleteConnectedApp(appId) {
return async (dispatch, getState) => {
recordEvent({ event: 'profile-disconnect-connected-app-started' });
dispatch({ type: DELETING_CONNECTED_APP, appId });