-
-
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
newline-after-import
breaks
#386
Comments
Sounds like somehow you've got a scope that isn't a I tried to conjure such a line. Couldn't figure it out. Without a reproduction, I'm not sure how to proceed. |
Have trouble reproducing it too 😕 |
It would be awesome if there was a way for the current file path to be part of the stack trace :-/ Could the code here perhaps just check if it's a |
That sounds like something that would be better integrated directly in ESLint. To debug your use-case, you could do what you said in your local If you could help us by doing that, that'd be great! |
Someone posted an issue about this on XO: xojs/xo#128 |
@ljharb 👍 That should definitely be added to ESLint. Can you open an issue there? It's indeed pretty annoying debugging broken rules when you have no idea where the error is coming from. |
@jfmengels the place where the error happens doesn't actually have That said, I'll try to play with the code in my local |
k, I've figured it out - there's a switch statement in our code that looks like this: switch (renderData.modalViewKey) {
case 'a':
return require('../path/to/template.hbs')(renderData, options);
case 'b':
return require('../path/to/template.hbs')(renderData, options);
case 'c':
return require('../path/to/template.hbs')(renderData, options);
case 'd':
return require('../path/to/template.hbs')(renderData, options);
case 'e':
return require('../path/to/template.hbs')(renderData, options);
case 'f':
return require('../path/to/template.hbs')(renderData, options);
case 'g':
return require('../path/to/template.hbs')(renderData, options);
case 'h':
return require('../path/to/template.hbs')(renderData, options);
case 'i':
return require('../path/to/template.hbs')(renderData, options);
case 'j':
return require('../path/to/template.hbs')(renderData, options);
case 'k':
return require('../path/to/template.hbs')(renderData, options);
case SOME_CONSTANT:
return renderData.mainModalContent.clone();
default:
return renderData.mainModalContent.clone();
} When I comment this out, it doesn't error out. |
Made a fix in #395. |
No idea what file it breaks on, but it started immediately after enabling this rule.
The text was updated successfully, but these errors were encountered: