diff --git a/package-lock.json b/package-lock.json index 098a564..37db5f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -177,6 +177,15 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "array-includes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.0.3.tgz", + "integrity": "sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0=", + "requires": { + "define-properties": "1.1.2", + "es-abstract": "1.11.0" + } + }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", @@ -1575,6 +1584,11 @@ } } }, + "chardet": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", + "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=" + }, "check-error": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", @@ -2261,6 +2275,7 @@ "version": "1.5.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, "requires": { "esutils": "2.0.2", "isarray": "1.0.0" @@ -2477,7 +2492,6 @@ "version": "1.11.0", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.11.0.tgz", "integrity": "sha512-ZnQrE/lXTTQ39ulXZ+J1DTFazV9qBy61x2bY071B+qGco8Z8q1QddsLdt/EF8Ai9hcWH72dWS0kFqXLxOxqslA==", - "dev": true, "requires": { "es-to-primitive": "1.1.1", "function-bind": "1.1.1", @@ -2490,7 +2504,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", - "dev": true, "requires": { "is-callable": "1.1.3", "is-date-object": "1.0.1", @@ -2609,50 +2622,276 @@ } }, "eslint": { - "version": "3.16.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.16.1.tgz", - "integrity": "sha1-m8MfxzQWks93LoBgdQj2fXEcVgk=", + "version": "4.19.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-4.19.1.tgz", + "integrity": "sha512-bT3/1x1EbZB7phzYu7vCr1v3ONuzDtX8WjuM9c0iYxe+cq+pwcKEoQjl7zd3RpC6YOLgnSy3cTN58M2jcoPDIQ==", "requires": { + "ajv": "5.5.2", "babel-code-frame": "6.26.0", - "chalk": "1.1.3", + "chalk": "2.4.0", "concat-stream": "1.6.2", - "debug": "2.6.9", - "doctrine": "1.5.0", - "escope": "3.6.0", + "cross-spawn": "5.1.0", + "debug": "3.1.0", + "doctrine": "2.1.0", + "eslint-scope": "3.7.1", + "eslint-visitor-keys": "1.0.0", "espree": "3.5.4", - "estraverse": "4.2.0", + "esquery": "1.0.1", "esutils": "2.0.2", "file-entry-cache": "2.0.0", + "functional-red-black-tree": "1.0.1", "glob": "7.1.2", - "globals": "9.18.0", + "globals": "11.4.0", "ignore": "3.3.7", "imurmurhash": "0.1.4", - "inquirer": "0.12.0", - "is-my-json-valid": "2.17.2", + "inquirer": "3.3.0", "is-resolvable": "1.1.0", - "js-yaml": "3.7.0", - "json-stable-stringify": "1.0.1", + "js-yaml": "3.11.0", + "json-stable-stringify-without-jsonify": "1.0.1", "levn": "0.3.0", "lodash": "4.17.5", + "minimatch": "3.0.4", "mkdirp": "0.5.1", "natural-compare": "1.4.0", "optionator": "0.8.2", "path-is-inside": "1.0.2", - "pluralize": "1.2.1", - "progress": "1.1.8", + "pluralize": "7.0.0", + "progress": "2.0.0", + "regexpp": "1.1.0", "require-uncached": "1.0.3", - "shelljs": "0.7.8", - "strip-bom": "3.0.0", + "semver": "5.5.0", + "strip-ansi": "4.0.0", "strip-json-comments": "2.0.1", - "table": "3.8.3", - "text-table": "0.2.0", - "user-home": "2.0.0" + "table": "4.0.2", + "text-table": "0.2.0" }, "dependencies": { - "strip-bom": { + "ajv": { + "version": "5.5.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", + "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "requires": { + "co": "4.6.0", + "fast-deep-equal": "1.1.0", + "fast-json-stable-stringify": "2.0.0", + "json-schema-traverse": "0.3.1" + } + }, + "ajv-keywords": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", + "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=" + }, + "ansi-escapes": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", + "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==" + }, + "ansi-regex": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "1.9.1" + } + }, + "chalk": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.0.tgz", + "integrity": "sha512-Wr/w0f4o9LuE7K53cD0qmbAMM+2XNLzR29vFn5hqko4sxGlUsyy363NvmyGIyk5tpe9cjTr9SJYbysEyPkRnFw==", + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "requires": { + "restore-cursor": "2.0.0" + } + }, + "cross-spawn": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", + "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", + "requires": { + "lru-cache": "4.1.2", + "shebang-command": "1.2.0", + "which": "1.3.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "requires": { + "esutils": "2.0.2" + } + }, + "esprima": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.0.tgz", + "integrity": "sha512-oftTcaMu/EGrEIu904mWteKIv8vMuOgGYo7EhVJJN00R/EED9DCua/xxHRdYnKtcECzVg7xOWhflvJMnqcFZjw==" + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "requires": { + "escape-string-regexp": "1.0.5" + } + }, + "globals": { + "version": "11.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.4.0.tgz", + "integrity": "sha512-Dyzmifil8n/TmSqYDEXbm+C8yitzJQqQIlJQLNRMwa+BOUJpRC19pyVeN12JAjt61xonvXjtff+hJruTRXn5HA==" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "inquirer": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-3.3.0.tgz", + "integrity": "sha512-h+xtnyk4EwKvFWHrUYsWErEVR+igKtLdchu+o0Z1RL7VU/jVMFbYir2bp6bAj8efFNxWqHX0dIss6fJQ+/+qeQ==", + "requires": { + "ansi-escapes": "3.1.0", + "chalk": "2.4.0", + "cli-cursor": "2.1.0", + "cli-width": "2.2.0", + "external-editor": "2.2.0", + "figures": "2.0.0", + "lodash": "4.17.5", + "mute-stream": "0.0.7", + "run-async": "2.3.0", + "rx-lite": "4.0.8", + "rx-lite-aggregates": "4.0.8", + "string-width": "2.1.1", + "strip-ansi": "4.0.0", + "through": "2.3.8" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "js-yaml": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.11.0.tgz", + "integrity": "sha512-saJstZWv7oNeOyBh3+Dx1qWzhW0+e6/8eDzo7p5rDFqxntSztloLtuKu+Ejhtq82jsilwOIZYsCz+lIjthg1Hw==", + "requires": { + "argparse": "1.0.10", + "esprima": "4.0.0" + } + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=" + }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "requires": { + "mimic-fn": "1.2.0" + } + }, + "pluralize": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", + "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==" + }, + "progress": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", + "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=" + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "requires": { + "onetime": "2.0.1", + "signal-exit": "3.0.2" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "requires": { + "is-promise": "2.1.0" + } + }, + "rx-lite": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-4.0.8.tgz", + "integrity": "sha1-Cx4Rr4vESDbwSmQH6S2kJGe3lEQ=" + }, + "slice-ansi": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", + "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "requires": { + "is-fullwidth-code-point": "2.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "2.0.0", + "strip-ansi": "4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "3.0.0" + } + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "requires": { + "has-flag": "3.0.0" + } + }, + "table": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/table/-/table-4.0.2.tgz", + "integrity": "sha512-UUkEAPdSGxtRpiV9ozJ5cMTtYiqz7Ni1OGqLXRCynrvzdtR1p+cfOWe2RJLwvUG8hNanaSRjecIqwOjqeatDsA==", + "requires": { + "ajv": "5.5.2", + "ajv-keywords": "2.1.1", + "chalk": "2.4.0", + "lodash": "4.17.5", + "slice-ansi": "1.0.0", + "string-width": "2.1.1" + } } } }, @@ -2814,12 +3053,32 @@ "dev": true }, "eslint-plugin-react": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.4.1.tgz", - "integrity": "sha1-fRqt50fbFYkvce7h/qSt35e8+is=", + "version": "7.7.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.7.0.tgz", + "integrity": "sha512-KC7Snr4YsWZD5flu6A5c0AcIZidzW3Exbqp7OT67OaD2AppJtlBr/GuPrW/vaQM/yfZotEvKAdrxrO+v8vwYJA==", "requires": { - "doctrine": "1.5.0", - "jsx-ast-utils": "1.4.1" + "doctrine": "2.1.0", + "has": "1.0.1", + "jsx-ast-utils": "2.0.1", + "prop-types": "15.6.1" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "requires": { + "esutils": "2.0.2" + } + }, + "jsx-ast-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz", + "integrity": "sha1-6AGxs5mF4g//yHtA43SAgOLcrH8=", + "requires": { + "array-includes": "3.0.3" + } + } } }, "eslint-plugin-standard": { @@ -2828,6 +3087,20 @@ "integrity": "sha1-NNDJFbRe3G8BA5PH7vOCOwhWXPI=", "dev": true }, + "eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha1-PWPD7f2gLgbgGkUq2IyqzHzctug=", + "requires": { + "esrecurse": "4.2.1", + "estraverse": "4.2.0" + } + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==" + }, "espree": { "version": "3.5.4", "resolved": "https://registry.npmjs.org/espree/-/espree-3.5.4.tgz", @@ -2842,6 +3115,14 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "requires": { + "estraverse": "4.2.0" + } + }, "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", @@ -2973,6 +3254,16 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" }, + "external-editor": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "requires": { + "chardet": "0.4.2", + "iconv-lite": "0.4.19", + "tmp": "0.0.33" + } + }, "extglob": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", @@ -4071,6 +4362,11 @@ "is-callable": "1.1.3" } }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + }, "generate-function": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/generate-function/-/generate-function-2.0.0.tgz", @@ -4610,8 +4906,7 @@ "is-callable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.3.tgz", - "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=", - "dev": true + "integrity": "sha1-hut1OSgF3cM69xySoO7fdO52BLI=" }, "is-ci": { "version": "1.1.0", @@ -4624,8 +4919,7 @@ "is-date-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.1.tgz", - "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", - "dev": true + "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=" }, "is-directory": { "version": "0.3.1", @@ -4751,6 +5045,11 @@ "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=" }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=" + }, "is-property": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-property/-/is-property-1.0.2.tgz", @@ -4760,7 +5059,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", - "dev": true, "requires": { "has": "1.0.1" } @@ -4798,8 +5096,7 @@ "is-symbol": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", - "dev": true + "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=" }, "is-typedarray": { "version": "1.0.0", @@ -5326,6 +5623,11 @@ "jsonify": "0.0.0" } }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=" + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -5770,6 +6072,11 @@ "mime-db": "1.33.0" } }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==" + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -7359,6 +7666,47 @@ "isarray": "1.0.0" } }, + "eslint": { + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-3.16.1.tgz", + "integrity": "sha1-m8MfxzQWks93LoBgdQj2fXEcVgk=", + "requires": { + "babel-code-frame": "6.26.0", + "chalk": "1.1.3", + "concat-stream": "1.6.2", + "debug": "2.6.9", + "doctrine": "1.3.0", + "escope": "3.6.0", + "espree": "3.5.4", + "estraverse": "4.2.0", + "esutils": "2.0.2", + "file-entry-cache": "2.0.0", + "glob": "7.1.2", + "globals": "9.18.0", + "ignore": "3.3.7", + "imurmurhash": "0.1.4", + "inquirer": "0.12.0", + "is-my-json-valid": "2.17.2", + "is-resolvable": "1.1.0", + "js-yaml": "3.7.0", + "json-stable-stringify": "1.0.1", + "levn": "0.3.0", + "lodash": "4.17.5", + "mkdirp": "0.5.1", + "natural-compare": "1.4.0", + "optionator": "0.8.2", + "path-is-inside": "1.0.2", + "pluralize": "1.2.1", + "progress": "1.1.8", + "require-uncached": "1.0.3", + "shelljs": "0.7.8", + "strip-bom": "3.0.0", + "strip-json-comments": "2.0.1", + "table": "3.8.3", + "text-table": "0.2.0", + "user-home": "2.0.0" + } + }, "eslint-import-resolver-node": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz", @@ -7405,6 +7753,15 @@ "pkg-up": "1.0.0" } }, + "eslint-plugin-react": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-6.4.1.tgz", + "integrity": "sha1-fRqt50fbFYkvce7h/qSt35e8+is=", + "requires": { + "doctrine": "1.3.0", + "jsx-ast-utils": "1.4.1" + } + }, "ms": { "version": "0.7.1", "resolved": "https://registry.npmjs.org/ms/-/ms-0.7.1.tgz", @@ -7418,6 +7775,11 @@ "asap": "2.0.6" } }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, "whatwg-fetch": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.2.tgz", @@ -7622,6 +7984,11 @@ "is-equal-shallow": "0.1.3" } }, + "regexpp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-1.1.0.tgz", + "integrity": "sha512-LOPw8FpgdQF9etWMaAfG/WRthIdXJGYp4mJ2Jgn/2lpkbod9jPn0t9UqN7AxBOKNfzRbYyVfgc7Vk4t/MpnXgw==" + }, "regexpu-core": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", @@ -7849,6 +8216,14 @@ "resolved": "https://registry.npmjs.org/rx-lite/-/rx-lite-3.1.2.tgz", "integrity": "sha1-Gc5QLKVyZl87ZHsQk5+X/RYV8QI=" }, + "rx-lite-aggregates": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz", + "integrity": "sha1-dTuHqJoRyVRnxKwWJsTvxOBcZ74=", + "requires": { + "rx-lite": "3.1.2" + } + }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", @@ -7967,6 +8342,19 @@ "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.2.6.tgz", "integrity": "sha1-F93t3F9yL7ZlAWWIlUYZd4ZzFbo=" }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "requires": { + "shebang-regex": "1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" + }, "shelljs": { "version": "0.7.8", "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.7.8.tgz", @@ -7982,6 +8370,11 @@ "resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz", "integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww==" }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" + }, "sinon": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/sinon/-/sinon-4.5.0.tgz", @@ -8429,6 +8822,14 @@ "setimmediate": "1.0.5" } }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "1.0.2" + } + }, "tmpl": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", diff --git a/package.json b/package.json index c83bb2e..f329a0c 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,8 @@ "babel-preset-airbnb": "^2.4.0", "babel-preset-es2015": "^6.24.1", "babel-preset-react": "^6.24.1", + "eslint": "^4.19.1", + "eslint-plugin-react": "^7.7.0", "react": "^16.3.1", "react-dom": "^16.3.1", "react-redux": "^5.0.7", diff --git a/src/actions/accounts.js b/src/actions/accounts.js index 4f84c8a..328aa1e 100644 --- a/src/actions/accounts.js +++ b/src/actions/accounts.js @@ -1,25 +1,23 @@ -import Network from '../network' -import AlertActions from './alerts' -import * as ActionTypes from '../actiontypes' +import Network from '../network'; +import AlertActions from './alerts'; +import * as ActionTypes from '../actiontypes'; const AccountActions = { - - findAccount() { - return async function(dispatch) { + findAccount () { + return async function (dispatch) { try { - const addresses = await Network.getAccounts() - const mainAddress = addresses[0] - dispatch(AccountActions.receiveAccount(mainAddress)) - } catch(error) { - dispatch(AlertActions.showError(error)) + const addresses = await Network.getAccounts(); + const mainAddress = addresses[0]; + dispatch(AccountActions.receiveAccount(mainAddress)); + } catch (error) { + dispatch(AlertActions.showError(error)); } - } + }; }, - receiveAccount(address) { - return { type: ActionTypes.RECEIVE_ACCOUNT, address } + receiveAccount (address) { + return { type: ActionTypes.RECEIVE_ACCOUNT, address }; }, +}; -} - -export default AccountActions +export default AccountActions; diff --git a/src/actions/alerts.js b/src/actions/alerts.js index a699936..65ae506 100644 --- a/src/actions/alerts.js +++ b/src/actions/alerts.js @@ -1,14 +1,14 @@ -import * as ActionTypes from '../actiontypes' +import * as ActionTypes from '../actiontypes'; const AlertActions = { - showError(error, message = null) { - console.error(error) - return { type: ActionTypes.SHOW_ERROR, message: (message || error.message) } + showError (error, message = null) { + console.error(error); + return { type: ActionTypes.SHOW_ERROR, message: (message || error.message) }; }, - reset() { - return { type: ActionTypes.RESET_ERROR } - } -} + reset () { + return { type: ActionTypes.RESET_ERROR }; + }, +}; -export default AlertActions +export default AlertActions; diff --git a/src/actions/fetching.js b/src/actions/fetching.js index f7a2306..c61f0b9 100644 --- a/src/actions/fetching.js +++ b/src/actions/fetching.js @@ -1,13 +1,13 @@ import * as ActionTypes from '../actiontypes'; const FetchingActions = { - start(message) { - return { type: ActionTypes.START_FETCHING, message } + start (message) { + return { type: ActionTypes.START_FETCHING, message }; }, - stop() { - return { type: ActionTypes.STOP_FETCHING } + stop () { + return { type: ActionTypes.STOP_FETCHING }; }, -} +}; -export default FetchingActions +export default FetchingActions; diff --git a/src/actions/jurisdiction.js b/src/actions/jurisdiction.js index da1a744..714380f 100644 --- a/src/actions/jurisdiction.js +++ b/src/actions/jurisdiction.js @@ -1,26 +1,25 @@ -import * as ActionTypes from '../actiontypes' +import * as ActionTypes from '../actiontypes'; -import { Jurisdiction } from '../contracts' -import { JURISDICTION_ADDRESS } from '../constants' +import { Jurisdiction } from '../contracts'; +import { JURISDICTION_ADDRESS } from '../constants'; const JurisdictionActions = { - - find() { - return async function(dispatch) { - const jurisdiction = await Jurisdiction.at(JURISDICTION_ADDRESS) - dispatch(JurisdictionActions.receive(jurisdiction)) - } + find () { + return async function (dispatch) { + const jurisdiction = await Jurisdiction.at(JURISDICTION_ADDRESS); + dispatch(JurisdictionActions.receive(jurisdiction)); + }; }, - receive(jurisdiction) { - return async function(dispatch) { - const owner = (await jurisdiction.owner()).toString() + receive (jurisdiction) { + return async function (dispatch) { + const owner = (await jurisdiction.owner()).toString(); dispatch({ type: ActionTypes.RECEIVE_JURISDICTION, jurisdiction: { owner }, - }) - } + }); + }; }, -} +}; -export default JurisdictionActions +export default JurisdictionActions; diff --git a/src/actions/network.js b/src/actions/network.js index bc2c7d7..8e9ee8f 100644 --- a/src/actions/network.js +++ b/src/actions/network.js @@ -1,23 +1,22 @@ -import Network from '../network' -import * as ActionTypes from '../actiontypes' +import Network from '../network'; +import * as ActionTypes from '../actiontypes'; const NetworkActions = { - checkConnection() { + checkConnection () { return dispatch => { - Network.web3().isConnected() ? - dispatch(NetworkActions.connectionSucceeded()) : - dispatch(NetworkActions.connectionFailed()) - } + Network.web3().isConnected() + ? dispatch(NetworkActions.connectionSucceeded()) + : dispatch(NetworkActions.connectionFailed()); + }; }, - connectionSucceeded() { - return { type: ActionTypes.CONNECTION_SUCCEEDED } + connectionSucceeded () { + return { type: ActionTypes.CONNECTION_SUCCEEDED }; }, - connectionFailed() { - return { type: ActionTypes.CONNECTION_FAILED } + connectionFailed () { + return { type: ActionTypes.CONNECTION_FAILED }; }, +}; -} - -export default NetworkActions +export default NetworkActions; diff --git a/src/actions/validation.js b/src/actions/validation.js index 38afe50..7618424 100644 --- a/src/actions/validation.js +++ b/src/actions/validation.js @@ -4,20 +4,19 @@ import { Jurisdiction, DummyValidator } from '../contracts'; import { JURISDICTION_ADDRESS, VALIDATOR_ADDRESS } from '../constants'; const ValidationActions = { - - checkValidated(address) { + checkValidated (address) { return async function (dispatch) { const jurisdiction = await Jurisdiction.at(JURISDICTION_ADDRESS); - const isValidated = await jurisdiction.hasAttribute(address, "VALID"); + const isValidated = await jurisdiction.hasAttribute(address, 'VALID'); dispatch(ValidationActions.update(address, isValidated)); - } + }; }, - update(address, isValidated) { + update (address, isValidated) { return { type: ActionTypes.VALIDATION_UPDATED, address, isValidated }; }, - validate(address) { + validate (address) { return async function (dispatch) { const validator = await DummyValidator.at(VALIDATOR_ADDRESS); await validator.validate({ from: address }); diff --git a/src/actions/validators.js b/src/actions/validators.js index 3dbe192..027f2ad 100644 --- a/src/actions/validators.js +++ b/src/actions/validators.js @@ -1,29 +1,28 @@ -import { Jurisdiction } from '../contracts' -import AlertActions from './alerts' -import * as ActionTypes from '../actiontypes' -import { JURISDICTION_ADDRESS } from '../constants' +import { Jurisdiction } from '../contracts'; +import AlertActions from './alerts'; +import * as ActionTypes from '../actiontypes'; +import { JURISDICTION_ADDRESS } from '../constants'; const ValidatorsActions = { - - findAll() { - return async function(dispatch) { - const jurisdiction = await Jurisdiction.at(JURISDICTION_ADDRESS) + findAll () { + return async function (dispatch) { + const jurisdiction = await Jurisdiction.at(JURISDICTION_ADDRESS); // FIXME this is very slow. We have to add a function to the Jurisdiction // contract that returns all the validators. // See https://github.com/TPL-protocol/tpl-contracts/issues/2 // --elopio - 20180704 const events = jurisdiction.ValidatorAdded({}, { fromBlock: 0, toBlock: 'latest' }); // FIXME this is not taking reorgs into account - events.watch(function(error, result) { - if(error) AlertActions.showError(error) - else dispatch(ValidatorsActions.add(result.args.validator)) - }) - } + events.watch(function (error, result) { + if (error) AlertActions.showError(error); + else dispatch(ValidatorsActions.add(result.args.validator)); + }); + }; }, - add(validator) { - return { type: ActionTypes.ADD_VALIDATOR, validator } + add (validator) { + return { type: ActionTypes.ADD_VALIDATOR, validator }; }, -} +}; -export default ValidatorsActions +export default ValidatorsActions; diff --git a/src/actions/wallet.js b/src/actions/wallet.js index 2e5ca9d..141e4ee 100644 --- a/src/actions/wallet.js +++ b/src/actions/wallet.js @@ -1,16 +1,11 @@ import * as ActionTypes from '../actiontypes'; -import Network from '../network' - -import { SampleCrowdsale } from '../contracts'; -import { SAMPLE_CROWDSALE_ADDRESS } from '../constants'; -import { SAMPLE_TOKEN_ADDRESS } from '../constants'; -import { SampleToken, } from '../contracts'; - +import Network from '../network'; +import { SampleCrowdsale, SampleToken } from '../contracts'; +import { SAMPLE_CROWDSALE_ADDRESS, SAMPLE_TOKEN_ADDRESS } from '../constants'; const WalletActions = { - - getBalance(address) { + getBalance (address) { return async function (dispatch) { const sampleToken = await SampleToken.at(SAMPLE_TOKEN_ADDRESS); const balance = await sampleToken.balanceOf(address); @@ -18,19 +13,17 @@ const WalletActions = { }; }, - updateBalance(address, balance) { + updateBalance (address, balance) { return { type: ActionTypes.BALANCE_UPDATED, address, balance }; }, - - buy(address) { + buy (address) { return async function (dispatch) { const sampleCrowdsale = await SampleCrowdsale.at(SAMPLE_CROWDSALE_ADDRESS); - await sampleCrowdsale.sendTransaction({ from: address, value: Network.web3().toWei(0.1, "ether") }); + await sampleCrowdsale.sendTransaction({ from: address, value: Network.web3().toWei(0.1, 'ether') }); dispatch(WalletActions.getBalance(address)); }; }, - }; export default WalletActions; diff --git a/src/actiontypes.js b/src/actiontypes.js index 485ba0f..3e46a34 100644 --- a/src/actiontypes.js +++ b/src/actiontypes.js @@ -1,13 +1,13 @@ export const SHOW_ERROR = 'SHOW_ERROR'; export const RESET_ERROR = 'RESET_ERROR'; -export const START_FETCHING = 'START_FETCHING' -export const STOP_FETCHING = 'STOP_FETCHING' +export const START_FETCHING = 'START_FETCHING'; +export const STOP_FETCHING = 'STOP_FETCHING'; -export const CONNECTION_FAILED = 'CONNECTION_FAILED' -export const CONNECTION_SUCCEEDED = 'CONNECTION_SUCCEEDED' +export const CONNECTION_FAILED = 'CONNECTION_FAILED'; +export const CONNECTION_SUCCEEDED = 'CONNECTION_SUCCEEDED'; -export const RECEIVE_JURISDICTION = 'RECEIVE_JURISDICTION' +export const RECEIVE_JURISDICTION = 'RECEIVE_JURISDICTION'; export const ADD_VALIDATOR = 'ADD_VALIDATOR'; diff --git a/src/components/Account.react.js b/src/components/Account.react.js index cf54a70..0ee58ad 100644 --- a/src/components/Account.react.js +++ b/src/components/Account.react.js @@ -1,35 +1,33 @@ import React, { Component } from 'react'; import { connect } from 'react-redux'; -import AccountActions from "../actions/accounts"; +import AccountActions from '../actions/accounts'; class Account extends Component { - - componentWillMount() { + componentWillMount () { this.props.findAccount(); } - render() { + render () { return (
My address is { this.props.address }
{alert.message} x
-RootDAO: { props.jurisdiction.owner }
-}) +const RootDAO = connect(({ jurisdiction }) => ({ jurisdiction }))((props) => { + returnRootDAO: { props.jurisdiction.owner }
; +}); class Transparency extends Component { - componentWillMount() { - this.props.find() + componentWillMount () { + this.props.find(); } - render() { + render () { return (Am I validated? { this.props.isValidated ? "Yes" : "No" }
+Am I validated? { this.props.isValidated ? 'Yes' : 'No' }
Validators:
- { validators.length === 0 ? ( - No validators - ) : ( -I have { this.props.balance.toString() } tokens.
@@ -19,21 +18,20 @@ class Wallet extends Component {