Unexpected results from curly: multi
See original GitHub issueWhat version of ESLint are you using?
3.3.1
What parser (default, Babel-ESLint, etc.) are you using?
Default
Please show your full configuration:
module.exports = {
"env": {
"node": true
},
"extends": "eslint:recommended",
"rules": {
"indent": [
"error",
2
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"curly": [
"error",
"multi"
]
}
};
What did you do? Please include the actual source code causing the issue.
/* global foo, cb */
if (foo) {
try {
foo();
} catch (err) {
cb(err);
}
}
What did you expect to happen?
I would expect the above code to be valid.
What actually happened? Please include the actual, raw output from ESLint.
$ eslint index.js
/home/ryan/t-eslint/index.js
2:1 error Unnecessary { after 'if' condition curly
✖ 1 problem (1 error, 0 warnings)
If this is the expected behavior, what is the correct way to format the code?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to Care for Multi-Textured Curly Hair | NaturallyCurly.com
If you have multiple textures, it is normal and you're not alone. Vitamin deficiencies or medication can cause a change in hair texture,...
Read more >Unexpected result when initializing variable in C++ using curly ...
When I build and run the previous code in codelite I receive no errors. However, if I compile my atom file dailyPractice10.cpp using...
Read more >object-curly-newline - ESLint - Pluggable JavaScript Linter
A pluggable and configurable linter tool for identifying and reporting on patterns in JavaScript. Maintain your code quality with ease.
Read more >Wait… IS MY HAIR ACTUALLY CURLY?! - Kayley Melissa
How to test if you actually have curly hair! Today AnnaLaura is trying out some curly girl method to see if her hair...
Read more >Curly Girl Method Before and After [ROUTINE + PICTURES]
Want some mind-blowing transformation curly girl method before and after pictures? Literally had no idea my hair had any natural texture whatsoever.
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
I don’t like:
Should be:
OK, I ended up wrapping my conditional inside the try block instead of putting the try statement in the conditional.
Closing for now.