xcv58/Tab-Manager-v2

View on GitHub

Showing 27 of 68 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export default observer(() => {
const { windowStore } = useStore()
const { cleanDuplicatedTabs, duplicatedTabs } = windowStore
return (
<Tooltip title={TITLE} enterDelay={TOOLTIP_DELAY}>
packages/extension/src/js/components/Toolbar/InvertSelect.tsx on lines 11..28

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export default observer(() => {
const { searchStore } = useStore()
const { invertSelect, matchedTabs } = searchStore
return (
<Tooltip title={TITLE} enterDelay={TOOLTIP_DELAY}>
packages/extension/src/js/components/Toolbar/RemoveDuplicated.tsx on lines 11..28

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export default observer(() => {
const { shortcutStore } = useStore()
return (
<Tooltip title={TITLE} enterDelay={TOOLTIP_DELAY}>
<div className="flex">
Severity: Major
Found in packages/extension/src/js/components/Toolbar/Help.tsx and 1 other location - About 4 hrs to fix
packages/extension/src/js/components/Toolbar/Settings.tsx on lines 11..26

Similar blocks of code found in 2 locations. Consider refactoring.
Open

export default observer(() => {
const { userStore } = useStore()
return (
<Tooltip title={TITLE} enterDelay={TOOLTIP_DELAY}>
<div className="flex">
Severity: Major
Found in packages/extension/src/js/components/Toolbar/Settings.tsx and 1 other location - About 4 hrs to fix
packages/extension/src/js/components/Toolbar/Help.tsx on lines 11..26

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

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            process.env.TARGET_BROWSER === 'firefox' && [
            ['alt+c'],
            (event: Event) => {
            preventDefault(event)
            this.store.containerStore.groupTabsByContainer()
            Severity: Major
            Found in packages/extension/src/js/stores/ShortcutStore.tsx and 1 other location - About 1 hr to fix
            packages/extension/src/js/stores/ShortcutStore.tsx on lines 412..419

            Similar blocks of code found in 2 locations. Consider refactoring.
            Open

            process.env.TARGET_BROWSER === 'firefox' && [
            ['alt+x'],
            (event: Event) => {
            preventDefault(event)
            this.store.focusStore.selectTabsInSameContainer()
            Severity: Major
            Found in packages/extension/src/js/stores/ShortcutStore.tsx and 1 other location - About 1 hr to fix
            packages/extension/src/js/stores/ShortcutStore.tsx on lines 420..427

            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

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              constructor(store: Store) {
              makeObservable(this, {
              id: observable,
              nodeRef: observable,
              setNodeRef: action,
              Severity: Major
              Found in packages/extension/src/js/stores/Focusable.tsx and 1 other location - About 1 hr to fix
              packages/extension/src/js/stores/HoverStore.tsx on lines 11..20

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              constructor(store: Store) {
              makeObservable(this, {
              hoveredTabId: observable,
              hovered: observable,
              hover: action,
              Severity: Major
              Found in packages/extension/src/js/stores/HoverStore.tsx and 1 other location - About 1 hr to fix
              packages/extension/src/js/stores/Focusable.tsx on lines 8..17

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              openSameContainerTabs =
              process.env.TARGET_BROWSER === 'firefox'
              ? () => {
              this.store.containerStore.openSameContainerTabs(this)
              }
              Severity: Minor
              Found in packages/extension/src/js/stores/Tab.tsx and 1 other location - About 50 mins to fix
              packages/extension/src/js/stores/Tab.tsx on lines 228..233

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              selectTabsInSameContainer =
              process.env.TARGET_BROWSER === 'firefox'
              ? () => {
              this.store.tabStore.selectTabsInSameContainer(this)
              }
              Severity: Minor
              Found in packages/extension/src/js/stores/Tab.tsx and 1 other location - About 50 mins to fix
              packages/extension/src/js/stores/Tab.tsx on lines 235..240

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              blue: {
              100: '#ebf8ff',
              200: '#bee3f8',
              300: '#90cdf4',
              400: '#63b3ed',
              Severity: Major
              Found in packages/extension/tailwind.config.js and 3 other locations - About 50 mins to fix
              packages/extension/tailwind.config.js on lines 13..23
              packages/extension/tailwind.config.js on lines 24..34
              packages/extension/tailwind.config.js on lines 35..45

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              red: {
              100: '#fff5f5',
              200: '#fed7d7',
              300: '#feb2b2',
              400: '#fc8181',
              Severity: Major
              Found in packages/extension/tailwind.config.js and 3 other locations - About 50 mins to fix
              packages/extension/tailwind.config.js on lines 13..23
              packages/extension/tailwind.config.js on lines 35..45
              packages/extension/tailwind.config.js on lines 46..56

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              gray: {
              100: '#f7fafc',
              200: '#edf2f7',
              300: '#e2e8f0',
              400: '#cbd5e0',
              Severity: Major
              Found in packages/extension/tailwind.config.js and 3 other locations - About 50 mins to fix
              packages/extension/tailwind.config.js on lines 24..34
              packages/extension/tailwind.config.js on lines 35..45
              packages/extension/tailwind.config.js on lines 46..56

              Similar blocks of code found in 4 locations. Consider refactoring.
              Open

              green: {
              100: '#f0fff4',
              200: '#c6f6d5',
              300: '#9ae6b4',
              400: '#68d391',
              Severity: Major
              Found in packages/extension/tailwind.config.js and 3 other locations - About 50 mins to fix
              packages/extension/tailwind.config.js on lines 13..23
              packages/extension/tailwind.config.js on lines 24..34
              packages/extension/tailwind.config.js on lines 46..56
              Severity
              Category
              Status
              Source
              Language