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

tools: add recommended linting rules #5188

Closed
wants to merge 1 commit into from
Closed

Commits on Feb 11, 2016

  1. tools: add recommended linting rules

    This change adds ESLint rules that meet two criteria:
    
    * recommended by ESLint
    * require no code changes
    
    These rules are:
    
    * `no-func-assign`: Disallow overwriting a function that was written
    as a function declaration.
    * `no-negated-in-lhs`: Disallow negated left operand of `in` operator.
    It prevents `if(!a in b)` when `if(!(a in b))` is intended.
    * `no-obj-calls`: Disallow global object function calls. It prevents
    errors like `JSON()` and `Math()`.
    to exercise the code in tests or whatever, it can sneak in.
    * `use-isnan`: Prevents errors like `if (foo == NaN)`
    * `no-octal`: Disallows confusing constructs like `var num = 071;`
    * `no-delete-var`: Delete works on properties, not variables. Disallows
    `delete foo`.
    Trott committed Feb 11, 2016
    Configuration menu
    Copy the full SHA
    dd7fb4d View commit details
    Browse the repository at this point in the history