Make Jessie ESLint Plugin ESLint v9 compatible #119
Merged
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.
Refs Agoric/agoric-sdk#10642
ESLint v9 requires visitor objects to be mutable as it needs to modify them internally during rule execution. Our current implementation hardens (freezes) the visitor object returned by
makeAwaitAllowedVisitor, which causes a TypeError when ESLint tries to modify it.This PR removes the
hardencall from the visitor object while maintaining hardening on the module exports and other objects where immutability is still desired. This change fixes the TypeError: "Cannot assign to read only property 'AwaitExpression' of object" that was observed when movingagoric/agoric-sdkto use ESLint v9The change only affects the mutability of the visitor object itself, which is necessary for ESLint's internal operations, while preserving our security model everywhere else.