From b2c57a953bc97cd9221f9dbcebd21bc2a6c22809 Mon Sep 17 00:00:00 2001 From: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com> Date: Wed, 10 Nov 2021 18:34:58 +0100 Subject: [PATCH] .eslintrc.json: adjust eslint rules to enforce readable chain syntax previously, the eslint hook would enforce that the dot of multi- line chaining was attached to the object instead of the property thus formatting the first example into the second which I find less readable. ```javascript const a = _({}) .mapKeys(...) .filter(...) .value(); ``` ```javascript const a = _({}). mapKeys(...). filter(...). value(); ``` --- .eslintrc.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 193058da0ed..3fa7b8edbb1 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,7 +16,7 @@ "computed-property-spacing" : ["warn", "never", { "enforceForClassMembers": true }], - "dot-location": "warn", + "dot-location": ["warn", "property"], "dot-notation": "warn", "eqeqeq": ["error", "always"], "func-call-spacing": "warn", @@ -27,6 +27,7 @@ "key-spacing": "warn", "keyword-spacing": "warn", "linebreak-style": ["warn", "unix"], + "newline-per-chained-call": "warn", "no-constructor-return": "warn", "no-extra-bind": "warn", "no-sequences": "warn",