grunt-ng-constant icon indicating copy to clipboard operation
grunt-ng-constant copied to clipboard

Issue with no-shadow-restricted-names ESLint rule

Open skylarmb opened this issue 6 years ago • 1 comments

Using the wrap: true option results in the module being wrapped in

(function(angular, undefined) {
    ...
})(angular);

Passing undefined as an argument conflicts with best practices and the no-shadow-restricted-names rule in ESLint. This should not be the default behavior of wrap: true in my opinion.

https://eslint.org/docs/rules/no-shadow-restricted-names

A workaround for now is defining my own wrap function.

skylarmb avatar Nov 30 '17 19:11 skylarmb

In generell I would not recommend to lint auto generated files, but this is another story.

What you do is the way to go, for everything that does not fit your needs.

Changing the wrapper could lead to other problems for other users. If I will release a version 3 of this task I would totally agree this is the way to go.

mlegenhausen avatar Dec 05 '17 08:12 mlegenhausen