diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..3564dd983 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,3 @@ +node_modules/ +dist/ +tests/*.bundle.* diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..8581447c4 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,857 @@ +module.exports = { + "env": { + "browser": true, + "commonjs": true, + "es6": false + }, + "extends": "eslint:recommended", + "parserOptions": { + "ecmaVersion": 8, + "sourceType": "module", + "ecmaFeatures": { + "experimentalObjectRestSpread": true + } + }, + "rules": { + "accessor-pairs": [ + "error", + { + "setWithoutGet": true, + "getWithoutSet": false + } + ], + "array-bracket-newline": [ + "off" + ], + "array-bracket-spacing": [ + "off" + ], + "array-callback-return": [ + "off" + ], + "array-element-newline": [ + "off" + ], + "arrow-body-style": [ + "off" + ], + "arrow-parens": [ + "off" + ], + "arrow-spacing": [ + "off" + ], + "block-scoped-var": [ + "off" + ], + "block-spacing": [ + "off" + ], + "brace-style": [ + "off" + ], + "callback-return": [ + "error" + ], + "camelcase": [ + "off" + ], + "capitalized-comments": [ + "off" + ], + "class-methods-use-this": [ + "error" + ], + "comma-dangle": [ + "off" + ], + "comma-spacing": [ + "off" + ], + "comma-style": [ + "error", + "last" + ], + "complexity": [ + "off" + ], + "computed-property-spacing": [ + "off", + "never" + ], + "consistent-return": [ + "off" + ], + "consistent-this": [ + "off" + ], + "constructor-super": [ + "error" + ], + "curly": [ + "off" + ], + "default-case": [ + "off" + ], + "dot-location": [ + "error", + "property" + ], + "dot-notation": [ + "off" + ], + "eol-last": [ + "off" + ], + "eqeqeq": [ + "off" + ], + "for-direction": [ + "error" + ], + "func-call-spacing": [ + "off" + ], + "func-name-matching": [ + "error" + ], + "func-names": [ + "off", + "never" + ], + "func-style": [ + "off" + ], + "function-paren-newline": [ + "off" + ], + "generator-star-spacing": [ + "error", + "before" + ], + "getter-return": [ + "error", + { + "allowImplicit": false + } + ], + "global-require": [ + "off" + ], + "guard-for-in": [ + "off" + ], + "handle-callback-err": [ + "error" + ], + "id-blacklist": [ + "error" + ], + "id-length": [ + "off" + ], + "id-match": [ + "error" + ], + "implicit-arrow-linebreak": [ + "error", + "beside" + ], + "indent": [ + "off" + ], + "indent-legacy": [ + "off" + ], + "init-declarations": [ + "off" + ], + "jsx-quotes": [ + "error" + ], + "key-spacing": [ + "off" + ], + "keyword-spacing": [ + "off" + ], + "line-comment-position": [ + "off" + ], + "linebreak-style": [ + "error", + "windows" + ], + "lines-around-comment": [ + "off" + ], + "lines-around-directive": [ + "error" + ], + "lines-between-class-members": [ + "error" + ], + "max-depth": [ + "off" + ], + "max-len": [ + "off" + ], + "max-lines": [ + "off" + ], + "max-nested-callbacks": [ + "error" + ], + "max-params": [ + "off" + ], + "max-statements": [ + "off" + ], + "max-statements-per-line": [ + "off" + ], + "multiline-comment-style": [ + "off", + "starred-block" + ], + "multiline-ternary": [ + "off", + "never" + ], + "new-cap": [ + "off" + ], + "new-parens": [ + "off" + ], + "newline-after-var": [ + "off" + ], + "newline-before-return": [ + "off" + ], + "newline-per-chained-call": [ + "off" + ], + "no-alert": [ + "error" + ], + "no-array-constructor": [ + "error" + ], + "no-await-in-loop": [ + "error" + ], + "no-bitwise": [ + "off" + ], + "no-buffer-constructor": [ + "error" + ], + "no-caller": [ + "error" + ], + "no-case-declarations": [ + "error" + ], + "no-catch-shadow": [ + "error" + ], + "no-class-assign": [ + "error" + ], + "no-compare-neg-zero": [ + "error" + ], + "no-cond-assign": [ + "off", + "except-parens" + ], + "no-confusing-arrow": [ + "error" + ], + "no-console": [ + "off" + ], + "no-const-assign": [ + "error" + ], + "no-constant-condition": [ + "error", + { + "checkLoops": false + } + ], + "no-continue": [ + "off" + ], + "no-control-regex": [ + "error" + ], + "no-debugger": [ + "error" + ], + "no-delete-var": [ + "error" + ], + "no-div-regex": [ + "error" + ], + "no-dupe-args": [ + "error" + ], + "no-dupe-class-members": [ + "error" + ], + "no-dupe-keys": [ + "error" + ], + "no-duplicate-case": [ + "error" + ], + "no-duplicate-imports": [ + "error", + { + "includeExports": true + } + ], + "no-else-return": [ + "off" + ], + "no-empty": [ + "off", + { + "allowEmptyCatch": false + } + ], + "no-empty-character-class": [ + "error" + ], + "no-empty-function": [ + "off" + ], + "no-empty-pattern": [ + "error" + ], + "no-eq-null": [ + "off" + ], + "no-ex-assign": [ + "off" + ], + "no-extra-boolean-cast": [ + "error" + ], + "no-extra-parens": [ + "error", + "all", + { + "conditionalAssign": false + } + ], + "no-extra-semi": [ + "off" + ], + "no-eval": [ + "off" + ], + "no-extend-native": [ + "off" + ], + "no-extra-bind": [ + "error" + ], + "no-extra-label": [ + "error" + ], + "no-extra-parens": [ + "off" + ], + "no-fallthrough": [ + "off" + ], + "no-floating-decimal": [ + "off" + ], + "no-func-assign": [ + "error" + ], + "no-global-assign": [ + "error" + ], + "no-implicit-coercion": [ + "off" + ], + "no-implicit-globals": [ + "error" + ], + "no-implied-eval": [ + "error" + ], + "no-inline-comments": [ + "off" + ], + "no-inner-declarations": [ + "off", + "both" + ], + "no-invalid-regexp": [ + "error" + ], + "no-invalid-this": [ + "off" + ], + "no-irregular-whitespace": [ + "error", + { + "skipStrings": false, + "skipComments": false, + "skipRegExps": false, + "skipTemplates": false + } + ], + "no-iterator": [ + "error" + ], + "no-label-var": [ + "error" + ], + "no-labels": [ + "off" + ], + "no-lone-blocks": [ + "error" + ], + "no-lonely-if": [ + "off" + ], + "no-loop-func": [ + "off" + ], + "no-magic-numbers": [ + "off" + ], + "no-mixed-operators": [ + "off" + ], + "no-mixed-requires": [ + "error" + ], + "no-mixed-spaces-and-tabs": [ + "off" + ], + "no-multi-assign": [ + "off" + ], + "no-multi-spaces": [ + "off" + ], + "no-multi-str": [ + "error" + ], + "no-multiple-empty-lines": [ + "off", + { + "max": 1 + } + ], + "no-native-reassign": [ + "error" + ], + "no-negated-condition": [ + "off" + ], + "no-negated-in-lhs": [ + "error" + ], + "no-nested-ternary": [ + "off" + ], + "no-new": [ + "error" + ], + "no-new-func": [ + "error" + ], + "no-new-object": [ + "error" + ], + "no-new-require": [ + "error" + ], + "no-new-symbol": [ + "error" + ], + "no-new-wrappers": [ + "error" + ], + "no-octal": [ + "error" + ], + "no-octal-escape": [ + "error" + ], + "no-obj-calls": [ + "error" + ], + "no-param-reassign": [ + "off" + ], + "no-path-concat": [ + "error" + ], + "no-plusplus": [ + "off" + ], + "no-process-env": [ + "off" + ], + "no-process-exit": [ + "error" + ], + "no-proto": [ + "error" + ], + "no-prototype-builtins": [ + "off" + ], + "no-redeclare": [ + "off" + ], + "no-regex-spaces": [ + "error" + ], + "no-restricted-globals": [ + "error" + ], + "no-restricted-imports": [ + "error" + ], + "no-restricted-modules": [ + "error" + ], + "no-restricted-properties": [ + "off", + { + "object": "console", + "property": "log", + "message": "'log' is too general, use an appropriate level when logging." + } + ], + "no-restricted-syntax": [ + "error" + ], + "no-return-assign": [ + "off" + ], + "no-return-await": [ + "error" + ], + "no-script-url": [ + "error" + ], + "no-self-assign": [ + "error", + { + "props": false + } + ], + "no-self-compare": [ + "error" + ], + "no-sequences": [ + "error" + ], + "no-shadow": [ + "off" + ], + "no-shadow-restricted-names": [ + "error" + ], + "no-spaced-func": [ + "off" + ], + "no-sparse-arrays": [ + "error" + ], + "no-sync": [ + "error" + ], + "no-tabs": [ + "off" + ], + "no-template-curly-in-string": [ + "error" + ], + "no-ternary": [ + "off" + ], + "no-this-before-super": [ + "off" + ], + "no-throw-literal": [ + "error" + ], + "no-trailing-spaces": [ + "off" + ], + "no-undef": [ + "off" + ], + "no-undef-init": [ + "error" + ], + "no-undefined": [ + "off" + ], + "no-underscore-dangle": [ + "off" + ], + "no-unexpected-multiline": [ + "error" + ], + "no-unmodified-loop-condition": [ + "error" + ], + "no-unneeded-ternary": [ + "off" + ], + "no-unreachable": [ + "off" + ], + "no-unsafe-finally": [ + "error" + ], + "no-unsafe-negation": [ + "error" + ], + "no-unused-expressions": [ + "off" + ], + "no-unused-labels": [ + "error" + ], + "no-unused-vars": [ + "off" + ], + "no-use-before-define": [ + "off" + ], + "no-useless-call": [ + "off" + ], + "no-useless-computed-key": [ + "error" + ], + "no-useless-concat": [ + "off" + ], + "no-useless-constructor": [ + "error" + ], + "no-useless-escape": [ + "off" + ], + "no-useless-rename": [ + "error", + { + "ignoreDestructuring": false, + "ignoreExport": false, + "ignoreImport": false + } + ], + "no-useless-return": [ + "off" + ], + "no-var": [ + "off" + ], + "no-void": [ + "off" + ], + "no-warning-comments": [ + "off" + ], + "no-whitespace-before-property": [ + "error" + ], + "no-with": [ + "error" + ], + "nonblock-statement-body-position": [ + "off", + "below" + ], + "object-curly-newline": [ + "off" + ], + "object-curly-spacing": [ + "off" + ], + "object-property-newline": [ + "off" + ], + "object-shorthand": [ + "off" + ], + "one-var": [ + "off" + ], + "one-var-declaration-per-line": [ + "off" + ], + "operator-assignment": [ + "off" + ], + "operator-linebreak": [ + "off", + "none" + ], + "padded-blocks": [ + "off" + ], + "padding-line-between-statements": [ + "error" + ], + "prefer-arrow-callback": [ + "off" + ], + "prefer-const": [ + "off" + ], + "prefer-destructuring": [ + "off" + ], + "prefer-numeric-literals": [ + "error" + ], + "prefer-promise-reject-errors": [ + "off" + ], + "prefer-reflect": [ + "off" + ], + "prefer-rest-params": [ + "off" + ], + "prefer-spread": [ + "off" + ], + "prefer-template": [ + "off" + ], + "quote-props": [ + "off" + ], + "quotes": [ + "off" + ], + "radix": [ + "off", + "as-needed" + ], + "require-await": [ + "off" + ], + "require-jsdoc": [ + "off" + ], + "require-yield": [ + "error" + ], + "rest-spread-spacing": [ + "error", + "never" + ], + "semi": [ + "off" + ], + "semi-spacing": [ + "off" + ], + "semi-style": [ + "error", + "last" + ], + "sort-imports": [ + "off" + ], + "sort-keys": [ + "off" + ], + "sort-vars": [ + "off" + ], + "space-before-blocks": [ + "off" + ], + "space-before-function-paren": [ + "off" + ], + "space-in-parens": [ + "off" + ], + "space-infix-ops": [ + "off" + ], + "space-unary-ops": [ + "off" + ], + "spaced-comment": [ + "off" + ], + "strict": [ + "off" + ], + "switch-colon-spacing": [ + "error", + { + "after": true, + "before": false + } + ], + "symbol-description": [ + "error" + ], + "template-curly-spacing": [ + "error" + ], + "template-tag-spacing": [ + "error" + ], + "unicode-bom": [ + "error", + "never" + ], + "use-isnan": [ + "error" + ], + "valid-jsdoc": [ + "off" + ], + "valid-typeof": [ + "error" + ], + "vars-on-top": [ + "off" + ], + "wrap-iife": [ + "error", + "any" + ], + "wrap-regex": [ + "off" + ], + "yield-star-spacing": [ + "error", + "before" + ], + "yoda": [ + "error", + "never" + ] + } +}; \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 015e3a66b..6aa3f2697 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3237,24 +3237,28 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz", + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "dev": true, "optional": true, "requires": { @@ -3264,12 +3268,14 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "1.0.0", @@ -3278,34 +3284,40 @@ }, "chownr": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true }, "debug": { "version": "2.6.9", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "optional": true, "requires": { @@ -3314,25 +3326,29 @@ }, "deep-extend": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, "requires": { @@ -3341,13 +3357,15 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, "requires": { @@ -3363,7 +3381,8 @@ }, "glob": { "version": "7.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "optional": true, "requires": { @@ -3377,13 +3396,15 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.21", - "bundled": true, + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.21.tgz", + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", "dev": true, "optional": true, "requires": { @@ -3392,7 +3413,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, "requires": { @@ -3401,7 +3423,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, "requires": { @@ -3411,18 +3434,21 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "1.0.1" @@ -3430,13 +3456,15 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "1.1.11" @@ -3444,12 +3472,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "minipass": { "version": "2.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.2.4.tgz", + "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, "requires": { "safe-buffer": "5.1.1", @@ -3458,7 +3488,8 @@ }, "minizlib": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz", + "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "dev": true, "optional": true, "requires": { @@ -3467,7 +3498,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { "minimist": "0.0.8" @@ -3475,13 +3507,15 @@ }, "ms": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true, "optional": true }, "needle": { "version": "2.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/needle/-/needle-2.2.0.tgz", + "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", "dev": true, "optional": true, "requires": { @@ -3492,7 +3526,8 @@ }, "node-pre-gyp": { "version": "0.10.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.0.tgz", + "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", "dev": true, "optional": true, "requires": { @@ -3510,7 +3545,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, "requires": { @@ -3520,13 +3556,15 @@ }, "npm-bundled": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.3.tgz", + "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.1.10", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.10.tgz", + "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", "dev": true, "optional": true, "requires": { @@ -3536,7 +3574,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, "requires": { @@ -3548,18 +3587,21 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1.0.2" @@ -3567,19 +3609,22 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, "requires": { @@ -3589,19 +3634,22 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true }, "rc": { "version": "1.2.7", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.7.tgz", + "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "dev": true, "optional": true, "requires": { @@ -3613,7 +3661,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } @@ -3621,7 +3670,8 @@ }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, "requires": { @@ -3636,7 +3686,8 @@ }, "rimraf": { "version": "2.6.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "optional": true, "requires": { @@ -3645,42 +3696,49 @@ }, "safe-buffer": { "version": "5.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "dev": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true }, "semver": { "version": "5.5.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "1.1.0", @@ -3690,7 +3748,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, "requires": { @@ -3699,7 +3758,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "2.1.1" @@ -3707,13 +3767,15 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "4.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz", + "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", "dev": true, "optional": true, "requires": { @@ -3728,13 +3790,15 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true }, "wide-align": { "version": "1.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.2.tgz", + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, "optional": true, "requires": { @@ -3743,12 +3807,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "yallist": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz", + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", "dev": true } } @@ -6177,7 +6243,18 @@ "requires": { "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", - "supports-color": "2.0.0" + "supports-color": "5.4.0" + }, + "dependencies": { + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + } } }, "cli-table": { @@ -6387,8 +6464,7 @@ "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true + "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, "topo": { "version": "1.1.0", diff --git a/package.json b/package.json index 4f537354d..0fb9c30fa 100644 --- a/package.json +++ b/package.json @@ -84,9 +84,11 @@ "url": "git+https://github.com/danielyxie/bitburner.git" }, "scripts": { + "lint:js": "eslint *.js src utils tests", "start:dev": "webpack-dev-server", "build": "webpack --mode production", "build:dev": "webpack --mode development", + "lint:javascript": "eslint ./src/**/*.js ./tests/**/*.js ./utils/**/*.js", "lint:typescript": "tslint --project . --exclude **/*.d.ts --format stylish src/**/*.ts utils/**/*.ts", "watch": "webpack --watch --mode production", "watch:dev": "webpack --watch --mode development" diff --git a/src/BitNode.js b/src/BitNode.js index 5327e5f54..d132ab732 100644 --- a/src/BitNode.js +++ b/src/BitNode.js @@ -308,14 +308,14 @@ function initBitNodeMultipliers() { BitNodeMultipliers.CorporationValuation = 0.01; break; case 12: //The Recursion - let sf12Lvl = 0; - for (let i = 0; i < Player.sourceFiles.length; i++) { + var sf12Lvl = 0; + for (var i = 0; i < Player.sourceFiles.length; i++) { if (Player.sourceFiles[i].n === 12) { sf12Lvl = Player.sourceFiles[i].lvl; } } - const inc = Math.pow(1.01, sf12Lvl); - const dec = Math.pow(0.99, sf12Lvl); + var inc = Math.pow(1.01, sf12Lvl); + var dec = Math.pow(0.99, sf12Lvl); BitNodeMultipliers.HackingLevelMultiplier = dec; BitNodeMultipliers.ServerMaxMoney = dec; diff --git a/src/Settings.js b/src/Settings.js index d219937b1..c91c88fb4 100644 --- a/src/Settings.js +++ b/src/Settings.js @@ -27,7 +27,7 @@ function initSettings() { Settings.MaxPortCapacity = 50; Settings.SuppressMessages = false; Settings.SuppressFactionInvites = false; - Settings.SuppressTravelConfirmation = false, + Settings.SuppressTravelConfirmation = false; Settings.AutosaveInterval = 60; Settings.DisableHotkeys = false; } diff --git a/src/SourceFile.js b/src/SourceFile.js index 3071d6760..c64a533e9 100644 --- a/src/SourceFile.js +++ b/src/SourceFile.js @@ -182,8 +182,8 @@ function applySourceFile(srcFile) { Player.company_rep_mult *= incMult; break; case 12: //The testing ground - const inc = Math.pow(1.01, srcFile.lvl); - const dec = Math.pow(0.99, srcFile.lvl); + var inc = Math.pow(1.01, srcFile.lvl); + var dec = Math.pow(0.99, srcFile.lvl); Player.hacking_chance_mult *= inc; Player.hacking_speed_mult *= inc;