We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I get the following error, when using $inject DI pattern rule for a function without parameters.
C:\Development\MyApp\app\common\helpViewer\helpBtn.directive.js 15:5 error You should use the $inject syntax for DI angular/di
Function Body: (function() { 'use strict';
angular.module('app.common') .directive('appHelpBtn', helpBtn); /** * Help button template generator * @name appHelpBtn * @memberof app.common * @class * @example * <app-help-btn link="help/something.html"></app-help-btn> */ function helpBtn() { return { restrict: 'AE', scope: { classes: '@class', link: '@' }, template: [ '<a ng-href="{{link}}" href="#" ng-classes="classes"', 'title="Show help for this view" app-help-viewer="{{link}}">', '<i class="fa fa-lg fa-question"></i>', '</a>' ].join('') }; }
})();
Rule defined in .eslintrc.json file "angular/di": [ 2, "$inject" ]
"angular/di": [ 2, "$inject" ]
Plugins in use "eslint-config-angular": "~0.5.0" "eslint-config-google": "~0.7.1" "eslint-plugin-angular": "~1.6.1" "gulp-eslint": "~3.0.1", "gulp": "~3.9.1"
Workaround: Add this line after declaring the directive.
helpBtn.$inject = [];
The text was updated successfully, but these errors were encountered:
Issue #442 DI validation error for a function without parameters
3d33cde
EmmanuelDemey
No branches or pull requests
I get the following error, when using $inject DI pattern rule for a function without parameters.
Function Body:
(function() {
'use strict';
})();
Rule defined in .eslintrc.json file
"angular/di": [ 2, "$inject" ]
Plugins in use
"eslint-config-angular": "~0.5.0"
"eslint-config-google": "~0.7.1"
"eslint-plugin-angular": "~1.6.1"
"gulp-eslint": "~3.0.1",
"gulp": "~3.9.1"
Workaround:
Add this line after declaring the directive.
helpBtn.$inject = [];
The text was updated successfully, but these errors were encountered: