Showing 3,732 of 12,811 total issues
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 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 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 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 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 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 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 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 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 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({
Function handleConfirmMoveFolderTo
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleConfirmMoveFolderTo = () => {
if (selectedFolder === null) {
setFolderInputError(
Constants.ErrorMessages.MoveConversation.FOLDER_REQUIRED,
);
Function getTab
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getTab = (tabName, label) => {
const activeTab = tabName === tab;
const tabClasses = classNames(
{
'active-search-tab': activeTab,
Function renderInState
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderInState = () => {
if (!displayedInputs.inState) return null;
const { inStateTuitionInformation } = profile.attributes;
const radioButtonsLabelText = 'Are you an in-state student?';
const options = [
Function mapStateToProps
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = state => {
const allLoaded =
_.difference(state.compare.selected, state.compare.details.loaded)
.length === 0;
const estimated = {};
Function fetchSearchByLocationResults
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchSearchByLocationResults(
location,
distance,
filters,
version,
Function GiBillBreadcrumbs
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const GiBillBreadcrumbs = () => {
const profileMatch = useRouteMatch('/institution/:facilityCode');
const compareMatch = useRouteMatch('/compare');
const crumbLiEnding = giDocumentTitle();
const crumbs = [
Function handleAdd
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
handleAdd() {
const numberOfItems = this.props.formData.length;
const lastIndex = numberOfItems - 1;
if (errorSchemaIsValid(this.props.errorSchema[lastIndex])) {
Function buildPrescriptionsTXT
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildPrescriptionsTXT = prescriptions => {
let result = `
---------------------------------------------------------------------------------
`;