diff options
author | Markus Doits <markus.doits@stellenticket.de> | 2016-09-11 14:49:59 +0200 |
---|---|---|
committer | Markus Doits <markus.doits@stellenticket.de> | 2016-09-11 15:13:42 +0200 |
commit | 1845f2e31adc6f9b1513b779f44e3bd347d6fd11 (patch) | |
tree | 41d61b6b061234f0f1ccab2f86898386a3ee6bcf /README.md | |
parent | 3403f9d12247884c18ffe7a1636fe12c3fb0f0da (diff) | |
download | pronto-hlint-1845f2e31adc6f9b1513b779f44e3bd347d6fd11.tar.gz pronto-hlint-1845f2e31adc6f9b1513b779f44e3bd347d6fd11.tar.zst pronto-hlint-1845f2e31adc6f9b1513b779f44e3bd347d6fd11.zip |
Allow to set config with `.pronto_eslint_npm.yml`
Make configuration dependent on instance instead of class, too.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 23 |
1 files changed, 22 insertions, 1 deletions
@@ -17,9 +17,30 @@ You'll need to install [eslint by yourself with npm][eslint-install]. | |||
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 | 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. |
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 | [eslintignore]: http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories | 26 | [eslintignore]: http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories |
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 | ``` | ||