test(linter/plugins): conformance tester identify known parsers by parseForESLint function#18680
Merged
graphite-app[bot] merged 1 commit intomainfrom Jan 28, 2026
Conversation
Member
Author
This was referenced Jan 28, 2026
parse functionparseForESLint function
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the conformance tester’s known-parser detection to be resilient to deep-cloned test case objects by matching parsers via their parseForESLint function reference rather than the parser object identity.
Changes:
- Replace parser identity maps with maps keyed by
parseForESLintfunction references. - Update test-case preprocessing to resolve parser details using
parseForESLint. - Adjust conformance runner setup to populate and clear the new maps.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/oxlint/conformance/src/rule_tester.ts | Switches parser recognition to use parseForESLint function keys when deriving parser details and normalizing test cases. |
| apps/oxlint/conformance/src/index.ts | Updates parser loading/registration to populate the new parseForESLint-keyed map and renames path mapping accordingly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
81d4d84 to
f626725
Compare
cf53919 to
8e79f9e
Compare
Contributor
Merge activity
|
…arseForESLint` function (#18680) Conformance tester was identifying known parsers specified by test cases by comparing the `parser` object to known values. Instead, compare `parser.parseForESLint` functions. This produces an accurate match even when the test case object is deep cloned which results in the `parser` object being a new (unknown) object. But the `parseForESLint` function stays the same after cloning. `eslint-plugin-sonarjs` does this kind of deep cloning.
f626725 to
70e4bd2
Compare
8e79f9e to
c3d1ae9
Compare
Base automatically changed from
om/01-28-test_linter_plugins_conformance_tester_keep_other_module_exports_when_mocking_ruletester_modules
to
main
January 28, 2026 23:10
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.

Conformance tester was identifying known parsers specified by test cases by comparing the
parserobject to known values. Instead, compareparser.parseForESLintfunctions.This produces an accurate match even when the test case object is deep cloned which results in the
parserobject being a new (unknown) object. But theparseForESLintfunction stays the same after cloning.eslint-plugin-sonarjsdoes this kind of deep cloning.