Showing 3,732 of 12,811 total issues
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { form } = this.props;
const { formId, data } = form;
const { fullName } = data;
Function OtherTextField
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function OtherTextField(props) {
let { inputType } = props.options;
if (!inputType) {
inputType = numberTypes.has(props.schema.type) ? 'number' : props.type;
}
Function formatServiceName
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const formatServiceName = service => {
if (!service) return null;
const lowerCaseService = service
.replace(/([A-Z])/g, ' $1')
.replace(/\s+/g, ' ')
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
return (
<div className="schemaform-intro">
<br />
<FormTitle title="Sign up to get a COVID-19 vaccine at VA" />
Function strongCaseTips
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const strongCaseTips = () => {
if (specReason) {
return (
<div>
<span>
Function submitForm
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const submitForm = (form, formConfig) => {
const body = formConfig.transformForSubmit
? formConfig.transformForSubmit(formConfig, form)
: transformForSubmit(formConfig, form);
const benefits = form.data['view:benefit'];
Function activateInjectedAssets
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function activateInjectedAssets() {
fetch(`${getContentHostName()}/generated/headerFooter.json`)
.then(resp => {
if (resp.ok) {
return resp.json();
Function getDateRangesBetween
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const getDateRangesBetween = (date1, date2) => {
const [year1, month1] = date1.split('-').map(str => parseInt(str, 10));
const [year2, month2] = date2.split('-').map(str => parseInt(str, 10));
const ranges = [];
Function TrainingAndWebinar
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TrainingAndWebinar = () => {
return (
<MainContentSubDiv
id="trainings-and-webinars"
header="Trainings and webinars"
Function bankInfo
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const bankInfo = (state = initialState, action) => {
switch (action.type) {
case UPDATE_BANK_INFO:
return {
...state,
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { lat, long, address } = this.state;
const { multiError, multiLoading, facilityID } = this.props;
const loading = multiLoading ? multiLoading[facilityID] : false;
const error = multiError ? multiError[facilityID] : false;
Function LoadingPage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const LoadingPage = props => {
const { router } = props;
const { t } = useTranslation();
const { goToNextPage } = useFormRouting(router);
Function onSearch
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSearch = (event, filterList, dropdownValue) => {
const incomingValue = event?.target?.filterBy?.value || dropdownValue;
const newSelectedOption = filterByOptions.find(
option => option?.value === incomingValue,
Function getRepresentativeStatus
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static getRepresentativeStatus() {
const requestUrl = `${
environment.API_URL
}/representation_management/v0/power_of_attorney`;
const apiSettings = {
Function displayContent
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const displayContent = (title, form526RequiredIdentifers) => {
const missingIdentifiers = filterMissingIdentifiers(
form526RequiredIdentifers,
);
Function fixTreatedDisabilityNamesKey
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function fixTreatedDisabilityNamesKey(savedData) {
const formData = clone(savedData.formData);
const facilities = formData.vaTreatmentFacilities || [];
const powDisabilities = formData['view:isPow']?.powDisabilities;
if (facilities) {
Function DisagreeFileClaimPage
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const DisagreeFileClaimPage = () => {
recordEvent({
event: 'howToWizard-alert-displayed',
'reason-for-alert': 'disagree with VA decision, needs a decision review',
});
Function updateSchema
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
updateSchema: formData => {
let mailingAddress;
const veteransAddress =
formData[veteranFields.parentObject][veteranFields.address];
if (
Function addServicePeriod
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addServicePeriod = (formData, separationDate, setFormData) => {
const updateData = newData => {
window.sessionStorage.removeItem(SAVED_SEPARATION_DATE);
setFormData({
...newData,
Function updateFormData
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const updateFormData = event => {
event.preventDefault();
const inputValue = homeAcreageValue.value;