chiiya/haven

View on GitHub

Showing 133 of 135 total issues

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

  public enableCookies(purpose: Purpose): void {
    CookieManager.setCookie(
      `${this.prefix}-${purpose}`,
      "true",
      this.attributes
Severity: Major
Found in src/cookies/cookie-manager.ts and 1 other location - About 2 hrs to fix
src/cookies/cookie-manager.ts on lines 101..108

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

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

  public disableCookies(purpose: Purpose): void {
    CookieManager.setCookie(
      `${this.prefix}-${purpose}`,
      "false",
      this.attributes
Severity: Major
Found in src/cookies/cookie-manager.ts and 1 other location - About 2 hrs to fix
src/cookies/cookie-manager.ts on lines 88..95

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

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

  public attachListeners(): void {
    const purposes = getAllPurposes();
    const checkboxes: { [purpose: string]: HTMLInputElement } = {};
    const saveButton = <HTMLButtonElement | null>document.getElementById(
      "cookie-preferences__save"
Severity: Minor
Found in src/preferences/index.ts - About 1 hr to fix

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

      public init(): void {
        // Use custom cookie notification if present
        this.cookieNotification = document.getElementById("cookie-notification");
    
        // If no custom cookie notification is found, create a default one.
    Severity: Minor
    Found in src/notification/index.ts - About 1 hr to fix

      Function get has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

        public static get(key: string): string | undefined {
          const cookies = document.cookie ? document.cookie.split('; ') : [];
          for (const cookie of cookies) {
            const parts = cookie.split('=');
            const name = decode(parts[0]);
      Severity: Minor
      Found in src/cookies/cookies.ts - About 35 mins 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

      Function resolveBaseConfiguration has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

        public static resolveBaseConfiguration(options: Partial<HavenOptions>) {
          for (const item of ["prefix", "cookies", "type", "services", "purposes"]) {
            if (options[item] !== undefined) {
              store[item] = options[item];
            }
      Severity: Minor
      Found in src/store/configuration-resolver.ts - About 25 mins 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

      " should be '
      Open

          const purposes = ["functional", ...getAllPurposes()];
      Severity: Minor
      Found in src/cookies/cookie-manager.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      " should be '
      Open

      import CookieManager from "./cookies/cookie-manager";
      Severity: Minor
      Found in src/haven.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      " should be '
      Open

      import store from "../store";
      Severity: Minor
      Found in src/notification/index.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      Expected parentheses around arrow function argument having a body with curly braces.
      Open

            this.cookiesDecline.addEventListener("click", event => {
      Severity: Minor
      Found in src/notification/index.ts by tslint

      Rule: ter-arrow-parens

      require parens in arrow function arguments

      Rationale

      Arrow functions can omit parentheses when they have exactly one parameter. In all other cases the parameter(s) must be wrapped in parentheses. This rule enforces the consistent use of parentheses in arrow functions.

      Config

      This rule has a string option and an object one.

      String options are:

      • "always" (default) requires parentheses around arguments in all cases.
      • "as-needed" allows omitting parentheses when there is only one argument.

      Object properties for variants of the "as-needed" option:

      • "requireForBlockBody": true modifies the as-needed rule in order to require parentheses if the function body is in an instructions block (surrounded by braces).
      Examples
      "ter-arrow-parens": 
      "ter-arrow-parens": [true]
      "ter-arrow-parens": 
      "ter-arrow-parens": [true, "always"]
      "ter-arrow-parens": 
      "ter-arrow-parens": [true, "as-needed"]
      "ter-arrow-parens": 
      "ter-arrow-parens": [true, "as-needed", { "requireForBlockBody": true }]
      Schema
      {
        "type": "array",
        "items": [
          {
            "enum": [
              "always",
              "as-needed"
            ]
          },
          {
            "type": "object",
            "properties": {
              "requireForBlockBody": {
                "type": "boolean"
              }
            },
            "additionalProperties": false
          }
        ],
        "maxLength": 1
      }

      For more information see this page.

      Missing trailing comma
      Open

            store.cookieAttributes
      Severity: Minor
      Found in src/notification/index.ts by tslint

      Rule: trailing-comma

      Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

      Notes
      • Has Fix

      Config

      One argument which is an object with the keys multiline and singleline. Both can be set to a string ("always" or "never") or an object.

      The object can contain any of the following keys: "arrays", "objects", "functions", "imports", "exports", and "typeLiterals"; each key can have one of the following values: "always", "never", and "ignore". Any missing keys will default to "ignore".

      • "multiline" checks multi-line object literals.
      • "singleline" checks single-line object literals.

      An array is considered "multiline" if its closing bracket is on a line after the last array element. The same general logic is followed for object literals, function typings, named import statements and function parameters.

      To align this rule with the ECMAScript specification that is implemented in modern JavaScript VMs, there is a third option esSpecCompliant. Set this option to true to disallow trailing comma on object and array rest and rest parameters.

      Examples
      "trailing-comma": true,[object Object]
      "trailing-comma": true,[object Object]
      Schema
      {
        "type": "object",
        "properties": {
          "multiline": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "always",
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "arrays": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "exports": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "functions": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "imports": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "objects": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "typeLiterals": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  }
                }
              }
            ]
          },
          "singleline": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "always",
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "arrays": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "exports": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "functions": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "imports": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "objects": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "typeLiterals": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  }
                }
              }
            ]
          },
          "esSpecCompliant": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }

      For more information see this page.

      " should be '
      Open

                notification.style.display = "none";
      Severity: Minor
      Found in src/preferences/index.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      Missing trailing comma
      Open

            "cookie-preferences__save"
      Severity: Minor
      Found in src/preferences/index.ts by tslint

      Rule: trailing-comma

      Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.

      Notes
      • Has Fix

      Config

      One argument which is an object with the keys multiline and singleline. Both can be set to a string ("always" or "never") or an object.

      The object can contain any of the following keys: "arrays", "objects", "functions", "imports", "exports", and "typeLiterals"; each key can have one of the following values: "always", "never", and "ignore". Any missing keys will default to "ignore".

      • "multiline" checks multi-line object literals.
      • "singleline" checks single-line object literals.

      An array is considered "multiline" if its closing bracket is on a line after the last array element. The same general logic is followed for object literals, function typings, named import statements and function parameters.

      To align this rule with the ECMAScript specification that is implemented in modern JavaScript VMs, there is a third option esSpecCompliant. Set this option to true to disallow trailing comma on object and array rest and rest parameters.

      Examples
      "trailing-comma": true,[object Object]
      "trailing-comma": true,[object Object]
      Schema
      {
        "type": "object",
        "properties": {
          "multiline": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "always",
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "arrays": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "exports": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "functions": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "imports": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "objects": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "typeLiterals": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  }
                }
              }
            ]
          },
          "singleline": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "always",
                  "never"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "arrays": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "exports": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "functions": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "imports": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "objects": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  },
                  "typeLiterals": {
                    "type": "string",
                    "enum": [
                      "always",
                      "never",
                      "ignore"
                    ]
                  }
                }
              }
            ]
          },
          "esSpecCompliant": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }

      For more information see this page.

      " should be '
      Open

      import { injectGoogleAnalytics } from "./google-analytics";
      Severity: Minor
      Found in src/services/service-loader.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      " should be '
      Open

            case "facebook-pixel":
      Severity: Minor
      Found in src/services/service-loader.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      " should be '
      Open

            background: "#3C366B",
      Severity: Minor
      Found in src/store/index.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      " should be '
      Open

      export type ConsentType = "opt-in" | "opt-out";
      Severity: Minor
      Found in src/types/index.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      " should be '
      Open

      import CookieManager from "../cookies/cookie-manager";
      Severity: Minor
      Found in src/notification/index.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      " should be '
      Open

      import store from "../store";
      Severity: Minor
      Found in src/services/service-loader.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      " should be '
      Open

          for (const item of ["prefix", "cookies", "type", "services", "purposes"]) {
      Severity: Minor
      Found in src/store/configuration-resolver.ts by tslint

      Rule: quotemark

      Enforces quote character for string literals.

      Notes
      • Has Fix

      Config

      Five arguments may be optionally provided:

      • "single" enforces single quotes.
      • "double" enforces double quotes.
      • "backtick" enforces backticks.
      • "jsx-single" enforces single quotes for JSX attributes.
      • "jsx-double" enforces double quotes for JSX attributes.
      • "avoid-template" forbids single-line untagged template strings that do not contain string interpolations. Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are present in the string (the latter option takes precedence).
      • "avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required. For example, [true, "double", "avoid-escape"] would not report a failure on the string literal 'Hello "World"'.
      Examples
      "quotemark": true,single,avoid-escape,avoid-template
      "quotemark": true,single,jsx-double
      Schema
      {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "single",
            "double",
            "backtick",
            "jsx-single",
            "jsx-double",
            "avoid-escape",
            "avoid-template"
          ]
        },
        "minLength": 0,
        "maxLength": 5
      }

      For more information see this page.

      Severity
      Category
      Status
      Source
      Language