---
title: "Integrating JavaScriptLint with mvim"
description: "Use JavaScriptLin in mac vim."
canonical_url: "https://www.bigbinary.com/blog/integrating-javascriptlint-with-mvim-and-getting-rid-of-annoying-warnings"
markdown_url: "https://www.bigbinary.com/blog/integrating-javascriptlint-with-mvim-and-getting-rid-of-annoying-warnings.md"
---

# Integrating JavaScriptLint with mvim

Use JavaScriptLin in mac vim.

- Author: Neeraj Singh
- Published: September 8, 2009
- Categories: JavaScript

I use [JavaScriptLint](http://www.javascriptlint.com) along with
[JavaScriptLint.vim](http://www.vim.org/scripts/script.php?script_id=2578) on
mvim to catch any JavaScript syntax error or missing semicolons. It works great
except in cases when I am chaining methods like this.

```javascript
var select_col1 = $("<select></select>")
  .addClass("ram_drop_down")
  .addClass("ram_drop_down_col1")
  .attr("name", "adv_search[" + random_num + "_row][col1]")
  .attr("id", random_num + "_ram_drop_down_col1");
```

In such cases JavaScriptLint had warnings for me.

```plaintext
unexpected end of line. It is ambiguous whether these lines are part of the same statement.
```

JavaScriptLint wants me to put the dot at the end of the line and not at the
beginning of the line. Well, I like having dots at the beginning of lines and I
wanted to turn off such warning.

JavaScriptLint comes with a default config file. I copied the config file to a
personal directory and disabled the warning.

```plaintext
before: +ambiguous_newline
after: -ambiguous_newline
```

Also I had to comment out `+process jsl-test.js` at the very bottom. Now tell
your plugin to use this configuration file rather than the default one. Add the
following line to your vimrc file.

```plaintext
let jslint_command_options = '-conf "/Users/neeraj/vim/plugin/jslint/jsl.custom.conf" -nofilelisting -nocontext -nosummary -nologo -process'
```

[This is the vim settings](http://github.com/neerajsingh0101/vim/tree/master) I
use and it has been configured to take care of it. Just go to `vimrc.local` and
change the path to your config file. Also don't forget to remove `"` at the
beginning of the line to uncomment it.

## Links

- [Human page](https://www.bigbinary.com/blog/integrating-javascriptlint-with-mvim-and-getting-rid-of-annoying-warnings)
