Showing 398 of 398 total issues

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

  if (typeof module === 'object' && module.exports) {
    module.exports = {
      tmpl: tmpl, brackets: brackets
    }
  } else if (typeof define === 'function' && typeof define.amd !== 'undefined') {
Severity: Major
Found in src/index.js and 1 other location - About 2 hrs to fix
dist/tmpl.js on lines 535..548

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

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 (typeof module === 'object' && module.exports) {
    module.exports = {
      tmpl: tmpl, brackets: brackets
    }
  } else if (typeof define === 'function' && typeof define.amd !== 'undefined') {
Severity: Major
Found in dist/tmpl.js and 1 other location - About 2 hrs to fix
src/index.js on lines 34..47

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

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

        Tokenizer.prototype.getNextToken = function () {
            if (this.buffer.length === 0) {
                var comments = this.scanner.scanComments();
                if (this.scanner.trackComment) {
                    for (var i = 0; i < comments.length; ++i) {
Severity: Major
Found in dist/csp.tmpl.js - About 2 hrs to fix

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

        var ClassExpression = (function () {
            function ClassExpression(id, superClass, body) {
                this.type = syntax_1.Syntax.ClassExpression;
                this.id = id;
                this.superClass = superClass;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var ExportNamedDeclaration = (function () {
            function ExportNamedDeclaration(declaration, specifiers, source) {
                this.type = syntax_1.Syntax.ExportNamedDeclaration;
                this.declaration = declaration;
                this.specifiers = specifiers;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var JSXElement = (function () {
            function JSXElement(openingElement, children, closingElement) {
                this.type = jsx_syntax_1.JSXSyntax.JSXElement;
                this.openingElement = openingElement;
                this.children = children;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var IfStatement = (function () {
            function IfStatement(test, consequent, alternate) {
                this.type = syntax_1.Syntax.IfStatement;
                this.test = test;
                this.consequent = consequent;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var UpdateExpression = (function () {
            function UpdateExpression(operator, argument, prefix) {
                this.type = syntax_1.Syntax.UpdateExpression;
                this.operator = operator;
                this.argument = argument;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var RegexLiteral = (function () {
            function RegexLiteral(value, raw, regex) {
                this.type = syntax_1.Syntax.Literal;
                this.value = value;
                this.raw = raw;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var ClassDeclaration = (function () {
            function ClassDeclaration(id, superClass, body) {
                this.type = syntax_1.Syntax.ClassDeclaration;
                this.id = id;
                this.superClass = superClass;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var ConditionalExpression = (function () {
            function ConditionalExpression(test, consequent, alternate) {
                this.type = syntax_1.Syntax.ConditionalExpression;
                this.test = test;
                this.consequent = consequent;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var ForOfStatement = (function () {
            function ForOfStatement(left, right, body) {
                this.type = syntax_1.Syntax.ForOfStatement;
                this.left = left;
                this.right = right;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var JSXOpeningElement = (function () {
            function JSXOpeningElement(name, selfClosing, attributes) {
                this.type = jsx_syntax_1.JSXSyntax.JSXOpeningElement;
                this.name = name;
                this.selfClosing = selfClosing;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300

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

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

        var AssignmentExpression = (function () {
            function AssignmentExpression(operator, left, right) {
                this.type = syntax_1.Syntax.AssignmentExpression;
                this.operator = operator;
                this.left = left;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5380..5388
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

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

        var TryStatement = (function () {
            function TryStatement(block, handler, finalizer) {
                this.type = syntax_1.Syntax.TryStatement;
                this.block = block;
                this.handler = handler;
    Severity: Major
    Found in dist/csp.tmpl.js and 11 other locations - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4872..4880
    dist/csp.tmpl.js on lines 4944..4952
    dist/csp.tmpl.js on lines 4954..4962
    dist/csp.tmpl.js on lines 4974..4982
    dist/csp.tmpl.js on lines 5040..5048
    dist/csp.tmpl.js on lines 5078..5086
    dist/csp.tmpl.js on lines 5131..5139
    dist/csp.tmpl.js on lines 5261..5269
    dist/csp.tmpl.js on lines 5400..5408
    dist/csp.tmpl.js on lines 6292..6300
    dist/csp.tmpl.js on lines 6352..6360

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

    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

        var ComputedMemberExpression = (function () {
            function ComputedMemberExpression(object, property) {
                this.type = syntax_1.Syntax.MemberExpression;
                this.computed = true;
                this.object = object;
    Severity: Major
    Found in dist/csp.tmpl.js and 1 other location - About 2 hrs to fix
    dist/csp.tmpl.js on lines 5303..5311

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

    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

        var StaticMemberExpression = (function () {
            function StaticMemberExpression(object, property) {
                this.type = syntax_1.Syntax.MemberExpression;
                this.computed = false;
                this.object = object;
    Severity: Major
    Found in dist/csp.tmpl.js and 1 other location - About 2 hrs to fix
    dist/csp.tmpl.js on lines 4964..4972

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

    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 (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
                    if (this.scanner.isRestrictedWord((id).name)) {
                        this.tolerateError(messages_1.Messages.StrictVarName);
                    }
                }
    Severity: Major
    Found in dist/csp.tmpl.js and 1 other location - About 2 hrs to fix
    dist/csp.tmpl.js on lines 1990..1994

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

    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 (this.context.strict && id.type === syntax_1.Syntax.Identifier) {
                    if (this.scanner.isRestrictedWord((id).name)) {
                        this.tolerateError(messages_1.Messages.StrictVarName);
                    }
                }
    Severity: Major
    Found in dist/csp.tmpl.js and 1 other location - About 2 hrs to fix
    dist/csp.tmpl.js on lines 2182..2186

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

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

        var Reader = (function () {
            function Reader() {
                this.values = [];
                this.curly = this.paren = -1;
            }
    Severity: Major
    Found in dist/csp.tmpl.js - About 2 hrs to fix
      Severity
      Category
      Status
      Source
      Language