Skip to content

test(oxlint/lsp): add test for .oxlintrc.json config change#19552

Merged
graphite-app[bot] merged 1 commit intomainfrom
02-19-test_oxlint_lsp_add_test_for_.oxlintrc.json_serverity_change
Feb 20, 2026
Merged

test(oxlint/lsp): add test for .oxlintrc.json config change#19552
graphite-app[bot] merged 1 commit intomainfrom
02-19-test_oxlint_lsp_add_test_for_.oxlintrc.json_serverity_change

Conversation

@Sysix
Copy link
Copy Markdown
Member

@Sysix Sysix commented Feb 19, 2026

Adds an LSP regression test to verify diagnostics are refreshed after configuration file content changes (e.g. .oxlintrc.json / oxlint.config.ts) by simulating workspace/didChangeWatchedFiles and waiting for a diagnostic refresh.

This shows the error for #19526 where the config is not refreshed and still shows an error. This is fixed in the downstream PR

Copy link
Copy Markdown
Member Author

Sysix commented Feb 19, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-linter-plugins Area - Linter JS plugins C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Feb 19, 2026
@Sysix Sysix force-pushed the 02-19-test_oxlint_lsp_add_test_for_.oxlintrc.json_serverity_change branch from 58b6c00 to f369f67 Compare February 19, 2026 19:28
@Sysix Sysix changed the title test(oxlint/lsp): add test for .oxlintrc.json serverity change test(oxlint/lsp): add test for .oxlintrc.json config change Feb 19, 2026
@Sysix Sysix requested a review from Copilot February 19, 2026 19:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an LSP regression test to verify diagnostics are refreshed after configuration file content changes (e.g. .oxlintrc.json / oxlint.config.ts) by simulating workspace/didChangeWatchedFiles and waiting for a diagnostic refresh.

Changes:

  • Extend the LSP test client helper with didChangeWatchedFiles() and a workspace/diagnostic/refresh waiter.
  • Add a new file_config_change Vitest suite with fixtures and snapshots for config-change scenarios.
  • Introduce fixtures for both .oxlintrc.json-based config and oxlint.config.ts-based config.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.

File Description
apps/oxlint/test/lsp/utils.ts Adds test utilities to simulate watched-file changes and await diagnostic refresh, plus a helper to snapshot diagnostics before/after a config content change.
apps/oxlint/test/lsp/file_config_change/file_config_change.test.ts New test suite covering diagnostics behavior across config changes.
apps/oxlint/test/lsp/file_config_change/snapshots/file_config_change.test.ts.snap Snapshots for the new config-change test suite.
apps/oxlint/test/lsp/file_config_change/fixtures/** New fixtures representing config files and lint targets used by the test.

@Sysix Sysix force-pushed the 02-19-test_oxlint_lsp_add_test_for_.oxlintrc.json_serverity_change branch from f369f67 to 35e48ce Compare February 19, 2026 19:45
@Sysix Sysix marked this pull request as ready for review February 19, 2026 19:45
@Sysix Sysix requested a review from camc314 as a code owner February 19, 2026 19:45
@camc314 camc314 self-assigned this Feb 20, 2026
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Feb 20, 2026
Copy link
Copy Markdown
Contributor

camc314 commented Feb 20, 2026

Merge activity

> Adds an LSP regression test to verify diagnostics are refreshed after configuration file content changes (e.g. .oxlintrc.json / oxlint.config.ts) by simulating workspace/didChangeWatchedFiles and waiting for a diagnostic refresh.

This shows the error for #19526 where the config is not refreshed and still shows an error. This is fixed in the downstream PR
@graphite-app graphite-app bot force-pushed the 02-19-test_oxlint_lsp_add_test_for_.oxlintrc.json_serverity_change branch from 35e48ce to ad43ccc Compare February 20, 2026 13:22
@graphite-app graphite-app bot merged commit ad43ccc into main Feb 20, 2026
19 checks passed
@graphite-app graphite-app bot deleted the 02-19-test_oxlint_lsp_add_test_for_.oxlintrc.json_serverity_change branch February 20, 2026 13:28
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter A-linter-plugins Area - Linter JS plugins C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants