fbredius/storybook

View on GitHub
lib/components/src/blocks/ArgsTable/ArgsTable.tsx

Summary

Maintainability
F
5 days
Test Coverage

File ArgsTable.tsx has 439 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import React, { FC } from 'react';
import pickBy from 'lodash/pickBy';
import { styled, ignoreSsrWarning } from '@storybook/theming';
import { opacify, transparentize, darken, lighten } from 'polished';
import { Icons } from '../../icon/icon';
Severity: Minor
Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx - About 6 hrs to fix

    Function ArgsTable has 125 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const ArgsTable: FC<ArgsTableProps> = (props) => {
      if ('error' in props) {
        return (
          <EmptyBlock>
            {props.error}&nbsp;
    Severity: Major
    Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx - About 5 hrs to fix

      Function TableWrapper has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
      Open

        ({ theme, compact, inAddonPanel }) => ({
          '&&': {
            // Resets for cascading/system styles
            borderCollapse: 'collapse',
            borderSpacing: 0,
      Severity: Minor
      Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function groupRows has 48 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      const groupRows = (rows: ArgType, sort: SortType) => {
        const sections: Sections = { ungrouped: [], ungroupedSubsections: {}, sections: {} };
        if (!rows) return sections;
      
        Object.entries(rows).forEach(([key, row]) => {
      Severity: Minor
      Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx - About 1 hr to fix

        Function ArgsTable has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

        export const ArgsTable: FC<ArgsTableProps> = (props) => {
          if ('error' in props) {
            return (
              <EmptyBlock>
                {props.error}&nbsp;
        Severity: Minor
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx - About 55 mins to fix

        Cognitive Complexity

        Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

        A method's cognitive complexity is based on a few simple rules:

        • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
        • Code is considered more complex for each "break in the linear flow of the code"
        • Code is considered more complex when "flow breaking structures are nested"

        Further reading

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

                      {Object.entries(section.subsections).map(([subcategory, subsection]) => (
                        <SectionRow
                          key={subcategory}
                          label={subcategory}
                          level="subsection"
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 5 hrs to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 468..480

        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 136.

        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

                  {Object.entries(groups.ungroupedSubsections).map(([subcategory, subsection]) => (
                    <SectionRow key={subcategory} label={subcategory} level="subsection" colSpan={colSpan}>
                      {subsection.map((row) => (
                        <ArgRow
                          key={row.key}
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 5 hrs to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 487..504

        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 136.

        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

              [`tr:first-child${ignoreSsrWarning}`]: {
                [`td:first-child${ignoreSsrWarning}, th:first-child${ignoreSsrWarning}`]: {
                  borderTopLeftRadius: inAddonPanel ? 0 : theme.appBorderRadius,
                },
                [`td:last-child${ignoreSsrWarning}, th:last-child${ignoreSsrWarning}`]: {
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 2 hrs to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 121..128

        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 83.

        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

              [`tr:last-child${ignoreSsrWarning}`]: {
                [`td:first-child${ignoreSsrWarning}, th:first-child${ignoreSsrWarning}`]: {
                  borderBottomLeftRadius: inAddonPanel ? 0 : theme.appBorderRadius,
                },
                [`td:last-child${ignoreSsrWarning}, th:last-child${ignoreSsrWarning}`]: {
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 2 hrs to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 112..119

        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 83.

        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

                  {groups.ungrouped.map((row) => (
                    <ArgRow key={row.key} row={row} arg={args && args[row.key]} {...common} />
                  ))}
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 1 hr to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 484..486

        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 2 locations. Consider refactoring.
        Open

                      {section.ungrouped.map((row) => (
                        <ArgRow key={row.key} row={row} arg={args && args[row.key]} {...common} />
                      ))}
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 1 hr to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 464..466

        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 2 locations. Consider refactoring.
        Open

              } else {
                const subsection = section.subsections[subcategory] || [];
                subsection.push({ key, ...row });
                section.subsections[subcategory] = subsection;
              }
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 1 hr to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 332..336

        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 58.

        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

            } else if (subcategory) {
              const subsection = sections.ungroupedSubsections[subcategory] || [];
              subsection.push({ key, ...row });
              sections.ungroupedSubsections[subcategory] = subsection;
            } else {
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 1 hr to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 326..330

        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 58.

        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

                    ? {
                        borderTopWidth: 1,
                        borderTopStyle: 'solid',
                        borderTopColor:
                          theme.base === 'light'
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 1 hr to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 173..180

        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 57.

        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

                        [`&:not(:first-child${ignoreSsrWarning})`]: {
                          borderTopWidth: 1,
                          borderTopStyle: 'solid',
                          borderTopColor:
                            theme.base === 'light'
        Severity: Major
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 1 hr to fix
        lib/components/src/blocks/ArgsTable/ArgsTable.tsx on lines 164..171

        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 57.

        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

          boxShadow:
            theme.base === 'light'
              ? `${theme.color.border} 0 0 0 1px inset`
              : `${theme.color.darker}  0 0 0 1px inset`,
        Severity: Minor
        Found in lib/components/src/blocks/ArgsTable/ArgsTable.tsx and 1 other location - About 55 mins to fix
        lib/components/src/typography/lib/common.tsx on lines 31..34

        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 53.

        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

        " should be '
        Open

                <Link href="http://storybook.js.org/docs/" target="_blank" withArrow>

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                              <Icons icon="undo" aria-hidden />

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                            <ResetButton onClick={() => resetArgs()} title="Reset controls">

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                <Link href="http://storybook.js.org/docs/" target="_blank" withArrow>

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                    <SectionRow key={subcategory} label={subcategory} level="subsection" colSpan={colSpan}>

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                          level="subsection"

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                <thead className="docblock-argstable-head">

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                <Link href="http://storybook.js.org/docs/" target="_blank" withArrow>

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                    <SectionRow key={category} label={category} level="section" colSpan={colSpan}>

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                <tbody className="docblock-argstable-body">

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                className="docblock-argstable"

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        " should be '
        Open

                <Link href="http://storybook.js.org/docs/" target="_blank" withArrow>

        Rule: quotemark

        Enforces quote character for string literals.

        Notes
        • Has Fix

        Config

        Five arguments may be optionally provided:

        • "single" enforces single quotes.
        • "double" enforces double quotes.
        • "backtick" enforces backticks.
        • "jsx-single" enforces single quotes for JSX attributes.
        • "jsx-double" enforces double quotes for JSX attributes.
        • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
        • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
        Examples
        "quotemark": true,single,avoid-escape,avoid-template
        "quotemark": true,single,jsx-double
        Schema
        {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "single",
              "double",
              "backtick",
              "jsx-single",
              "jsx-double",
              "avoid-escape",
              "avoid-template"
            ]
          },
          "minLength": 0,
          "maxLength": 5
        }

        For more information see this page.

        There are no issues that match your filters.

        Category
        Status