Skip to content

fix: lint newly created files in dev watchers - #820

Closed
charan-rathore wants to merge 2 commits into
fi3ework:mainfrom
charan-rathore:fix/lint-new-files
Closed

charan-rathore wants to merge 2 commits into
fi3ework:mainfrom
charan-rathore:fix/lint-new-files

Conversation

@charan-rathore

Copy link
Copy Markdown

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 add event when a file is created, so a new file with a lint error gets no diagnostics until it is saved again.

Send add events through the same handler as change. Set ignoreInitial: true because 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.ts needs formatting; this patch leaves it unchanged.

This does not address the separate stale-diagnostics/deletion race described in #807.

@netlify

netlify Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for vite-plugin-checker ready!

Name Link
🔨 Latest commit b3c05a2
🔍 Latest deploy log https://app.netlify.com/projects/vite-plugin-checker/deploys/6abddc9d7d64b7000808c6cc
😎 Deploy Preview https://deploy-preview-820--vite-plugin-checker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new

pkg-pr-new Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/vite-plugin-checker@820

commit: b3c05a2

@charan-rathore

Copy link
Copy Markdown
Author

Closing since this has sat without activity. Glad to reopen if someone wants to take it forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant