Showing 4,231 of 14,884 total issues
Function findHeadingIssues
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static findHeadingIssues(headings) {
const issues = [];
// Check for missing h1
if (!headings.some(h => h.level === 1)) {
Function addFile
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addFile = (file, state, setState) => {
let docType = '';
if (!isValidFileType(file)) {
setState({
...state,
Function addFile
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const addFile = (file, state, setState) => {
let docType = '';
if (!isValidFileType(file)) {
setState({
...state,
Function fetchTotalDisabilityRating
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchTotalDisabilityRating() {
return dispatch => {
const {
FETCH_DISABILITY_RATING_STARTED,
FETCH_DISABILITY_RATING_FAILED,
Function updateDiariesService
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function updateDiariesService(shouldUpdate) {
return async dispatch => {
if (!shouldUpdate) {
dispatch({
type: UPDATE_DIARIES_SKIP,
Function UnauthContext
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const UnauthContext = () => {
const dispatch = useDispatch();
const handleSigninClick = () => {
recordEvent({ event: AUTH_EVENTS.LOGIN });
dispatch(toggleLoginModal(true, 'btsss-login-widget'));
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
if (this.props.loading) {
return <va-loading-indicator message="Loading facility..." />;
}
Function TravelAgreement
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const TravelAgreement = props => {
const { router } = props;
const { t } = useTranslation();
const { goToPreviousPage } = useFormRouting(router);
Function getDateFilters
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function getDateFilters() {
const today = utcToZonedTime(new Date());
let quarter = getQuarter(today);
const dateRanges = [];
Function phoneUISchema
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function phoneUISchema(category) {
const schema = {
'ui:options': {
hideLabelText: true,
showFieldLabel: false,
Function onSuccess
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const onSuccess = resp => {
const successfulSubmissions = resp.filter(response =>
response.status.toLowerCase().includes('processed'),
);
const failedSubmissions = resp.filter(
Function mapStateToProps
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = (state, ownProps) => {
const supplies = state.form?.data?.supplies;
const batterySupplies = supplies
?.filter(battery => battery.productGroup?.includes('Battery'))
.filter(battery => moment().diff(battery.nextAvailabilityDate) >= 0);
Function flowPages
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const flowPages = (obj, list, path) => {
const pages = _.cloneDeep(obj);
const flowGroup = {};
const flowGroupName = path
.split('-')
Function getErrorType
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const getErrorType = () => {
const hasAttachments = attachments.length > 0;
const hasValidSignature =
isSignatureRequired && electronicSignature !== '';
const verifyAllFieldsAreValid =
Function handleConfirmMoveFolderTo
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleConfirmMoveFolderTo = () => {
if (selectedFolder === null) {
setFolderInputError(
Constants.ErrorMessages.MoveConversation.FOLDER_REQUIRED,
);
Function generateMockPrograms
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const generateMockPrograms = numPrograms => {
const programNames = [
'CERTIFIED ETHICAL HACKER',
'CISCO SYSTEMS - CCDA',
'CERTIFIED INFORMATION SYSTEMS SECURITY',
Function renderInState
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const renderInState = () => {
if (!displayedInputs.inState) return null;
const { inStateTuitionInformation } = profile.attributes;
const radioButtonsLabelText = 'Are you an in-state student?';
const options = [
Function mapStateToProps
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const mapStateToProps = state => {
const allLoaded =
_.difference(state.compare.selected, state.compare.details.loaded)
.length === 0;
const estimated = {};
Function fetchSearchByLocationResults
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function fetchSearchByLocationResults(
location,
distance,
filters,
version,
Function handleAdd
has 34 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])) {