add the settings from SES and fix eslint-errors
MODIFY
.eslintrc.js
.eslintrc.js
module.exports = {
- extends: ['airbnb'],
+ extends: ['airbnb', 'plugin:prettier/recommended'],
env: {
es6: true,
mocha: true,
@@ -8,5 +8,7 @@ module.exports = {
'implicit-arrow-linebreak': 'off',
'function-paren-newline': 'off',
'arrow-parens': 'off',
+ strict: 'off',
+ 'no-console': 'off',
},
};

MODIFY
package.json
package.json
"main": "src/index.js",
"scripts": {
"test": "node test/test.js",
- "format": "prettier --write '**/*.{js,jsx}'",
- "lint": "eslint '**/*.{js,jsx}'"
+ "pretty-fix": "prettier --write '**/*.{js,jsx}'",
+ "pretty-check": "prettier --check '**/*.{js,jsx}'",
+ "lint-fix": "eslint --fix '**/*.{js,jsx}'",
+ "lint-check": "eslint '**/*.{js,jsx}'"
},
"repository": {
"type": "git",
"devDependencies": {
"eslint": "^5.3.0",
"eslint-config-airbnb": "^17.1.0",
+ "eslint-config-prettier": "^4.0.0",
"eslint-plugin-import": "^2.16.0",
"eslint-plugin-jsx-a11y": "^6.2.1",
+ "eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.4",
"husky": "^1.3.1",
"lint-staged": "^8.1.3",

MODIFY
src/index.js
src/index.js
// limitations under the License.
// const makeHardener = require('@agoric/make-hardener');
-const makeHardener = require('../../MakeHardener/index.js').makeHardener;
+const { makeHardener } = require('../../MakeHardener/index.js');
const buildTable = require('./buildTable');
// this use of 'global' is why Harden is a "resource module", whereas
// MakeHardener is "pure".
const initialRoots = buildTable(global);
-console.log("initialRoots are", initialRoots);
+console.log('initialRoots are', initialRoots);
const harden = makeHardener(initialRoots);

MODIFY
test/test.js
test/test.js
+/* eslint no-undef: "off" */
+
const test = require('tape');
const { harden } = require('../src/index.js');

add the settings from SES and fix eslint-errors