install eslint and prettier
ADD
.eslintrc.js
+module.exports = {
+ extends: 'airbnb',
+ env: {
+ es6: true,
+ mocha: true,
+ },
+ rules: {
+ 'implicit-arrow-linebreak': 'off',
+ 'function-paren-newline': 'off',
+ 'arrow-parens': 'off',
+ },
+};

ADD
.prettierrc.json
+{
+ "trailingComma": "all",
+ "singleQuote": true
+}

MODIFY
package.json
package.json
"test": "node scripts/build-intermediate.js && tape -r esm test/**/*.js",
"just-test": "tape -r esm test/**/*.js",
"build-intermediate": "node scripts/build-intermediate.js",
- "build": "git submodule update --init --recursive && node scripts/build-intermediate.js && rollup --format=iife --output.name=SES --output.exports=named --sourcemap --file=dist/ses-shim.js -- src/index.js"
+ "build": "git submodule update --init --recursive && node scripts/build-intermediate.js && rollup --format=iife --output.name=SES --output.exports=named --sourcemap --file=dist/ses-shim.js -- src/index.js",
+ "format": "prettier --write '**/*.{js,jsx}'",
+ "lint": "./node_modules/.bin/eslint '**/*.{js,jsx}' --fix"
},
"devDependencies": {
"rollup": "^1.1.0",
"rollup-plugin-node-resolve": "^4.0.0",
- "tape": "^4.9.2"
+ "tape": "^4.9.2",
+ "eslint": "^5.11.1",
+ "eslint-config-airbnb": "^17.1.0",
+ "eslint-config-prettier": "^3.3.0",
+ "eslint-plugin-import": "^2.14.0",
+ "eslint-plugin-jsx-a11y": "^6.1.2",
+ "eslint-plugin-prettier": "^3.0.1",
+ "eslint-plugin-react": "^7.12.0",
+ "prettier": "1.15.3"
},
"dependencies": {
"esm": "^3.2.4"

install eslint and prettier