diff options
author | Paul Bonaud <paul.bonaud@fretlink.com> | 2019-04-13 16:38:04 +0200 |
---|---|---|
committer | Paul Bonaud <paul.bonaud@fretlink.com> | 2019-04-13 16:38:04 +0200 |
commit | 9c1df04756bd900c1ab61e98526ad6eaac8a7216 (patch) | |
tree | cf4048303525aa090d00d7a4a2977377cb6a99d1 /README.md | |
parent | 83414e23d7f03a7a939655f51b81c0792fff616a (diff) | |
download | pronto-hlint-9c1df04756bd900c1ab61e98526ad6eaac8a7216.tar.gz pronto-hlint-9c1df04756bd900c1ab61e98526ad6eaac8a7216.tar.zst pronto-hlint-9c1df04756bd900c1ab61e98526ad6eaac8a7216.zip |
Welcom pronto-hlint! This is a whole rewrite of pronto-eslint_npm.
Forking the pronto-eslint_npm repository to build a runner for hlint
haskell linter.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 43 |
1 files changed, 18 insertions, 25 deletions
@@ -1,46 +1,39 @@ | |||
1 | # Pronto runner for ESLint (using eslint from npm) | 1 | # Pronto runner for Hlint |
2 | 2 | ||
3 | [![Code Climate](https://codeclimate.com/github/doits/pronto-eslint_npm.svg)](https://codeclimate.com/github/doits/pronto-eslint_npm) | 3 | [![Build Status](https://travis-ci.org/fretlink/pronto-hlint.svg?branch=master)](https://travis-ci.org/fretlink/pronto-hlint) |
4 | [![Build Status](https://travis-ci.org/doits/pronto-eslint_npm.svg?branch=master)](https://travis-ci.org/doits/pronto-eslint_npm) | 4 | [![Gem Version](https://badge.fury.io/rb/pronto-hlint.svg)](http://badge.fury.io/rb/pronto-hlint) |
5 | [![Gem Version](https://badge.fury.io/rb/pronto-eslint_npm.svg)](http://badge.fury.io/rb/pronto-eslint_npm) | ||
6 | 5 | ||
7 | Pronto runner for [ESlint](http://eslint.org), pluggable linting utility for JavaScript and JSX. [What is Pronto?](https://github.com/mmozuras/pronto) | 6 | Pronto runner for [Hlint](https://hackage.haskell.org/package/hlint), pluggable linting utility for Haskell. [What is Pronto?](https://github.com/mmozuras/pronto) |
8 | |||
9 | Uses official eslint executable installed by `npm` in contrast to [pronto-eslint][pronto-eslint]. | ||
10 | |||
11 | [pronto-eslint]: https://github.com/mmozuras/pronto-eslint | ||
12 | 7 | ||
13 | ## Prerequisites | 8 | ## Prerequisites |
14 | 9 | ||
15 | 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)). | 10 | You'll need to install [hlint by yourself with cabal or stack][hlint-install]. If `hlint` is in your `PATH`, everything will simply work, otherwise you have to provide pronto-hlint your custom executable path (see [below](#configuration-of-hlint)). |
16 | |||
17 | [eslint-install]: http://eslint.org/docs/user-guide/getting-started | ||
18 | 11 | ||
19 | ## Configuration of ESLint | 12 | [hlint-install]: https://github.com/ndmitchell/hlint#installing-and-running-hlint |
20 | 13 | ||
21 | Configuring ESLint via [.eslintrc and consorts][eslintrc] and excludes via [.eslintignore][eslintignore] will work just fine with pronto-eslint-npm. | 14 | ## Configuration of Hlint |
22 | 15 | ||
23 | [eslintrc]: http://eslint.org/docs/user-guide/configuring#configuration-file-formats | 16 | Configuring Hlint via [.hlint.yaml][.hlint.yaml] will work just fine with pronto-hlint. |
24 | 17 | ||
25 | [eslintignore]: http://eslint.org/docs/user-guide/configuring#ignoring-files-and-directories | 18 | [.hlint.yaml]: https://github.com/ndmitchell/hlint#customizing-the-hints |
26 | 19 | ||
27 | ## Configuration of ESLintNPM | 20 | ## Configuration of Pronto-Hlint |
28 | 21 | ||
29 | pronto-eslint-npm can be configured by placing a `.pronto_eslint_npm.yml` inside the directory where pronto is run. | 22 | pronto-hlint can be configured by placing a `.pronto_hlint.yml` inside the directory where pronto will run. |
30 | 23 | ||
31 | Following options are available: | 24 | Following options are available: |
32 | 25 | ||
33 | | Option | Meaning | Default | | 26 | | Option | Meaning | Default | |
34 | | ----------------- | ---------------------------------------------------------------------------------------- | ----------------------------------- | | 27 | | ----------------- | ---------------------------------------------------------------------------------------- | ----------------------------------- | |
35 | | eslint_executable | ESLint executable to call. | `eslint` (calls `eslint` in `PATH`) | | 28 | | hlint_executable | Hlint executable to call. | `hlint` (calls `hlint` in `PATH`) | |
36 | | files_to_lint | What files to lint. Absolute path of offending file will be matched against this Regexp. | `(\.js|\.es6)$` | | 29 | | files_to_lint | What files to lint. Absolute path of offending file will be matched against this Regexp. | `(\.hs)$` | |
37 | | cmd_line_opts | Command line options to pass to eslint when running | '' | | 30 | | cmd_line_opts | Command line options to pass to hlint when running | `` | |
38 | 31 | ||
39 | Example configuration to call custom eslint executable and only lint files ending with `.my_custom_extension`: | 32 | Example configuration to call custom hlint executable and only lint files ending with `.my_custom_extension`: |
40 | 33 | ||
41 | ```yaml | 34 | ```yaml |
42 | # .pronto_eslint_npm.yml | 35 | # .pronto_hlint.yml |
43 | eslint_executable: '/my/custom/node/path/.bin/eslint' | 36 | hlint_executable: '/my/custom/path/.bin/hlint' |
44 | files_to_lint: '\.my_custom_extension$' | 37 | files_to_lint: '\.my_custom_extension$' |
45 | cmd_line_opts: '--ext .html,.js,.es6' | 38 | cmd_line_opts: '-j $(nproc) --typecheck' |
46 | ``` | 39 | ``` |