Showing 3,732 of 12,811 total issues
Function EditPreferences
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const EditPreferences = () => {
const [editListModal, setEditListModal] = useState(false);
const editPreferencesButtonRef = useRef();
const handleModalClose = useCallback(() => {
focusElement(editPreferencesButtonRef.current);
Function ClaimantInformationComponent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function ClaimantInformationComponent() {
const {
gender,
dob,
userFullName: { first, last },
Function handleDeleteDraftConfirm
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleDeleteDraftConfirm = () => {
if (savedDraft) {
setNavigationError(null);
setIsModalVisible(false);
dispatch(deleteDraft(draftId)).then(() => {
Function FoldersList
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FoldersList = props => {
const { folders, showUnread } = props;
return (
<div className="vads-u-margin-top--2">
Function getFacilityPageInfo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getFacilityPageInfo(state) {
const formInfo = getCovid19VaccineFormPageInfo(state, 'vaFacility');
const data = selectCovid19VaccineFormData(state);
const newBooking = selectCovid19VaccineNewBooking(state);
Function transformFormToAppointment
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function transformFormToAppointment(state) {
const data = getFormData(state);
const clinic = getChosenClinicInfo(state);
const timezone = getTimezoneByFacilityId(data.vaFacility);
Function clearAllFilters
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const clearAllFilters = () => {
dispatchFilterChange({
...filters,
schools: true,
excludedSchoolTypes: [
Function searchResults
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const searchResults = (cnt, visible = true) => {
if (cnt > 0) {
const containerClassNames = classNames(
'location-search-results-container',
'usa-grid',
Function otherCheckboxes
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function otherCheckboxes(
handleVetTechPreferredProviderChange,
options,
smallScreen,
automatedTest = false,
Function LoginAlert
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
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>
Function yellowRibbonReducer
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const yellowRibbonReducer = (state = initialState, action) => {
switch (action.type) {
case FETCH_RESULTS: {
return {
...state,
Function ItemList
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ItemList = props => {
const { list } = props;
if (typeof list === 'string')
return (
<span data-dd-privacy="mask" data-testid="item-list-string">
Function DownloadingRecordsInfo
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DownloadingRecordsInfo = props => {
const { allowTxtDownloads } = props;
const publicSharedContent = () => {
return (
Function redirectOrLoad
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
redirectOrLoad(props) {
// Stop a user that's been redirected from being redirected again after
// logging in
this.shouldRedirectOrLoad = false;
Function DefaultErrorMessage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DefaultErrorMessage = () => {
let InlineErrorComponent;
if (isReactComponent(errorText)) {
InlineErrorComponent = errorText;
} else if (typeof errorText === 'string') {
Function currentOrPastDateRangeUI
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const currentOrPastDateRangeUI = (fromOptions, toOptions, errorMessage) => {
let fromLabel = 'From date';
let toLabel = 'To date';
let fromCustomOptions = {};
let toCustomOptions = {};
Function expandArrayPages
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function expandArrayPages(pageList, data) {
const result = pageList.reduce(
(acc, nextPage) => {
const { lastArrayPath, arrayPages, currentList } = acc;
// If we see an array page and we’re starting a section or in the middle of one, just add it
Function handleEdit
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleEdit(key, editing, index = null) {
if (editing || !this.hasValidationError(key, index)) {
this.props.onEdit(key, editing, index);
const name = fixSelector(key);
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { terms, topContent } = this.props;
const enabled =
this.props.isDataAvailable === true ||
typeof this.props.isDataAvailable === 'undefined';
Function deselectBasedOnValue
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static deselectBasedOnValue(name, value, formData, properties) {
// derive the notListedTextKey by looking at the form schema properties for a 'string' field type
// be aware this logic limits the usage to a single text field for a 'write in' style field
const notListedTextKey = Object.entries(properties).reduce(
(previous, [propertyKey, { type }]) => {