Quantcast
Channel: Node.js Tools for Visual Studio
Viewing all articles
Browse latest Browse all 4630

Commented Issue: Should not dedent my code while I am in the middle of coding [1147]

$
0
0
We shouldn't dedent the following code all the way to the lef while I am in the middle of coding.

```
pf.breed.list(function (data) {
var breeds = data.petfinder.breeds.breed; <== dedented
breeds = breeds.map(function (breed) { <== dedented
return breed.$t; <== dedented
}); <== dedented
console.log("get list of breeds:"); <== dedented
console.log("\t", breeds.slice(0, 5).join(", ")); <== dedented
});
```
After completing the last }); and hitting <enter>, the code was formatted correctly as following.
```
pf.breed.list(function (data) {
var breeds = data.petfinder.breeds.breed;
breeds = breeds.map(function (breed) {
return breed.$t;
});
console.log("get list of breeds:");
console.log("\t", breeds.slice(0, 5).join(", "));
});
```
Comments: Also see https://nodejstools.codeplex.com/workitem/1136

Viewing all articles
Browse latest Browse all 4630

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>