drdgvhbh/node-XMLHttpRequest

View on GitHub

Showing 65 of 65 total issues

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

test('redirect 303', async (done) => {
  const xhr = new XMLHttpRequest();
  const port = await getPort();
  const server = createServer((req, res) => {
    if (req.url === '/redirectingResource') {
Severity: Major
Found in __tests__/test-redirect-303.ts and 2 other locations - About 1 day to fix
__tests__/test-redirect-302.ts on lines 5..38
__tests__/test-redirect-307.ts on lines 5..38

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

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

test('redirect 302', async (done) => {
  const xhr = new XMLHttpRequest();
  const port = await getPort();
  const server = createServer((req, res) => {
    if (req.url === '/redirectingResource') {
Severity: Major
Found in __tests__/test-redirect-302.ts and 2 other locations - About 1 day to fix
__tests__/test-redirect-303.ts on lines 5..38
__tests__/test-redirect-307.ts on lines 5..38

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

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

test('redirect 307', async (done) => {
  const xhr = new XMLHttpRequest();
  const port = await getPort();
  const server = createServer((req, res) => {
    if (req.url === '/redirectingResource') {
Severity: Major
Found in __tests__/test-redirect-307.ts and 2 other locations - About 1 day to fix
__tests__/test-redirect-302.ts on lines 5..38
__tests__/test-redirect-303.ts on lines 5..38

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

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

    xhr.onreadystatechange = () => {
      if (xhr.readyState === xhr.DONE) {
        expect(() => (xhr.responseType = 'json')).toThrow();
        expect(() => (xhr.responseType = 'arraybuffer')).toThrow();
        expect(() => (xhr.responseType = 'blob')).toThrow();
Severity: Major
Found in __tests__/response-type.ts and 1 other location - About 5 hrs to fix
__tests__/response-type.ts on lines 58..67

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

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

    xhr.onreadystatechange = () => {
      if (xhr.readyState === xhr.LOADING) {
        expect(() => (xhr.responseType = 'json')).toThrow();
        expect(() => (xhr.responseType = 'arraybuffer')).toThrow();
        expect(() => (xhr.responseType = 'blob')).toThrow();
Severity: Major
Found in __tests__/response-type.ts and 1 other location - About 5 hrs to fix
__tests__/response-type.ts on lines 43..51

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

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 XMLHttpRequest.ts has 333 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import http from 'http';
import {
  InvalidStateDOMException,
  SyntaxErrDOMException,
  SecurityErrDOMException,
Severity: Minor
Found in src/XMLHttpRequest.ts - About 4 hrs to fix

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

      beforeEach(async () => {
        xhr = new XMLHttpRequest();
        port = await getport();
        serverUrl = `http://localhost:${port}`;
    
    
    Severity: Major
    Found in __tests__/response-url.ts and 1 other location - About 3 hrs to fix
    __tests__/response-type.ts on lines 13..23

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 99.

    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

      beforeEach(async () => {
        xhr = new XMLHttpRequest();
        port = await getport();
        serverUrl = `http://localhost:${port}`;
    
    
    Severity: Major
    Found in __tests__/response-type.ts and 1 other location - About 3 hrs to fix
    __tests__/response-url.ts on lines 13..23

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 99.

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

      public send(data?: Document | BodyInit | null) {
        if (this.readyState !== this.OPENED) {
          throw new InvalidStateDOMException('state is not opened');
        }
        if (this.sendFlag) {
    Severity: Major
    Found in src/XMLHttpRequest.ts - About 3 hrs to fix

      XMLHttpRequest has 23 functions (exceeds 20 allowed). Consider refactoring.
      Open

      export class XMLHttpRequest {
        private request: http.ClientRequest | undefined | null;
      
        private response: request.Response | undefined;
      
      
      Severity: Minor
      Found in src/XMLHttpRequest.ts - About 2 hrs to fix

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

        export class HierarchyRequestDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 42..50
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 72..80
        src/DOMException.ts on lines 82..90
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 112..120
        src/DOMException.ts on lines 122..130
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 142..150
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 192..200
        src/DOMException.ts on lines 202..210
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 222..230
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

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

        export class NotSupportedDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 42..50
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 62..70
        src/DOMException.ts on lines 72..80
        src/DOMException.ts on lines 82..90
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 112..120
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 142..150
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 192..200
        src/DOMException.ts on lines 202..210
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 222..230
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

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

        export class InvalidStateDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 42..50
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 62..70
        src/DOMException.ts on lines 72..80
        src/DOMException.ts on lines 82..90
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 112..120
        src/DOMException.ts on lines 122..130
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 192..200
        src/DOMException.ts on lines 202..210
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 222..230
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

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

        export class WrongDocumentDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 42..50
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 62..70
        src/DOMException.ts on lines 82..90
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 112..120
        src/DOMException.ts on lines 122..130
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 142..150
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 192..200
        src/DOMException.ts on lines 202..210
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 222..230
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

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

        export class ValidationErrDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 42..50
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 62..70
        src/DOMException.ts on lines 72..80
        src/DOMException.ts on lines 82..90
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 112..120
        src/DOMException.ts on lines 122..130
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 142..150
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 202..210
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 222..230
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

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

        export class IndexSizeDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 62..70
        src/DOMException.ts on lines 72..80
        src/DOMException.ts on lines 82..90
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 112..120
        src/DOMException.ts on lines 122..130
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 142..150
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 192..200
        src/DOMException.ts on lines 202..210
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 222..230
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

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

        export class InvalidCharacterDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 42..50
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 62..70
        src/DOMException.ts on lines 72..80
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 112..120
        src/DOMException.ts on lines 122..130
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 142..150
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 192..200
        src/DOMException.ts on lines 202..210
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 222..230
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

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

        export class NotFoundDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 42..50
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 62..70
        src/DOMException.ts on lines 72..80
        src/DOMException.ts on lines 82..90
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 122..130
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 142..150
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 192..200
        src/DOMException.ts on lines 202..210
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 222..230
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

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

        export class TypeMismatchDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 42..50
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 62..70
        src/DOMException.ts on lines 72..80
        src/DOMException.ts on lines 82..90
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 112..120
        src/DOMException.ts on lines 122..130
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 142..150
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 192..200
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 222..230
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

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

        export class NetworkErrDOMException extends DOMException {
          public code: number;
        
          constructor(message = '', name = 'Error') {
            super(message, name);
        Severity: Major
        Found in src/DOMException.ts and 24 other locations - About 1 hr to fix
        src/DOMException.ts on lines 42..50
        src/DOMException.ts on lines 52..60
        src/DOMException.ts on lines 62..70
        src/DOMException.ts on lines 72..80
        src/DOMException.ts on lines 82..90
        src/DOMException.ts on lines 92..100
        src/DOMException.ts on lines 102..110
        src/DOMException.ts on lines 112..120
        src/DOMException.ts on lines 122..130
        src/DOMException.ts on lines 132..140
        src/DOMException.ts on lines 142..150
        src/DOMException.ts on lines 152..160
        src/DOMException.ts on lines 162..170
        src/DOMException.ts on lines 172..180
        src/DOMException.ts on lines 182..190
        src/DOMException.ts on lines 192..200
        src/DOMException.ts on lines 202..210
        src/DOMException.ts on lines 212..220
        src/DOMException.ts on lines 232..240
        src/DOMException.ts on lines 242..250
        src/DOMException.ts on lines 252..260
        src/DOMException.ts on lines 262..270
        src/DOMException.ts on lines 272..280
        src/DOMException.ts on lines 282..290

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

        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