dockyard/es6_module_transpiler-rails

View on GitHub

Showing 225 of 225 total issues

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

        return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
            (ch >= 65 && ch <= 90) ||         // A..Z
            (ch >= 97 && ch <= 122) ||        // a..z
            (ch === 92) ||                    // \ (backslash)
Severity: Minor
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 45 mins to fix
lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 849..852

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

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

                if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) {
                    throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
                }
Severity: Minor
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 40 mins to fix
lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 1069..1071

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

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

            if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) {
                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
            }
Severity: Minor
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 40 mins to fix
lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 1091..1093

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

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

Consider simplifying this complex logical expression.
Open

                if (checkToken &&
                        checkToken.type === "Keyword" &&
                        (checkToken.value === "if" ||
                         checkToken.value === "while" ||
                         checkToken.value === "for" ||
Severity: Major
Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 40 mins to fix

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

            if (state.allowDefault) {
                id = matchKeyword('default') ? parseNonComputedProperty() : parseVariableIdentifier();
            } else {
                id = parseVariableIdentifier();
            }
    Severity: Minor
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 40 mins to fix
    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 5030..5034

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

    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

        doNamedImport: function(name, dependencyName, alias) {
          return ("var " + alias + " = __dependency" + this.map[dependencyName] + "__." + name + ";\n");
        },
    Severity: Minor
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 40 mins to fix
    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6320..6322

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

    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

        doNamedImport: function(name, dependencyName, alias) {
          return ("var " + alias + " = __dependency" + this.map[dependencyName] + "__." + name + ";\n");
        },
    Severity: Minor
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 40 mins to fix
    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 6720..6722

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

    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

            if (state.allowDefault) {
                id = matchKeyword('default') ? parseNonComputedProperty() : parseVariableIdentifier();
            } else {
                id = parseVariableIdentifier();
            }
    Severity: Minor
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 40 mins to fix
    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 4736..4740

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

    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 $__createClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    }, $__createClass = function(object, staticObject, protoParent, superClass, hasConstructor) {
    Severity: Minor
    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 35 mins to fix

      Function $__createClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      }, $__createClass = function(object, staticObject, protoParent, superClass, hasConstructor) {
      Severity: Minor
      Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 35 mins to fix

        Function $__createClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        }, $__createClass = function(object, staticObject, protoParent, superClass, hasConstructor) {
        Severity: Minor
        Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 35 mins to fix

          Function createProperty has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  createProperty: function (kind, key, value, method, shorthand) {
          Severity: Minor
          Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 35 mins to fix

            Function $__createClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            }, $__createClass = function(object, staticObject, protoParent, superClass, hasConstructor) {
            Severity: Minor
            Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 35 mins to fix

              Function createArrowFunctionExpression has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      createArrowFunctionExpression: function (params, defaults, body, rest, expression) {
              Severity: Minor
              Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 35 mins to fix

                Function $__createClass has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                }, $__createClass = function(object, staticObject, protoParent, superClass, hasConstructor) {
                Severity: Minor
                Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 35 mins to fix

                  Function addComment has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                      function addComment(type, value, start, end, loc) {
                  Severity: Minor
                  Found in lib/es6_module_transpiler/support/es6-module-transpiler.js - About 35 mins to fix

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

                            createTryStatement: function (block, guardedHandlers, handlers, finalizer) {
                                return {
                                    type: Syntax.TryStatement,
                                    block: block,
                                    guardedHandlers: guardedHandlers,
                    Severity: Minor
                    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 2 other locations - About 35 mins to fix
                    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 2169..2177
                    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 2501..2509

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

                    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

                            createForStatement: function (init, test, update, body) {
                                return {
                                    type: Syntax.ForStatement,
                                    init: init,
                                    test: test,
                    Severity: Minor
                    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 2 other locations - About 35 mins to fix
                    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 2350..2358
                    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 2501..2509

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

                    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

                            createExportDeclaration: function (def, declaration, specifiers, source) {
                                return {
                                    type: Syntax.ExportDeclaration,
                                    declaration: declaration,
                                    default: def,
                    Severity: Minor
                    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 2 other locations - About 35 mins to fix
                    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 2169..2177
                    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 2350..2358

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

                    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 (extra.tokens[extra.openCurlyToken - 4] &&
                                            extra.tokens[extra.openCurlyToken - 4].type === "Keyword") {
                                        // Named function.
                                        checkToken = extra.tokens[extra.openCurlyToken - 5];
                                        if (!checkToken) {
                    Severity: Minor
                    Found in lib/es6_module_transpiler/support/es6-module-transpiler.js and 1 other location - About 35 mins to fix
                    lib/es6_module_transpiler/support/es6-module-transpiler.js on lines 1917..1933

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

                    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