Skip to content

test(linter/plugins): add eslint-stylistic to conformance tests#18554

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/01-24-test_linter_plugins_add_eslint-stylistic_to_conformance_tests
Jan 25, 2026
Merged

test(linter/plugins): add eslint-stylistic to conformance tests#18554
graphite-app[bot] merged 1 commit intomainfrom
om/01-24-test_linter_plugins_add_eslint-stylistic_to_conformance_tests

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Jan 25, 2026

Add eslint-plugin-stylistic to conformance tests.

99.96% pass rate. The remaining 7 failing tests are not easily fixable:

jsx-props-no-multi-spaces rule

1 failing test

The rule clones nodes with Object.assign({}, node), and then uses the loc property of the cloned node. Because loc is a getter on prototype of AST nodes, loc property is not present on the cloned node.

This bug may have real-world impact. We'll need to make loc a real property of node objects to fix it (#10307). We originally had loc getter on the node objects themselves, but that caused a 3x slowdown.

jsx-tag-spacing rule

6 failing tests

TypeScript parser (which we use for generating tokens) cannot parse closing JSX tags with whitespace before the / - e.g. <App>text< /App>.

TS-ESLint parser also fails to parse this (AST explorer) so this bug is unlikely to have real-world impact.

Copy link
Member Author

overlookmotel commented Jan 25, 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.

Copy link
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

This PR adds eslint-plugin-stylistic to the conformance tests, validating Oxlint's compatibility with this plugin's 129 rules. The tests achieve an impressive 99.96% pass rate (18,303 passing out of 18,310 tests, excluding skipped tests). The 7 failing tests are documented with clear explanations of the root causes.

Changes:

  • Added dependencies for @typescript-eslint/parser and eslint-vitest-rule-tester to support stylistic plugin testing
  • Extended RuleTester to handle stylistic plugin's test format, including support for missing errors property via __unknown__ marker
  • Created stylistic test group configuration with appropriate test transformations, parser handling, and skip conditions
  • Added initialization script for cloning and setting up the stylistic plugin submodule with necessary patches

Reviewed changes

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

Show a summary per file
File Description
pnpm-lock.yaml Added @typescript-eslint/parser, eslint-vitest-rule-tester, and their dependencies to support stylistic plugin testing
apps/oxlint/package.json Added @typescript-eslint/parser and eslint-vitest-rule-tester as dev dependencies
apps/oxlint/src-js/package/rule_tester.ts Exported ParserOptionsInternal interface and added handling for __unknown__ errors marker used when test cases don't specify expected errors
apps/oxlint/conformance/tester.ts Updated debug script to test stylistic plugin rules with TypeScript/ESLint parser integration
apps/oxlint/conformance/src/rule_tester.ts Exported LanguageOptions and ParserOptions types needed by stylistic test group
apps/oxlint/conformance/src/groups/stylistic.ts Created comprehensive test group for stylistic plugin with custom rule runner mock, parser handling, and skip conditions for known issues
apps/oxlint/conformance/src/groups/index.ts Registered stylistic test group alongside existing groups
apps/oxlint/conformance/snapshots/stylistic.md Documented conformance test results showing 99.96% pass rate with detailed failure analysis
apps/oxlint/conformance/init.sh Added setup script for cloning stylistic plugin, installing dependencies, patching package.json for Node.js imports, and replacing top-level await imports
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@overlookmotel overlookmotel self-assigned this Jan 25, 2026
@overlookmotel overlookmotel force-pushed the om/01-24-test_linter_plugins_add_eslint-stylistic_to_conformance_tests branch from 8e1e684 to a356696 Compare January 25, 2026 21:11
@overlookmotel overlookmotel force-pushed the om/01-25-test_linter_plugins_conformance_tester_set_default_export_on_parser_modules branch from ca2d841 to e07c667 Compare January 25, 2026 21:11
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
Copy link
Member Author

