-
Notifications
You must be signed in to change notification settings - Fork 52
Tern Linter Lint
tern-lint provides the lint.js Tern plugin which is enable to validate your JS files. Please note, that this lint.js is experimetal.
Please read Validation Rules to know what this tern lint is able to validate.
After installing and converting your project as Tern Project, go at Tern project property, you can check the lint plugin.
In the following sample, we have checked browser tern definition :
Here sample validation with document#getElementById
. If you use known property :
var elt = document.getElementById('myId');
you will see no warnings :
If you use unknown property :
var elt = document.getElementByIdXXX('myId');
you will see the Unknown property 'getElementByIdXXX' warning :
Validation works too with Tern plugin. In the following sample, we have checked YUI tern plugin :
Here sample validation with YUI()#use
. If you use known property :
YUI().use('node', function(Y) {
Y.
});
you will see no warnings :
You can notice, that completion is available for the Y instance.
If you use unknown property :
YUI().useXXX('node', function(Y) {
Y.
});
you will see the Unknown property 'useXXX' warning :
You can notice, that completion is not available for the Y instance.
Please read here
- Tern IDE
- Tern Toolings
-
Tern Modules
- AngularJS
- AlloyUI
- Browser
- Bootstrap
- CKEditor
- CordovaJS
- Dojo Toolkit
- ECMAScript
- ExtJS
- Game
- jQuery
- JSDoc Support
- Liferay
- Meteor
- Node.js
- Qooxdoo
- snabbt.js
- RequireJS
- Tabris.js
- three.js
- Titanium
- YUI Library
- Completion
- Linter (Validator)
- Tests
- JavaScript Build
- New and Noteworthy