Showing 17 of 54 total issues
Function withFacebook
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function withFacebook(WrappedComponent) {
class Facebook extends Component {
constructor(props) {
super(props)
this.state = {
Function withGoogle
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function withGoogle(WrappedComponent) {
class Google extends Component {
constructor(props) {
super(props)
this.state = {
Function withDebouncedInput
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function withDebouncedInput(WrappedComponent) {
class DebouncedInput extends Component {
constructor(props) {
super(props)
this.state = {
Function render
has 62 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
placeholder,
src,
width,
Function withThirdPartyAuth
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function withThirdPartyAuth(WrappedComponent) {
class ThirdPartyAuth extends Component {
constructor(props) {
super(props)
this.state = {
Function VerticalSpace
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function VerticalSpace(props) {
const { space, children, columns } = props
const propsToPass = Object.assign({}, props)
delete propsToPass.space
Function Avatar
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Avatar(props) {
const { placeholderText, src, width, link, onClick } = props
const placeholder = (
<Div
Function render
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
Open
render() {
const {
placeholder,
src,
width,
- 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 Installation
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Installation = (props) => {
const {
maintainer,
command,
npm,
Function InputTopLabel
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function InputTopLabel(props) {
const {
onChange: handleChange,
onKeyUp: handleKeyUp,
value,
Function User
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function User(props) {
const {
avatarLetter,
avatarSrc,
avatarWidth,
Function ButtonStroke
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ButtonStroke(props) {
const { left, right, theme, children, color, textColor } = props
const className = glamor.css(getThemeForComponent('ButtonStroke', theme, props, (t) => {
return {
Function ButtonMajor
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ButtonMajor(props) {
const { left, right, theme, children, color, textColor } = props
const className = glamor.css(getThemeForComponent('ButtonMajor', theme, props, (t) => {
return {
Function Button
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Button(props) {
const { left, right, theme, children, color, textColor } = props
const className = glamor.css(getThemeForComponent('Button', theme, props, (t) => {
return {
Function Usage
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const Usage = (props) => {
const {
importString,
children
} = props
Function render
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { show, message } = this.props
const { ready, isClosed } = this.state
return (
Function Link
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
function Link({ to, href, onClick, children, className, target }) {
let useClientRouting = false
const linkProps = {
className,
- 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"