Showing 1,982 of 1,982 total issues

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

      AssignmentExpression(path, file) {
        const leftPath = path.get("left");
        if (leftPath.isObjectPattern() && hasRestElement(leftPath)) {
          const nodes = [];

Severity: Minor
Found in packages/babel-plugin-proposal-object-rest-spread/src/index.js - About 1 hr to fix

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

              this.match(tt.colon) ||
              this.match(tt.comma) ||
              this.match(tt.question) ||
              this.match(tt.eq)
    Severity: Major
    Found in packages/babel-parser/src/plugins/typescript/index.js and 2 other locations - About 1 hr to fix
    packages/babel-parser/src/plugins/flow.js on lines 1101..1104
    packages/babel-parser/src/plugins/flow.js on lines 1757..1760

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

    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

              this.match(tt.comma) ||
              this.match(tt.semi) ||
              this.match(tt.braceR) ||
              this.match(tt.braceBarR);
    Severity: Major
    Found in packages/babel-parser/src/plugins/flow.js and 2 other locations - About 1 hr to fix
    packages/babel-parser/src/plugins/flow.js on lines 1757..1760
    packages/babel-parser/src/plugins/typescript/index.js on lines 946..949

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

    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

    defineType("TypeAlias", {
      visitor: ["id", "typeParameters", "right"],
      aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
      fields: {
        id: validateType("Identifier"),
    Severity: Major
    Found in packages/babel-types/src/definitions/flow.js and 2 other locations - About 1 hr to fix
    packages/babel-types/src/definitions/flow.js on lines 108..116
    packages/babel-types/src/definitions/flow.js on lines 118..126

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

    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 function QualifiedTypeIdentifier(node: Object) {
      this.print(node.qualification, node);
      this.token(".");
      this.print(node.id, node);
    }
    Severity: Major
    Found in packages/babel-generator/src/generators/flow.js and 4 other locations - About 1 hr to fix
    packages/babel-generator/src/generators/expressions.js on lines 224..228
    packages/babel-generator/src/generators/expressions.js on lines 257..261
    packages/babel-generator/src/generators/jsx.js on lines 13..17
    packages/babel-generator/src/generators/jsx.js on lines 19..23

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

    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

    defineType("DeclareOpaqueType", {
      visitor: ["id", "typeParameters", "supertype"],
      aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
      fields: {
        id: validateType("Identifier"),
    Severity: Major
    Found in packages/babel-types/src/definitions/flow.js and 2 other locations - About 1 hr to fix
    packages/babel-types/src/definitions/flow.js on lines 108..116
    packages/babel-types/src/definitions/flow.js on lines 399..407

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

    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 function JSXMemberExpression(node: Object) {
      this.print(node.object, node);
      this.token(".");
      this.print(node.property, node);
    }
    Severity: Major
    Found in packages/babel-generator/src/generators/jsx.js and 4 other locations - About 1 hr to fix
    packages/babel-generator/src/generators/expressions.js on lines 224..228
    packages/babel-generator/src/generators/expressions.js on lines 257..261
    packages/babel-generator/src/generators/flow.js on lines 597..601
    packages/babel-generator/src/generators/jsx.js on lines 13..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 61.

    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 function BindExpression(node: Object) {
      this.print(node.object, node);
      this.token("::");
      this.print(node.callee, node);
    }
    Severity: Major
    Found in packages/babel-generator/src/generators/expressions.js and 4 other locations - About 1 hr to fix
    packages/babel-generator/src/generators/expressions.js on lines 257..261
    packages/babel-generator/src/generators/flow.js on lines 597..601
    packages/babel-generator/src/generators/jsx.js on lines 13..17
    packages/babel-generator/src/generators/jsx.js on lines 19..23

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

    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 function JSXNamespacedName(node: Object) {
      this.print(node.namespace, node);
      this.token(":");
      this.print(node.name, node);
    }
    Severity: Major
    Found in packages/babel-generator/src/generators/jsx.js and 4 other locations - About 1 hr to fix
    packages/babel-generator/src/generators/expressions.js on lines 224..228
    packages/babel-generator/src/generators/expressions.js on lines 257..261
    packages/babel-generator/src/generators/flow.js on lines 597..601
    packages/babel-generator/src/generators/jsx.js on lines 19..23

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

    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 function MetaProperty(node: Object) {
      this.print(node.meta, node);
      this.token(".");
      this.print(node.property, node);
    }
    Severity: Major
    Found in packages/babel-generator/src/generators/expressions.js and 4 other locations - About 1 hr to fix
    packages/babel-generator/src/generators/expressions.js on lines 224..228
    packages/babel-generator/src/generators/flow.js on lines 597..601
    packages/babel-generator/src/generators/jsx.js on lines 13..17
    packages/babel-generator/src/generators/jsx.js on lines 19..23

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

    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

    defineType("DeclareTypeAlias", {
      visitor: ["id", "typeParameters", "right"],
      aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"],
      fields: {
        id: validateType("Identifier"),
    Severity: Major
    Found in packages/babel-types/src/definitions/flow.js and 2 other locations - About 1 hr to fix
    packages/babel-types/src/definitions/flow.js on lines 118..126
    packages/babel-types/src/definitions/flow.js on lines 399..407

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

    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

                this.match(tt._class) ||
                this.match(tt.name) ||
                this.match(tt._function) ||
                this.match(tt._var) ||
    Severity: Major
    Found in packages/babel-parser/src/plugins/flow.js and 2 other locations - About 1 hr to fix
    packages/babel-parser/src/plugins/flow.js on lines 1101..1104
    packages/babel-parser/src/plugins/typescript/index.js on lines 946..949

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

    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 AssignmentExpression has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          AssignmentExpression(path) {
            const { node, scope } = path;
            const { operator, left, right } = node;
            if (operator !== "||=" && operator !== "&&=" && operator !== "??=") {
              return;

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

      export default function (
        path: NodePath,
        scope = path.scope,
        shouldHoistVariables = true,
      ) {
      Severity: Minor
      Found in packages/babel-helper-call-delegate/src/index.js - About 1 hr to fix

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

        function getLowestVersions(browsers: Array<string>): Targets {
          return browsers.reduce((all: Object, browser: string): Object => {
            const [browserName, browserVersion] = browser.split(" ");
            const normalizedBrowserName = browserNameMap[browserName];
        
        
        Severity: Minor
        Found in packages/babel-helper-compilation-targets/src/index.js - About 1 hr to fix

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

              jsxReadEntity(): string {
                let str = "";
                let count = 0;
                let entity;
                let ch = this.input[this.state.pos];
          Severity: Minor
          Found in packages/babel-parser/src/plugins/jsx/index.js - About 1 hr to fix

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

                flowEnumMemberInit(): EnumMemberInit {
                  const startPos = this.state.start;
                  const endOfInit = () => this.match(tt.comma) || this.match(tt.braceR);
                  switch (this.state.type) {
                    case tt.num: {
            Severity: Minor
            Found in packages/babel-parser/src/plugins/flow.js - About 1 hr to fix

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

                parseObj<T: N.ObjectPattern | N.ObjectExpression>(
                  close: TokenType,
                  isPattern: boolean,
                  isRecord?: ?boolean,
                  refExpressionErrors?: ?ExpressionErrors,
              Severity: Minor
              Found in packages/babel-parser/src/parser/expression.js - About 1 hr to fix

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

                  parseVar(
                    node: N.VariableDeclaration,
                    isFor: boolean,
                    kind: "var" | "let" | "const",
                  ): N.VariableDeclaration {
                Severity: Minor
                Found in packages/babel-parser/src/parser/statement.js - About 1 hr to fix

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

                      JSXOpeningElement(path, state) {
                        const id = t.jsxIdentifier(TRACE_ID);
                        const location = path.container.openingElement.loc;
                        if (!location) {
                          // the element was generated and doesn't have location information
                  Severity: Minor
                  Found in packages/babel-plugin-transform-react-jsx-source/src/index.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language