Skip to content
angelozerr edited this page May 29, 2015 · 1 revision

Editors

Today several JavaScript editors supports tern-lint :

CodeMirror :

Here a screenshot with tern lint and CodeMirror :

CodeMirror & TernLint

Eclipse :

If you are Eclipse user, you can use the tern lint.js too. See Tern IDE & Validation

Eclipse & TernLint

Emacs

Emacs & TernLint

See tern-lint.el for more information.

Atom

![Atom & TernLint] (https://camo.githubusercontent.com/2f6791e4df4362cdbaf3f3fff17db1af63f24314/687474703a2f2f7777772e746f626961732d73636875626572742e636f6d2f6769746875622f6769746875622d7465726e2d6c696e742e706e67)

See atom-ternjs for more information.

Other editors

If you wish to integrate the tern lint with an editor (Vim, Sublime, etc), here the JSON request to post to the tern server :

{
 "query": {
  "type": "lint",
  "file": "test.js",
  "files": [
   {
    "name": "test.js",
    "text": "var elt = document.getElementByIdXXX('myId');",
    "type": "full"
   }
  ]
 }
}

and the JSON response of the tern server :

{
 "messages": [
  {
   "message": "Unknow property 'getElementByIdXXX'",
   "from": 19,
   "to": 36,
   "severity": "warning"
  }
 ]
}

Contents

Clone this wiki locally