Showing 12 of 127 total issues
File index.d.ts
has 576 lines of code (exceeds 250 allowed). Consider refactoring. Open
// TypeScript Version: 2.3
declare module 'react-google-maps' {
export { default as withGoogleMap, WithGoogleMapProps } from 'react-google-maps/lib/withGoogleMap'
export { default as withScriptjs, WithScriptjsProps } from 'react-google-maps/lib/withScriptjs'
Function transformer
has 210 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function transformer(file, api) {
const j = api.jscodeshift
const wrap = j(file.source)
const exportConfig = wrap.find(j.ExportNamedDeclaration).at(0)
Function withGoogleMap
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function withGoogleMap(BaseComponent) {
const factory = React.createFactory(BaseComponent)
class Container extends React.PureComponent {
static displayName = `withGoogleMap(${getDisplayName(BaseComponent)})`
Function withScriptjs
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function withScriptjs(BaseComponent) {
const factory = React.createFactory(BaseComponent)
class Container extends React.PureComponent {
static displayName = `withScriptjs(${getDisplayName(BaseComponent)})`
Function contentToJS
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
function contentToJS(KlassName, $, $content) {
const constructor = $content
.find(`#${KlassName}`)
.next()
.find("code")
File MarkerWithLabel.jsx
has 259 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*
* -----------------------------------------------------------------------------
* This file is auto-generated from the corresponding file at `src/macros/`.
* Please **DO NOT** edit this file directly when creating PRs.
* -----------------------------------------------------------------------------
Function txPropTypes
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
function txPropTypes() {
return [
...methodAsProps.map(({ name, args, desc }) => {
const [, prop] = name.match(/^set(\S+)/)
const [, maybeType] = args.match(/\S+:(\S+)/)
Function txClassMethods
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
function txClassMethods() {
return [
...publicMethods.map(({ name, returns, returnsDesc }) => {
return Object.assign(
j.classMethod(
Function withScriptjs
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
export function withScriptjs(BaseComponent) {
const factory = React.createFactory(BaseComponent)
class Container extends React.PureComponent {
static displayName = `withScriptjs(${getDisplayName(BaseComponent)})`
- 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 componentDidUpdate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
component,
instance,
eventMap,
updaterMap,
prevProps
Function rdcUncontrolledAndControlledProps
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
function rdcUncontrolledAndControlledProps(acc, value, key) {
if (_.has(acc.prevProps, key)) {
const match = key.match(/^default(\S+)/)
if (match) {
const unprefixedKey = _.lowerFirst(match[1])
- 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 withGoogleMap
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export function withGoogleMap(BaseComponent) {
const factory = React.createFactory(BaseComponent)
class Container extends React.PureComponent {
static displayName = `withGoogleMap(${getDisplayName(BaseComponent)})`
- 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"