altereagle/paperboy

View on GitHub

Showing 77 of 77 total issues

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

  on(event, callback) {
    return new Promise((resolve, reject) => {
      // Paperboy can release `subscribe` connections
      const releaseConnection = (connection) => this.pool.subscribe.release(connection);
      
Severity: Major
Found in index.js and 1 other location - About 2 hrs to fix
index.js on lines 292..320

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

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

  once(event, callback) {
    return new Promise((resolve, reject) => {
      // Paperboy can release `subscribe` connections
      const releaseConnection = (connection) => this.pool.subscribe.release(connection);
      
Severity: Major
Found in index.js and 1 other location - About 2 hrs to fix
index.js on lines 323..351

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

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 create has 58 lines of code (exceeds 50 allowed). Consider refactoring.
Open

    create: function() {
      
      // **And** the connection sets its url and name
      const getUrlAndConnectionName = () => {
        return new Promise((resolve) => {
Severity: Major
Found in index.js - About 1 hr to fix

    Rule doesn't have all its properties in alphabetical order.
    Open

    ul.sections {
    Severity: Minor
    Found in docs/docco.css by csslint

    Don't use IDs in selectors.
    Open

    #jump_to a.large {
    Severity: Minor
    Found in docs/docco.css by csslint

    Don't use IDs in selectors.
    Open

    #jump_wrapper {
    Severity: Minor
    Found in docs/docco.css by csslint

    Rule doesn't have all its properties in alphabetical order.
    Open

    @font-face {
    Severity: Minor
    Found in docs/docco.css by csslint

    Values of 0 shouldn't have units specified.
    Open

      margin: 15px 0 0px;
    Severity: Minor
    Found in docs/docco.css by csslint

    Rule doesn't have all its properties in alphabetical order.
    Open

    pre, tt, code {
    Severity: Minor
    Found in docs/docco.css by csslint

    Rule doesn't have all its properties in alphabetical order.
    Open

    #jump_to a.small {
    Severity: Minor
    Found in docs/docco.css by csslint

    Don't use IDs in selectors.
    Open

      #jump_page .source {
    Severity: Minor
    Found in docs/docco.css by csslint

    Outlines should only be modified using :focus.
    Open

    a:active,

    Unexpected console statement.
    Open

                console.error(errorMessage);
    Severity: Minor
    Found in index.js by eslint

    disallow the use of console (no-console)

    In JavaScript that is designed to be executed in the browser, it's considered a best practice to avoid using methods on console. Such messages are considered to be for debugging purposes and therefore not suitable to ship to the client. In general, calls using console should be stripped before being pushed to production.

    console.log("Made it here.");
    console.error("That shouldn't have happened.");

    Rule Details

    This rule disallows calls to methods of the console object.

    Examples of incorrect code for this rule:

    /*eslint no-console: "error"*/
    
    console.log("Log a debug level message.");
    console.warn("Log a warn level message.");
    console.error("Log an error level message.");

    Examples of correct code for this rule:

    /*eslint no-console: "error"*/
    
    // custom console
    Console.log("Hello world!");

    Options

    This rule has an object option for exceptions:

    • "allow" has an array of strings which are allowed methods of the console object

    Examples of additional correct code for this rule with a sample { "allow": ["warn", "error"] } option:

    /*eslint no-console: ["error", { allow: ["warn", "error"] }] */
    
    console.warn("Log a warn level message.");
    console.error("Log an error level message.");

    When Not To Use It

    If you're using Node.js, however, console is used to output information to the user and so is not strictly used for debugging purposes. If you are developing for Node.js then you most likely do not want this rule enabled.

    Related Rules

    Rule doesn't have all its properties in alphabetical order.
    Open

    b, strong {
    Severity: Minor
    Found in docs/docco.css by csslint

    Rule doesn't have all its properties in alphabetical order.
    Open

    #jump_to, #jump_page {
    Severity: Minor
    Found in docs/docco.css by csslint

    Don't use IDs in selectors.
    Open

    #jump_to, #jump_wrapper {
    Severity: Minor
    Found in docs/docco.css by csslint

    Don't use IDs in selectors.
    Open

      #container {
    Severity: Minor
    Found in docs/docco.css by csslint

    The box-sizing property isn't supported in IE6 and IE7.
    Open

      box-sizing: border-box;         /* css3 */
    Severity: Minor
    Found in docs/docco.css by csslint

    Don't use IDs in selectors.
    Open

    #jump_page {
    Severity: Minor
    Found in docs/docco.css by csslint

    Rule doesn't have all its properties in alphabetical order.
    Open

    body {
    Severity: Minor
    Found in docs/docco.css by csslint
    Severity
    Category
    Status
    Source
    Language