-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Update no-dynamic-require.md #693
Conversation
require('../name' + name); it should not be passed
@@ -18,7 +18,5 @@ require(name()); | |||
### Pass | |||
|
|||
```js | |||
require('../name'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't a dynamic require, and it should pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, but it seems like it is duplicated a bit below.
@yooungt13 If you could, instead of removing it, replace it by a library import (like lodash
), that might be better for the purpose of the example :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought the purpose was to illustrate that both a string literal, and a template literal with no interpolations, would pass?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aah... yes, you're right. I totally missed the difference in quotes. Yes, this line should stay as it was.
Thanks @yooungt13, good catch :) I'm fine with this, but I left a comment to improve this if you don't mind :) |
I fixed the issue. Thanks again for reporting this @yooungt13! |
require('../name' + name);
it should not be passed