Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v9.x backport] This is backporting multiple commits that were requested #19244

Closed
wants to merge 16 commits into from

Commits on Mar 21, 2018

  1. test: refactor assert test

    This adds puctiations to the comments, uses a capital letters for
    the first character, removes a few obsolete comments and switches
    to assert.ok when suitable.
    
    It also moves all `assert.deepEqual()` and `assert.deepStrictEqual()`
    tests to the appropriate file.
    
    PR-URL: nodejs#18610
    Reviewed-By: Joyee Cheung <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    5fc201b View commit details
    Browse the repository at this point in the history
  2. test: remove assert.doesNotThrow()

    There is actually no reason to use `assert.doesNotThrow()` in the
    tests. If a test throws, just let the error bubble up right away
    instead of first catching it and then rethrowing it.
    
    PR-URL: nodejs#18669
    Reviewed-By: Ben Noordhuis <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Matteo Collina <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    9a063f9 View commit details
    Browse the repository at this point in the history
  3. test: minor refactoring

    Add punctuation and comments about code that should not throw.
    Also remove a obsolete test and refactor some tests.
    
    PR-URL: nodejs#18669
    Reviewed-By: Ben Noordhuis <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Matteo Collina <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    9e9f331 View commit details
    Browse the repository at this point in the history
  4. tools: add assert.doesNotThrow eslint rule

    Prohibit the usage of `assert.doesNotThrow()`.
    
    PR-URL: nodejs#18669
    Reviewed-By: Ben Noordhuis <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Matteo Collina <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    3b0db45 View commit details
    Browse the repository at this point in the history
  5. tools: enable no-unsafe-finally

    This enables the `no-unsafe-finally` eslint rule to make sure we
    have a proper control flow in try / catch.
    
    PR-URL: nodejs#18745
    Reviewed-By: Ben Noordhuis <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    a60b423 View commit details
    Browse the repository at this point in the history
  6. doc: update buffer examples

    Move the print statements below a console.log call.
    
    PR-URL: nodejs#18758
    Reviewed-By: Benjamin Gruenbaum <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Vse Mozhet Byt <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    01e5624 View commit details
    Browse the repository at this point in the history
  7. tools: enable eslint no-undef-init rule

    This also fixes the three entries that did not pass.
    
    PR-URL: nodejs#18831
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Matheus Marchini <[email protected]>
    Reviewed-By: Anna Henningsen <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    Reviewed-By: Anatoli Papirovski <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    433497e View commit details
    Browse the repository at this point in the history
  8. tools: enable eslint strict key-spacing

    PR-URL: nodejs#18831
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Matheus Marchini <[email protected]>
    Reviewed-By: Anna Henningsen <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    Reviewed-By: Anatoli Papirovski <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    dcf01b5 View commit details
    Browse the repository at this point in the history
  9. tools: enable eslint one-var rule

    PR-URL: nodejs#18831
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Matheus Marchini <[email protected]>
    Reviewed-By: Anna Henningsen <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    Reviewed-By: Anatoli Papirovski <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    6a262d1 View commit details
    Browse the repository at this point in the history
  10. doc: enable eslint prefer-template rule

    PR-URL: nodejs#18831
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Matheus Marchini <[email protected]>
    Reviewed-By: Anna Henningsen <[email protected]>
    Reviewed-By: Michaël Zasso <[email protected]>
    Reviewed-By: Anatoli Papirovski <[email protected]>
    Reviewed-By: Colin Ihrig <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    c2a3b9b View commit details
    Browse the repository at this point in the history
  11. errors: implement new error handling

    This implements a function based system. Instead of passing in the
    error code as first argument, the error code itself is a error class.
    It already contains the correct error type, so while adding a new
    error no one has to think about the error type anymore. In case a
    single error code has more than one error type, the error class has
    properties for the non default error types. Those can be used as
    fallback.
    
    This prevents typos, makes the implementation easier and it is less
    verbose when writing the code for a new error.
    
    The implementation itself does not interfere with the old
    implementation. So the old and the new system can co-exist and it is
    possible to slowly migrate the old ones to the new system.
    
    PR-URL: nodejs#18857
    Reviewed-By: Anna Henningsen <[email protected]>
    Reviewed-By: Gus Caplan <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Joyee Cheung <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    cc63116 View commit details
    Browse the repository at this point in the history
  12. errors: update all internal errors

    This updates all internal errors to the new error type. While doing
    so it removes unused errors.
    
    A few errors currently seem to have the wrong type. To identify them
    later, comments were added next to the error type.
    
    PR-URL: nodejs#18857
    Reviewed-By: Anna Henningsen <[email protected]>
    Reviewed-By: Gus Caplan <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Joyee Cheung <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    c491b28 View commit details
    Browse the repository at this point in the history
  13. console: port errors to new system

    This ports the errors to the new error system.
    
    PR-URL: nodejs#18857
    Reviewed-By: Anna Henningsen <[email protected]>
    Reviewed-By: Gus Caplan <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Joyee Cheung <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    d115284 View commit details
    Browse the repository at this point in the history
  14. errors: add comments about falsy error types

    Some error types are not properly set. This adds comments which
    ones are probably falty and to what they should be set instead.
    
    PR-URL: nodejs#18857
    Reviewed-By: Anna Henningsen <[email protected]>
    Reviewed-By: Gus Caplan <[email protected]>
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Joyee Cheung <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    cabe547 View commit details
    Browse the repository at this point in the history
  15. repl: upper case comments first char

    PR-URL: nodejs#17919
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Tobias Nießen <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Weijia Wang <[email protected]>
    Reviewed-By: Khaidi Chu <[email protected]>
    Reviewed-By: Jon Moss <[email protected]>
    Reviewed-By: Lance Ball <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    976823c View commit details
    Browse the repository at this point in the history
  16. repl: refactor code for readability

    PR-URL: nodejs#17919
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Tobias Nießen <[email protected]>
    Reviewed-By: Luigi Pinca <[email protected]>
    Reviewed-By: Weijia Wang <[email protected]>
    Reviewed-By: Khaidi Chu <[email protected]>
    Reviewed-By: Jon Moss <[email protected]>
    Reviewed-By: Lance Ball <[email protected]>
    BridgeAR committed Mar 21, 2018
    Configuration menu
    Copy the full SHA
    6086e71 View commit details
    Browse the repository at this point in the history