Showing 334 of 1,376 total issues
Function componentWillReceiveProps
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentWillReceiveProps(nextProps) {
this.currentSelectedState = nextProps.selectedValues;
if (!isEqual(this.props.selectedValues, nextProps.selectedValues)) {
const searchParams = this.props.getSearchParams
? this.props.getSearchParams()
Function mounted
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
mounted() {
this.addComponent(this.internalComponent);
this.addComponent(this.$props.componentId);
if (this.$props.stream) {
Function render
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
className, style, themePreset, ...rest
} = this.props;
return (
GeoDistanceSlider
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class GeoDistanceSlider extends Component {
constructor(props) {
super(props);
this.state = {
Function render
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { showLoadMore, loadMoreLabel, renderListItem } = this.$props;
const renderListItemCalc
= this.$scopedSlots.renderListItem || renderListItem;
const { isLastBucket } = this.$data;
Function render
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
let selectAll = [];
if (this.state.options.length === 0) {
return null;
Function render
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { showLoadMore, loadMoreLabel, renderListItem } = this.$props;
const { isLastBucket } = this.$data;
let selectAll = [];
const renderListItemCalc
Function render
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<Slider primary style={this.props.style} className={this.props.className}>
{this.props.title && (
<Title className={getClassName(this.props.innerClass, 'title') || null}>
Function setValue
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
setValue(value, isDefaultValue = false, props = this.$props) {
// ignore state updates when component is locked
if (props.beforeValueChange && this.locked) {
return;
}
- 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 16 (exceeds 5 allowed). Consider refactoring. Open
render() {
let style = {};
if (this.props.showIcon) {
if (this.props.iconPosition === 'left') {
- 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 componentDidMount
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentDidMount() {
this.props.addComponent(this.internalComponent);
this.props.addComponent(this.props.componentId);
if (this.props.stream) {
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { showLoadMore, loadMoreLabel } = this.props;
const { isLastBucket } = this.state;
let selectAll = [];
Function render
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { showLoadMore, loadMoreLabel } = this.props;
const { isLastBucket } = this.state;
let selectAll = [];
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<ReactiveBase
app="good-books-ds"
credentials="nY6NNTZZ6:27b76b9f-18ea-456c-bc5e-3a5263ebc63d"
Function componentWillReceiveProps
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
componentWillReceiveProps(nextProps) {
checkPropChange(this.props.react, nextProps.react, () => this.setReact(nextProps));
checkPropChange(this.props.options, nextProps.options, () => {
const { showLoadMore, dataField } = nextProps;
const { options } = this.state;
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
return (
<DateContainer
showBorder={!this.props.showClear}
style={this.props.style}
Function render
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
items,
selectedItem,
placeholder,
- 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 shouldQuery
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
DataSearch.shouldQuery = (value, dataFields, props) => {
const fields = dataFields.map(
(field, index) =>
`${field}${
Array.isArray(props.fieldWeights) && props.fieldWeights[index]
Function renderAsList
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
renderAsList({ item, triggerClickAnalytics }) {
const onData = this.$props.onData || this.$scopedSlots.onData;
const result = onData(item);
if (result) {
return (
Function render
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const tooltipTrigger
= this.$props.tooltipTrigger === 'none' ? false : this.$props.tooltipTrigger;
return (
<Container class={this.$props.className}>