<commit_before>lein-jslint
===========

[JSLint](https://github.com/reid/node-jslint) is a static code analysis tool used in software development for checking if JavaScript source code complies with coding rules.

[lein-jslint](https://github.com/vbauer/lein-jslint) is a Leiningen plugin for running javascript code through JSLint.


Pre-requirements
================

Install [NodeJS](http://nodejs.org/) and [NPM](https://github.com/npm/npm) (package manager for Node) to install JSHint:

On Ubuntu:
```
sudo apt-get install nodejs
```
On Mac OS X:
```
brew install node
```


Installation
============


To enable lein-jslint for your project, put the following in the :plugins vector of your project.clj file:

![latest-version](https://clojars.org/lein-jslint/latest-version.svg)

[![Build Status](https://travis-ci.org/vbauer/lein-jslint.svg?branch=master)](https://travis-ci.org/vbauer/lein-jslint)
[![Dependencies Status](http://jarkeeper.com/vbauer/lein-jslint/status.png)](http://jarkeeper.com/vbauer/lein-jslint)

Install [JSLint](https://www.npmjs.org/package/jslint) to use lein-jslint plugin. It could be done in few ways:

- Use NPM to install JSLint globally:
```
npm install jslint -g
```
- You can also install JSLint in the current directory:
```
npm install jslint
```
- Use [lein-npm](https://github.com/bodil/lein-npm) plugin:
```
lein npm install
```
- Use just Leiningen:
```
lein deps
```

To enable this plugin in compile stage, use the following hook:
```clojure
:hooks [lein-jslint.plugin]
```


Configuration
=============

You can specify places, where JS files will be located with:
```clojure
:jslint {
  :includes ["resources/public/js/*.js"
             "resources/js/*.js"]
}
```

You can also specify JS files that should be excluded from checking:
```clojure
:jslint { :excludes ["resources/public/lib/*.js"] }
```

To specify *:includes* and *:excludes* options, it is possible to use <a href="http://en.wikipedia.org/wiki/Glob_(programming)">Glob Patterns</a>.

JSLint rules could be configured with *:config* parameter:
```clojure
; It specifies which JSLint options to turn on or off
:jslint {
  :config {:predef {"angular" "console" "$"}
           :nomen true
           :es5 true
           :eqeq true
           ...}}
```

You can use both variants to specify keys: string values or keywords.

All available parameters are described in the official documentation here: http://www.jslint.com/lint.html


Examples
========

Detailed example
----------------

```clojure
:jslint {
  :includes ["resources/public/js/*.js"]

  ; This configuration is used by default
  :config {:confusion    true
           :continue     true
           :css          true
           :es5          true
           :fragment     true
           :regexp       true
           :unparam      true
           :vars         true
           :validthis    true
           :strict_mode  true}}
```
Another example of configuration file: [.jslintrc](https://gist.github.com/irae/2764095)


Example project
---------------

Just clone the current repository and try to play with [example project](https://github.com/vbauer/lein-jslint/tree/master/example) for better understanding how to use lein-jslint.


Thanks to
=========

[Douglas Crockford](http://www.crockford.com) for the great [JSLint](https://github.com/douglascrockford/JSLint) project.


Might also like
===============

* [lein-asciidoctor](https://github.com/asciidoctor/asciidoctor-lein-plugin) - A Leiningen plugin for generating documentation using Asciidoctor.
* [lein-jshint](https://github.com/vbauer/lein-jshint) - a Leiningen plugin for running javascript code through JSHint.
* [lein-plantuml](https://github.com/vbauer/lein-plantuml) - a Leiningen plugin for generating UML diagrams using PlantUML.


License
=======

Copyright © 2014 <NAME>

Distributed under the Eclipse Public License, the same as Clojure.<commit_msg>Update README.md: add information about lein-coffeescript<commit_after>lein-jslint
===========

[JSLint](https://github.com/reid/node-jslint) is a static code analysis tool used in software development for checking if JavaScript source code complies with coding rules.

[lein-jslint](https://github.com/vbauer/lein-jslint) is a Leiningen plugin for running javascript code through JSLint.


Pre-requirements
================

Install [NodeJS](http://nodejs.org/) and [NPM](https://github.com/npm/npm) (package manager for Node) to install JSHint:

On Ubuntu:
```
sudo apt-get install nodejs
```
On Mac OS X:
```
brew install node
```


Installation
============


To enable lein-jslint for your project, put the following in the :plugins vector of your project.clj file:

![latest-version](https://clojars.org/lein-jslint/latest-version.svg)

[![Build Status](https://travis-ci.org/vbauer/lein-jslint.svg?branch=master)](https://travis-ci.org/vbauer/lein-jslint)
[![Dependencies Status](http://jarkeeper.com/vbauer/lein-jslint/status.png)](http://jarkeeper.com/vbauer/lein-jslint)

Install [JSLint](https://www.npmjs.org/package/jslint) to use lein-jslint plugin. It could be done in few ways:

- Use NPM to install JSLint globally:
```
npm install jslint -g
```
- You can also install JSLint in the current directory:
```
npm install jslint
```
- Use [lein-npm](https://github.com/bodil/lein-npm) plugin:
```
lein npm install
```
- Use just Leiningen:
```
lein deps
```

To enable this plugin in compile stage, use the following hook:
```clojure
:hooks [lein-jslint.plugin]
```


Configuration
=============

You can specify places, where JS files will be located with:
```clojure
:jslint {
  :includes ["resources/public/js/*.js"
             "resources/js/*.js"]
}
```

You can also specify JS files that should be excluded from checking:
```clojure
:jslint { :excludes ["resources/public/lib/*.js"] }
```

To specify *:includes* and *:excludes* options, it is possible to use <a href="http://en.wikipedia.org/wiki/Glob_(programming)">Glob Patterns</a>.

JSLint rules could be configured with *:config* parameter:
```clojure
; It specifies which JSLint options to turn on or off
:jslint {
  :config {:predef {"angular" "console" "$"}
           :nomen true
           :es5 true
           :eqeq true
           ...}}
```

You can use both variants to specify keys: string values or keywords.

All available parameters are described in the official documentation here: http://www.jslint.com/lint.html


Examples
========

Detailed example
----------------

```clojure
:jslint {
  :includes ["resources/public/js/*.js"]

  ; This configuration is used by default
  :config {:confusion    true
           :continue     true
           :css          true
           :es5          true
           :fragment     true
           :regexp       true
           :unparam      true
           :vars         true
           :validthis    true
           :strict_mode  true}}
```
Another example of configuration file: [.jslintrc](https://gist.github.com/irae/2764095)


Example project
---------------

Just clone the current repository and try to play with [example project](https://github.com/vbauer/lein-jslint/tree/master/example) for better understanding how to use lein-jslint.


Thanks to
=========

[<NAME>](http://www.crockford.com) for the great [JSLint](https://github.com/douglascrockford/JSLint) project.


Might also like
===============

* [lein-asciidoctor](https://github.com/asciidoctor/asciidoctor-lein-plugin) - A Leiningen plugin for generating documentation using Asciidoctor.
* [lein-plantuml](https://github.com/vbauer/lein-plantuml) - a Leiningen plugin for generating UML diagrams using PlantUML.
* [lein-coffeescript](https://github.com/vbauer/lein-coffeescript) - a Leiningen plugin for running CoffeeScript compiler.
* [lein-jshint](https://github.com/vbauer/lein-jshint) - a Leiningen plugin for running javascript code through JSHint.


License
=======

Copyright © 2014 <NAME>

Distributed under the Eclipse Public License, the same as Clojure.
{'fraction_non_alphanumeric': 0.14840812233642517, 'fraction_numerical': 0.0032589621459012284, 'mean_word_length': 3.5028216704288937, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 29, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '31005', 'n_tokens_mistral': 2631, 'n_tokens_neox': 2442, 'n_words': 727}