endo
endo copied to clipboard
Error or warn on type declaring global vars if type only
What is the Problem Being Solved?
Ref: https://github.com/endojs/endo/pull/2845
Disallow type declaring global vars that are only types
Error or warn with linting
Description of the Design
ESLint rule, use previous one or create plugin
Security Considerations
None
Scaling Considerations
Test Plan
ESLint
Compatibility Considerations
Upgrade Considerations
We do need the ability to declare some global vars for shims that install such globals, no ?
yes harden/repairIntrinsics/hardenIntrinsics/lockdown/assert/Compartment are ok since src files (shims) install them as globals
but i mistakenly added https://github.com/endojs/endo/pull/2845 which could have been prevented with an eslint rule? called e.g.
- @endo/require-global-assignment
- @endo/no-unassigned-global-declarations
- @endo/enforce-global-runtime-binding
- @endo/global-declaration-assignment
- @endo/no-orphaned-global-declarations
- @endo/no-phantom-globals
if more effort than worth then may not be worth the bother