New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS indentation style not consistent #655

Closed
cvrebert opened this Issue Dec 16, 2012 · 4 comments

Comments

Projects
None yet
5 participants
@cvrebert
Copy link
Contributor

cvrebert commented Dec 16, 2012

select.js has lines that, variously, use:

  • 4 spaces
  • 2 spaces
  • tabs

for indentation.

Which is the preferred style? (At the moment, there's also no CONTRIBUTING file to spell such things out.)

Relatedly, both i++ and i = i + 1 are utilized, for no apparent reason.

@Saturate

This comment has been minimized.

Copy link

Saturate commented Feb 1, 2013

There is also some problems with semicolons, they are used some here and not other places. My vote would be to use them according to JSHint. Some places we compare using "==" and others "===", would be great if we made this more consistent, I would not mind taking this task. There are more inconsistent things, but the main thing is that we clear them up.

@julen

This comment has been minimized.

Copy link
Contributor

julen commented Apr 10, 2013

Any official words on this matter? TBH it's not a pleasant experience to read the source code in its current state.

@ivaynberg

This comment has been minimized.

Copy link
Contributor

ivaynberg commented Apr 10, 2013

running a code formatter on the codebase will screw up all the pending pull requests. i am planning on doing that when i start on a feature that will require me to touch a lot of code.

@kevin-brown

This comment has been minimized.

Copy link
Member

kevin-brown commented Oct 15, 2014

Select2 4.0 now uses JSHint and this is one of the things that are being enforced. You can see the progress in #2743.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment