Showing 445 of 2,739 total issues
Function getCardElementOptions
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function getCardElementOptions(theme, disabled, size) {
const fontSize = SIZES[size] || SIZES.medium;
return {
style: {
base: {
Function Checkmark
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Checkmark = props => {
const { className, style } = props;
const {
rainbow: { palette },
} = useTheme();
Function Picture
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Picture = props => {
const { className, style } = props;
return (
<svg
className={className}
Function Upload
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Upload(props) {
const { className, style } = props;
return (
<svg
className={className}
Function constructor
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(props) {
super(props);
this.inputId = uniqueId('picklist-input');
this.errorMessageId = uniqueId('error-message');
this.listboxId = uniqueId('listbox');
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { className, style, latitude, longitude, icon } = this.props;
const { label, description } = this.state;
if (latitude && longitude) {
Function StarHalf
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function StarHalf() {
return (
<svg width="19px" height="18px" viewBox="0 0 19 18">
<defs>
<linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="0%">
Function Cancel
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Cancel(props) {
const { className, style } = props;
return (
<svg
width="16px"
Function useMoveFocusedDayFunction
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function useMoveFocusedDayFunction(focusedDate, currentMonth, minDate, maxDate) {
return useCallback(
increment => {
const { minCalendarDate, maxCalendarDate } = getCalendarBounds(minDate, maxDate);
const nextFocusedDate = addDays(focusedDate, increment);
Function Month
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Month(props) {
const { firstDayMonth, value, minDate, maxDate, onChange } = props;
const date = new Date(firstDayMonth);
const lastDayMonth = getLastDayMonth(firstDayMonth);
Function Notification
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Notification(props) {
const { className, style, icon, title, description, onRequestClose, hideCloseButton } = props;
return (
<StyledContainer className={className} style={style}>
Function getTotalWidthsMetadata
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function getTotalWidthsMetadata(params) {
const { columns, minColumnWidth, maxColumnWidth } = params;
const initial = {
totalFixedWidth: 0,
totalFixedColumns: 0,
Function Header
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Header = React.forwardRef((props, ref) => {
const { week, today, locale } = props;
const formattedWeekDay = useFormatedWeekDay(locale);
const formattedNumberDay = useFormattedNumberDay(locale);
Function MenuItems
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function MenuItems(props) {
const { items, onClick, focusedItemIndex, onHover } = props;
return items.map((item, index) => {
const { label, description, icon, type } = item;
Function SearchIcon
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const SearchIcon = props => {
const { className } = props;
return (
<svg
className={className}
Function Day
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function Day(props) {
const { date, firstDayMonth, isSelected, minDate, maxDate, onSelect } = props;
const { dateComponent } = useContext(MonthCalendarContext);
const day = date.getDate();
const isAdjacentDate = date.getMonth() !== firstDayMonth.getMonth();
Function Coin
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Coin = props => {
const { className, style } = props;
return (
<svg
className={className}
Consider simplifying this complex logical expression. Open
Open
if (
(focusedNode && name === focusedNode) ||
(isSelected && !focusedNode) ||
(isFirstNode && !selectedNode && !focusedNode)
) {
Consider simplifying this complex logical expression. Open
Open
if (type === 'hsv' && Array.isArray(values) && values.length === 3) {
return (
values.filter(
(value, index) =>
(index === 0 && value >= 0 && value <= 360) || (value >= 0 && value <= 100),
Consider simplifying this complex logical expression. Open
Open
if (
(currentHour && currentMinutes && ampm && !hour24) ||
(currentHour && currentMinutes && hour24)
) {
onChange(time);