Consider turning on exception ignoreEOLComments for no-multi-spaces rule
See original GitHub issueWhen you have a longer chain in your code, like an observable chain, or promise one, or lodash flow one, we sometimes comment the chain to make it more understandable what happens and why each step is there. To make it easier to read, we align the comments, but the current rule settings give errors on this.
So why is the ignoreEOLComments turned off? Is there a special reason for this? Imho, it should be turned on, to make it possible to align comments like:
myObservable
.pipe(
map(inACertainWayFunction), // Step explanation
filter(byPropBFunction), // Step explanation
distinctUntilChanged(comparisonFunction) // Step explanation
);
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
no-multi-spaces - ESLint - Pluggable JavaScript Linter
This rule's configuration consists of an object with the following properties: "ignoreEOLComments": true (defaults to false ) ignores multiple spaces before ...
Read more >parsing error: 'const declarations' require an initialization ...
Const declarations require an initialization value javascript typescript 16,204 Solution 1 Try to put ts-loader before js rule in webpack config { test:...
Read more >Diff - 9a34b2cc2d..78de17c053 - chromium/src - Git at Google
The option + // |ignoreEOLComments| is not supported yet in the bundled eslint. + 'no-multi-spaces': 0, + + // TODO(shik): temporarily disable the...
Read more >How to add exception to a eslint rule? - Stack Overflow
This rule ( no-multi-spaces ) has an option exceptions that you can configure to ignore all variable declarations.
Read more >218.58.62.115:18081/gitlab/edgegw_cs/source/-/comm...
+ // Ignore default rules for ternary expressions. ... They haven't been added to a specific release yet, but we'll consider them for...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ljharb, It’s actually the ‘why’ they explain. In very long difficult chains, we’ll always explain the functional part behind the steps, so we know ‘why’ they are there, that’s what I mean with step explanation. Off course it’s bad to explain what the code does, that should be clear by the line of code itself.
Some real code of the current project to better show what I mean:
Can you try and write it like this? Does that help the readability?