Showing 3,724 of 12,675 total issues
Function ConfirmCancelModal
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ConfirmCancelModal = props => {
const { activeSection, closeModal, onHide, isVisible } = props;
// return null to avoid even having the web component in dom
// when not needed (this makes testing easier as well)
Function recordSearchResultsEvents
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const recordSearchResultsEvents = (props, results) => {
const dataPush = { event: 'fl-search-results' };
const { currentQuery, pagination, resultTime } = props;
if (currentQuery) {
Function DisasterAlert
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DisasterAlert = () => {
return (
<va-alert-expandable
trigger="Need help with VA Debt after a natural disaster?"
status="info"
Function fetchResultsThunk
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchResultsThunk = () => async dispatch => {
// Change the `fetching` state in our store.
dispatch(
fetchResultsAction({
hideFetchingState: true,
Function AreaOfDisagreementReviewField
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const AreaOfDisagreementReviewField = props => {
const { defaultEditButton, formData } = props;
if (!getIssueName(formData)) {
return null;
Function withFeatureFlip
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const withFeatureFlip = (Component, type) => {
return props => {
const selectFeatureToggles = useMemo(makeSelectFeatureToggles, []);
const featureToggles = useSelector(selectFeatureToggles);
const {
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { user, form } = this.props;
const contentBeforeButtons = (
<SaveFormLink
locationPathname={this.props.location.pathname}
Function fileUploadUi
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fileUploadUi(content) {
return {
...fileUiSchema(content.label, {
buttonText: 'Upload file',
addAnotherLabel: 'Upload another file',
Function prepareAddressData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const prepareAddressData = formData => {
let addressData = {
veteranName: formData.fullName,
addressLine1: formData.addressLine1,
addressLine2: formData.addressLine2,
Function formatMenuItems
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const formatMenuItems = menuItems => {
const formattedMenuItems = [];
if (menuItems && isArray(menuItems)) {
return menuItems;
Function mockData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mockData = (state = INITIAL_STATE, action) => {
switch (action.type) {
case UPDATE_PENDING_VERIFICATIONS:
// this delets all pending verifications award_ids
return {
Function buildHourItem
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const buildHourItem = item => {
// {day: 4, starthours: 700, endhours: 1730, comment: ""}
if (
item.starthours < 0 ||
item.endhours < 0 ||
Function DependentListLoopForm
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DependentListLoopForm = props => {
const { children, data, page, onChange, onSubmit } = props;
const { isLoggedIn } = useSelector(selectAuthStatus);
const { fullName = {} } = data || {};
Function updateFormPages
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateFormPages = (
patientDemographicsStatus,
pages,
URLS,
isTravelReimbursementEnabled = false,
Function withError
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const withError = Component => {
const WrappedComponent = props => {
const selectError = useMemo(makeSelectError, []);
const { error } = useSelector(selectError);
Function TravelQuestion
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TravelQuestion = props => {
const { router } = props;
const { t } = useTranslation();
const additionalInfoItems = [
Function TravelVehicle
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TravelVehicle = props => {
const { router } = props;
const { t } = useTranslation();
const { updateError } = useUpdateError();
const additionalInfoItems = [
Function makeSchema
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeSchema(locationId) {
return {
type: 'object',
properties: {
toxicExposure: {
Function prefillTransformer
has 29 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 makeSchema
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeSchema(itemId) {
return {
type: 'object',
properties: {
toxicExposure: {