overlookmotel commented Jan 25, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the om/01-25-test_linter_plugins_conformance_tester_set_default_export_on_parser_modules branch from e07c667 to da76bc5 Compare January 25, 2026 21:33
graphite-app bot pushed a commit that referenced this pull request Jan 25, 2026
…8554)

Add `eslint-plugin-stylistic` to conformance tests.

99.96% pass rate. The remaining 7 failing tests are not easily fixable:

#### `jsx-props-no-multi-spaces` rule

1 failing test

The rule clones nodes with `Object.assign({}, node)`, and then uses the `loc` property of the cloned node. Because `loc` is a getter on *prototype* of AST nodes, `loc` property is not present on the cloned node.

This bug may have real-world impact. We'll need to make `loc` a real property of node objects to fix it (#10307). We originally had `loc` getter on the node objects themselves, but that caused a 3x slowdown.

#### `jsx-tag-spacing` rule

6 failing tests

TypeScript parser (which we use for generating tokens) cannot parse closing JSX tags with whitespace before the `/` - e.g. `<App>text< /App>`.

TS-ESLint parser also fails to parse this [AST explorer](https://ast-explorer.dev/#eNpFyzEKwzAMBdCrGM0p3UModOkROnkRRgUH1xaWUlqC716pHbJJ7/+/Q4EZVnyhpJ5ZYQI20A/TH04kJVf3ZL5cmS+P1pZw9su0me6xhhCB0hPv1CW3GmE2KKgkGmE68huhbp3EC7+ZB6u8/de+kdOIdcD4AgUpMYU=), so this bug is unlikely to have real-world impact.
@graphite-app graphite-app bot force-pushed the om/01-24-test_linter_plugins_add_eslint-stylistic_to_conformance_tests branch from a356696 to c421024 Compare January 25, 2026 21:34
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
@overlookmotel overlookmotel marked this pull request as draft January 25, 2026 22:09
…8554)

Add `eslint-plugin-stylistic` to conformance tests.

99.96% pass rate. The remaining 7 failing tests are not easily fixable:

#### `jsx-props-no-multi-spaces` rule

1 failing test

The rule clones nodes with `Object.assign({}, node)`, and then uses the `loc` property of the cloned node. Because `loc` is a getter on *prototype* of AST nodes, `loc` property is not present on the cloned node.

This bug may have real-world impact. We'll need to make `loc` a real property of node objects to fix it (#10307). We originally had `loc` getter on the node objects themselves, but that caused a 3x slowdown.

#### `jsx-tag-spacing` rule

6 failing tests

TypeScript parser (which we use for generating tokens) cannot parse closing JSX tags with whitespace before the `/` - e.g. `<App>text< /App>`.

TS-ESLint parser also fails to parse this [AST explorer](https://ast-explorer.dev/#eNpFyzEKwzAMBdCrGM0p3UModOkROnkRRgUH1xaWUlqC716pHbJJ7/+/Q4EZVnyhpJ5ZYQI20A/TH04kJVf3ZL5cmS+P1pZw9su0me6xhhCB0hPv1CW3GmE2KKgkGmE68huhbp3EC7+ZB6u8/de+kdOIdcD4AgUpMYU=), so this bug is unlikely to have real-world impact.
@overlookmotel overlookmotel force-pushed the om/01-24-test_linter_plugins_add_eslint-stylistic_to_conformance_tests branch from c421024 to 43eccaa Compare January 25, 2026 22:12
@overlookmotel overlookmotel marked this pull request as ready for review January 25, 2026 22:12
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Jan 25, 2026
Base automatically changed from om/01-25-test_linter_plugins_conformance_tester_set_default_export_on_parser_modules to main January 25, 2026 22:15
@graphite-app graphite-app bot merged commit 43eccaa into main Jan 25, 2026
21 of 22 checks passed
@graphite-app graphite-app bot deleted the om/01-24-test_linter_plugins_add_eslint-stylistic_to_conformance_tests branch January 25, 2026 22:19
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jan 25, 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.

1 participant

Comments