xcv58/Tab-Manager-v2

View on GitHub

Showing 7 of 68 total issues

Function AutocompleteSearch has 69 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const AutocompleteSearch = observer((props: Props) => {
const { autoFocus, open } = props
const searchInputRef = useSearchInputRef()
const options = useOptions()
const { userStore, searchStore } = useStore()
Severity: Major
Found in packages/extension/src/js/components/AutocompleteSearch/index.tsx - About 2 hrs to fix

    File FocusStore.tsx has 254 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import { makeAutoObservable } from 'mobx'
    import Store from 'stores'
    import log from 'libs/log'
    import Tab from './Tab'
    import Window from './Window'
    Severity: Minor
    Found in packages/extension/src/js/stores/FocusStore.tsx - About 2 hrs to fix

      Function Icon has 52 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const Icon = observer((props: TabProps) => {
      const { userStore } = useStore()
      const { focus, select, iconUrl, isSelected, bulkSelect } = props.tab
      const checkbox = (
      <Checkbox
      Severity: Major
      Found in packages/extension/src/js/components/Tab/Icon.tsx - About 2 hrs to fix

        Function constructor has 46 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        constructor(tab, store: Store, win: Window) {
        super(store)
         
        makeObservable(this, {
        cookieStoreId: observable,
        Severity: Minor
        Found in packages/extension/src/js/stores/Tab.tsx - About 1 hr to fix

          Function TabContent has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          (
          props: TabProps & {
          buttonClassName: string
          content: ReactElement
          onAuxClick: (e: SyntheticEvent) => void
          Severity: Minor
          Found in packages/extension/src/js/components/Tab/TabContent.tsx - About 1 hr to fix

            Function transform has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            transform: function (content) {
            const json = JSON.parse(content.toString())
            if (process.env.NODE_ENV === 'production') {
            delete json.content_security_policy
            }
            Severity: Minor
            Found in packages/extension/webpack.config.js - About 1 hr to fix

              Function tabComparator has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              export const tabComparator = (a, b) => {
              if (a.pinned ^ b.pinned) {
              return b.pinned ? 1 : -1
              }
              if (a.domain !== b.domain) {
              Severity: Minor
              Found in packages/extension/src/js/libs/index.tsx - About 25 mins to fix
              Severity
              Category
              Status
              Source
              Language