Showing 3,724 of 12,675 total issues
Function makeLoadedCards
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const makeLoadedCards = () => {
setLoadedCards(
loaded.map((facilityCode, index) => {
return (
<li
Function default
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function(state = INITIAL_STATE, action) {
switch (action.type) {
case FETCH_CONSTANTS_STARTED:
return {
...state,
Function deleteConnectedApp
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function deleteConnectedApp(appId) {
return async (dispatch, getState) => {
recordEvent({ event: 'profile-disconnect-connected-app-started' });
dispatch({ type: DELETING_CONNECTED_APP, appId });
Function disclaimerText
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const disclaimerText = () => {
return (
<>
<div>
<p>
Function vaProfile
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function vaProfile(state = initialState, action) {
switch (action.type) {
case FETCH_HERO_SUCCESS:
case FETCH_HERO_FAILED:
return set('hero', action.hero, state);
Function ClaimantType
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const ClaimantType = props => {
const { router, setFormData } = props;
const { data: formData } = useSelector(state => state.form);
const [localData, setLocalData] = useState({});
Function generateTocItem
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generateTocItem = (doc, parent, data, pageData) => {
const leftMargin = 100;
const pages =
pageData.startPage === pageData.endPage
? `page ${pageData.startPage}`
Function createServiceMap
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function createServiceMap(maintenanceWindows = []) {
const serviceMap = new Map();
// Maintenance windows should be sorted in ascending order
// so that when a single externalService has multiple upcoming
Function sortListByFuzzyMatch
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function sortListByFuzzyMatch(value, list, prop = 'label') {
return list
.map(option => {
const label = option[prop].toUpperCase().replace(/[^a-zA-Z ]/g, '');
const val = value.toUpperCase().replace(/[^a-zA-Z ]/g, '');
Function render
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const primaryButton = {
action: this.handleClose,
text: 'Finish applying',
};
Function vaDateCommonFieldMapping
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function vaDateCommonFieldMapping(props) {
const {
description,
textDescription,
DescriptionField,
Function firstNameLastNameNoSuffixUI
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const firstNameLastNameNoSuffixUI = (formatTitle, uiOptions = {}) => {
return {
'ui:validations': [validateEmpty],
first: {
'ui:title': formatTitle ? formatTitle('first name') : 'First name',
Function focusElement
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function focusElement(selectorOrElement, options, root) {
function applyFocus(el) {
if (el) {
// Use getAttribute to grab the "tabindex" attribute (returns string), not
// the "tabIndex" property (returns number). Focusable elements will
Function handleAdd
has 29 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 sortListByFuzzyMatch
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function sortListByFuzzyMatch(value, list, prop = 'label') {
return list
.map(option => {
const label = option[prop].toUpperCase().replace(/[^a-zA-Z ]/g, '');
const val = value.toUpperCase().replace(/[^a-zA-Z ]/g, '');
Function updateUiSchema
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function updateUiSchema(schema, uiSchema, formData) {
if (!uiSchema) {
return uiSchema;
}
Function Pending
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Pending(props) {
const { formConfig, onBack, onSubmit } = props;
let ariaDescribedBy = null;
// If no ariaDescribedBy is passed down from form.js,
// a null value will properly not render the aria label.
Function navigateForward
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const navigateForward = (SHORT_NAME, formResponses, router) => {
const roadmap = makeRoadmap(getServicePeriodResponse(formResponses));
if (roadmap?.length) {
const CURRENT_INDEX = roadmap?.indexOf(SHORT_NAME);
Function checkResponses
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const checkResponses = (formResponses, displayConditionsForPath) => {
const questionRequirements = Object.keys(displayConditionsForPath);
for (const questionShortName of questionRequirements) {
const formResponse = formResponses?.[questionShortName];
Function phoneUiSchema
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const phoneUiSchema = fieldName => {
return {
inputPhoneNumber: {
'ui:title': `${fieldName} (U.S. numbers only)`,
'ui:webComponentField': VaTextInputField,