master fd5da4df8ba0 cached
3 files
2.5 KB
725 tokens
1 requests
Download .txt
Repository: mtscout6/syntastic-local-eslint.vim
Branch: master
Commit: fd5da4df8ba0
Files: 3
Total size: 2.5 KB

Directory structure:
gitextract_if1aaika/

├── LICENSE
├── README.md
└── ftplugin/
    └── javascript.vim

================================================
FILE CONTENTS
================================================

================================================
FILE: LICENSE
================================================
The MIT License (MIT)

Copyright (c) 2015 Matt Smith

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



================================================
FILE: README.md
================================================
# syntastic-local-eslint.vim

Prefer local repo install of eslint over global install with syntastic

Installation Instructions
-------------------------

Using [vim plugged](https://github.com/junegunn/vim-plug) you just need to add:

```
Plug 'mtscout6/syntastic-local-eslint.vim'
```

Inspired By
-----------

Inspired by http://blog.pixelastic.com/2015/10/05/use-local-eslint-in-syntastic/


================================================
FILE: ftplugin/javascript.vim
================================================
" return full path with the trailing slash
"  or an empty string if we're not in an npm project
fun! s:GetNodeModulesAbsPath ()
  let lcd_saved = fnameescape(getcwd())
  silent! exec "lcd" expand('%:p:h')
  let path = finddir('node_modules', '.;')
  exec "lcd" lcd_saved

  " fnamemodify will return full path with trailing slash;
  " if no node_modules found, we're safe
  return path is '' ? '' : fnamemodify(path, ':p')
endfun

" return full path of local eslint executable
"  or an empty string if no executable found
fun! s:GetEslintExec (node_modules)
  let eslint_guess = a:node_modules is '' ? '' : a:node_modules . '.bin/eslint'
  return exepath(eslint_guess)
endfun

" if eslint_exec found successfully, set it for the current buffer
fun! s:LetEslintExec (eslint_exec)
  if a:eslint_exec isnot ''
    let b:syntastic_javascript_eslint_exec = a:eslint_exec
  endif
endfun

fun! s:main ()
  let node_modules = s:GetNodeModulesAbsPath()
  let eslint_exec = s:GetEslintExec(node_modules)
  call s:LetEslintExec(eslint_exec)
endfun

call s:main()
Download .txt
gitextract_if1aaika/

├── LICENSE
├── README.md
└── ftplugin/
    └── javascript.vim
Condensed preview — 3 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (3K chars).
[
  {
    "path": "LICENSE",
    "chars": 1078,
    "preview": "The MIT License (MIT)\n\nCopyright (c) 2015 Matt Smith\n\nPermission is hereby granted, free of charge, to any person obtain"
  },
  {
    "path": "README.md",
    "chars": 394,
    "preview": "# syntastic-local-eslint.vim\n\nPrefer local repo install of eslint over global install with syntastic\n\nInstallation Instr"
  },
  {
    "path": "ftplugin/javascript.vim",
    "chars": 1052,
    "preview": "\" return full path with the trailing slash\n\"  or an empty string if we're not in an npm project\nfun! s:GetNodeModulesAbs"
  }
]

About this extraction

This page contains the full source code of the mtscout6/syntastic-local-eslint.vim GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 3 files (2.5 KB), approximately 725 tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!