Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Switch from JSCS to Eslint #1975

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -373,17 +373,17 @@ project's root rather than the current directory...__

A. You can set up an `autocmd` to search for the configuration file in the
current directory and upwards, and add it to the checker's options when found.
For example for `jscs`:
For example for `eslint`:

```vim
function! FindConfig(prefix, what, where)
let cfg = findfile(a:what, escape(a:where, ' ') . ';')
return cfg !=# '' ? ' ' . a:prefix . ' ' . shellescape(cfg) : ''
endfunction

autocmd FileType javascript let b:syntastic_javascript_jscs_args =
\ get(g:, 'syntastic_javascript_jscs_args', '') .
\ FindConfig('-c', '.jscsrc', expand('<afile>:p:h', 1))
autocmd FileType javascript let b:syntastic_javascript_eslint_args =
\ get(g:, 'syntastic_javascript_eslint_args', '') .
\ FindConfig('-c', '.eslintrc', expand('<afile>:p:h', 1))
```

<a name="faqstyle"></a>
Expand Down