0.02
No release in over 3 years
Low commit activity in last 3 years
A Danger plugin for linting javascript with eslint.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.3
~> 2.14
= 3.0.7
>= 0
~> 10.0
~> 3.4
~> 0.49
~> 0.9.11

Runtime

 Project Readme

Gem Gem Gem Travis branch

danger-eslint

A Danger plugin for eslint.

Installation

$ gem install danger-eslint

eslint also needs to be installed(global or local) before you run Danger, Please check the installation guide danger-eslint will first try local node_module/.bin/eslint then the global eslint.

Usage

Run lint without and configuration will do the samething as run eslint .
All lint result will send as individual comment. If your are using Github, the comment will show as a inline comment directly on the violation's position if possiable.

eslint.lint

Also, you can pass a config file or eslintignore file to danger-eslint with:

eslint.config_file = /path/yourconfig
eslint.ignore_file = /path/yourigonre
eslint.lint

If you want to lint only new/modified files. You can achieve that with setting the filtering parameter to true.

eslint.filtering = true
eslint.lint

If you want to lint files with specified extension, you can set extensions to the target_extensions parameter.
The default value is ['.js']. In the case of the example below, the value will be ['.js', '.es6'].

eslint.target_extensions += %W(.es6)
eslint.lint

If you want to specify eslint's bin file, you can set a bin path to the bin_path parameter.

eslint.bin_path = "/hoge/node_modules/.bin/eslint"
eslint.lint

Development

  1. Clone this repo
  2. Run bundle install to setup dependencies.
  3. Run bundle exec rake spec to run the tests.
  4. Use bundle exec guard to automatically have tests run as you make changes.
  5. Make your changes.