Sha256: c56ab6a8bad89c2aabae7e0f7e1db9ccb02dc53639b90f6324340ae353d1550a
Contents?: true
Size: 1.71 KB
Versions: 3
Compression:
Stored size: 1.71 KB
Contents
# JSHint [![travis-ci](https://api.travis-ci.org/damian/jshint.png)](http://travis-ci.org/#!/damian/jshint) [![Code Climate](https://codeclimate.com/github/damian/jshint.png)](https://codeclimate.com/github/damian/jshint) [![Coverage Status](https://coveralls.io/repos/damian/jshint/badge.png?branch=master)](https://coveralls.io/r/damian/jshint?branch=master) Making it easy to lint your JavaScript assets in any Rails 3.1+ application. ## Installation Add this line to your application's Gemfile: ```ruby group :development, :test do gem 'jshint' end ``` And then execute: ```ruby $ bundle ``` Run the generator: ```ruby bundle exec rake jshint:install_config ``` ## Usage To start using JSHint simply run the Rake task: ```ruby bundle exec rake jshint ``` This Rake task runs JSHint across all the JavaScript assets within the following three folders to ensure that they're lint free. Using that data it builds a report which is shown in STDOUT. ```bash your-rails-project/app/assets/javascripts your-rails-project/vendor/assets/javascripts your-rails-project/lib/assets/javascripts ``` ## Configuration JSHint has some configuration options. You can read the default configuration created by JSHint in your applications config folder. ```yaml # your-rails-project/config/jshint.yml files: ['**/*.js'] options: boss: true browser: true ... globals: jQuery: true $: true ``` For more configuration options see the [JSHint documentation](http://jshint.com/docs/options/). ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jshint-1.1.1 | README.md |
jshint-1.0.1 | README.md |
jshint-1.0.0 | README.md |