loading...

re: How should we indent `const` declarations? VIEW POST

TOP OF THREAD FULL DISCUSSION
re: 6 spaces for me. Your 6 spaces example is broken to me, as for a multiline variable declaration block i would add an extra \n after it.
 

But why? As soon as you run any code formatter over it, it will change indentation. Or do you know any code formatter that makes a difference between var and const?

Also, when working together with other developers, you should typically adhere to coding guidelines. Often these coding guidelines are enforced meaning that you won't be able to check in your code if they are not met. I have not heard of coding guidelines with such complicated indentation rules.

 

I take your point regarding current practicality, but I think we should leave aside current patterns and tooling for this discussion. The point of this article is to question. what beat practices should be in the first place. Formatters and standards can always be updated if accepted best practices change.

Good point - we should never stop thinking about how we could improve the current state.

Code of Conduct Report abuse