fix(unstable): lint node properties should be enumerable (#30391)
Some checks are pending
ci / test debug linux-aarch64 (push) Blocked by required conditions
ci / test release linux-aarch64 (push) Blocked by required conditions
ci / test debug macos-aarch64 (push) Blocked by required conditions
ci / test release macos-aarch64 (push) Blocked by required conditions
ci / bench release linux-x86_64 (push) Blocked by required conditions
ci / lint debug linux-x86_64 (push) Blocked by required conditions
ci / lint debug macos-x86_64 (push) Blocked by required conditions
ci / lint debug windows-x86_64 (push) Blocked by required conditions
ci / test debug linux-x86_64 (push) Blocked by required conditions
ci / test release linux-x86_64 (push) Blocked by required conditions
ci / test debug macos-x86_64 (push) Blocked by required conditions
ci / test release macos-x86_64 (push) Blocked by required conditions
ci / test debug windows-x86_64 (push) Blocked by required conditions
ci / test release windows-x86_64 (push) Blocked by required conditions
ci / pre-build (push) Waiting to run
ci / build libs (push) Blocked by required conditions
ci / publish canary (push) Blocked by required conditions

This makes npm libraries that traverse the ESTree format like `zimmerframe` or `periscopic` work with our lint ast.
This commit is contained in:
Marvin Hagemeister 2025-08-13 15:46:51 +02:00 committed by GitHub
parent ca06312ac7
commit a8cde960ce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 22 additions and 1 deletions

View file

@ -607,6 +607,9 @@ function setNodeGetters(ctx) {
const name = getString(ctx.strTable, id);
Object.defineProperty(FacadeNode.prototype, name, {
// The `parent` key is expected to be non-enumerable.
// See the npm `zimmerframe` library.
enumerable: name !== "parent",
get() {
return readValue(
this[INTERNAL_CTX],