Skip to content

Docs: Clarify scope of the style guides #139

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

Closed
wants to merge 1 commit into from
Closed

Conversation

dmethvin
Copy link
Member

Ref #138


Our style guides aim to make the code bases appear as if they were written by one precise punctilious programmer, rather than a cacophony of competing coders. As with many aspects of coding and writing, there can be differences of opinion about the best style. Contentious issues like "spaces versus tabs" or "semicolons or not" distract from the goal of writing code that works. Most project contributors have a slightly different personal coding style, but we all use the jQuery style when contributing to jQuery projects.
Long term, we would like to have formatting automatically done by the build process, so that the resulting code would always follow the style guide. We have taken a few steps in that direction. For example, our projects contain an [EditorConfig file](http://editorconfig.org) that many programming editors can use to enforce the space and tab rules. Our [JSHint](http://www.jshint.com/about/) configuration checks for common style _faux pas_ such as trailing spaces on a line, or using a variable before it is defined. Some projects use [ESLint]() or [JSCS]() to do more exensive style checks.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

links for ESLint and JSCS are missing here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Long term, we would like to have formatting automatically done by the build process

esformatter, also used by standard-format, can provide that. JSCS with autofixing as well (afaik to a lesser degree though). Since those tools exist and aren't used in our build process (right?), I wonder if it really makes sense to mention that here as a goal.

@dmethvin dmethvin closed this in e701b2c Jul 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants