Reduce complexity in lockdown-shim
MODIFY
packages/lockdown-shim/.eslintrc.json
packages/lockdown-shim/.eslintrc.json
"es6": true
},
"rules": {
+ "complexity": ["error", 8],
"implicit-arrow-linebreak": "off",
"function-paren-newline": "off",
"arrow-parens": "off",

MODIFY
packages/lockdown-shim/src/main.js
packages/lockdown-shim/src/main.js
@@ -33,7 +33,6 @@ export function lockdown(options = {}) {
registerOnly = false,
} = options;
- try {
/**
* 1. TAME powers first.
*/
@@ -102,8 +101,4 @@ export function lockdown(options = {}) {
// must be the operation that modifies the intrinsics.
harden(intrinsics, registerOnly);
harden(detachedProperties, registerOnly);
- } catch (e) {
- throw e;
- // TODO: exit to prevent misuse after failure.
- }
}

Reduce complexity in lockdown-shim