Showing 42 of 110 total issues
Function controlledModalize
has a Cognitive Complexity of 20 (exceeds 10 allowed). Consider refactoring. Open
export const controlledModalize = (WrappedButtonComponent) => {
const ModalComponent = (props) => {
const {
disabled,
modal,
- 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 FloatingContainer
has a Cognitive Complexity of 20 (exceeds 10 allowed). Consider refactoring. Open
function FloatingContainer(props: Props) {
const {
children,
className: classNameFromProps,
closeOnEscape,
- 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 createDays
has a Cognitive Complexity of 19 (exceeds 10 allowed). Consider refactoring. Open
createDays({ year, month, value }) {
const firstDate = new Date(year, month - 1, 1);
const lastDate = new Date(year, month, 0);
const selected = value && new Date(value);
- 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 ColorInput
has a Cognitive Complexity of 18 (exceeds 10 allowed). Consider refactoring. Open
function ColorInput(props) {
const {
onChange,
showHintAndError,
label,
- 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 render
has a Cognitive Complexity of 18 (exceeds 10 allowed). Consider refactoring. Open
render() {
const {
error,
hint,
keySelector,
- 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 render
has 111 lines of code (exceeds 100 allowed). Consider refactoring. Open
render() {
const {
error,
hint,
label,
Function ConfirmOnClick
has 111 lines of code (exceeds 100 allowed). Consider refactoring. Open
const ConfirmOnClick = (WrappedComponent) => {
const ConfirmComponent = class extends React.PureComponent {
static propTypes = propTypes;
static defaultProps = defaultProps;
Function Image
has 110 lines of code (exceeds 100 allowed). Consider refactoring. Open
function Image(props: Props) {
const {
alt,
className: classNameFromProps,
imageClassName,
Function FloatingContainer
has 108 lines of code (exceeds 100 allowed). Consider refactoring. Open
function FloatingContainer(props: Props) {
const {
children,
className: classNameFromProps,
closeOnEscape,
Function TreeNode
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
function TreeNode<T, K extends OptionKey>(props: TreeNodeProps<T, K>) {
const {
className,
disabled,
readOnly,
- 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 createActionSyncMiddleware
has a Cognitive Complexity of 16 (exceeds 10 allowed). Consider refactoring. Open
export const createActionSyncMiddleware = (actionPrefixes, tabId) => () => next => (action) => {
const {
senderId,
resenderId,
type,
- 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 UNSAFE_componentWillReceiveProps
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
UNSAFE_componentWillReceiveProps(nextProps) {
const {
data: oldData,
boundingClientRect: oldBoundingClientRect,
clusterSize: oldClusterSize,
- 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 Calendar
has a Cognitive Complexity of 13 (exceeds 10 allowed). Consider refactoring. Open
const Calendar = (props: CalendarProps) => {
const {
className,
disabled,
onChange,
- 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 render
has a Cognitive Complexity of 13 (exceeds 10 allowed). Consider refactoring. Open
render() {
const {
className: classNameFromProps,
data,
emptyComponent: EmptyComponent,
- 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 UNSAFE_componentWillReceiveProps
has a Cognitive Complexity of 13 (exceeds 10 allowed). Consider refactoring. Open
UNSAFE_componentWillReceiveProps(nextProps) {
const {
map: oldMap,
mapStyle: oldMapStyle,
layout: oldLayout,
- 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 ListView
has a Cognitive Complexity of 13 (exceeds 10 allowed). Consider refactoring. Open
function ListView<
D,
P,
K extends OptionKey, GP, GK extends OptionKey,
>(props: ListViewProps<D, P, K, GP, GK>) {
- 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 renderChart
has a Cognitive Complexity of 12 (exceeds 10 allowed). Consider refactoring. Open
renderChart() {
const {
boundingClientRect,
idSelector,
groupSelector,
- 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 renderChart
has a Cognitive Complexity of 12 (exceeds 10 allowed). Consider refactoring. Open
renderChart() {
const {
data,
boundingClientRect,
childrenSelector,
- 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 useKeyboard
has a Cognitive Complexity of 12 (exceeds 10 allowed). Consider refactoring. Open
function useKeyboard<T, Q extends OptionKey>(
focusedKey: Q | undefined,
selectedKey: Q | undefined,
keySelector: (option: T) => Q,
options: T[],
- 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
Avoid too many return
statements within this function. Open
return (
<a
key={data}
className={className}
onClick={onClick}