Showing 4,231 of 14,884 total issues
Function useLocalStorage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useLocalStorage = (key, defaultValue) => {
const [value, setValue] = useState(() => {
let currentValue;
try {
Function certificateOfEligibility
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const certificateOfEligibility = (state = initialState, action) => {
switch (action.type) {
case UPDATE_LOGGEDIN_STATUS:
return { ...state, profileIsUpdating: false };
case SKIP_AUTOMATIC_COE_CHECK:
Function libraryCurrent
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function libraryCurrent() {
let increment = 1;
let numVal;
Array.prototype.slice.call(cards).forEach(element => {
if (
Function handleEditPageDisplayTweaks
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const handleEditPageDisplayTweaks = location => {
const navHeader = document.querySelector('#nav-form-header');
const chapterProgress = document.querySelector(
'.schemaform-chapter-progress',
);
Function certificateOfEligibility
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const certificateOfEligibility = (state = initialState, action) => {
switch (action.type) {
case UPDATE_LOGGEDIN_STATUS:
return { ...state, profileIsUpdating: false };
case SKIP_AUTOMATIC_COE_CHECK:
Function createDuplicateEvents
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createDuplicateEvents = () => {
const eventA = createEvent(
now
.clone()
.add(5, 'days')
Function fetchNearbyVetCenters
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const fetchNearbyVetCenters = async () => {
const mainAddress = props.mainVetCenterAddress;
if (!mainAddress) {
return;
}
Function buildHourItem
has 28 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 formatReadableDate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatReadableDate = rawDate => {
const months = [
'January',
'February',
'March',
Function MixedLanguageDisclaimer
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MixedLanguageDisclaimer = () => {
const selectFeatureToggles = useMemo(makeSelectFeatureToggles, []);
const {
isTranslationDisclaimerSpanishEnabled,
isTranslationDisclaimerTagalogEnabled,
Function setDayOfData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
payload => {
batch(() => {
const {
appointments,
demographics,
Function formatReadableDate
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatReadableDate = rawDate => {
const months = [
'January',
'February',
'March',
Function showSeparationLocation
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const showSeparationLocation = formData => {
const { serviceInformation = {} } = formData || {};
const { servicePeriods, reservesNationalGuardService } = serviceInformation;
// moment(undefined) => today
Function submit
has 28 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 transformSecondaryDisabilities
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const transformSecondaryDisabilities = formData => {
if (!formData.newSecondaryDisabilities) {
return formData;
}
Function render
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const pageDescription = (
<>
<h3 className="vads-u-font-size--h4">Shipping address</h3>
<div className="vads-u-margin-top--2">
Function DisagreeFileClaimPage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DisagreeFileClaimPage = () => {
const linkText = 'Learn about the decision review process';
recordEvent({
event: 'howToWizard-alert-displayed',
Function uiSchema
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const uiSchema = index => {
const addressUI = addressUISchema(
`secondaryIncident${index}.sources[:index]address`,
null,
false,
Function ConfirmationPage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const ConfirmationPage = props => {
const form = useSelector(state => state.form || {});
const { submission } = form;
const { formConfig } = props?.route;
const submitDate = submission.timestamp;
Function SurveyInformation
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SurveyInformation = () => {
const isProduction = environment.isProduction();
// showForm/loadForm use specific survey numbers for each environment
const surveyNumber = isProduction