Showing 1,982 of 1,982 total issues

Avoid too many return statements within this function.
Open

      return evaluateQuasis(path, node.quasi.quasis, state, true);
Severity: Major
Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

    Avoid too many return statements within this function.
    Open

        if (!state.confident) return;
    Severity: Major
    Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

            return evaluateCached(path.get("alternate"), state);
      Severity: Major
      Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

                return binding ? deopt(binding.path, state) : NaN;
        Severity: Major
        Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                    return deopt(keyPath, state);
          Severity: Major
          Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

            Avoid too many return statements within this function.
            Open

                    return left && right;
            Severity: Major
            Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

              Avoid too many return statements within this function.
              Open

                return getConditionalAnnotation(ifStatement, name);
              Severity: Major
              Found in packages/babel-traverse/src/path/inference/inferer-reference.js - About 30 mins to fix

                Avoid too many return statements within this function.
                Open

                    return evaluateQuasis(path, node.quasis, state);
                Severity: Major
                Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

                  Avoid too many return statements within this function.
                  Open

                      if (!state.confident) return;
                  Severity: Major
                  Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return value[property.node.name];
                    Severity: Major
                    Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                          return this.parentPath.getTypeAnnotation();
                      Severity: Major
                      Found in packages/babel-traverse/src/path/inference/index.js - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                              return binding.value;
                        Severity: Major
                        Found in packages/babel-traverse/src/path/evaluation.js - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                              return node;
                          Severity: Major
                          Found in packages/babel-helper-builder-react-jsx/src/index.js - About 30 mins to fix

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

                            defineType("JSXSpreadChild", {
                              visitor: ["expression"],
                              aliases: ["JSX", "Immutable"],
                              fields: {
                                expression: {
                            Severity: Minor
                            Found in packages/babel-types/src/definitions/jsx.js and 1 other location - About 30 mins to fix
                            packages/babel-types/src/definitions/core.js on lines 933..941

                            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

                                    case tt.braceBarL:
                                      return this.flowParseObjectType({
                                        allowStatic: false,
                                        allowExact: true,
                                        allowSpread: true,
                            Severity: Minor
                            Found in packages/babel-parser/src/plugins/flow.js and 1 other location - About 30 mins to fix
                            packages/babel-parser/src/plugins/flow.js on lines 1373..1380

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

                            export function PrivateName(node: Object) {
                              this.token("#");
                              this.print(node.id, node);
                            }
                            Severity: Major
                            Found in packages/babel-generator/src/generators/expressions.js and 3 other locations - About 30 mins to fix
                            packages/babel-generator/src/generators/flow.js on lines 375..378
                            packages/babel-generator/src/generators/flow.js on lines 592..595
                            packages/babel-generator/src/generators/types.js on lines 14..17

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

                            export function NullableTypeAnnotation(node: Object) {
                              this.token("?");
                              this.print(node.typeAnnotation, node);
                            }
                            Severity: Major
                            Found in packages/babel-generator/src/generators/flow.js and 3 other locations - About 30 mins to fix
                            packages/babel-generator/src/generators/expressions.js on lines 263..266
                            packages/babel-generator/src/generators/flow.js on lines 592..595
                            packages/babel-generator/src/generators/types.js on lines 14..17

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

                            export function ObjectTypeSpreadProperty(node: Object) {
                              this.token("...");
                              this.print(node.argument, node);
                            }
                            Severity: Major
                            Found in packages/babel-generator/src/generators/flow.js and 3 other locations - About 30 mins to fix
                            packages/babel-generator/src/generators/expressions.js on lines 263..266
                            packages/babel-generator/src/generators/flow.js on lines 375..378
                            packages/babel-generator/src/generators/types.js on lines 14..17

                            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

                                parseExprAtom(): MaybePlaceholder<"Expression"> {
                                  return (
                                    this.parsePlaceholder("Expression") || super.parseExprAtom(...arguments)
                                  );
                                }
                            Severity: Minor
                            Found in packages/babel-parser/src/plugins/placeholders.js and 1 other location - About 30 mins to fix
                            packages/babel-parser/src/plugins/placeholders.js on lines 127..131

                            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

                                parseBindingAtom(): MaybePlaceholder<"Pattern"> {
                                  return (
                                    this.parsePlaceholder("Pattern") || super.parseBindingAtom(...arguments)
                                  );
                                }
                            Severity: Minor
                            Found in packages/babel-parser/src/plugins/placeholders.js and 1 other location - About 30 mins to fix
                            packages/babel-parser/src/plugins/placeholders.js on lines 99..103

                            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

                            Severity
                            Category
                            Status
                            Source
                            Language