Skip to content
New issue

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

Issue with no-shadow-restricted-names ESLint rule #58

Open
skylarmb opened this issue Nov 30, 2017 · 1 comment
Open

Issue with no-shadow-restricted-names ESLint rule #58

skylarmb opened this issue Nov 30, 2017 · 1 comment

Comments

@skylarmb
Copy link

skylarmb commented Nov 30, 2017

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.

@mlegenhausen
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants