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

Validation for goog.require('classWichDoesn'tExists #2

Open
angelozerr opened this issue Jul 21, 2014 · 3 comments
Open

Validation for goog.require('classWichDoesn'tExists #2

angelozerr opened this issue Jul 21, 2014 · 3 comments

Comments

@angelozerr
Copy link
Contributor

For your information, I have started tern lint https://github.com/angelozerr/tern.lint

You can validate too custom validation, like goog.require('classWichDoesn'tExists

I will happy to explain you how it works and we could discuss too how to improve it.

@jgiles
Copy link
Contributor

jgiles commented Aug 8, 2014

This could be tricky, since at the moment we are using goog.require to define stand-in types for required names. If we were going to do validation, we would have to depend on a file finder, and flag an error if the name wasn't found.
I'm not sure that we will be able to identify classes that aren't provided reliably enough to provide helpful lint errors.

@angelozerr
Copy link
Contributor Author

If we were going to do validation, we would have to depend on a file finder, and flag an error if the name wasn't found.

What is the problem with file finder? If you tell me that file finder is the solution, tern lint can manage that because you can define your own lint function.

@jgiles
Copy link
Contributor

jgiles commented Aug 9, 2014

The challenge is that a finder isn't always present, and also that finders operate asynchronously. We could probably make it work, though.

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