Showing 445 of 2,739 total issues
Function cells
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
const cells = columns.map((column, index) => {
const {
header,
component,
field,
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
id,
options,
required,
Function Avatar
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Avatar = props => {
const { className } = props;
return (
<svg className={className} width="20px" height="20px" viewBox="0 0 20 20" version="1.1">
<g id="pages" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
style,
className,
value,
Function FolderClose
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
const FolderClose = props => {
const { className, style } = props;
return (
<svg className={className} style={style} width="20px" height="16px" viewBox="0 0 20 16">
<g id="components" stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { liveUrl, previewUrl } = this.props;
const { isVisible } = this.state;
return (
Function SelectableHeader
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function SelectableHeader(props) {
const {
onSelectAllRows,
onDeselectAllRows,
tableId,
Function Marker
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Marker = props => {
const { className, style } = props;
return (
<svg
className={className}
Function render
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { children, toc } = this.props;
const { components } = toc.props.sections[1];
return (
Function filterCountries
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function filterCountries(query, countries, country) {
if (query === '' || query === '+') {
const filteredCountries = countries.filter(value => value.isoCode !== country.isoCode);
filteredCountries.unshift(country);
return filteredCountries;
Function manageTab
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function manageTab(node, event) {
const tabbable = findTabbableElements(node);
if (!tabbable.length) {
event.preventDefault();
Function DownloadCsv
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function DownloadCsv(props) {
const { className, style } = props;
return (
<svg
className={className}
Function CsvIcon
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function CsvIcon(props) {
const { className, style } = props;
return (
<svg
className={className}
Function CheckCircle
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function CheckCircle(props) {
const { className, style } = props;
return (
<svg
className={className}
Function Building
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Building = props => {
const { className, style } = props;
return (
<svg
className={className}
Function Facebook
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const Facebook = props => {
const { className, style } = props;
return (
<svg
className={className}
Function AvatarMenu
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function AvatarMenu(props) {
const {
src,
initials,
icon,
Function enableBodyScroll
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export function enableBodyScroll(targetElement) {
if (isIosDevice) {
if (!targetElement) {
// eslint-disable-next-line no-console
console.error(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function AccordionTimelineMarker
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function AccordionTimelineMarker(props) {
const {
icon,
name,
isLoading,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function SelectableCell
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
export default function SelectableCell(props) {
const { isSelected, isDisabled, tableId, onSelectRow, onDeselectRow, inputType } = props;
const name = `${tableId}-options`;
const isRadio = inputType === 'radio';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"