-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
harden-exports rule for eslint plugin #2369
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one!
export const a = 'alreadyHardened'; | ||
export const b = 'toHarden'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a handful of cases, it will be somewhat tedious to have to harden primitive literals. Are you up for a little complication?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm all ears. I'd like to land this though because it's useful as is
Rebase to fix the failing CI job. #2366 |
closes: #9693 ## Description more linting for #9693, using endojs/endo#2369 Also adopts `harden-exports` for `.contract.js` modules, - #4770 ### Security Considerations none ### Scaling Considerations none ### Documentation Considerations none ### Testing Considerations CI with expected errors ### Upgrade Considerations n/a
Refs: Agoric/agoric-sdk#9726
Description
A new lint rule,
harden-exports
, to support Agoric/agoric-sdk#9726Includes an autofixer
Security Considerations
Could enhance security
Scaling Considerations
n/a
Documentation Considerations
We don't yet document provided rules: https://endojs.github.io/endo/modules/_endo_eslint_plugin.html
I think that's okay for now. If that is requested I'd file it as a separate issue, out of scope of this one.
Testing Considerations
I temporarily enabled this in the recommended config and ran
lint-fix
on the repo. All the changes looked correct. Howeverharden()
isn't always available so I don't think we should enable it in any of Endo's shared configs.Compatibility Considerations
n/a
Upgrade Considerations
n/a