Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 8, 2025

"Writeable" is a mis-spelling. In addition:

Oxlint docs say:

You may also use "writeable" or true to represent "writable".

ESLint's docs state "writable" (without an "e") as the name of the option.

This suggests that "writable" is the "real" name of this option, and "writeable" (with an "e") is an alias provided for backwards compat.

Therefore, I think it makes more sense to call the enum variant GlobalValue::Writable (with the correct spelling).

Main motivation is that it means globals get serialized with the right spelling, allowing removing a JS-side workaround from JS plugins code (#16610).

For consistency, I've changed "writeable" to "writable" in all test cases, except for 1 test which specifically aims to check that that "legacy" spelling is accepted.

fn test_deserialize_legacy_spelling() {
let globals = globals!({
"foo": "readable",
"bar": "writeable",
});
assert!(globals.is_enabled("foo"));
assert!(globals.is_enabled("bar"));
}

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI A-editor Area - Editor and Language Server C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Dec 8, 2025
Copy link
Member Author

overlookmotel commented Dec 8, 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.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 8, 2025

CodSpeed Performance Report

Merging #16609 will not alter performance

Comparing 12-08-refactor_linter_rename_globalvalue_writeable_to_writable_ (00c5614) with main (767db50)1

Summary

✅ 4 untouched
⏩ 41 skipped2

Footnotes

  1. No successful run was found on main (198e6e2) during the generation of this report, so 767db50 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

  2. 41 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@overlookmotel overlookmotel marked this pull request as ready for review December 8, 2025 15:11
Copilot AI review requested due to automatic review settings December 8, 2025 15:11
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 corrects the spelling of the GlobalValue enum variant from Writeable to Writable, aligning with ESLint's canonical spelling. The change ensures that globals are serialized with the correct spelling ("writable" instead of "writeable"), while maintaining full backward compatibility by continuing to accept "writeable" as input through the TryFrom<&str> implementation.

Key Changes

  • Renamed GlobalValue::Writeable to GlobalValue::Writable in the Rust enum
  • Updated serialization to use "writable" as the canonical form
  • Maintained backward compatibility by accepting both "writable" and "writeable" in deserialization

Reviewed changes

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

Show a summary per file
File Description
crates/oxc_linter/src/config/globals.rs Renamed enum variant from Writeable to Writable, updated as_str() method, and updated From<bool> implementation while preserving backward compatibility in TryFrom<&str>
crates/oxc_linter/src/config/config_store.rs Updated test cases to use "writable" instead of "writeable" in JSON test data
apps/oxlint/fixtures/overrides_env_globals/.oxlintrc.json Updated fixture configuration file to use canonical "writable" spelling
npm/oxlint/configuration_schema.json Updated schema enum to list "writable" instead of "writeable" as the canonical value
crates/oxc_linter/src/snapshots/schema_json.snap Updated snapshot to reflect schema changes
editors/vscode/tests/test-helpers.ts Updated TypeScript type definition to use "writable" instead of "writeable"

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

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Dec 8, 2025
Copy link
Contributor

camc314 commented Dec 8, 2025

Merge activity

"Writeable" is a mis-spelling. In addition:

Oxlint docs say:

> You may also use `"writeable"` or `true` to represent `"writable"`.

[ESLint's docs](https://eslint.org/docs/v8.x/use/configure/language-options#using-configuration-files-1) state "writable" (without an "e") as the name of the option.

This suggests that "writable" is the "real" name of this option, and "writeable" (with an "e") is an alias provided for backwards compat.

Therefore, I think it makes more sense to call the enum variant `GlobalValue::Writable` (with the correct spelling).

Main motivation is that it means globals get serialized with the right spelling, allowing removing a JS-side workaround from JS plugins code (#16610).

For consistency, I've changed "writeable" to "writable" in all test cases, except for 1 test which specifically aims to check that that "legacy" spelling is accepted.

https://github.com/oxc-project/oxc/blob/00c5614d1f1bb3465ba7aa5ad668a936b8ec1266/crates/oxc_linter/src/config/globals.rs#L161-L168
@graphite-app graphite-app bot force-pushed the 12-08-refactor_linter_rename_globalvalue_writeable_to_writable_ branch from 00c5614 to 913b1b3 Compare December 8, 2025 15:20
@graphite-app graphite-app bot merged commit 913b1b3 into main Dec 8, 2025
21 checks passed
@graphite-app graphite-app bot deleted the 12-08-refactor_linter_rename_globalvalue_writeable_to_writable_ branch December 8, 2025 15:26
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 8, 2025
graphite-app bot pushed a commit that referenced this pull request Dec 8, 2025
After #16609, the value of globals is serialized correctly ("writable" not "writeable"), so this workaround is no longer required. Remove it.
Copilot AI pushed a commit that referenced this pull request Dec 10, 2025
"Writeable" is a mis-spelling. In addition:

Oxlint docs say:

> You may also use `"writeable"` or `true` to represent `"writable"`.

[ESLint's docs](https://eslint.org/docs/v8.x/use/configure/language-options#using-configuration-files-1) state "writable" (without an "e") as the name of the option.

This suggests that "writable" is the "real" name of this option, and "writeable" (with an "e") is an alias provided for backwards compat.

Therefore, I think it makes more sense to call the enum variant `GlobalValue::Writable` (with the correct spelling).

Main motivation is that it means globals get serialized with the right spelling, allowing removing a JS-side workaround from JS plugins code (#16610).

For consistency, I've changed "writeable" to "writable" in all test cases, except for 1 test which specifically aims to check that that "legacy" spelling is accepted.

https://github.com/oxc-project/oxc/blob/00c5614d1f1bb3465ba7aa5ad668a936b8ec1266/crates/oxc_linter/src/config/globals.rs#L161-L168
Copilot AI pushed a commit that referenced this pull request Dec 10, 2025
After #16609, the value of globals is serialized correctly ("writable" not "writeable"), so this workaround is no longer required. Remove it.
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…project#16609)

"Writeable" is a mis-spelling. In addition:

Oxlint docs say:

> You may also use `"writeable"` or `true` to represent `"writable"`.

[ESLint's docs](https://eslint.org/docs/v8.x/use/configure/language-options#using-configuration-files-1) state "writable" (without an "e") as the name of the option.

This suggests that "writable" is the "real" name of this option, and "writeable" (with an "e") is an alias provided for backwards compat.

Therefore, I think it makes more sense to call the enum variant `GlobalValue::Writable` (with the correct spelling).

Main motivation is that it means globals get serialized with the right spelling, allowing removing a JS-side workaround from JS plugins code (oxc-project#16610).

For consistency, I've changed "writeable" to "writable" in all test cases, except for 1 test which specifically aims to check that that "legacy" spelling is accepted.

https://github.com/oxc-project/oxc/blob/00c5614d1f1bb3465ba7aa5ad668a936b8ec1266/crates/oxc_linter/src/config/globals.rs#L161-L168
taearls pushed a commit to taearls/oxc that referenced this pull request Dec 11, 2025
…ject#16610)

After oxc-project#16609, the value of globals is serialized correctly ("writable" not "writeable"), so this workaround is no longer required. Remove it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-editor Area - Editor and Language Server A-linter Area - Linter C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants