Showing 3,724 of 12,675 total issues
Function makeSchema
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeSchema(locationId) {
return {
type: 'object',
properties: {
toxicExposure: {
Function makeSchema
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeSchema(locationId) {
return {
type: 'object',
properties: {
toxicExposure: {
Function changeDisabilityName
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const changeDisabilityName = (oldData, newData, changedIndex) => {
const oldId = sippableId(oldData.newDisabilities[changedIndex]?.condition);
const newId = sippableId(newData.newDisabilities[changedIndex]?.condition);
let result = removeDisability(oldData.newDisabilities[changedIndex], newData);
Function prefillTransformer
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function prefillTransformer(pages, formData, metadata) {
const prefillPersonalInformation = data => {
return {
aboutYourself: {
...data.personalInformation,
Function MaintenanceAlert
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const MaintenanceAlert = () => {
return (
<va-alert
class="row vads-u-margin-top--3 vads-u-margin-left--1"
status="info"
Function UnAuthBanner
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UnAuthBanner = () => {
const dispatch = useDispatch();
const handleSignIn = () => {
dispatch(toggleLoginModal(true, 'mhv-sm-landing-page'));
};
Function getCancelInfo
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getCancelInfo(state) {
const {
appointmentToCancel,
showCancelModal,
cancelAppointmentStatus,
Function generatePhaseItems
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const generatePhaseItems = () => {
const {
currentPhaseBack,
previousPhases,
} = claim.attributes.claimPhaseDates;
Function institutionFieldValue
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const institutionFieldValue = (
field,
rowIndex,
colIndex,
institution,
Function buildSearchFilters
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const buildSearchFilters = filters => {
const clonedFilters = _.cloneDeep(filters);
delete clonedFilters.expanded;
delete clonedFilters.search;
Function fetchCompareDetails
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchCompareDetails(facilityCodes, filters, version) {
const params = rubyifyKeys({
facilityCodes,
...buildSearchFilters(filters),
});
Function addMapMarker
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const addMapMarker = (institution, index, locationBounds, mapMarkers) => {
const { latitude, longitude, name } = institution;
const lngLat = new mapboxgl.LngLat(longitude, latitude);
const markerElement = document.createElement('div');
Function EightKeysModalContent
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function EightKeysModalContent() {
return (
<>
<p>
The “8 Keys to Veterans’ Success” are steps that postsecondary
Function fetchProfile
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchProfile(facilityCode, version) {
const queryString = version ? `?version=${version}` : '';
const url = `${api.url}/institutions/${facilityCode}${queryString}`;
return (dispatch, getState) => {
Function VeteranSuccessModalContent
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function VeteranSuccessModalContent() {
return (
<>
<p>
This program supports service members, Veterans, and qualified
Function mapStateToProps
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const mapStateToProps = state => {
const mailingFieldName = VAP_SERVICE.FIELD_NAMES.MAILING_ADDRESS;
const {
apiRoute,
Function constructor
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(props) {
super(props);
// Throw an error if there’s no viewField (should be React component)
if (!isReactComponent(this.props.uiSchema['ui:options'].viewField)) {
Function validateAddress
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function validateAddress(errors, address, formData, currentSchema) {
// Adds error message for state if it is blank and one of the following countries:
// USA, Canada
if (
countriesWithStateCodes.has(address.country) &&
Function prepareAddressData
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const prepareAddressData = formData => {
let addressData = {
veteranName: formData.fullName,
addressLine1: formData.addressLine1,
addressLine2: formData.addressLine2,
Function fileUploadUi
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fileUploadUi(content) {
return {
...fileUiSchema(content.label, {
buttonText: 'Upload file',
addAnotherLabel: 'Upload another file',