Skip to content

Commit

Permalink
.eslintrc.json: adjust eslint rules to enforce readable chain syntax
Browse files Browse the repository at this point in the history
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();
```
  • Loading branch information
Swiftb0y committed Nov 10, 2021
1 parent 5577f36 commit b2c57a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit b2c57a9

Please sign in to comment.