Feature Request: `curly` rule should optionally ignore unnecessary braces
See original GitHub issueWhat version of ESLint are you using? v2.9.0
What parser (default, Babel-ESLint, etc.) are you using? default
I think the curly
rule should have an option to relax complaints about unnecessary braces. Many style guides have rules to enforcing the use of curly braces, but few of them enforce the removal of braces. It’s often desirable to allow the programmer to add additional braces at his/her discretion.
Issue Analytics
- State:
- Created 7 years ago
- Comments:26 (18 by maintainers)
Top Results From Across the Web
curly - ESLint - Pluggable JavaScript Linter
JavaScript allows the omission of curly braces when a block contains only one statement. However, it is considered by many to be best...
Read more >When can I omit curly braces in C? - Stack Overflow
The only places you can omit brackets are for the bodies of if-else , for , while , or do-while statements if the...
Read more >Optional Braces - Scala 3 - EPFL
Generally, the rule is that adding a pair of optional braces will not change the meaning of a well-indented program. These changes can...
Read more >Control structures should use curly braces - SonarSource Rules
Java static code analysis. Unique rules to find Bugs, Vulnerabilities, Security Hotspots, and Code Smells in your JAVA code. All rules 649 ·...
Read more >coding style - Should curly braces appear on their own line?
@12431234123412341234123: I think he means because some people print the code out for code-review. And each not absolutely necessary newline is paper wasted,...
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
Here’s what I understand this proposal to be:
Assuming that’s the correct description of the proposal, please indicate your support by adding a 👍 to this comment.
@kaicataldo That’s a great management practice.