From 1845f2e31adc6f9b1513b779f44e3bd347d6fd11 Mon Sep 17 00:00:00 2001 From: Markus Doits Date: Sun, 11 Sep 2016 14:49:59 +0200 Subject: Allow to set config with `.pronto_eslint_npm.yml` Make configuration dependent on instance instead of class, too. --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'README.md') diff --git a/README.md b/README.md index 4fb2cdc..9ee2e19 100644 --- a/README.md +++ b/README.md @@ -17,9 +17,30 @@ You'll need to install [eslint by yourself with npm][eslint-install]. [eslint-install]: http://eslint.org/docs/user-guide/getting-started -## Configuration +## Configuration of ESLint Configuring ESLint via [.eslintrc and consorts][eslintrc] and excludes via [.eslintignore][eslintignore] will work just fine with pronto-eslint. [eslintrc]: http://eslint.org/docs/user-guide/configuring#configuration-file-formats + [eslintignore]: http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories + +## Configuration of ESLintNPM + +Pronto::ESLintNPM can be configured by placing a `.pronto_eslint_npm.yml` inside the directory +where pronto is run. + +Following options are available: + +| Option | Meaning | Default | +| ----------------- | --------------------------------------------------------------------------------- | ----------------------------------- | +| eslint_executable | ESLint executable to call | `eslint` (calls `eslint` in `PATH`) | +| files_to_lint | What files to lint. Absolute path of the file will be matched against this regexp | `(\.js|\.es6)$` | + +Example configuration to call custom eslint executable and only lint files ending with `.my_custom_extension`: + +```yaml +# .pronto_eslint_npm.yaml +eslint_executable: '/my/cusom/node/path/.bin/eslint' +files_to_lint: '\.my_custom_extension$' +``` -- cgit v1.2.3