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

eslintrc,lib,test: enable prefer-const rule #3152

Closed

Commits on Oct 25, 2015

  1. tools: enable prefer-const eslint rule

    Description from: http://eslint.org/docs/rules/prefer-const.html
    
    If a variable is never modified, using the `const` declaration is
    better. `const` declaration tells readers, "this variable is never
    modified," reducing cognitive load and improving maintainability.
    
    Refer: nodejs#3118
    PR-URL: nodejs#3152
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Сковорода Никита Андреевич <[email protected]>
    Reviewed-By: Roman Reiss <[email protected]>
    thefourtheye committed Oct 25, 2015
    Configuration menu
    Copy the full SHA
    af82367 View commit details
    Browse the repository at this point in the history
  2. lib,test: update let to const where applicable

    As per the `prefer-const` eslint rule, few instances of `let` have been
    identified to be better with `const`. This patch updates all those
    instances.
    
    Refer: nodejs#3118
    PR-URL: nodejs#3152
    Reviewed-By: Colin Ihrig <[email protected]>
    Reviewed-By: Сковорода Никита Андреевич <[email protected]>
    Reviewed-By: Roman Reiss <[email protected]>
    thefourtheye committed Oct 25, 2015
    Configuration menu
    Copy the full SHA
    06d5aee View commit details
    Browse the repository at this point in the history