From 8ae7c6e887bc718fc06bf7b6ffc2faa219932ee8 Mon Sep 17 00:00:00 2001 From: Dave Methvin Date: Wed, 11 May 2016 21:03:56 -0400 Subject: [PATCH] Docs: Clarify scope of the style guides --- pages/style-guide.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/style-guide.md b/pages/style-guide.md index 670f8343..b74beb24 100644 --- a/pages/style-guide.md +++ b/pages/style-guide.md @@ -2,11 +2,11 @@ "title": "jQuery's Style Guides" } -jQuery projects strive to use a common set of styles for code and documentation. This facilitates a team of developers working on the same code base. If each developer were to use their own style, there would be jarring changes in the code as someone read through it. This slows comprehension and can also cause spurious differences in changesets as developers alter style in frivolous ways on the code they touch. +Style guides aim to make a code base appear as if it 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. -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. -Long term, we would like to have all of the formatting automatically done by the build process, so that the resulting code would always follow the style guide. We haven't reached that nirvana yet, but 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. +jQuery Foundation projects may choose any style guide that fits their team's preferences; check with the project before starting work to see what style they follow. The style guides here are generally known as the "jQuery Style" and are used by jQuery, jQuery UI, and jQuery Mobile. Many projects outside the Foundation use this style as well. ### [Prose Style Guide](/style-guide/prose/)