diff --git a/.eslintrc b/.eslintrc index b668757a3..8f1862aff 100644 --- a/.eslintrc +++ b/.eslintrc @@ -6,8 +6,14 @@ }, "parserOptions": { "ecmaVersion": 2017, - "sourceType": "module" + "sourceType": "module" }, + "overrides": [ + { + "files": ["**/*.ts"], + "parser": "@typescript-eslint/parser" + } + ], "rules": { "block-scoped-var": 0, "brace-style": [ @@ -35,34 +41,19 @@ "after": true } ], - "comma-style": [ - 2, - "last" - ], + "comma-style": [2, "last"], "complexity": 0, "consistent-return": 0, "consistent-this": 0, - "curly": [ - 0, - "multi-line" - ], + "curly": [0, "multi-line"], "default-case": 0, "dot-notation": 0, "eol-last": 2, "eqeqeq": 0, - "generator-star-spacing": [ - 2, - "after" - ], + "generator-star-spacing": [2, "after"], "guard-for-in": 0, - "handle-callback-err": [ - 2, - "^(err|error|anySpecificError)$" - ], - "indent": [ - 2, - 2 - ], + "handle-callback-err": [2, "^(err|error|anySpecificError)$"], + "indent": [2, 2], "key-spacing": [ 2, { @@ -71,11 +62,7 @@ } ], "max-depth": 0, - "max-len": [ - 2, - 100, - 4 - ], + "max-len": [2, 100, 4], "max-nested-callbacks": 0, "max-params": 0, "max-statements": 0, @@ -117,10 +104,7 @@ "no-func-assign": 2, "no-implied-eval": 2, "no-inline-comments": 0, - "no-inner-declarations": [ - 2, - "functions" - ], + "no-inner-declarations": [2, "functions"], "no-invalid-regexp": 2, "no-irregular-whitespace": 2, "no-iterator": 2, @@ -129,14 +113,8 @@ "no-lone-blocks": 0, "no-lonely-if": 0, "no-loop-func": 0, - "no-mixed-requires": [ - 0, - false - ], - "no-mixed-spaces-and-tabs": [ - 2, - false - ], + "no-mixed-requires": [0, false], + "no-mixed-spaces-and-tabs": [2, false], "no-multi-spaces": 2, "no-multi-str": 2, "no-multiple-empty-lines": [ @@ -190,50 +168,24 @@ "no-warning-comments": [ 0, { - "terms": [ - "todo", - "fixme", - "xxx" - ], + "terms": ["todo", "fixme", "xxx"], "location": "start" } ], "no-with": 0, "one-var": 0, - "operator-assignment": [ - 0, - "always" - ], - "padded-blocks": [ - 2, - "never" - ], + "operator-assignment": [0, "always"], + "padded-blocks": [2, "never"], "quote-props": 0, - "quotes": [ - 2, - "single", - "avoid-escape" - ], + "quotes": [2, "single", "avoid-escape"], "radix": 0, "semi": 1, "semi-spacing": 0, "sort-vars": 0, - "space-before-blocks": [ - 2, - "always" - ], - "space-before-function-paren": [ - 2, - "never" - ], - "object-curly-spacing": [ - 2, - "never" - ], - "space-in-parens": [ - 2, - "never" - ], + "space-before-blocks": [2, "always"], + "space-before-function-paren": [2, "never"], + "object-curly-spacing": [2, "never"], + "space-in-parens": [2, "never"], "space-infix-ops": 2, "space-unary-ops": [ 2, @@ -248,11 +200,8 @@ "valid-jsdoc": 0, "valid-typeof": 2, "vars-on-top": 0, - "wrap-iife": [ - 0, - "outside" - ], + "wrap-iife": [0, "outside"], "wrap-regex": 0, "yoda": 0 } -} \ No newline at end of file +} diff --git a/package.json b/package.json index 1e4a79c94..53d84086c 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "^21.0.1", + "@typescript-eslint/parser": "^5.30.7", "eslint": "6.8.0", "lerna": "3.20.2", "rollup": "^2.58.0", diff --git a/yarn.lock b/yarn.lock index 7445d828b..44f251258 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1099,6 +1099,50 @@ version "6.2.3" resolved "https://registry.npmjs.org/@types/semver/-/semver-6.2.3.tgz" +"@typescript-eslint/parser@^5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.7.tgz#99d09729392aec9e64b1de45cd63cb81a4ddd980" + integrity sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A== + dependencies: + "@typescript-eslint/scope-manager" "5.30.7" + "@typescript-eslint/types" "5.30.7" + "@typescript-eslint/typescript-estree" "5.30.7" + debug "^4.3.4" + +"@typescript-eslint/scope-manager@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz#8269a931ef1e5ae68b5eb80743cc515c4ffe3dd7" + integrity sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw== + dependencies: + "@typescript-eslint/types" "5.30.7" + "@typescript-eslint/visitor-keys" "5.30.7" + +"@typescript-eslint/types@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.7.tgz#18331487cc92d0f1fb1a6f580c8ec832528079d0" + integrity sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg== + +"@typescript-eslint/typescript-estree@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz#05da9f1b281985bfedcf62349847f8d168eecc07" + integrity sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA== + dependencies: + "@typescript-eslint/types" "5.30.7" + "@typescript-eslint/visitor-keys" "5.30.7" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/visitor-keys@5.30.7": + version "5.30.7" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz#c093abae75b4fd822bfbad9fc337f38a7a14909a" + integrity sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw== + dependencies: + "@typescript-eslint/types" "5.30.7" + eslint-visitor-keys "^3.3.0" + "@zkochan/cmd-shim@^3.1.0": version "3.1.0" resolved "https://registry.npmjs.org/@zkochan/cmd-shim/-/cmd-shim-3.1.0.tgz" @@ -1934,6 +1978,13 @@ debug@^4.0.1: dependencies: ms "2.1.2" +debug@^4.3.4: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + debuglog@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz" @@ -2210,6 +2261,11 @@ eslint-visitor-keys@^1.1.0: version "1.3.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz" +eslint-visitor-keys@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + eslint@6.8.0: version "6.8.0" resolved "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz" @@ -2750,7 +2806,7 @@ globals@^12.1.0: dependencies: type-fest "^0.8.1" -globby@^11.0.0: +globby@^11.0.0, globby@^11.1.0: version "11.1.0" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" dependencies: @@ -3176,6 +3232,13 @@ is-glob@^4.0.0, is-glob@^4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-negative-zero@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz" @@ -4839,6 +4902,13 @@ semver@^7.3.2: version "7.3.2" resolved "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz" +semver@^7.3.7: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== + dependencies: + lru-cache "^6.0.0" + set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" @@ -5444,10 +5514,17 @@ trim@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz" -tslib@^1.9.0: +tslib@^1.8.1, tslib@^1.9.0: version "1.14.1" resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + tty-table@^2.8.10: version "2.8.13" resolved "https://registry.npmjs.org/tty-table/-/tty-table-2.8.13.tgz"