diff options
author | cjihrig <cjihrig@gmail.com> | 2016-01-22 00:27:02 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2016-01-28 11:31:14 -0500 |
commit | 452928eb24342756b422bce672a73930e8da9a7a (patch) | |
tree | 7a7bf88a12bf0aad50810d6fc106ac89aa0cd917 /.eslintrc | |
parent | 3218dfbe60955702933b1f6e4e728b9498811f80 (diff) | |
download | android-node-v8-452928eb24342756b422bce672a73930e8da9a7a.tar.gz android-node-v8-452928eb24342756b422bce672a73930e8da9a7a.tar.bz2 android-node-v8-452928eb24342756b422bce672a73930e8da9a7a.zip |
tools: add arrow function rules to eslint
This commit enables the following rules:
* arrow-parens - requires parens around arrow function arguments
* arrow-spacing - ensures a space on each side of the =>
* no-arrow-condition - prevents accidental use of => in cases
where the user really intends to use <=
PR-URL: https://github.com/nodejs/node/pull/4813
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Saúl Ibarra Corretgé <saghul@gmail.com>
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
Diffstat (limited to '.eslintrc')
-rw-r--r-- | .eslintrc | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -86,6 +86,12 @@ rules: # list: http://eslint.org/docs/rules/#ecmascript-6 ## Suggest using 'const' wherever possible prefer-const: 2 + ## Enforce parens around arrow function arguments + arrow-parens: [2, "always"] + ## Require a space on each side of arrow operator + arrow-spacing: [2, {"before": true, "after": true}] + ## Prevent using => in a condition where <= is intended + no-arrow-condition: 2 # Strict Mode # list: https://github.com/eslint/eslint/tree/master/docs/rules#strict-mode |