jslint-org/jslint

Feature request: Tabs not spaces

moritztim opened this issue · 7 comments

Is your feature request related to a problem? Please describe.

  • spaces introduce redundancies. Why use 4 characters if you can use just one?
  • tabs exist mostly for the exact purpose of indentation. Leave it to tabs so their size can be customized and they can be easily recognized. If you want to change indent size with spaces, you'd have to first find out which spaces are tabs, so why not skip that step and use tabs directly
  • if a tool like jslint uses tabs, maybe sites like github will quickly start properly displaying them. At the very least, usage of spaces should not be pushed this much.

Like matthewkastor said here:

I agree that choosing either spaces or tabs for indentation, and sticking to it, is a good practice because the code will be legible in any editor. The only issue is in mixing spaces and tabs and that issue is purely aesthetic. What I really like about JSLint is that it lets me know when I've done something that either doesn't work, or could produce some side effect that I don't want.

Describe the solution you'd like
Go back to the inconsistant indentation message instead of forcing your style onto JSLint users.

Describe alternatives you've considered
It can be customized but my point is it shouldn't have to be.

https://www.crockford.com/code.html
Use of tabs invites confusion, argument,and crying, with little compensating value. Do not use tabs. Use space.

I don't see how this is an argument... It's not when you use tabs or spaces that people complain, it's when you enforce either in the same way you enforce actual esential issues in the users code.

It can be customized but my point is it shouldn't have to be.

hi @moritz-t-w, closing this as won't fix. for better or for worse, 4-space-indent has been a style-standard of jslint since forever. changing that tradition over to tabs would likely anger its core users (myself included).

(me too).

I am well aware