Showing 4,231 of 14,884 total issues
Function questionStatus
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const questionStatus = () => {
if (hasError) {
return (
<>
<p>
Function updateFormData
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateFormData = e => {
e.preventDefault();
if (isEditing) {
// find the one we are editing in the employeeRecords array
const updatedRecords = employmentRecords.map((item, arrayIndex) => {
Function AuthorizedRoutes
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const AuthorizedRoutes = () => {
const contactListPage = useSelector(
state =>
state.featureToggles[
FEATURE_FLAG_NAMES.mhvSecureMessagingEditContactList
Function RemoveAttachmentModal
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const RemoveAttachmentModal = props => {
return (
<VaModal
id={`remove-attachment-modal${
props.draftSequence ? `-${props.draftSequence}` : ''
Function conditionReducer
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const conditionReducer = (state = initialState, action) => {
switch (action.type) {
case Actions.Conditions.GET: {
return {
...state,
Function buildNonVAPrescriptionPDFList
has 63 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildNonVAPrescriptionPDFList = prescription => {
return [
{
sections: [
{
File index.js
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { parseISO, startOfDay } from 'date-fns';
import { format, utcToZonedTime } from 'date-fns-tz';
import { ELIGIBILITY } from './eligibility';
import { VISTA_CHECK_IN_STATUS_IENS } from '../appConstants';
File toxicExposure.jsx
has 271 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import {
capitalizeEachWord,
formSubtitle,
formTitle,
Function render
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
columnThreeLinkClicked,
href,
linkClicked,
Function updateUiSchema
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateUiSchema: formData => {
const arrayData = formData?.[arrayPath];
return arrayData?.length
? {
'ui:title':
Function paginatedThreads
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const paginatedThreads = (req, res) => {
const { index } = req.params;
const { pageSize, pageNumber, sortField, sortOrder } = req.query;
const sortFunc = (a, b) => {
File profileAddress.js
has 270 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* This uiSchema is modeled after how addresses are handled in the Profile application, and makes the same pattern
* available for use inside forms generated by the platform's form system.
*/
Function searchWithBounds
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static searchWithBounds(
address = null,
bounds,
locationType,
serviceType,
Function onAddFile
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onAddFile = async (event, index = null, password) => {
if (event.target?.files?.length) {
// Only upload the first file; when va-file-input v3 supports multiple
// files, we'll need to update this entire component
const currentFile = event.target.files[0];
Function InterstitialChanges
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function InterstitialChanges() {
const [userEmails, setUserEmails] = useState({});
const [isLoading, setIsLoading] = useState(true);
const [error, setError] = useState(false);
Function ClaimantInformation
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function ClaimantInformation(props) {
const { values, setFieldValue } = useFormikContext();
const getOptions = [
{ label: 'Spouse', value: 'spouse', key: 1 },
{ label: 'Child', value: 'child', key: 2 },
Function sortTheResults
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const sortTheResults = (sortByPropertyName, indexA, indexB) => {
// -n (negative number) sorts indexA to the front of the array.
// n (positive number) sorts indexA to the back of the array.
// stayPut keeps both indexA and indexB right where they are.
const [
Function RadioWidget
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function RadioWidget(props) {
const { options, formContext = {}, value, disabled, onChange, id } = props;
const { enumOptions, labels = {} } = options;
const onReviewPage = formContext?.onReviewPage || false;
Function EditVeteranAddressBase
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EditVeteranAddressBase = props => {
const dispatch = useDispatch();
const { location } = props;
const fromReviewPage = location?.query?.review;
Function updateFormData
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateFormData = () => {
const { from: startDate, to: endDate, isCurrent } = employmentRecord;
// Check validity
if (