toggle-corp/react-store

View on GitHub

Showing 110 of 110 total issues

Function FloatingContainer has a Cognitive Complexity of 20 (exceeds 10 allowed). Consider refactoring.
Open

function FloatingContainer(props: Props) {
const {
children,
className: classNameFromProps,
closeOnEscape,
Severity: Minor
Found in v2/View/FloatingContainer/index.tsx - About 1 hr to fix

Function controlledModalize has a Cognitive Complexity of 20 (exceeds 10 allowed). Consider refactoring.
Open

export const controlledModalize = (WrappedButtonComponent) => {
const ModalComponent = (props) => {
const {
disabled,
modal,
Severity: Minor
Found in components/General/Modalize.js - About 1 hr to fix

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);
 
 
Severity: Minor
Found in components/Input/DatePicker/DayPicker/index.js - About 1 hr to fix

Function ColorInput has a Cognitive Complexity of 18 (exceeds 10 allowed). Consider refactoring.
Open

function ColorInput(props) {
const {
onChange,
showHintAndError,
label,
Severity: Minor
Found in components/Input/ColorInput/index.js - About 1 hr to fix

Function render has a Cognitive Complexity of 18 (exceeds 10 allowed). Consider refactoring.
Open

render() {
const {
error,
hint,
keySelector,
Severity: Minor
Found in components/Input/SearchMultiSelectInput/index.js - About 1 hr to fix

Function render has 111 lines of code (exceeds 100 allowed). Consider refactoring.
Open

render() {
const {
error,
hint,
label,
Severity: Major
Found in components/Input/DateInput/index.js - About 1 hr to fix

    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;
    Severity: Major
    Found in components/Action/ConfirmOnClick/index.js - About 1 hr to fix

      Function Image has 110 lines of code (exceeds 100 allowed). Consider refactoring.
      Open

      function Image(props: Props) {
      const {
      alt,
      className: classNameFromProps,
      imageClassName,
      Severity: Major
      Found in v2/View/Image/index.tsx - About 1 hr to fix

        Function FloatingContainer has 108 lines of code (exceeds 100 allowed). Consider refactoring.
        Open

        function FloatingContainer(props: Props) {
        const {
        children,
        className: classNameFromProps,
        closeOnEscape,
        Severity: Major
        Found in v2/View/FloatingContainer/index.tsx - About 1 hr to fix

          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,
          Severity: Minor
          Found in utils/redux-sync.js - About 1 hr to fix

          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,
          Severity: Minor
          Found in v2/Input/TreeInput/index.tsx - About 1 hr to fix

          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,
          Severity: Minor
          Found in components/Visualization/NewForceDirectedGraph/index.js - About 1 hr to fix

          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>) {
          Severity: Minor
          Found in v2/View/ListView/index.tsx - About 45 mins to fix

          Function Calendar has a Cognitive Complexity of 13 (exceeds 10 allowed). Consider refactoring.
          Open

          const Calendar = (props: CalendarProps) => {
          const {
          className,
          disabled,
          onChange,
          Severity: Minor
          Found in v2/Input/NepaliDateInput/Calendar/index.tsx - About 45 mins to fix

          Function render has a Cognitive Complexity of 13 (exceeds 10 allowed). Consider refactoring.
          Open

          render() {
          const {
          className: classNameFromProps,
          data,
          emptyComponent: EmptyComponent,
          Severity: Minor
          Found in components/View/List/ListView/index.js - About 45 mins to fix

          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,
          Severity: Minor
          Found in components/Visualization/Map/MapLayer/index.js - About 45 mins to fix

          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[],
          Severity: Minor
          Found in v2/General/useKeyboard.ts - About 35 mins to fix

          Function renderChart has a Cognitive Complexity of 12 (exceeds 10 allowed). Consider refactoring.
          Open

          renderChart() {
          const {
          boundingClientRect,
          idSelector,
          groupSelector,
          Severity: Minor
          Found in components/Visualization/ForceDirectedGraph/index.js - About 35 mins to fix

          Function renderChart has a Cognitive Complexity of 12 (exceeds 10 allowed). Consider refactoring.
          Open

          renderChart() {
          const {
          data,
          boundingClientRect,
          childrenSelector,
          Severity: Minor
          Found in components/Visualization/RadialDendrogram/index.js - About 35 mins to fix

          Avoid too many return statements within this function.
          Open

          return (
          <a
          key={data}
          className={className}
          onClick={onClick}
          Severity: Major
          Found in components/View/ScrollTabs/index.js - About 30 mins to fix
            Severity
            Category
            Status
            Source
            Language