Showing 3,732 of 12,811 total issues
Function getSubmenu
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
getSubmenu(item, currentSection) {
if (this.mobileMediaQuery?.matches) {
const menuSections = [
item.menuSections.mainColumn,
item.menuSections.columnOne,
Function replaceSchema
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
replaceSchema: (formData, _schema, _uiSchema, index, path) => {
const addressPath = getAddressPath(path); // path is ['address', 'currentField']
cachedPath = addressPath;
const data = get(addressPath, formData) ?? {};
const { country } = data;
Function createRoutes
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function createRoutes(formConfig) {
// Validate the config while creating the routes because this is really the
// entry point for applications to use the forms library.
// TODO: Tree shake this config validation in prod
validateConfig(formConfig);
Function pactAct
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const pactAct = (state = initialState, action) => {
switch (action.type) {
case PAW_UPDATE_SERVICE_PERIOD:
return updateFormValue(SERVICE_PERIOD, false, state, action);
case PAW_UPDATE_BURN_PIT_2_1:
Function fetchFormStatus
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const fetchFormStatus = () => async dispatch => {
dispatch(initiateApiCall());
const sessionExpiration = localStorage.getItem('sessionExpiration');
const remainingSessionTime = moment(sessionExpiration).diff(moment());
if (!remainingSessionTime) {
Function prefillTransformer
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function prefillTransformer(pages, formData, metadata, state) {
const vaProfile = state.user.profile;
// For reference, I _think_ the vapContactInfo has the follow form:
// const vapContactInfo = {
Function DecisionReviewPage
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DecisionReviewPage = () => {
useEffect(() => {
setTimeout(() => {
focusElement('#main h2');
});
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { form } = this.props;
const { submission, formId, data } = form;
const submitDate = submission.timestamp;
const { fullName } = data;
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div>
<va-button onClick={this.openModal} text="Opt Out" />
<VaModal
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { form } = this.props;
const { submission, formId, data } = form;
const submitDate = new Date(submission?.timestamp);
Function mailInfo
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mailInfo = (address, officeName, faxNum, preamble, appType) => {
const faxNumMarkup = (
<VaTelephone
contact={JSON.stringify({
phoneNumber: faxNum ?? '3033317809',
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { form } = this.props;
const { submission, formId, data } = form;
const { fullName } = data;
Function MFA
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const MFA = () => {
const verifyLink = useCallback(async policy => {
await verify({ policy, isLink: true, isSignup: false });
}, []);
Function verifyDependents
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function verifyDependents(state = initialState, action) {
switch (action.type) {
case DEPENDENCY_VERIFICATION_CALL_SUCCESS:
return {
...state,
Function FinancialConfirmation
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const FinancialConfirmation = props => {
const { goBack, goForward } = props;
return (
<va-alert
Function YourAppointment
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const YourAppointment = props => {
const { avs } = props;
return (
<div className="avs-accordion-item">
Function createRecurringEvents
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const createRecurringEvents = () => {
const recurEventData = { id: 'upcoming' };
const eventA = createEvent(
now
.clone()
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { form } = this.props;
const { submission, formId, data } = form;
const submitDate = submission ? submission.timestamp : null;
const { fullName } = data;
Function generateMedicalCentersSchemas
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateMedicalCentersSchemas = (
medicalCentersKey = 'medicalCenters',
medicalCentersTitle = 'Default Medical Centers Title',
medicalCenterMessage = 'Default Message',
medicalCenterFieldLabel = 'Default Field Label',
Function App
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const App = props => {
const { location, children } = props;
const { data: formData } = useSelector(state => state.form);
const { isLoadingFeatureFlags: loading, useFacilitiesApi } = useSelector(
selectFeatureToggles,