bufferapp/ui

View on GitHub

Showing 333 of 333 total issues

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

<Select
onSelectClick={() => console.info('Main select clicked')}
label="Click Me"
keyMap={{
id: '_id',
src/documentation/examples/Select/BasicSelect.tsx on lines 8..57

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

<Select
onSelectClick={() => console.info('Main select clicked')}
label="Click Me"
keyMap={{
id: '_id',
Severity: Major
Found in src/documentation/examples/Select/BasicSelect.tsx and 1 other location - About 2 days to fix
src/documentation/examples/Select/SelectWithItemsWithNoSelectedState.tsx on lines 21..70

File Select.tsx has 645 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/* eslint-disable no-unused-expressions, react/no-unused-state */
import React from 'react'
import PropTypes from 'prop-types'
import helper from 'immutability-helper'
import SearchIcon from '../Icon/Icons/Search'
Severity: Major
Found in src/components/Select/Select.tsx - About 1 day to fix

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

    const menuItems = [
    {
    id: '1',
    title: 'FAQ',
    onItemClick: () => console.info('FAQ'),
    src/documentation/examples/DropdownMenu/DropdownMenu.tsx on lines 30..67

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

    const menuItems = [
    {
    id: '1',
    title: 'FAQ',
    onItemClick: () => console.info('FAQ'),
    Severity: Major
    Found in src/documentation/examples/DropdownMenu/DropdownMenu.tsx and 1 other location - About 1 day to fix
    src/documentation/examples/DropdownMenu/DropdownMenuWithOnOpenEvent.tsx on lines 30..67

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

    export default function ExampleSizeSmall() {
    const [selected, setSelected] = useState('facebook')
     
    return (
    <div style={{ display: 'inline-block' }}>
    src/documentation/examples/SegmentedControl/Size/SizeLarge.tsx on lines 28..52

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

    export default function ExampleSizeLarge() {
    const [selected, setSelected] = useState('facebook')
     
    return (
    <div style={{ display: 'inline-block' }}>
    src/documentation/examples/SegmentedControl/Size/SizeSmall.tsx on lines 28..52

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

    export default function ExampleTypeTextOnly() {
    const [selected, setSelected] = useState('facebook')
     
    return (
    <div style={{ display: 'inline-block' }}>
    src/documentation/examples/SegmentedControl/Type/TypeTextAndIcon.tsx on lines 26..49

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

    export default function ExampleTypeTextAndIcon() {
    const [selected, setSelected] = useState('facebook')
     
    return (
    <div style={{ display: 'inline-block' }}>
    src/documentation/examples/SegmentedControl/Type/TypeTextOnly.tsx on lines 26..49

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

    export default function ExampleStateDisabled() {
    const [selected, setSelected] = useState('facebook')
     
    return (
    <div style={{ display: 'inline-block' }}>
    src/documentation/examples/SegmentedControl/Size/SizeNormal.tsx on lines 28..51
    src/documentation/examples/SegmentedControl/State/StateCustomDefault.tsx on lines 29..52
    src/documentation/examples/SegmentedControl/Type/TypeIconOnly.tsx on lines 27..50

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

    export default function ExampleSizeNormal() {
    const [selected, setSelected] = useState('facebook')
     
    return (
    <div style={{ display: 'inline-block' }}>
    src/documentation/examples/SegmentedControl/State/StateCustomDefault.tsx on lines 29..52
    src/documentation/examples/SegmentedControl/State/StateCustomTooltip.tsx on lines 31..54
    src/documentation/examples/SegmentedControl/Type/TypeIconOnly.tsx on lines 27..50

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

    export default function ExampleStateDisabled() {
    const [selected, setSelected] = useState('facebook')
     
    return (
    <div style={{ display: 'inline-block' }}>
    src/documentation/examples/SegmentedControl/Size/SizeNormal.tsx on lines 28..51
    src/documentation/examples/SegmentedControl/State/StateCustomTooltip.tsx on lines 31..54
    src/documentation/examples/SegmentedControl/Type/TypeIconOnly.tsx on lines 27..50

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

    export default function ExampleTypeIconOnly() {
    const [selected, setSelected] = useState('facebook')
     
    return (
    <div style={{ display: 'inline-block' }}>
    src/documentation/examples/SegmentedControl/Size/SizeNormal.tsx on lines 28..51
    src/documentation/examples/SegmentedControl/State/StateCustomDefault.tsx on lines 29..52
    src/documentation/examples/SegmentedControl/State/StateCustomTooltip.tsx on lines 31..54

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

    <AnimationWrapper {...animationProps}>
    {!changed && (
    <div style={{ width: '300px', padding: '30px', background: 'pink' }}>
    <Text type="p">
    There is a theory which states that if ever anyone discovers
    src/documentation/examples/AnimationWrapper/AnimationWrapper.tsx on lines 22..65

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

    <AnimationWrapper
    stageInAnimation={stageInCenter}
    stageOutAnimation={stageOutCenter}
    duration={450}
    >
    src/documentation/examples/AnimationWrapper/AnimationWrapperHook.tsx on lines 28..67

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

    it('onMoveDown: should increase hoveredItem in state by +1', () => {
    const wrapper = shallow(
    // @ts-expect-error TS(2769) FIXME: No overload matches this call.
    <Select onSelectClick={() => true} items={[]} label="Select" />,
    )
    Severity: Major
    Found in src/components/Select/Select.test.tsx and 1 other location - About 6 hrs to fix
    src/components/Select/Select.test.tsx on lines 442..464

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

    it('onMoveUp: should decrease hoveredItem in state by -1', () => {
    const wrapper = shallow(
    // @ts-expect-error TS(2769) FIXME: No overload matches this call.
    <Select onSelectClick={() => true} items={[]} label="Select" />,
    )
    Severity: Major
    Found in src/components/Select/Select.test.tsx and 1 other location - About 6 hrs to fix
    src/components/Select/Select.test.tsx on lines 418..440

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

    <States>
    <States.Media>
    <iframe
    title="buffer promo vid"
    width="420"
    Severity: Major
    Found in src/documentation/examples/States/StatesLargeWithMedia.tsx and 1 other location - About 6 hrs to fix
    src/documentation/examples/States/StatesSmallWithMedia.tsx on lines 19..39

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

    <States size="small">
    <States.Media>
    <iframe
    title="buffer promo vid"
    width="300"
    Severity: Major
    Found in src/documentation/examples/States/StatesSmallWithMedia.tsx and 1 other location - About 6 hrs to fix
    src/documentation/examples/States/StatesLargeWithMedia.tsx on lines 18..38

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

    resolve: {
    // This allows you to set a fallback for where Webpack should look for modules.
    // We placed these paths second because we want `node_modules` to "win"
    // if there are any conflicts. This matches Node resolution mechanism.
    // https://github.com/facebook/create-react-app/issues/253
    Severity: Major
    Found in scripts/config/webpack.config.prod.js and 1 other location - About 6 hrs to fix
    scripts/config/webpack.config.dev.js on lines 129..164
    Severity
    Category
    Status
    Source
    Language