apjames93/mui-storyblok

View on GitHub

Showing 91 of 91 total issues

Function setup has 44 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function setup() {
  const props = {
    autoplay: true,
    geocode: 'Colorado1234',
    tabs: [{

    Function setup has 43 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function setup() {
      const props = {
        _editable: '<!--#storyblok#{"name": "Form", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
        content: [{
          _editable: '<!--#storyblok#{"name": "FormGrid", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
    Severity: Minor
    Found in src/lib/components/PageGrid/templates/Form/Form.test.js - About 1 hr to fix

      Function setup has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function setup() {
        const props = {
          _editable: '<!--#storyblok#{"name": "Card", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
          content: [{
            _editable: '<!--#storyblok#{"name": "CardActions", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
      Severity: Minor
      Found in src/lib/components/PageGrid/organisms/Card/Card.test.js - About 1 hr to fix

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

        function setup() {
          const props = {
            tabs: [{
              component: 'Tab',
              label: 'First Tab option',
        Severity: Minor
        Found in src/lib/components/PageGrid/templates/Tabs/Tabs.test.js - About 1 hr to fix

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

          function setup() {
            const props = {
              dialog: [{
                component: 'Dialog',
                content: [{

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

            function setup() {
              const props = {
                menuName: [{
                  component: 'Typography',
                  content: [{

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

              function setup(isButton = false, redirectRoute = undefined, href = undefined) {
                const props = {
                  _editable: '<!--#storyblok#{"name": "ListItemButton", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
              
                  listItemAvatar: [{

                Function setMetadata has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                export const setMetadata = (res) => {
                  if (res.data.story.content.seo) {
                    const metadataTag = checkForMetaTag('metadataTitle');
                    const metaOgTitle = checkForMetaTag('metaOgTitle', 'og:title');
                    const metaOgImage = checkForMetaTag('metaOgImage', 'og:image');
                Severity: Minor
                Found in src/lib/utils/Storyblok.js - About 1 hr to fix

                  Function setup has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function setup() {
                    const props = {
                      _editable: '<!--#storyblok#{"name": "ButtonDrawer", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
                      anchor: 'left',
                      elevation: 16,

                    Function setup has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function setup() {
                      const props = {
                        _editable: '<!--#storyblok#{"name": "IconButtonDrawer", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
                        anchor: 'left',
                        elevation: 16,

                      Function setup has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function setup() {
                        const props = {
                          cellHeight: '180',
                          cols: '3',
                          spacing: '4',
                      Severity: Minor
                      Found in src/lib/components/PageGrid/organisms/GridList/GridList.test.js - About 1 hr to fix

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

                        function setup() {
                          const props = {
                            _editable: '<!--#storyblok#{"name": "ReviewCard", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
                            overline: 'overline',
                            heading: 'heading',
                        Severity: Minor
                        Found in src/lib/components/PageGrid/organisms/ReviewCard/ReviewCard.test.js - About 1 hr to fix

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

                          function setup() {
                            const props = {
                              _editable: '<!--#storyblok#{"name": "PostCard", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
                              overline: 'overline',
                              heading: 'heading',
                          Severity: Minor
                          Found in src/lib/components/PageGrid/organisms/PostCard/PostCard.test.js - About 1 hr to fix

                            Function setup has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            function setup() {
                              const props = {
                                height: '100px',
                                width: '100px',
                                header: [{

                              Function setup has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              function setup(open = false) {
                                const props = {
                                  open,
                                  toggleDialog: jest.fn(),
                                  content: [{
                              Severity: Minor
                              Found in src/lib/components/PageGrid/organisms/Dialog/Dialog.test.js - About 1 hr to fix

                                Function setup has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function setup(open = false) {
                                  const props = {
                                    open,
                                    toggleDrawer: jest.fn(),
                                    _editable: '<!--#storyblok#{"name": "Drawer", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
                                Severity: Minor
                                Found in src/lib/components/PageGrid/molecules/Drawer/Drawer.test.js - About 1 hr to fix

                                  Function setup has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function setup() {
                                    const props = {
                                      _editable: '<!--#storyblok#{"name": "ButtonDialog", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',
                                      button: [{
                                        _editable: '<!--#storyblok#{"name": "Button", "space": "48408", "uid": "947be9f0-47c3-4315-a95a-550f0c560eb5", "id": "307934"}-->',

                                    Function dimensionProp has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                                    Confirmed

                                    export const dimensionProp = (props, propName, componentName) => {
                                      // use 'px', 'em', '%' 'vh', 'vw', as unit of measurement for height and width prop
                                      let error;
                                    
                                      if (propName === 'height' || propName === 'width') {
                                    Severity: Minor
                                    Found in src/lib/utils/customProps.js - About 35 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

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

                                    const Grid = ({
                                      alignContent,
                                      alignItems,
                                      rootClass,
                                      direction,
                                    Severity: Minor
                                    Found in src/lib/components/PageGrid/templates/Grid/Grid.js - About 25 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

                                    'style' is missing in props validation
                                    Open

                                      style,

                                    For more information visit Source: http://eslint.org/docs/rules/

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language