codenautas/js-to-html

View on GitHub

Showing 181 of 181 total issues

File js-to-html.ts has 1778 lines of code (exceeds 250 allowed). Consider refactoring.
Open

"use strict";

function isPlainObject(x:any):boolean{
    return typeof x==="object" && x && x.constructor === Object;
}
Severity: Major
Found in src/js-to-html.ts - About 4 days to fix

    html has 120 functions (exceeds 20 allowed). Consider refactoring.
    Open

    export var html={
        defaultTitle:"",
        insecureModeEnabled:true,
        mandatoryTitle:true,
        _text(text:string){
    Severity: Major
    Found in src/js-to-html.ts - About 2 days to fix

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

          "src": {
              "tags": {
                  "audio": {"description": "Address of the resource","value": "Valid non-empty URL potentially surrounded by spaces"},
                  "embed": {"description": "Address of the resource","value": "Valid non-empty URL potentially surrounded by spaces"},
                  "iframe": {"description": "Address of the resource","value": "Valid non-empty URL potentially surrounded by spaces"},
      Severity: Major
      Found in src/js-to-html.ts and 2 other locations - About 6 hrs to fix
      src/js-to-html.ts on lines 1136..1149
      src/js-to-html.ts on lines 1183..1196

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

      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

          "disabled": {
              "tags": {
                  "button": {"description": "Whether the form control is disabled","value": "Boolean attribute"},
                  "menuitem": {"description": "Whether the form control is disabled","value": "Boolean attribute"},
                  "fieldset": {"description": "Whether the form control is disabled","value": "Boolean attribute"},
      Severity: Major
      Found in src/js-to-html.ts and 2 other locations - About 6 hrs to fix
      src/js-to-html.ts on lines 1183..1196
      src/js-to-html.ts on lines 1662..1675

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

      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

          "form": {
              "tags": {
                  "button": {"description": "Associates the control with a form element","value": "ID*"},
                  "fieldset": {"description": "Associates the control with a form element","value": "ID*"},
                  "input": {"description": "Associates the control with a form element","value": "ID*"},
      Severity: Major
      Found in src/js-to-html.ts and 2 other locations - About 6 hrs to fix
      src/js-to-html.ts on lines 1136..1149
      src/js-to-html.ts on lines 1662..1675

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

      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

          "width": {
              "tags": {
                  "canvas": {"description": "Horizontal dimension","value": "Valid non-negative integer"},
                  "embed": {"description": "Horizontal dimension","value": "Valid non-negative integer"},
                  "iframe": {"description": "Horizontal dimension","value": "Valid non-negative integer"},
      Severity: Major
      Found in src/js-to-html.ts and 2 other locations - About 4 hrs to fix
      src/js-to-html.ts on lines 1239..1250
      src/js-to-html.ts on lines 1728..1739

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

      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

          "title": {
              "tags": {
                  "HTML elements": {"description": "Advisory information for the element","value": "Text"},
                  "abbr": {"description": "Full term or expansion of abbreviation","value": "Text"},
                  "dfn": {"description": "Full term or expansion of abbreviation","value": "Text"},
      Severity: Major
      Found in src/js-to-html.ts and 2 other locations - About 4 hrs to fix
      src/js-to-html.ts on lines 1239..1250
      src/js-to-html.ts on lines 1789..1800

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

      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

          "height": {
              "tags": {
                  "canvas": {"description": "Vertical dimension","value": "Valid non-negative integer"},
                  "embed": {"description": "Vertical dimension","value": "Valid non-negative integer"},
                  "iframe": {"description": "Vertical dimension","value": "Valid non-negative integer"},
      Severity: Major
      Found in src/js-to-html.ts and 2 other locations - About 4 hrs to fix
      src/js-to-html.ts on lines 1728..1739
      src/js-to-html.ts on lines 1789..1800

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

      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 toHtmlDoc has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring.
      Open

          toHtmlDoc(opts:PrintOpts,recurseOpts:PrintRecurseOpts){
              opts = opts||{};
              var target:Html=this;
              if(!opts.incomplete){
                  var source:Html=this;
      Severity: Minor
      Found in src/js-to-html.ts - About 3 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

          "crossorigin": {
              "tags": {
                  "audio": {"description": "How the element handles crossorigin requests","value": "\"anonymous\"; \"use-credentials\""},
                  "img": {"description": "How the element handles crossorigin requests","value": "\"anonymous\"; \"use-credentials\""},
                  "link": {"description": "How the element handles crossorigin requests","value": "\"anonymous\"; \"use-credentials\""},
      Severity: Major
      Found in src/js-to-html.ts and 2 other locations - About 3 hrs to fix
      src/js-to-html.ts on lines 986..995
      src/js-to-html.ts on lines 1352..1361

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

      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

          "autofocus": {
              "tags": {
                  "button": {"description": "Automatically focus the form control when the page is loaded","value": "Boolean attribute"},
                  "input": {"description": "Automatically focus the form control when the page is loaded","value": "Boolean attribute"},
                  "keygen": {"description": "Automatically focus the form control when the page is loaded","value": "Boolean attribute"},
      Severity: Major
      Found in src/js-to-html.ts and 2 other locations - About 3 hrs to fix
      src/js-to-html.ts on lines 1085..1094
      src/js-to-html.ts on lines 1352..1361

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

      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

          "label": {
              "tags": {
                  "menuitem": {"description": "User-visible label","value": "Text"},
                  "menu": {"description": "User-visible label","value": "Text"},
                  "optgroup": {"description": "User-visible label","value": "Text"},
      Severity: Major
      Found in src/js-to-html.ts and 2 other locations - About 3 hrs to fix
      src/js-to-html.ts on lines 986..995
      src/js-to-html.ts on lines 1085..1094

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

      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

      File tagInterface.js has 283 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      
      var fs=require('fs').promises;
      
      // https://html.spec.whatwg.org/multipage/indices.html#element-interfaces
      
      Severity: Minor
      Found in generators/tagInterface.js - About 2 hrs to fix

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

        export interface Attr4HTMLVideoElement extends Attr4HTMLElement {src?:any,crossorigin?:any,poster?:any,preload?:any,autoplay?:any,playsinline?:any,loop?:any,muted?:any,controls?:any,width?:any,height?:any,}
        Severity: Major
        Found in src/js-to-html.ts and 1 other location - About 2 hrs to fix
        src/js-to-html.ts on lines 39..39

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

        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

        export interface Attr4HTMLButtonElement extends Attr4HTMLElement {autofocus?:any,disabled?:any,form?:any,formaction?:any,formenctype?:any,formmethod?:any,formnovalidate?:any,formtarget?:any,name?:any,type?:any,value?:any,}
        Severity: Major
        Found in src/js-to-html.ts and 1 other location - About 2 hrs to fix
        src/js-to-html.ts on lines 96..96

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

        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

        export interface Attr4HTMLLinkElement extends Attr4HTMLElement {href?:any,crossorigin?:any,rel?:any,as?:any,media?:any,hreflang?:any,type?:any,sizes?:any,referrerpolicy?:any,integrity?:any,}
        Severity: Major
        Found in src/js-to-html.ts and 2 other locations - About 2 hrs to fix
        src/js-to-html.ts on lines 57..57
        src/js-to-html.ts on lines 58..58

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

        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

        export interface Attr4HTMLImageElement extends Attr4HTMLElement {alt?:any,src?:any,srcset?:any,crossorigin?:any,usemap?:any,ismap?:any,width?:any,height?:any,decoding?:any,referrerpolicy?:any,}
        Severity: Major
        Found in src/js-to-html.ts and 2 other locations - About 2 hrs to fix
        src/js-to-html.ts on lines 57..57
        src/js-to-html.ts on lines 63..63

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

        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

        export interface Attr4HTMLIFrameElement extends Attr4HTMLElement {src?:any,srcdoc?:any,name?:any,sandbox?:any,allowfullscreen?:any,allowpaymentrequest?:any,allowusermedia?:any,width?:any,height?:any,referrerpolicy?:any,}
        Severity: Major
        Found in src/js-to-html.ts and 2 other locations - About 2 hrs to fix
        src/js-to-html.ts on lines 58..58
        src/js-to-html.ts on lines 63..63

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

        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

            "href": {
                "tags": {
                    "a": {"description": "Address of the hyperlink","value": "Valid URL potentially surrounded by spaces"},
                    "area": {"description": "Address of the hyperlink","value": "Valid URL potentially surrounded by spaces"},
                    "link": {"description": "Address of the hyperlink","value": "Valid non-empty URL potentially surrounded by spaces"},
        Severity: Major
        Found in src/js-to-html.ts and 3 other locations - About 2 hrs to fix
        src/js-to-html.ts on lines 977..985
        src/js-to-html.ts on lines 1023..1031
        src/js-to-html.ts on lines 1719..1727

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

            "autocomplete": {
                "tags": {
                    "form": {"description": "Default setting for autofill feature for controls in the form","value": "\"on\"; \"off\""},
                    "input": {"description": "Hint for form autofill feature","value": "Autofill field name and related tokens*"},
                    "select": {"description": "Hint for form autofill feature","value": "Autofill field name and related tokens*"},
        Severity: Major
        Found in src/js-to-html.ts and 3 other locations - About 2 hrs to fix
        src/js-to-html.ts on lines 1023..1031
        src/js-to-html.ts on lines 1263..1271
        src/js-to-html.ts on lines 1719..1727

        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

        Severity
        Category
        Status
        Source
        Language