-
-
Notifications
You must be signed in to change notification settings - Fork 172
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
Lint visible documents on activation #141
Lint visible documents on activation #141
Conversation
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.
Please review 33c2e4a. I made that change back when I was occasionally getting "took too long to initialize" bugs. What eventually fixed that was bundling, so I'm open to undoing that optimization - especially in light of the bug you report. However, it looks like you change might be more simply implemented with a call to cleanLintVisibleFiles
?
041dc52
to
17ca464
Compare
Thanks for the clarification. I didn't use Updated to use |
You make a great point. I definitely do not want to add a synchronous lint of N documents to the load path. But as you say, |
17ca464
to
d807440
Compare
Updated to wrap the call to |
extension.js
Outdated
requestLint(vscode.window.activeTextEditor.document); | ||
} | ||
// Lint all visible documents | ||
setTimeout(() => cleanLintVisibleFiles(), throttleDuration); |
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.
Do we need a function that calls cLVF
, or can we pass it directly by 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.
Done in ba0da26.
It would be great to have a global ESLint rule similar to Lodash's no-extraneous-function-wrapping
available.
d807440
to
ba0da26
Compare
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.
Nice!
Changes the extension activation to request linting of all visible documents, not just the active one.
I noticed a small bug while working on the extension where a visible but inactive Markdown file would not be linted until either:
onDidChangeVisibleTextEditors
event to fire.