diff options
-rw-r--r-- | README.md | 19 |
1 files changed, 9 insertions, 10 deletions
@@ -7,19 +7,19 @@ | |||
7 | 7 | ||
8 | Pronto runner for [ESlint](http://eslint.org), pluggable linting utility for JavaScript and JSX. [What is Pronto?](https://github.com/mmozuras/pronto) | 8 | Pronto runner for [ESlint](http://eslint.org), pluggable linting utility for JavaScript and JSX. [What is Pronto?](https://github.com/mmozuras/pronto) |
9 | 9 | ||
10 | Uses system wide installed eslint in contrast to [pronto-eslint][pronto-eslint]. | 10 | Uses official eslint executable installed by `npm` in contrast to [pronto-eslint][pronto-eslint]. |
11 | 11 | ||
12 | [pronto-eslint]: https://github.com/mmozuras/pronto-eslint | 12 | [pronto-eslint]: https://github.com/mmozuras/pronto-eslint |
13 | 13 | ||
14 | ## Prerequisites | 14 | ## Prerequisites |
15 | 15 | ||
16 | You'll need to install [eslint by yourself with npm][eslint-install]. | 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 | 17 | ||
18 | [eslint-install]: http://eslint.org/docs/user-guide/getting-started | 18 | [eslint-install]: http://eslint.org/docs/user-guide/getting-started |
19 | 19 | ||
20 | ## Configuration of ESLint | 20 | ## Configuration of ESLint |
21 | 21 | ||
22 | Configuring ESLint via [.eslintrc and consorts][eslintrc] and excludes via [.eslintignore][eslintignore] will work just fine with pronto-eslint. | 22 | Configuring ESLint via [.eslintrc and consorts][eslintrc] and excludes via [.eslintignore][eslintignore] will work just fine with pronto-eslint-npm. |
23 | 23 | ||
24 | [eslintrc]: http://eslint.org/docs/user-guide/configuring#configuration-file-formats | 24 | [eslintrc]: http://eslint.org/docs/user-guide/configuring#configuration-file-formats |
25 | 25 | ||
@@ -27,20 +27,19 @@ Configuring ESLint via [.eslintrc and consorts][eslintrc] and excludes via [.esl | |||
27 | 27 | ||
28 | ## Configuration of ESLintNPM | 28 | ## Configuration of ESLintNPM |
29 | 29 | ||
30 | Pronto::ESLintNPM can be configured by placing a `.pronto_eslint_npm.yml` inside the directory | 30 | pronto-eslint-npm can be configured by placing a `.pronto_eslint_npm.yml` inside the directory where pronto is run. |
31 | where pronto is run. | ||
32 | 31 | ||
33 | Following options are available: | 32 | Following options are available: |
34 | 33 | ||
35 | | Option | Meaning | Default | | 34 | | Option | Meaning | Default | |
36 | | ----------------- | --------------------------------------------------------------------------------- | ----------------------------------- | | 35 | | ----------------- | ---------------------------------------------------------------------------------------- | ----------------------------------- | |
37 | | eslint_executable | ESLint executable to call | `eslint` (calls `eslint` in `PATH`) | | 36 | | 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)$` | | 37 | | files_to_lint | What files to lint. Absolute path of offending file will be matched against this Regexp. | `(\.js|\.es6)$` | |
39 | 38 | ||
40 | Example configuration to call custom eslint executable and only lint files ending with `.my_custom_extension`: | 39 | Example configuration to call custom eslint executable and only lint files ending with `.my_custom_extension`: |
41 | 40 | ||
42 | ```yaml | 41 | ```yaml |
43 | # .pronto_eslint_npm.yaml | 42 | # .pronto_eslint_npm.yaml |
44 | eslint_executable: '/my/cusom/node/path/.bin/eslint' | 43 | eslint_executable: '/my/custom/node/path/.bin/eslint' |
45 | files_to_lint: '\.my_custom_extension$' | 44 | files_to_lint: '\.my_custom_extension$' |
46 | ``` | 45 | ``` |