Skip to content

Comments

ci(lint): use prefer-const rule from ESLint#16448

Merged
graphite-app[bot] merged 1 commit intomainfrom
11-26-ci_lint_use_prefer-const_rule_from_eslint
Dec 3, 2025
Merged

ci(lint): use prefer-const rule from ESLint#16448
graphite-app[bot] merged 1 commit intomainfrom
11-26-ci_lint_use_prefer-const_rule_from_eslint

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 3, 2025

Dogfood Oxlint JS plugins by enabling ESLint's prefer-const rule, running as a JS plugin.

#15707 will implement this rule natively in Oxlint, but in meantime this is a good one to use to test JS plugins.

Copy link
Member Author

overlookmotel commented Dec 3, 2025


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.

@overlookmotel overlookmotel force-pushed the 11-26-ci_lint_use_prefer-const_rule_from_eslint branch from 3f1df29 to 6a4af9a Compare December 3, 2025 14:32
@overlookmotel overlookmotel marked this pull request as ready for review December 3, 2025 14:36
Copilot AI review requested due to automatic review settings December 3, 2025 14:36
@overlookmotel overlookmotel added the A-linter-plugins Area - Linter JS plugins label Dec 3, 2025
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 enables ESLint's prefer-const rule as a JavaScript plugin in Oxlint to dogfood the JS plugin functionality while awaiting native implementation in issue #15707. The change adds ESLint as a dependency and creates a custom plugin that wraps ESLint's built-in rules for use within Oxlint.

Key changes:

  • Adds ESLint 9.39.1 as a development dependency for accessing built-in ESLint rules
  • Creates a new JS plugin (oxlint-plugin.mts) that exports ESLint's prefer-const rule
  • Configures Oxlint to use the JS plugin and enables the prefer-const rule with "all" destructuring mode

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
package.json Adds ESLint ^9.39.1 as a devDependency
pnpm-lock.yaml Updates lock file with ESLint 9.39.1 and its dependencies
oxlintrc.json Adds jsPlugins configuration and enables eslint-js/prefer-const rule
oxlint-plugin.mts New JS plugin that wraps ESLint's built-in rules for use in Oxlint
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

@graphite-app graphite-app bot changed the base branch from 12-03-perf_napi_parser_do_not_remove_extraneous_options_on_js_side to graphite-base/16448 December 3, 2025 14:45
@graphite-app graphite-app bot force-pushed the graphite-base/16448 branch from 98c53a9 to 790beeb Compare December 3, 2025 14:53
@graphite-app graphite-app bot force-pushed the 11-26-ci_lint_use_prefer-const_rule_from_eslint branch from 6a4af9a to 075113a Compare December 3, 2025 14:53
@graphite-app graphite-app bot changed the base branch from graphite-base/16448 to main December 3, 2025 14:54
@graphite-app graphite-app bot force-pushed the 11-26-ci_lint_use_prefer-const_rule_from_eslint branch from 075113a to 635db80 Compare December 3, 2025 14:54
@overlookmotel overlookmotel force-pushed the 11-26-ci_lint_use_prefer-const_rule_from_eslint branch from 635db80 to 5fb19d6 Compare December 3, 2025 23:10
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Dec 3, 2025
Copy link
Member Author

overlookmotel commented Dec 3, 2025

Merge activity

Dogfood Oxlint JS plugins by enabling ESLint's `prefer-const` rule, running as a JS plugin.

#15707 will implement this rule natively in Oxlint, but in meantime this is a good one to use to test JS plugins.
@graphite-app graphite-app bot force-pushed the 11-26-ci_lint_use_prefer-const_rule_from_eslint branch from 5fb19d6 to 46bd226 Compare December 3, 2025 23:19
@graphite-app graphite-app bot merged commit 46bd226 into main Dec 3, 2025
19 checks passed
@graphite-app graphite-app bot deleted the 11-26-ci_lint_use_prefer-const_rule_from_eslint branch December 3, 2025 23:25
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 3, 2025
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
Dogfood Oxlint JS plugins by enabling ESLint's `prefer-const` rule, running as a JS plugin.

oxc-project#15707 will implement this rule natively in Oxlint, but in meantime this is a good one to use to test JS plugins.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter-plugins Area - Linter JS plugins

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants