RFC: space-in-parens: exception to distinguish between function calls and sub-expression grouping.
See original GitHub issueI like to use spaces in parentheses when grouping expressions, but not when calling functions, like this:
a = ( 1 + 2 ) * 3;
b(1, 2);
It allows one to visually mark semantically distinct uses of parentheses.
Would you accept a PR that implements this (and the opposite, off course)?
Edit: Thanks, eslintbot. So, a priori, the only unknown to me is whether it is “1. Widely applicable”.
<bountysource-plugin>
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource. </bountysource-plugin>
Issue Analytics
- State:
- Created 8 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
How to distinguish SUP error from RFC function exception?
I know the reason of the problem, it is a raised exception in my RFC module. In my Android application, if it is...
Read more >Chapter 14. Exception Handling - Exploring JS
Tip: If you want to distinguish between different kinds of exceptions, you can use the constructor property to switch over the exceptions' constructors...
Read more >rfc:random-function-exceptions - PHP.net wiki
Concern has been raised over the way failure is indicated by several functions in the core that are often used for security purposes....
Read more >How to represent SEH (__try / __except) in LLVM IR
The filter expressions are emitted as separate function bodies that the personality function calls. If a filter function returns '1', ...
Read more >Exception Groups in Python - GeeksforGeeks
Now, what happens if we call this Function? Users will get a structured new kind of error message which clearly states the number...
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
Adding to this; space-in-parens seems to be unable to differentiate condition expressions (i.e. if () {}, where, etc…).
This is important since this is a perfectly valid coding style:
i.e. never space parenthesis in general, but always space the test in conditions.
Thanks for your interest in improving ESLint. Unfortunately, it looks like this issue didn’t get consensus from the team, so I’m closing it. We define consensus as having three 👍s from team members, as well as a team member willing to champion the proposal. This is a high bar by design – we can’t realistically accept and maintain every feature request in the long term, so we only accept feature requests which are useful enough that there is consensus among the team that they’re worth adding.
Since ESLint is pluggable and can load custom rules at runtime, the lack of consensus among the ESLint team doesn’t need to be a blocker for you using this in your project, if you’d find it useful. It just means that you would need to implement the rule yourself, rather than using a bundled rule that is packaged with ESLint.