Showing 82 of 1,769 total issues
Function render
has 68 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
// console.info('Day render')
const {
size,
day,
- Create a ticketCreate a ticket
Function render
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
width,
height,
homeAddress,
- Create a ticketCreate a ticket
Function getEventColor
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
const getEventColor = (discipline, type, status = '') => {
let eventColor = ''
switch (status) {
case 'Canceled':
eventColor = Colors.event.status.canceled
- Read upRead up
- Create a ticketCreate a ticket
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 16 (exceeds 5 allowed). Consider refactoring. Open
render() {
// console.info('Day render')
const {
size,
day,
- Read upRead up
- Create a ticketCreate a ticket
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 @@router/LOCATION_CHANGE
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
['@@router/LOCATION_CHANGE']: (state, action) => {
const locationState = action.payload.state
// splitting on sub-actions
if (locationState && locationState.subActionName) {
- Create a ticketCreate a ticket
Function shallowEqual
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
function shallowEqual(objA, objB, except = {exceptProps: []}, compName = '<unknown>') {
if (is(objA, objB)) {
return true
}
- Read upRead up
- Create a ticketCreate a ticket
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 14 (exceeds 5 allowed). Consider refactoring. Open
render() {
// Perf.start()
this.whenRenderStarted = +new Date()
console.info('Calendar render is called') //eslint-disable-line
const {
- Read upRead up
- Create a ticketCreate a ticket
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 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
url,
showHeader = true,
showBorder = false,
- Create a ticketCreate a ticket
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
type = 'secondary',
size = 'md',
primaryHover,
- Create a ticketCreate a ticket
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {containerWidth} = this.props
const style = {
position: 'fixed',
- Create a ticketCreate a ticket
Function S3Router
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function S3Router(options) {
const S3_BUCKET = options.bucket + (options.directory || '')
// only for returning to the client
const directory = options.directory || ''
- Create a ticketCreate a ticket
Function GridLines
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
const GridLines = (props) => {
const thiknessPx = 4
const baseStyle = {
position: 'fixed',
- Create a ticketCreate a ticket
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { useStaticLinks = false } = this.props
const Link = getLinkComponent(useStaticLinks)
- Create a ticketCreate a ticket
Function parsePromoter
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
const parsePromoter = promoterRaw => {
const clubId = getClubIdFromUrl(promoterRaw.url)
let matchingPromoter = promotersByClubId[clubId]
- Create a ticketCreate a ticket
Function render
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { containerWidth, calendarIsLoading } = this.props
const calendarId = getDraftCalendarId(this.props.params.calendarId)
let weekdaysSizes
- Create a ticketCreate a ticket
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {sizes} = this.props
const rowStyle = {
flexWrap: 'nowrap'
- Create a ticketCreate a ticket
Function render
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { copied } = this.state
const {
type = 'button',
whatToCopyText = '',
- Create a ticketCreate a ticket
Function convertUsacEventToRcnEvent
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
const convertUsacEventToRcnEvent = previousEventsByPermit => rawUsacEvent => {
const existingRcnEvents = previousEventsByPermit[trim(rawUsacEvent.permit)]
const existingRcnEvent = existingRcnEvents
? (existingRcnEvents.length === 1)
- Read upRead up
- Create a ticketCreate a ticket
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 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { calendar, events } = this.props
const NO_OF_UPCOMING_DAYS = 4
- Create a ticketCreate a ticket
Function render
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let {
square,
inverted,
color = Colors.bodyBg,
- Create a ticketCreate a ticket