Add ng-anotate support
The rules should check this : 1)
var app = angular.module('hello');
app.factory(function(toto, titi) {'ngInject';});
But with ng-annotate implicit annotation, it becomes useless.
var app = angular.module('hello');
app.factory(factoryFn);
var factoryFn= function(toto, titi) {'ngInject';}
But with ng-annotate implicit annotation (managing reference), it becomes also useless.
import { factoryFn} from './hello.factory.js';
angular.module('hello').factory(factoryFn);
and in the ./hello.factory.js file
export const factoryFn = function(toto, titi) {'ngInject';}
This last one would be interesting to have but I am not sure that eslint does like tslint, ie linting accross files.
Meanwhile, using ng-strict-di is the best way to verify that there is no DI error. And it is also the recommanded one.
For my point of view, this ng-annotate eslint rule should be abandonned.
I don't think this has everything to do with di-error, is about DRY, why would you keep in sync two sets of the same names?, if there is a tool that can do it for you 😎