yannickcr/eslint-plugin-react

View on GitHub

Showing 696 of 696 total issues

Avoid too many return statements within this function.
Open

        return true;
Severity: Major
Found in lib/rules/jsx-no-target-blank.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

      return aProp.localeCompare(bProp, actualLocale);
    Severity: Major
    Found in lib/rules/jsx-sort-props.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

                return false;
      Severity: Major
      Found in lib/rules/prop-types.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                      return memo;
        Severity: Major
        Found in lib/rules/jsx-sort-props.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                        return memo;
          Severity: Major
          Found in lib/rules/jsx-sort-props.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                  return true;
            Severity: Major
            Found in lib/rules/prop-types.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                    return -shorthandSign;
              Severity: Major
              Found in lib/rules/jsx-sort-props.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                              return memo;
                Severity: Major
                Found in lib/rules/jsx-sort-props.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                          return node.value.name;
                  Severity: Major
                  Found in lib/rules/boolean-prop-naming.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                        return fixer.replaceText(reportedNode, `${leftSideText} ? ${rightSideText} : null`);
                    Severity: Major
                    Found in lib/rules/jsx-no-leaked-render.js - About 30 mins to fix

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

                                val.node.type === 'ArrowFunctionExpression'
                                && val.node.parent
                                && val.node.parent.type === 'VariableDeclarator'
                      Severity: Minor
                      Found in lib/util/Components.js and 1 other location - About 30 mins to fix
                      lib/util/defaultProps.js on lines 145..146

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

                      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

                      Avoid too many return statements within this function.
                      Open

                                    if (isWithoutNewLine === prevent) return;
                      Severity: Major
                      Found in lib/rules/jsx-newline.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                  return;
                        Severity: Major
                        Found in lib/rules/no-unknown-property.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return curr;
                          Severity: Major
                          Found in lib/rules/sort-prop-types.js - About 30 mins to fix

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

                            function uncast(node) {
                              while (node.type === 'TypeCastExpression') {
                                node = node.expression;
                              }
                              return node;
                            Severity: Minor
                            Found in lib/rules/no-unused-state.js and 1 other location - About 30 mins to fix
                            lib/rules/no-unused-class-component-methods.js on lines 52..57

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

                            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

                            function uncast(node) {
                              while (node.type === 'TypeCastExpression') {
                                node = node.expression;
                              }
                              return node;
                            Severity: Minor
                            Found in lib/rules/no-unused-class-component-methods.js and 1 other location - About 30 mins to fix
                            lib/rules/no-unused-state.js on lines 19..24

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

                            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

                            function testLowerCase(char) {
                              const lowerCase = char.toLowerCase();
                              return char === lowerCase && lowerCase !== char.toUpperCase();
                            }
                            Severity: Minor
                            Found in lib/rules/jsx-pascal-case.js and 1 other location - About 30 mins to fix
                            lib/rules/jsx-pascal-case.js on lines 19..22

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

                            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

                            Avoid too many return statements within this function.
                            Open

                                    if (tagName === 'fbt' || tagName === 'fbs') { return; } // fbt/fbs nodes are bonkers, let's not go there
                            Severity: Major
                            Found in lib/rules/no-unknown-property.js - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                      if (!isValidHTMLTagInJSX(node)) { return; }
                              Severity: Major
                              Found in lib/rules/no-unknown-property.js - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                            return prev;
                                Severity: Major
                                Found in lib/rules/sort-prop-types.js - About 30 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language