Closed KylePDavis closed 9 years ago
@KylePDavis I understand your problem.
At first I have forked tern angular from marijnh/tern : tern/plugin/angular.js #L405 for AngularJS Eclipse https://github.com/angelozerr/angularjs-eclipse to improve it and to get list of directives, controller. See https://github.com/angelozerr/angularjs-eclipse/wiki/Angular-Explorer-View
Your problem is because tern doesn't provide the capability to declare several type for the same function. I think to resolve this problem a custom !lint should be developped for angular. It was in my scope to do that. I must just find time to do that.
@angelozerr, thanks for the additional information (and confirmation about typing in marijnh/tern). I just wanted to make sure that the issue was reported.
I think I can workaround most of this for now by removing the DI Arrays from my source code and add a build step to put them back before minification / mangling.
@KylePDavis I'm workinh on again about my fork of tern angular. I have created the project at https://github.com/angelozerr/tern-angularjs and I'm writing tests (I would like to have a lot of tests).
I think your lint problem is not difficult to fix it. It should be really cool if you could create an issues per problem (with a sample) at https://github.com/angelozerr/tern-angularjs
I will fix it. After that you will able to copy/paste https://github.com/angelozerr/tern-angularjs/blob/master/angular.js in your tern/plugin/angular.js
I have the attention to contribute to official tern plugin with my fork.
@KylePDavis fix was very easy https://github.com/angelozerr/tern-angularjs/commit/2d638d39e698e605b25c097539678fc94aad6456#diff-682a0dacb1474ac05ce433b2e5af0aafR1250 (multi parameter)
When using both the
lint
and theangular
plugins forternjs
and using strict dependency injection I get warnings about invalid parameters.Example code:
I get the following linter warning:
Not sure if this is an issue with the
angular
plugin or thelint
plugin or both. I found thetern
type info in theangular
plugin here:It would be nice if we could figure out a way to make functions with more than one signature work properly though.
I can't really use the
lint
plugin for any of my large projects until this works.