Skip to content

Commit

Permalink
Switch from JSLint to JSHint for code quality.
Browse files Browse the repository at this point in the history
  • Loading branch information
reid committed Apr 17, 2012
1 parent 77ca31a commit 913fd3f
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
16 changes: 16 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"globalstrict": true,
"node": true,
"es5": true,
"onevar": true,
"white": true,
"curly": true,
"eqeqeq": true,
"latedef": true,
"newcap": true,
"noempty": true,
"nonew": true,
"plusplus": true,
"undef": true,
"trailing": true
}
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,16 @@ Documentation will be built to `build_docs/api/everything/`.

Yeti uses [YUIDocJS][] to generate API documentation from inline JSDoc comment blocks.

### JSLint
### Linter

make lint

You may also run JSLint on individual files with `./lint`:
You may also run the linter on individual files with `./lint`:

./lint test/blizzard.js

Yeti uses [JSHint][] to analyze code for problems. See `.jshintrc` for options used by Yeti.

### Contribute to Yeti

Your contributions are welcome!
Expand All @@ -207,7 +209,7 @@ before we can accept your pull request.

#### Contribution Checklist

1. Run `make lint` and make sure your new code runs through JSLint without error.
1. Run `make lint` and make sure your new code runs through the linter without error.
1. Run `make coverage` and make sure your new code is covered with a test.
Tests are located in `test` and use [Vows][].

Expand All @@ -221,6 +223,7 @@ Yeti is an experimental project of YUI Labs. As such, it doesn't receive the sam

Yeti is free to use under YUI's BSD license. See the LICENSE file or the [YUI license page][license] for license text and copyright information.

[JSHint]: http://jshint.com/
[YUIDocJS]: https://github.com/davglass/yuidocjs
[Selleck]: http://github.com/rgrove/selleck
[PhantomJS]: http://phantomjs.org/
Expand Down
2 changes: 1 addition & 1 deletion lint
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
DIR="$( cd "$( dirname "$0" )" && pwd )"
node $DIR/node_modules/.bin/jslint --nomen --bitwise $@
node $DIR/node_modules/.bin/jshint $@
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"devDependencies": {
"ronn": ">=0.3.8",
"jslint": ">=0.1.4",
"jshint": ">=0.6.1",
"pact": ">=0.1.2",
"phantom": ">=0.3.3",
"vows": ">=0.5.0",
Expand Down

0 comments on commit 913fd3f

Please sign in to comment.