]>
Commit | Line | Data |
---|---|---|
5001cb27 | 1 | # Pronto runner for ESLint (using eslint from npm) |
ce89f9ed | 2 | |
126fe1e2 MD |
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) | |
ce89f9ed MM |
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 | ||
5001cb27 MD |
10 | Uses system wide installed eslint in contrast to [pronto-eslint][pronto-eslint]. |
11 | ||
1d19d52c | 12 | [pronto-eslint]: https://github.com/mmozuras/pronto-eslint |
5001cb27 | 13 | |
ce89f9ed MM |
14 | ## Prerequisites |
15 | ||
5001cb27 | 16 | You'll need to install [eslint by yourself with npm][eslint-install]. |
c2307793 MD |
17 | |
18 | [eslint-install]: http://eslint.org/docs/user-guide/getting-started | |
ce89f9ed | 19 | |
1845f2e3 | 20 | ## Configuration of ESLint |
ce89f9ed | 21 | |
c2307793 | 22 | Configuring ESLint via [.eslintrc and consorts][eslintrc] and excludes via [.eslintignore][eslintignore] will work just fine with pronto-eslint. |
676cea90 | 23 | |
c2307793 | 24 | [eslintrc]: http://eslint.org/docs/user-guide/configuring#configuration-file-formats |
1845f2e3 | 25 | |
676cea90 | 26 | [eslintignore]: http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories |
1845f2e3 MD |
27 | |
28 | ## Configuration of ESLintNPM | |
29 | ||
30 | Pronto::ESLintNPM can be configured by placing a `.pronto_eslint_npm.yml` inside the directory | |
31 | where pronto is run. | |
32 | ||
33 | Following options are available: | |
34 | ||
35 | | Option | Meaning | Default | | |
36 | | ----------------- | --------------------------------------------------------------------------------- | ----------------------------------- | | |
37 | | eslint_executable | ESLint executable to call | `eslint` (calls `eslint` in `PATH`) | | |
38 | | files_to_lint | What files to lint. Absolute path of the file will be matched against this regexp | `(\.js|\.es6)$` | | |
39 | ||
40 | Example configuration to call custom eslint executable and only lint files ending with `.my_custom_extension`: | |
41 | ||
42 | ```yaml | |
43 | # .pronto_eslint_npm.yaml | |
44 | eslint_executable: '/my/cusom/node/path/.bin/eslint' | |
45 | files_to_lint: '\.my_custom_extension$' | |
46 | ``` |