X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=README.md;h=5e53859dfe479dbf60c4745e8a4fdbc5f0cab05c;hb=49fbdde567507bf05ee68685d3163ad151be3d1d;hp=e9aa8e97807ed4a773f8cec9e908751aa806cf9c;hpb=ce89f9ed8a80a06d26b0618658733956d0c98f84;p=github%2Ffretlink%2Fpronto-hlint.git diff --git a/README.md b/README.md index e9aa8e9..5e53859 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,45 @@ -# Pronto runner for ESLint +# Pronto runner for ESLint (using eslint from npm) -[![Code Climate](https://codeclimate.com/github/mmozuras/pronto-eslint.png)](https://codeclimate.com/github/mmozuras/pronto-eslint) -[![Build Status](https://travis-ci.org/mmozuras/pronto-eslint.png)](https://travis-ci.org/mmozuras/pronto-eslint) -[![Gem Version](https://badge.fury.io/rb/pronto-eslint.png)](http://badge.fury.io/rb/pronto-eslint) -[![Dependency Status](https://gemnasium.com/mmozuras/pronto-eslint.png)](https://gemnasium.com/mmozuras/pronto-eslint) +[![Code Climate](https://codeclimate.com/github/doits/pronto-eslint_npm.svg)](https://codeclimate.com/github/doits/pronto-eslint_npm) +[![Build Status](https://travis-ci.org/doits/pronto-eslint_npm.svg?branch=master)](https://travis-ci.org/doits/pronto-eslint_npm) +[![Gem Version](https://badge.fury.io/rb/pronto-eslint_npm.svg)](http://badge.fury.io/rb/pronto-eslint_npm) +[![Dependency Status](https://gemnasium.com/doits/pronto-eslint_npm.svg)](https://gemnasium.com/doits/pronto-eslint_npm) Pronto runner for [ESlint](http://eslint.org), pluggable linting utility for JavaScript and JSX. [What is Pronto?](https://github.com/mmozuras/pronto) +Uses official eslint executable installed by `npm` in contrast to [pronto-eslint][pronto-eslint]. + +[pronto-eslint]: https://github.com/mmozuras/pronto-eslint + ## Prerequisites -You'll need to install one of the runtimes supported by [ExecJS](https://github.com/sstephenson/execjs#execjs). +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)). + +[eslint-install]: http://eslint.org/docs/user-guide/getting-started + +## Configuration of ESLint + +Configuring ESLint via [.eslintrc and consorts][eslintrc] and excludes via [.eslintignore][eslintignore] will work just fine with pronto-eslint-npm. + +[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-eslint-npm 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 offending file will be matched against this Regexp. | `(\.js|\.es6)$` | -## Configuration +Example configuration to call custom eslint executable and only lint files ending with `.my_custom_extension`: -Configuring ESLint via .eslintrc will work just fine with pronto-eslint. +```yaml +# .pronto_eslint_npm.yaml +eslint_executable: '/my/custom/node/path/.bin/eslint' +files_to_lint: '\.my_custom_extension$' +```