Repository navigation
fix: lint newly created files in dev watchers - #820
Closed
charan-rathore wants to merge 2 commits into
Closed
charan-rathore wants to merge 2 commits into
charan-rathore wants to merge 2 commits into
Conversation
✅ Deploy Preview for vite-plugin-checker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
Author
|
Closing since this has sat without activity. Glad to reopen if someone wants to take it forward. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Addresses the new-file reporting part of #807.
ESLint, Stylelint, and Biome currently listen for file changes and deletion, but not creation. Chokidar sends an
addevent when a file is created, so a new file with a lint error gets no diagnostics until it is saved again.Send
addevents through the same handler aschange. SetignoreInitial: truebecause each checker already runs an initial full check before creating its watcher.The regression tests use the built checker workers, real linters, and real filesystem events. They first verify that the watcher handles an existing file, then create another file once and require diagnostics for that new path. All three tests fail before this change and pass after it.
Validation: all 44 unit tests, package typecheck, production build, and changed-file Biome checks pass. Repository-wide lint already fails on main because an untouched
utils.spec.tsneeds formatting; this patch leaves it unchanged.This does not address the separate stale-diagnostics/deletion race described in #807.