Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Javascript validation with Tern lint #7090

Closed
angelozerr opened this issue Mar 5, 2014 · 4 comments
Closed

Javascript validation with Tern lint #7090

angelozerr opened this issue Mar 5, 2014 · 4 comments

Comments

@angelozerr
Copy link

Hi bracket guys,

I would like to know if could interest to work together about managing validation with Tern? The basic idea is to provide a tern plugin to use the file ast and validate the JS file. I have started to implement a simple POC which validates the property of object (ex : document.getEl add a warn message which says "getEl" is a unknown property).

Here a screenshot with CodeMirror :

ternlintdemo

I have spoken about this feature to Marijn but he wishes not to integrate it to tern, because he has no time to maintain it. See my message at https://groups.google.com/forum/#!topic/codemirror/uHgcDjh6yRc

Hope this idea could interest you.

Regards Angelo

@dangoor
Copy link
Contributor

dangoor commented Mar 12, 2014

Hi Angelo,

This would be an interesting experiment, but there will likely be some issues because of how dynamic JS is. It's hard to know for sure when something is defined or not.

I'd suggest bringing this up on the brackets-dev googlegroup to see if there are others who want to explore this with you. (I've also given this issue the Extension Idea label which some people search for when looking for things to build)

@dangoor dangoor closed this as completed Mar 12, 2014
@angelozerr
Copy link
Author

Hi dangoor,

Thank's for your answer. Just for your info, you can find my start o ftern lint at https://github.com/angelozerr/tern.java/blob/master/core/tern.server.nodejs/node_modules/tern/plugin/lint.js

Regards Angelo

@dangoor
Copy link
Contributor

dangoor commented Mar 14, 2014

Cool! Definitely bring it up on brackets-dev when you want to share it more broadly!

@angelozerr
Copy link
Author

Jus for your information, I have created https://github.com/angelozerr/tern.lint project. It contains both tern lint plugin and CodeMirror lint addon which uses this tern lint plugin.

Any contribution are welcome!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants