Showing 12,843 of 12,843 total issues
Function data
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
data: (state = initialState, action) => {
switch (action.type) {
case MEB_FETCH_CLAIM_STATUS:
return {
...state,
Function submit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function submit(form, formConfig) {
const headers = { 'Content-Type': 'application/json' };
const body = transform(formConfig, form);
const apiRequestOptions = {
method: 'POST',
Function applicantInformationField
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const applicantInformationField = (automatedTest = false) => {
if (isProductionOfTestProdEnv(automatedTest)) {
return {
...createApplicantInformationPage(fullSchema1995, {
isVeteran: true,
Function BehalfOfSomeoneElseContent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const BehalfOfSomeoneElseContent = () => {
return (
<>
<p>
You’ll need a copy of their sponsor’s DD214 or other separation papers.
Function checkFlags
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function checkFlags(pages, person, newListOfMissingFiles) {
const personUpdated = person; // shallow, updates reflect on actual form state
const wrapped = Array.isArray(pages)
? pages
: Object.keys(pages).map(pg => pages[pg]); // On confirmation, "pages" is obj
Function fileUploadUi
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fileUploadUi = content => {
// a11y focus management. Move focus to select after upload
// see va.gov-team/issues/19688
const addAnotherLabel = 'Upload another file';
Function addFile
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addFile = (file, state, setState) => {
let docType = '';
if (!isValidFileType(file)) {
setState({
...state,
Function addFile
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addFile = (file, state, setState) => {
let docType = '';
if (!isValidFileType(file)) {
setState({
...state,
Function EnrollmentVerificationBreadcrumbs
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function EnrollmentVerificationBreadcrumbs() {
const breadcrumbs = [
{ href: '/', label: 'Home' },
{ href: '/education/', label: 'Education and training' },
{
Function updateDiariesService
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function updateDiariesService(shouldUpdate) {
return async dispatch => {
if (!shouldUpdate) {
dispatch({
type: UPDATE_DIARIES_SKIP,
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (this.props.loading) {
return <va-loading-indicator message="Loading facility..." />;
}
Function UnauthContext
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UnauthContext = () => {
const dispatch = useDispatch();
const handleSigninClick = () => {
recordEvent({ event: AUTH_EVENTS.LOGIN });
dispatch(toggleLoginModal(true, 'coronavirus-vaccination'));
Function prefillTransformer
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function prefillTransformer(pages, formData, metadata, state) {
const {
residentialAddress,
mailingAddress,
} = state.user.profile?.vapContactInfo;
Function fetchTotalDisabilityRating
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchTotalDisabilityRating() {
return dispatch => {
const {
FETCH_DISABILITY_RATING_STARTED,
FETCH_DISABILITY_RATING_FAILED,
Function submit
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function submit(form, formConfig) {
const headers = { 'Content-Type': 'application/json' };
const body = transform(formConfig, form);
const apiRequestOptions = {
Function onSuccess
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSuccess = resp => {
const successfulSubmissions = resp.filter(response =>
response.status.toLowerCase().includes('processed'),
);
const failedSubmissions = resp.filter(
Function mapStateToProps
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = (state, ownProps) => {
const supplies = state.form?.data?.supplies;
const batterySupplies = supplies
?.filter(battery => battery.productGroup?.includes('Battery'))
.filter(battery => moment().diff(battery.nextAvailabilityDate) >= 0);
Function getDateFilters
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getDateFilters() {
const today = utcToZonedTime(new Date());
let quarter = getQuarter(today);
const dateRanges = [];
Function TravelAgreement
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TravelAgreement = props => {
const { router } = props;
const { t } = useTranslation();
const { goToPreviousPage } = useFormRouting(router);
Function newFolder
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const newFolder = folderName => async dispatch => {
try {
const response = await createFolder(folderName);
dispatch({