Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Stylistic fixes for CONTRIBUTING and README

  • Loading branch information...
commit 3103342b0a72f943acbb41e279b9b7d4ef78adb8 1 parent 18d6ca4
@valueof valueof authored
Showing with 10 additions and 5 deletions.
  1. +8 −3
  2. +2 −2
@@ -35,20 +35,22 @@ many people contributed. —[idiomatic.js](
* [Smart tabs]( are okay.
* Use one space after `if`, `for`, `while`, etc.
* Use one space after `function` for anonymous functions but not for named functions:
var a = function () {};
function a() {}
* Feel free to indent variable assignments or property definitions if it makes the code look better. But don't abuse that:
// Good
var next = token.peak();
var prev = token.peak(-1);
var cur = token.current;
var scope = {
- name: '(global)',
+ name: "(global)",
parent: parentScope,
vars: [],
uses: []
@@ -58,16 +60,19 @@ var scope = {
var cur = token.current;
var isSemicolon = cur.isPunctuator(";");
* Wrap multi-line comments with new lines on both sides.
### Variables
* Use one `var` per variable unless you don't assign any values to it (and it's short enough):
var token = tokens.find(index);
var scope = scopes.current;
var next, prev, cur;
* Don't be overly descriptive with your variable names but don't abuse one-letter variables either. Find a sweet spot somewhere in between.
### Comments
@@ -84,8 +89,8 @@ var next, prev, cur;
* Don't use comma-first notation.
* Try not to chain stuff unless it **really** helps (e.g. in tests).
* Don't short-circuit expressions if you're not assigning the result:
// Good
token = token || tokens.find(0);
@@ -44,13 +44,13 @@ use them, clone this repo and run our build command:
-Look for a file named in this repository. It contains our contributing
+Look for a file named `` in this repository. It contains our contributing
guidelines. We also have [a mailing list](
-JSHint is distributed under the MIT License. One file (`src/stable/jshint.js`) is
+JSHint is distributed under the MIT License. One file and one file only (src/stable/jshint.js) is
distributed under the slightly modified MIT License.
Please sign in to comment.
Something went wrong with that request. Please try again.