]> git.immae.eu Git - github/fretlink/pronto-hlint.git/blob - README.md
c17e25c0091dd2daf295273acc7fdd52f1ac1acf
[github/fretlink/pronto-hlint.git] / README.md
1 # Pronto runner for ESLint (using eslint from npm)
2
3 [![Code Climate](https://codeclimate.com/github/doits/pronto-eslint_npm.svg)](https://codeclimate.com/github/doits/pronto-eslint_npm)
4 [![Build Status](https://travis-ci.org/doits/pronto-eslint_npm.svg?branch=master)](https://travis-ci.org/doits/pronto-eslint_npm)
5 [![Gem Version](https://badge.fury.io/rb/pronto-eslint_npm.svg)](http://badge.fury.io/rb/pronto-eslint_npm)
6 [![Dependency Status](https://gemnasium.com/doits/pronto-eslint_npm.svg)](https://gemnasium.com/doits/pronto-eslint_npm)
7
8 Pronto runner for [ESlint](http://eslint.org), pluggable linting utility for JavaScript and JSX. [What is Pronto?](https://github.com/mmozuras/pronto)
9
10 Uses official eslint executable installed by `npm` in contrast to [pronto-eslint][pronto-eslint].
11
12 [pronto-eslint]: https://github.com/mmozuras/pronto-eslint
13
14 ## Prerequisites
15
16 You'll need to install [eslint by yourself with npm][eslint-install]. If `eslint` is in your `PATH`, everything will simply work, otherwise you have to provide pronto-eslint-npm your custom executable path (see [below](#configuration-of-eslintnpm)).
17
18 [eslint-install]: http://eslint.org/docs/user-guide/getting-started
19
20 ## Configuration of ESLint
21
22 Configuring ESLint via [.eslintrc and consorts][eslintrc] and excludes via [.eslintignore][eslintignore] will work just fine with pronto-eslint-npm.
23
24 [eslintrc]: http://eslint.org/docs/user-guide/configuring#configuration-file-formats
25
26 [eslintignore]: http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories
27
28 ## Configuration of ESLintNPM
29
30 pronto-eslint-npm can be configured by placing a `.pronto_eslint_npm.yml` inside the directory where pronto is run.
31
32 Following options are available:
33
34 | Option | Meaning | Default |
35 | ----------------- | ---------------------------------------------------------------------------------------- | ----------------------------------- |
36 | eslint_executable | ESLint executable to call. | `eslint` (calls `eslint` in `PATH`) |
37 | files_to_lint | What files to lint. Absolute path of offending file will be matched against this Regexp. | `(\.js|\.es6)$` |
38
39 Example configuration to call custom eslint executable and only lint files ending with `.my_custom_extension`:
40
41 ```yaml
42 # .pronto_eslint_npm.yml
43 eslint_executable: '/my/custom/node/path/.bin/eslint'
44 files_to_lint: '\.my_custom_extension$'
45 ```