# broccoli-jshint

> Broccoli plugin to run JSHint

Latest version **2.1.0** (published 2016-03-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install broccoli-jshint
pnpm add broccoli-jshint
yarn add broccoli-jshint
bun add broccoli-jshint
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2016-03-09 |
| First published | 2014-04-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Robert Jackson |
| Maintainers | rwjblue, stefanpenner |
| Keywords | broccoli-plugin, jshint, javascript |

## Links

- npm: https://www.npmjs.com/package/broccoli-jshint
- Repository: https://github.com/rwjblue/broccoli-jshint
- Homepage: https://github.com/rwjblue/broccoli-jshint#readme
- Issues: https://github.com/rwjblue/broccoli-jshint/issues
- npm.io page: https://npm.io/package/broccoli-jshint

## Dependencies (6)

- [chalk](https://npm.io/package/chalk.md) ~0.4.0
- [jshint](https://npm.io/package/jshint.md) ^2.7.0
- [mkdirp](https://npm.io/package/mkdirp.md) ~0.4.0
- [findup-sync](https://npm.io/package/findup-sync.md) ^0.3.0
- [json-stable-stringify](https://npm.io/package/json-stable-stringify.md) ^1.0.0
- [broccoli-persistent-filter](https://npm.io/package/broccoli-persistent-filter.md) ^1.2.0

## Recent versions

- 2.1.0 (latest) — 2016-03-09
- 1.2.0 (release-1-x) — 2016-03-09
- 2.0.0 — 2016-03-08
- 1.1.2 — 2016-02-06
- 1.1.1 — 2015-12-07
- 1.1.0 — 2015-08-24
- 1.0.0 — 2015-08-20
- 0.5.8 — 2015-08-20
- 0.5.7 — 2015-08-20
- 0.5.6 — 2015-05-08
- 0.5.5 — 2015-02-28
- 0.5.4 — 2015-02-25
- 0.5.3 — 2014-09-29
- 0.5.2 — 2014-09-29
- 0.5.1 — 2014-06-14
- … 10 more at https://npm.io/package/broccoli-jshint/versions

## README

# Broccoli JSHint

[![Build Status](https://travis-ci.org/rwjblue/broccoli-jshint.svg?branch=master)](https://travis-ci.org/rwjblue/broccoli-jshint)

Run JSHint on the provided node.

## Usage

```javascript
var JSHinter = require('broccoli-jshint');

// Assuming someNode contains .js files
var node = new JSHinter(someNode);
```

## Documentation

### `new JSHinter(inputNode, options)`

---

`options.jshintrcRoot` *{String}*

Will look in the root of the provided node for a `.jshintrc`. If you would prefer to use another specific root
for looking up your JSHint config, supply this option.

Default: **input node root**

---

`options.jshintrcPath` *{String}*

Specify the path to the `.jshintrc` that you would like to use. Use this option if you would like to use a `.jshintrc`
file from a path that is not in the same hierarchy as your input node (if it is use the `.jshintrcRoot`).

Default: **undefined**

---

`options.log` *{true|false}*

Should we log errors to the console?

Default: **true**

---

`options.disableTestGenerator` *{true|false}*

If `true` tests will not be generated.

Default: **false**

---

`options.testGenerator` *{Function}*

The function used to generate test modules. You can provide a custom function for your client side testing framework of choice.

The function receives the following arguments:

* `relativePath` - The relative path to the file being tested.
* `errors` - A generated string of errors found.

Default generates QUnit style tests:

```javascript
var path = require('path');

function(relativePath, errors) {
  return "module('" + path.dirname(relativePath) + '");";
         "test('" + relativePath + "' should pass jshint', function() { " +
         "  ok(passed, moduleName+" should pass jshint."+(errors ? "\n"+errors : '')); " +
         "});
};
```
---

`options.console` *{Object}*

Allows you to provide a custom `console` object. This is useful if you have to supress console output in CI for example.

Default: **`console`**

---

`options.annotation` *{String}*

A human-readable description for this plugin instance.

Default: **undefined**

## ZOMG!!! TESTS?!?!!?

I know, right?

Running the tests:

```javascript
npm install
npm test
```

## License

This project is distributed under the MIT license.

---
_Source: https://npm.io/package/broccoli-jshint · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
