Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@iomekam
Copy link
Contributor

@iomekam iomekam commented Jan 15, 2025

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 harden call 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 moving agoric/agoric-sdk to use ESLint v9

The 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.

@iomekam iomekam marked this pull request as ready for review January 15, 2025 03:38
@iomekam iomekam requested a review from michaelfig January 15, 2025 03:39
@iomekam iomekam changed the title Make Jessie ESLint v9 compatible Make Jessie ES Plugin ESLint v9 compatible Jan 15, 2025
@iomekam iomekam changed the title Make Jessie ES Plugin ESLint v9 compatible Make Jessie ESLint Plugin ESLint v9 compatible Jan 15, 2025
@iomekam iomekam force-pushed the ikenna-eslint-9-compat branch from 46371a8 to b732653 Compare January 15, 2025 03:50
Copy link
Member

@michaelfig michaelfig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Please leave behind a breadcrumb comment about this change.

@iomekam iomekam merged commit eaf3e94 into main Jan 15, 2025
3 checks passed
@iomekam iomekam deleted the ikenna-eslint-9-compat branch January 15, 2025 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants