fix eslint settings and change testing to use esm
ADD
.eslintignore
+/dist
+

MODIFY
package-lock.json
package-lock.json
"integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==",
"dev": true
},
+ "esm": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/esm/-/esm-3.2.7.tgz",
+ "integrity": "sha512-zsyD5gO8CY9dpK3IrdC4WHtvtHGXEFOpYA4zB+6p+Kygf3vv/6kF3YMEQLOArwKPPNvKt8gjI8UYhQW8bXM/YQ==",
+ "dev": true
+ },
"espree": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz",

MODIFY
package.json
package.json
"module": "dist/nat.esm.js",
"browser": "dist/nat.umd.js",
"scripts": {
- "test": "node test/test.js",
+ "test": "node -r esm test/test.js",
"build": "rollup -c",
"lint-fix": "eslint --fix '**/*.{js,jsx}'",
"lint-check": "eslint '**/*.{js,jsx}'"
"eslint-plugin-jsx-a11y": "^6.2.1",
"eslint-plugin-prettier": "^3.0.1",
"eslint-plugin-react": "^7.12.4",
+ "esm": "^3.2.7",
"prettier": "1.16.4",
"rollup": "^1.1.2",
"tape": "^4.9.2"

MODIFY
test/test.js
test/test.js
/* eslint no-mixed-operators: "off" */
-const test = require('tape');
-const Nat = require('../index-commonjs.js');
+import test from 'tape';
+import Nat from '../src/index';
test('Nat() throws when not a natural number', t => {
t.equal(Nat(0), 0);

fix eslint settings and change testing to use esm