Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leonhartx/danger-eslint
A Danger plugin for linting javascript with eslint.
https://github.com/leonhartx/danger-eslint
danger danger-plugin emcascript eslint javascript linter
Last synced: 2 months ago
JSON representation
A Danger plugin for linting javascript with eslint.
- Host: GitHub
- URL: https://github.com/leonhartx/danger-eslint
- Owner: leonhartX
- License: mit
- Created: 2017-06-16T07:20:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T22:36:41.000Z (almost 2 years ago)
- Last Synced: 2024-10-14T14:37:00.330Z (3 months ago)
- Topics: danger, danger-plugin, emcascript, eslint, javascript, linter
- Language: Ruby
- Homepage:
- Size: 32.2 KB
- Stars: 13
- Watchers: 2
- Forks: 12
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Gem](https://img.shields.io/gem/v/danger-eslint.svg)](https://rubygems.org/gems/danger-eslint)
[![Gem](https://img.shields.io/gem/dt/danger-eslint.svg)](https://rubygems.org/gems/danger-eslint)
[![Gem](https://img.shields.io/gem/dtv/danger-eslint.svg)](https://rubygems.org/gems/danger-eslint)
[![Travis branch](https://img.shields.io/travis/leonhartX/danger-eslint/master.svg)](https://travis-ci.org/leonhartX/danger-eslint)
# danger-eslintA [Danger](https://github.com/danger/danger) plugin for [eslint](http://eslint.org/).
## Installation
$ gem install danger-eslint
`eslint` also needs to be installed(global or local) before you run Danger, Please check the [installation guide](http://eslint.org/docs/user-guide/getting-started)
`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.lintIf 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.lintIf 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.