Showing 4,231 of 14,884 total issues
Function deepEqual
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function deepEqual(obj1, obj2) {
if (obj1 === obj2) return true;
if (
typeof obj1 !== 'object' ||
Function MemoryUsage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const MemoryUsage = () => {
const [memoryUsage, setMemoryUsage] = useState(null);
useEffect(() => {
// Function to get browser tab's memory usage
Function fetchDevToggles
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async () => {
try {
updateDevLoading(true);
const response = await fetch(
Function mapBenefitFromFormInputData
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const mapBenefitFromFormInputData = (benefit, formData) => {
if (checkExtraConditions(benefit, formData) === false) return false;
const mappingKeys = Object.keys(mappingTypes);
// Each mapping type (i.e. GOALS).
Function getChapterPagesFromChapterIndex
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getChapterPagesFromChapterIndex = chapterIndex => {
const chapterKey = chapterKeys[chapterIndex];
const chapter = formConfig.chapters[chapterKey];
// ideally this would filter out visibility using the page depends function
return Object.keys(chapter.pages || {}).map((page, index) => {
Function AuthRegistrationOnlyPage
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AuthRegistrationOnlyPage = props => {
const { location, route, router } = props;
const { data: formData } = useSelector(state => state.form);
const goBack = () => {
const { pathname } = location;
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (this.props.loading) {
return <va-loading-indicator message="Loading facility..." />;
}
Function DemographicViewField
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DemographicViewField = props => {
const { formContext, uiSchema, schema, formData, registry } = props;
const { ObjectField } = registry.fields;
if (formContext.reviewMode) {
Function handleChange
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function handleChange(event) {
if (props?.toeDupContactInfoCall) {
if (props.email !== event) {
props.setFormData({
...props?.formData,
Function renderOldLandingContent
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderOldLandingContent = () => {
return (
<>
<p>
You can find an accredited attorney, claims agent, or VSO in 1 of these
Function postTravelOnlyClaim
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
postTravelOnlyClaim: async (startTime, uuid, timeToComplete) => {
const url = '/check_in/v0/travel_claims/';
const headers = { 'Content-Type': 'application/json' };
const travelClaimData = {
travelClaims: {
Function isBDD
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const isBDD = formData => {
const isBddDataFlag = Boolean(formData?.['view:isBddData']);
const servicePeriods = formData?.serviceInformation?.servicePeriods || [];
// separation date entered in the wizard
Function IdentityNotVerified
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const IdentityNotVerified = () => {
const content = (
<>
<p className="vads-u-font-size--base">
We need to make sure you’re you — and not someone pretending to be you —
Function ui:validations
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(errors, city, formData, _schema, _uiSchema, _index) => {
// This variable represents whether a veteran checked the "I live on a military base outside of the U.S." checkbox on the page
// running this validation. This is stored within `formData` as `view:livesOnMilitaryBase` (`MILITARY_BASE_PATH`), but the path
// thereto differs depending on the page running the validation.
let livesOnMilitaryBase =
Function prefillContactInformation
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const prefillContactInformation = data => {
const newData = _.omit(['veteran'], data);
const { veteran } = data;
if (veteran) {
Function submitErrorContent
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const submitErrorContent = props => {
const submissionIdContent = props.submissionId
? ` and provide this reference number ${props.submissionId}`
: '';
Function FinancialHardshipViewField
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FinancialHardshipViewField = props => {
const { defaultEditButton, formData } = props;
const { financialHardshipDocuments } = formData;
return (
Function makePages
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function makePages() {
const pagesList = Object.keys(ADDITIONAL_EXPOSURES)
.filter(itemId => itemId !== 'none' && itemId !== 'notsure')
.map(itemId => {
const pageName = `additional-exposure-${itemId}`;
Function TerminalIllnessViewField
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TerminalIllnessViewField = props => {
const { defaultEditButton, formData } = props;
const { terminalIllnessDocuments } = formData;
return (
Function chapters
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
.map(chapterName => {
const pages = pagesByChapter[chapterName];
const expandedPages = getActiveExpandedPages(pages, formData);
const chapterFormConfig = getChapterFormConfigAskVa(
modifiedFormConfig,