bufferapp/ui

View on GitHub

Showing 333 of 333 total issues

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

const PersonIcon = createIconComponent({
  content: (
    <g>
      <path
        fillRule="evenodd"
Severity: Major
Found in src/components/Icon/Icons/Person.tsx and 5 other locations - About 1 hr to fix
src/components/Icon/Icons/Camera.tsx on lines 8..19
src/components/Icon/Icons/Giveaway.tsx on lines 8..19
src/components/Icon/Icons/Search.tsx on lines 8..19
src/components/Icon/Icons/TextRephrase.tsx on lines 8..19
src/components/Icon/Icons/View.tsx on lines 8..19

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

      <States>
        <States.Image
          src="./images/illustration2.png"
          alt="a colourful illustration of a buffer character"
        />
src/documentation/examples/States/StatesSmallWithoutButtons.tsx on lines 16..26

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

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

const ViewIcon = createIconComponent({
  content: (
    <g>
      <path
        fillRule="evenodd"
Severity: Major
Found in src/components/Icon/Icons/View.tsx and 5 other locations - About 1 hr to fix
src/components/Icon/Icons/Camera.tsx on lines 8..19
src/components/Icon/Icons/Giveaway.tsx on lines 8..19
src/components/Icon/Icons/Person.tsx on lines 8..19
src/components/Icon/Icons/Search.tsx on lines 8..19
src/components/Icon/Icons/TextRephrase.tsx on lines 8..19

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 66.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function getStyleLoaders has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const getStyleLoaders = (cssOptions, preProcessor) => {
  const loaders = [
    {
      loader: MiniCssExtractPlugin.loader,
      options: Object.assign(
Severity: Minor
Found in scripts/config/webpack.config.prod.js - About 1 hr to fix

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

                  <div
                    style={{
                      height: '500px',
                      width: '1000px',
                      background:
    Severity: Major
    Found in src/documentation/examples/Modal/with-carousel.tsx and 2 other locations - About 1 hr to fix
    src/documentation/examples/Modal/with-carousel.tsx on lines 30..45
    src/documentation/examples/Modal/with-carousel.tsx on lines 46..61

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 65.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                  <div
                    style={{
                      height: '500px',
                      width: '1000px',
                      background:
    Severity: Major
    Found in src/documentation/examples/Modal/with-carousel.tsx and 2 other locations - About 1 hr to fix
    src/documentation/examples/Modal/with-carousel.tsx on lines 46..61
    src/documentation/examples/Modal/with-carousel.tsx on lines 62..77

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 65.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

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

                  <div
                    style={{
                      height: '500px',
                      width: '1000px',
                      background:
    Severity: Major
    Found in src/documentation/examples/Modal/with-carousel.tsx and 2 other locations - About 1 hr to fix
    src/documentation/examples/Modal/with-carousel.tsx on lines 30..45
    src/documentation/examples/Modal/with-carousel.tsx on lines 62..77

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 65.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Function ExampleIconPosition has 37 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function ExampleIconPosition() {
      const [selected, setSelected] = useState('facebook')
      const [iconPosition, setIconPosition] = useState('left')
    
      // @ts-expect-error TS(7006) FIXME: Parameter 'item' implicitly has an 'any' type.

      Function ExampleSelectWithSelectAll has 37 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function ExampleSelectWithSelectAll() {
        const [items, setItems] = useState(data)
      
        // @ts-expect-error TS(7006) FIXME: Parameter 'option' implicitly has an 'any' type.
        const handleClick = (option) => {
      Severity: Minor
      Found in src/documentation/examples/Select/SelectWithSelectAll.tsx - About 1 hr to fix

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

        export default function ExampleSocialButton() {
          return (
            <div style={{ position: 'relative' }}>
              <SocialButton channel="linkedin" onClick={() => {}} />
            </div>
        src/documentation/examples/SocialButton/FacebookSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/InstagramSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/PinterestSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/TwitterSocialButton.tsx on lines 6..12

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        export default function ExampleSocialButton() {
          return (
            <div style={{ position: 'relative' }}>
              <SocialButton channel="pinterest" onClick={() => {}} />
            </div>
        src/documentation/examples/SocialButton/FacebookSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/InstagramSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/LinkedinSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/TwitterSocialButton.tsx on lines 6..12

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        export default function ExampleNotice() {
          return (
            // eslint-disable-next-line
            <Notice dismiss={() => console.log('dismissed!')} type="note">
              <Text>
        Severity: Major
        Found in src/documentation/examples/Notice/NoticeDismissable.tsx and 1 other location - About 1 hr to fix
        src/documentation/examples/Notice/NoticeLongText.tsx on lines 8..19

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        export default function ExampleSocialButton() {
          return (
            <div style={{ position: 'relative' }}>
              <SocialButton channel="twitter" onClick={() => {}} />
            </div>
        src/documentation/examples/SocialButton/FacebookSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/InstagramSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/LinkedinSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/PinterestSocialButton.tsx on lines 6..12

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        export default function ExampleSocialButton() {
          return (
            <div style={{ position: 'relative' }}>
              <SocialButton channel="instagram" onClick={() => {}} />
            </div>
        src/documentation/examples/SocialButton/FacebookSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/LinkedinSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/PinterestSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/TwitterSocialButton.tsx on lines 6..12

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        export default function ExampleSocialButton() {
          return (
            <div style={{ position: 'relative' }}>
              <SocialButton channel="facebook" onClick={() => {}} />
            </div>
        src/documentation/examples/SocialButton/InstagramSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/LinkedinSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/PinterestSocialButton.tsx on lines 6..12
        src/documentation/examples/SocialButton/TwitterSocialButton.tsx on lines 6..12

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

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

        export default function ExampleNotice() {
          return (
            // eslint-disable-next-line
            <Notice dismiss={() => console.log('dismissed!')} type="warning">
              <Text>
        Severity: Major
        Found in src/documentation/examples/Notice/NoticeLongText.tsx and 1 other location - About 1 hr to fix
        src/documentation/examples/Notice/NoticeDismissable.tsx on lines 8..18

        Duplicated Code

        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

        Tuning

        This issue has a mass of 64.

        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

        Refactorings

        Further Reading

        Function Home has 36 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function Home() {
          return (
            <Container>
              <Content>
                <Welcome>Welcome</Welcome>
        Severity: Minor
        Found in src/documentation/app/Home.tsx - About 1 hr to fix

          Function generateReactIconComponents has 36 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          function generateReactIconComponents(icons, spinner) {
            return new Promise((resolve) => {
              const iconsCreated = []
              eachLimit(
                Object.values(icons),
          Severity: Minor
          Found in scripts/generateIconComponents.js - About 1 hr to fix

            Function render has 35 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render() {
                const {
                  children,
                  // @ts-expect-error TS(2339) FIXME: Property 'label' does not exist on type 'Readonly<... Remove this comment to see the full error message
                  label,
            Severity: Minor
            Found in src/components/Tooltip/Tooltip.tsx - About 1 hr to fix

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

              class Select extends UISelect {
                // @ts-expect-error TS(7006) FIXME: Parameter 'option' implicitly has an 'any' type.
                handleSelectOption = (option, event) => {
                  // @ts-expect-error TS(2339) FIXME: Property 'props' does not exist on type 'Select'.
                  this.props.onSelectClick(option, event)
              src/documentation/examples/Select/SelectWithItemsWithNoSelectedState.tsx on lines 5..15

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 63.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Severity
              Category
              Status
              Source
              Language