-
-
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
"RangeError: Maximum call stack size exceeded" when file includes itself #210
Comments
Ah, dang. I think this should be fixed when I fix #200, and even if not, I will definitely add as a test case. Thanks! |
@benmosher this still happens when you do // test.js
export * from './test.js' |
That should be a runtime error; in other words, that code can't ever execute. However, this eslint plugin shouldn't crash; but any rule touching imports should probably error out on it. |
Somehow it’s been working in production for 10 months in TypeScript in GitHub Desktop. |
That seems like a Typescript bug then. |
Still, it seems like this plugin should parse invalid constructs, since the job of a linter is to warn you before you encounter a runtime (thrown or logic) error. |
Totally agree! I'll reopen this; hopefully someone can out in a PR that fixes it. |
Looks like this block should check if (remoteMap === m.path) return before calling |
.eslintrc:
import/named
seems to be required for this to fail. Without that rule, eslint exits without error (as in the file passes the check)Let's create a file that requires itself with the following code inside of it:
...and name it test.js:
Obviously it's a mistake that the file includes itself, but this plugin should warn, not crash, in that case.
The text was updated successfully, but these errors were encountered: