https://github.com/heavenshell/vim-eslint-config
Wrapper for ESLint [deprecated]
https://github.com/heavenshell/vim-eslint-config
Last synced: 5 months ago
JSON representation
Wrapper for ESLint [deprecated]
- Host: GitHub
- URL: https://github.com/heavenshell/vim-eslint-config
- Owner: heavenshell
- License: bsd-3-clause
- Created: 2016-09-19T07:20:18.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-10-03T14:34:58.000Z (over 9 years ago)
- Last Synced: 2026-01-17T11:55:19.334Z (5 months ago)
- Language: VimL
- Homepage:
- Size: 6.84 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vim-eslint-config
Wrapper for [eslint](https://eslint.github.io/).
## Motivations
I want to load `eslint` config file dynamically.
[Syntastic](https://github.com/scrooloose/syntastic) can use `eslint` but not support config file.
[watchdocs.vim](https://github.com/osyo-manga/vim-watchdogs) also has `eslint` settings but not supporting config file.
## Configure
Add `eslint` config file name to your `.vimrc`.
```viml
" eslint.vim {{{
let g:eslint_configs = [
\ 'eslint-config-standard',
\ 'eslint-config-airbnb',
\ '.eslintrc.js'
\ ]
" }}}
```
## Usage
```viml
:Eslint
```
If you did not set any args, `vim-eslint` would search `g:eslint_configs`'s value and if config found, use it.
```viml
:Eslint -c eslint-config-standard
```
You can select `eslint` config file via command line.
```viml
:silent make|redraw|copen
```
Execute `eslint` via `:make`.
## Helpful plugins
[QuickFixstatus](https://github.com/dannyob/quickfixstatus) shows error message at the bottom of the screen.
[Hier](https://github.com/cohama/vim-hier) will highlight `quickfix` errors and location list entries in buffer.
## Integration
`vim-eslint` can integrate with [watchdocs.vim](https://github.com/osyo-manga/vim-watchdogs).
Configure followings to your `.vimrc`.
```viml
" Enable vim-eslint config
let g:quickrun_config['javascript/watchdogs_checker'] = {
\ 'type': 'watchdogs_checker/eslint',
\ 'hook/watchdogs_quickrun_running_eslint/enable': 1,
\ }
```
Run `watchdocs.vim`.
```viml
:WatchdogsRun
```
Run `Eslint and WatchdogsRun` at once.
```viml
:EslintRun -c eslint-config-standard
```