=3.2.1 <3.6.0 ([#597](https://github.com/typescript-eslint/typescript-eslint/issues/597)) ([5d2b962](https://github.com/typescript-eslint/typescript-eslint/commit/5d2b962))
+- **eslint-plugin:** [explicit-function-return-type] allowHigherOrderFunctions ([#193](https://github.com/typescript-eslint/typescript-eslint/issues/193)) ([#538](https://github.com/typescript-eslint/typescript-eslint/issues/538)) ([50a493e](https://github.com/typescript-eslint/typescript-eslint/commit/50a493e))
+- **eslint-plugin:** add config all.json ([#313](https://github.com/typescript-eslint/typescript-eslint/issues/313)) ([67537b8](https://github.com/typescript-eslint/typescript-eslint/commit/67537b8))
+
+# [1.9.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.8.0...v1.9.0) (2019-05-12)
+
+### Bug Fixes
+
+- **eslint-plugin:** Add missing dependency ([89c87cc](https://github.com/typescript-eslint/typescript-eslint/commit/89c87cc)), closes [#516](https://github.com/typescript-eslint/typescript-eslint/issues/516)
+- **eslint-plugin:** Fix exported name of eslint-recommended ([#513](https://github.com/typescript-eslint/typescript-eslint/issues/513)) ([5c65350](https://github.com/typescript-eslint/typescript-eslint/commit/5c65350))
+
+### Features
+
+- **eslint-plugin:** add prefer-regexp-exec rule ([#305](https://github.com/typescript-eslint/typescript-eslint/issues/305)) ([f61d421](https://github.com/typescript-eslint/typescript-eslint/commit/f61d421))
+
+# [1.8.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.7.0...v1.8.0) (2019-05-10)
+
+### Bug Fixes
+
+- **eslint-plugin:** [array-type] support readonly operator ([#429](https://github.com/typescript-eslint/typescript-eslint/issues/429)) ([8e2d2f5](https://github.com/typescript-eslint/typescript-eslint/commit/8e2d2f5))
+- **eslint-plugin:** [explicit-function-return-type] Add handling for class properties ([#502](https://github.com/typescript-eslint/typescript-eslint/issues/502)) ([2c36325](https://github.com/typescript-eslint/typescript-eslint/commit/2c36325))
+- **eslint-plugin:** [no-extra-parens] Fix build error ([298d66c](https://github.com/typescript-eslint/typescript-eslint/commit/298d66c))
+- **eslint-plugin:** [unbound-method] Work around class prototype bug ([#499](https://github.com/typescript-eslint/typescript-eslint/issues/499)) ([3219aa7](https://github.com/typescript-eslint/typescript-eslint/commit/3219aa7))
+- **eslint-plugin:** correct eslint-recommended settings ([d52a683](https://github.com/typescript-eslint/typescript-eslint/commit/d52a683))
+- **eslint-plugin:** explicit-func-return-type: support object types and as expressions ([#459](https://github.com/typescript-eslint/typescript-eslint/issues/459)) ([d19e512](https://github.com/typescript-eslint/typescript-eslint/commit/d19e512))
+- **eslint-plugin:** restrict-plus-operands: generic constraint support ([#440](https://github.com/typescript-eslint/typescript-eslint/issues/440)) ([3f305b1](https://github.com/typescript-eslint/typescript-eslint/commit/3f305b1))
+- **eslint-plugin:** Support more nodes [no-extra-parens](<[#465](https://github.com/typescript-eslint/typescript-eslint/issues/465)>) ([2d15644](https://github.com/typescript-eslint/typescript-eslint/commit/2d15644))
+- **eslint-plugin:** support switch statement [unbound-method](<[#485](https://github.com/typescript-eslint/typescript-eslint/issues/485)>) ([e99ca81](https://github.com/typescript-eslint/typescript-eslint/commit/e99ca81))
+
+### Features
+
+- **eslint-plugin:** (EXPERIMENTAL) begin indent rewrite ([#439](https://github.com/typescript-eslint/typescript-eslint/issues/439)) ([6eb97d4](https://github.com/typescript-eslint/typescript-eslint/commit/6eb97d4))
+- **eslint-plugin:** Add better non-null handling [no-unnecessary-type-assertion](<[#478](https://github.com/typescript-eslint/typescript-eslint/issues/478)>) ([4cd5590](https://github.com/typescript-eslint/typescript-eslint/commit/4cd5590))
+- **eslint-plugin:** Add func-call-spacing ([#448](https://github.com/typescript-eslint/typescript-eslint/issues/448)) ([92e65ec](https://github.com/typescript-eslint/typescript-eslint/commit/92e65ec))
+- **eslint-plugin:** Add new config "eslint-recommended" ([#488](https://github.com/typescript-eslint/typescript-eslint/issues/488)) ([2600a9f](https://github.com/typescript-eslint/typescript-eslint/commit/2600a9f))
+- **eslint-plugin:** add no-magic-numbers rule ([#373](https://github.com/typescript-eslint/typescript-eslint/issues/373)) ([43fa09c](https://github.com/typescript-eslint/typescript-eslint/commit/43fa09c))
+- **eslint-plugin:** Add semi [extension](<[#461](https://github.com/typescript-eslint/typescript-eslint/issues/461)>) ([0962017](https://github.com/typescript-eslint/typescript-eslint/commit/0962017))
+- **eslint-plugin:** no-inferrable-types: Support more primitives ([#442](https://github.com/typescript-eslint/typescript-eslint/issues/442)) ([4e193ca](https://github.com/typescript-eslint/typescript-eslint/commit/4e193ca))
+- Move shared types into their own package ([#425](https://github.com/typescript-eslint/typescript-eslint/issues/425)) ([a7a03ce](https://github.com/typescript-eslint/typescript-eslint/commit/a7a03ce))
+
+# [1.7.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.6.0...v1.7.0) (2019-04-20)
+
+### Bug Fixes
+
+- **eslint-plugin:** indent: fix false positive on type parameters ([#385](https://github.com/typescript-eslint/typescript-eslint/issues/385)) ([d476f15](https://github.com/typescript-eslint/typescript-eslint/commit/d476f15))
+- **eslint-plugin:** no-object-literal-type-assertion: fix `as const` is reported ([#390](https://github.com/typescript-eslint/typescript-eslint/issues/390)) ([2521b85](https://github.com/typescript-eslint/typescript-eslint/commit/2521b85))
+- **eslint-plugin:** support BigInt in restrict-plus-operands rule ([#344](https://github.com/typescript-eslint/typescript-eslint/issues/344)) ([eee6d49](https://github.com/typescript-eslint/typescript-eslint/commit/eee6d49)), closes [#309](https://github.com/typescript-eslint/typescript-eslint/issues/309)
+
+### Features
+
+- **eslint-plugin:** [member-accessibility] add more options ([#322](https://github.com/typescript-eslint/typescript-eslint/issues/322)) ([4b3d820](https://github.com/typescript-eslint/typescript-eslint/commit/4b3d820))
+- **eslint-plugin:** add prefer-for-of rule ([#338](https://github.com/typescript-eslint/typescript-eslint/issues/338)) ([3e26ab6](https://github.com/typescript-eslint/typescript-eslint/commit/3e26ab6))
+- **eslint-plugin:** add prefer-includes rule ([#294](https://github.com/typescript-eslint/typescript-eslint/issues/294)) ([01c4dae](https://github.com/typescript-eslint/typescript-eslint/commit/01c4dae)), closes [#284](https://github.com/typescript-eslint/typescript-eslint/issues/284)
+- **eslint-plugin:** add prefer-string-starts-ends-with rule ([#289](https://github.com/typescript-eslint/typescript-eslint/issues/289)) ([5592a2c](https://github.com/typescript-eslint/typescript-eslint/commit/5592a2c)), closes [#285](https://github.com/typescript-eslint/typescript-eslint/issues/285)
+- **eslint-plugin:** added new rule await-promise ([#192](https://github.com/typescript-eslint/typescript-eslint/issues/192)) ([5311342](https://github.com/typescript-eslint/typescript-eslint/commit/5311342))
+- **eslint-plugin:** added new rule unbound-method ([#204](https://github.com/typescript-eslint/typescript-eslint/issues/204)) ([6718906](https://github.com/typescript-eslint/typescript-eslint/commit/6718906))
+- **eslint-plugin:** support type assertions in no-extra-parens rule ([#311](https://github.com/typescript-eslint/typescript-eslint/issues/311)) ([116ca75](https://github.com/typescript-eslint/typescript-eslint/commit/116ca75))
+
+# [1.6.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.5.0...v1.6.0) (2019-04-03)
+
+### Bug Fixes
+
+- **eslint-plugin:** explicit-function-return-type: ensure class arrow methods are validated ([#377](https://github.com/typescript-eslint/typescript-eslint/issues/377)) ([643a223](https://github.com/typescript-eslint/typescript-eslint/commit/643a223)), closes [#348](https://github.com/typescript-eslint/typescript-eslint/issues/348)
+- **eslint-plugin:** Fix `allowExpressions` false positives in explicit-function-return-type and incorrect documentation ([#388](https://github.com/typescript-eslint/typescript-eslint/issues/388)) ([f29d1c9](https://github.com/typescript-eslint/typescript-eslint/commit/f29d1c9)), closes [#387](https://github.com/typescript-eslint/typescript-eslint/issues/387)
+- **eslint-plugin:** member-naming false flagging constructors ([#376](https://github.com/typescript-eslint/typescript-eslint/issues/376)) ([ad0f2be](https://github.com/typescript-eslint/typescript-eslint/commit/ad0f2be)), closes [#359](https://github.com/typescript-eslint/typescript-eslint/issues/359)
+- **eslint-plugin:** no-type-alias: fix typeof alias erroring ([#380](https://github.com/typescript-eslint/typescript-eslint/issues/380)) ([cebcfe6](https://github.com/typescript-eslint/typescript-eslint/commit/cebcfe6))
+
+### Features
+
+- change TypeScript version range to >=3.2.1 <3.5.0 ([#399](https://github.com/typescript-eslint/typescript-eslint/issues/399)) ([a4f95d3](https://github.com/typescript-eslint/typescript-eslint/commit/a4f95d3))
+- **eslint-plugin:** allow explicit variable type with arrow functions ([#260](https://github.com/typescript-eslint/typescript-eslint/issues/260)) ([bea6b92](https://github.com/typescript-eslint/typescript-eslint/commit/bea6b92)), closes [#149](https://github.com/typescript-eslint/typescript-eslint/issues/149)
+
+# [1.5.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.4.2...v1.5.0) (2019-03-20)
+
+### Bug Fixes
+
+- **eslint-plugin:** [interface-name-prefix] correct error message in always mode ([#333](https://github.com/typescript-eslint/typescript-eslint/issues/333)) ([097262f](https://github.com/typescript-eslint/typescript-eslint/commit/097262f))
+- **eslint-plugin:** fix false positives for adjacent-overload-signatures regarding computed property names ([#340](https://github.com/typescript-eslint/typescript-eslint/issues/340)) ([f6e5118](https://github.com/typescript-eslint/typescript-eslint/commit/f6e5118))
+- **eslint-plugin:** fix incorrect rule name ([#357](https://github.com/typescript-eslint/typescript-eslint/issues/357)) ([0a5146b](https://github.com/typescript-eslint/typescript-eslint/commit/0a5146b))
+
+### Features
+
+- **eslint-plugin:** Add unified-signature rule ([#178](https://github.com/typescript-eslint/typescript-eslint/issues/178)) ([6ffaa0b](https://github.com/typescript-eslint/typescript-eslint/commit/6ffaa0b))
+
+## [1.4.2](https://github.com/typescript-eslint/typescript-eslint/compare/v1.4.1...v1.4.2) (2019-02-25)
+
+**Note:** Version bump only for package @typescript-eslint/eslint-plugin
+
+## [1.4.1](https://github.com/typescript-eslint/typescript-eslint/compare/v1.4.0...v1.4.1) (2019-02-23)
+
+### Bug Fixes
+
+- **eslint-plugin:** out-of-bounds access in member-ordering rule ([#304](https://github.com/typescript-eslint/typescript-eslint/issues/304)) ([4526f27](https://github.com/typescript-eslint/typescript-eslint/commit/4526f27))
+- **eslint-plugin:** support BigInt in restrict-plus-operands rule ([#309](https://github.com/typescript-eslint/typescript-eslint/issues/309)) ([#310](https://github.com/typescript-eslint/typescript-eslint/issues/310)) ([9a88363](https://github.com/typescript-eslint/typescript-eslint/commit/9a88363))
+
+# [1.4.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.3.0...v1.4.0) (2019-02-19)
+
+### Bug Fixes
+
+- **parser:** fix crash when visiting decorators in parameters ([#237](https://github.com/typescript-eslint/typescript-eslint/issues/237)) ([225fc26](https://github.com/typescript-eslint/typescript-eslint/commit/225fc26))
+- **parser:** fix visiting props of TSDeclareFunction ([#244](https://github.com/typescript-eslint/typescript-eslint/issues/244)) ([b40def8](https://github.com/typescript-eslint/typescript-eslint/commit/b40def8))
+- **ts-estree:** make sure that every node can be converted to tsNode ([#287](https://github.com/typescript-eslint/typescript-eslint/issues/287)) ([9f1d314](https://github.com/typescript-eslint/typescript-eslint/commit/9f1d314))
+- **typescript-estree, eslint-plugin:** stop adding ParenthesizedExpressions to node maps ([#226](https://github.com/typescript-eslint/typescript-eslint/issues/226)) ([317405a](https://github.com/typescript-eslint/typescript-eslint/commit/317405a))
+
+### Features
+
+- **eslint-plugin:** add 'no-unnecessary-qualifier' rule ([#231](https://github.com/typescript-eslint/typescript-eslint/issues/231)) ([cc8f906](https://github.com/typescript-eslint/typescript-eslint/commit/cc8f906))
+- **eslint-plugin:** add ban-ts-ignore rule ([#276](https://github.com/typescript-eslint/typescript-eslint/issues/276)) ([859ab29](https://github.com/typescript-eslint/typescript-eslint/commit/859ab29))
+- **eslint-plugin:** add prefer-function-type rule ([#222](https://github.com/typescript-eslint/typescript-eslint/issues/222)) ([b95c4cf](https://github.com/typescript-eslint/typescript-eslint/commit/b95c4cf))
+- **eslint-plugin:** add require-array-sort-compare rule ([#261](https://github.com/typescript-eslint/typescript-eslint/issues/261)) ([2a4aaaa](https://github.com/typescript-eslint/typescript-eslint/commit/2a4aaaa)), closes [#247](https://github.com/typescript-eslint/typescript-eslint/issues/247)
+- **eslint-plugin:** Migrate plugin to ts ([#120](https://github.com/typescript-eslint/typescript-eslint/issues/120)) ([61c60dc](https://github.com/typescript-eslint/typescript-eslint/commit/61c60dc))
+- **eslint-plugin:** update types to allow parameter type inferrence ([#272](https://github.com/typescript-eslint/typescript-eslint/issues/272)) ([80bd72c](https://github.com/typescript-eslint/typescript-eslint/commit/80bd72c))
+- **no-empty-interface:** add allowSingleExtend option ([#215](https://github.com/typescript-eslint/typescript-eslint/issues/215)) ([bf46f8c](https://github.com/typescript-eslint/typescript-eslint/commit/bf46f8c))
+
+# [1.3.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.2.0...v1.3.0) (2019-02-07)
+
+### Bug Fixes
+
+- **eslint-plugin:** fix false positive from adjacent-overload-signatures ([#206](https://github.com/typescript-eslint/typescript-eslint/issues/206)) ([07e950e](https://github.com/typescript-eslint/typescript-eslint/commit/07e950e))
+
+### Features
+
+- change TypeScript version range to >=3.2.1 <3.4.0 ([#184](https://github.com/typescript-eslint/typescript-eslint/issues/184)) ([f513a14](https://github.com/typescript-eslint/typescript-eslint/commit/f513a14))
+- **eslint-plugin:** add new rule no-for-in-array ([#155](https://github.com/typescript-eslint/typescript-eslint/issues/155)) ([84162ba](https://github.com/typescript-eslint/typescript-eslint/commit/84162ba))
+- **eslint-plugin:** add new rule no-require-imports ([#199](https://github.com/typescript-eslint/typescript-eslint/issues/199)) ([683e5bc](https://github.com/typescript-eslint/typescript-eslint/commit/683e5bc))
+- **eslint-plugin:** added new rule promise-function-async ([#194](https://github.com/typescript-eslint/typescript-eslint/issues/194)) ([5f3aec9](https://github.com/typescript-eslint/typescript-eslint/commit/5f3aec9))
+
+# [1.2.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.1.1...v1.2.0) (2019-02-01)
+
+### Bug Fixes
+
+- **eslint-plugin:** fix no-extraneous-class for class without name ([#174](https://github.com/typescript-eslint/typescript-eslint/issues/174)) ([b1dbb64](https://github.com/typescript-eslint/typescript-eslint/commit/b1dbb64))
+- **eslint-plugin:** fix wrong URL ([#180](https://github.com/typescript-eslint/typescript-eslint/issues/180)) ([00d020d](https://github.com/typescript-eslint/typescript-eslint/commit/00d020d))
+- **eslint-plugin:** use bracket for infer type in array-type rule ([#173](https://github.com/typescript-eslint/typescript-eslint/issues/173)) ([1f868ce](https://github.com/typescript-eslint/typescript-eslint/commit/1f868ce))
+- **parser:** fix regression with no-unused-vars for jsx attributes ([#161](https://github.com/typescript-eslint/typescript-eslint/issues/161)) ([6147de1](https://github.com/typescript-eslint/typescript-eslint/commit/6147de1))
+
+### Features
+
+- **eslint-plugin:** add eslint rule no-useless-constructor ([#167](https://github.com/typescript-eslint/typescript-eslint/issues/167)) ([3fb57a5](https://github.com/typescript-eslint/typescript-eslint/commit/3fb57a5))
+- **eslint-plugin:** add no-unnecessary-type-assertion rule ([#157](https://github.com/typescript-eslint/typescript-eslint/issues/157)) ([38abc28](https://github.com/typescript-eslint/typescript-eslint/commit/38abc28))
+
+## [1.1.1](https://github.com/typescript-eslint/typescript-eslint/compare/v1.1.0...v1.1.1) (2019-01-29)
+
+### Bug Fixes
+
+- **eslint-plugin:** make parser services error clearer ([#132](https://github.com/typescript-eslint/typescript-eslint/issues/132)) ([aa9d1e1](https://github.com/typescript-eslint/typescript-eslint/commit/aa9d1e1))
+- **parser:** add visiting of type parameters in JSXOpeningElement ([#150](https://github.com/typescript-eslint/typescript-eslint/issues/150)) ([5e16003](https://github.com/typescript-eslint/typescript-eslint/commit/5e16003))
+
+# [1.1.0](https://github.com/typescript-eslint/typescript-eslint/compare/v1.0.0...v1.1.0) (2019-01-23)
+
+### Bug Fixes
+
+- **eslint-plugin:** don’t mark `declare class` as unused ([#110](https://github.com/typescript-eslint/typescript-eslint/issues/110)) ([5841cd2](https://github.com/typescript-eslint/typescript-eslint/commit/5841cd2)), closes [#106](https://github.com/typescript-eslint/typescript-eslint/issues/106)
+- **eslint-plugin:** improve detection of used vars in heritage ([#102](https://github.com/typescript-eslint/typescript-eslint/issues/102)) ([193b434](https://github.com/typescript-eslint/typescript-eslint/commit/193b434))
+
+### Features
+
+- **eslint-plugin:** add new rule restrict-plus-operands ([#70](https://github.com/typescript-eslint/typescript-eslint/issues/70)) ([c541ede](https://github.com/typescript-eslint/typescript-eslint/commit/c541ede))
+- **eslint-plugin:** add option to no-object-literal-type-assertion rule ([#87](https://github.com/typescript-eslint/typescript-eslint/issues/87)) ([9f501a1](https://github.com/typescript-eslint/typescript-eslint/commit/9f501a1))
+
+# [1.0.0](https://github.com/typescript-eslint/typescript-eslint/compare/v0.2.1...v1.0.0) (2019-01-20)
+
+### Bug Fixes
+
+- **eslint-plugin:** fix crash in rule indent for eslint 5.12.1 ([#89](https://github.com/typescript-eslint/typescript-eslint/issues/89)) ([3f51d51](https://github.com/typescript-eslint/typescript-eslint/commit/3f51d51))
+- **eslint-plugin:** no-unused-vars: mark declared statements as used ([#88](https://github.com/typescript-eslint/typescript-eslint/issues/88)) ([2df5e0c](https://github.com/typescript-eslint/typescript-eslint/commit/2df5e0c))
+- **eslint-plugin:** update remaining parser refs ([#97](https://github.com/typescript-eslint/typescript-eslint/issues/97)) ([055c3fc](https://github.com/typescript-eslint/typescript-eslint/commit/055c3fc))
+
+### Features
+
+- **eslint-plugin:** remove exported parser ([#94](https://github.com/typescript-eslint/typescript-eslint/issues/94)) ([0ddb93c](https://github.com/typescript-eslint/typescript-eslint/commit/0ddb93c))
+
+## [0.2.1](https://github.com/typescript-eslint/typescript-eslint/compare/v0.2.0...v0.2.1) (2019-01-20)
+
+**Note:** Version bump only for package @typescript-eslint/eslint-plugin
diff --git a/node_modules/@typescript-eslint/eslint-plugin/LICENSE b/node_modules/@typescript-eslint/eslint-plugin/LICENSE
new file mode 100644
index 000000000..7e7370143
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2019 TypeScript ESLint and other contributors
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/node_modules/@typescript-eslint/eslint-plugin/README.md b/node_modules/@typescript-eslint/eslint-plugin/README.md
new file mode 100644
index 000000000..63b5b6e7f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/README.md
@@ -0,0 +1,224 @@
+ESLint Plugin TypeScript
+
+An ESLint plugin which provides lint rules for TypeScript codebases.
+
+
+
+
+
+
+
+## Getting Started
+
+- **[You can find our Getting Started docs here](../../docs/getting-started/linting/README.md)**
+- **[You can find our FAQ / Troubleshooting docs here](../../docs/getting-started/linting/FAQ.md)**
+
+These docs walk you through setting up ESLint, this plugin, and our parser. If you know what you're doing and just want to quick start, read on...
+
+## Quick-start
+
+### Installation
+
+Make sure you have TypeScript and [`@typescript-eslint/parser`](../parser) installed:
+
+```bash
+$ yarn add -D typescript @typescript-eslint/parser
+$ npm i --save-dev typescript @typescript-eslint/parser
+```
+
+Then install the plugin:
+
+```bash
+$ yarn add -D @typescript-eslint/eslint-plugin
+$ npm i --save-dev @typescript-eslint/eslint-plugin
+```
+
+It is important that you use the same version number for `@typescript-eslint/parser` and `@typescript-eslint/eslint-plugin`.
+
+**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `@typescript-eslint/eslint-plugin` globally.
+
+### Usage
+
+Add `@typescript-eslint/parser` to the `parser` field and `@typescript-eslint` to the plugins section of your `.eslintrc` configuration file, then configure the rules you want to use under the rules section.
+
+```json
+{
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"],
+ "rules": {
+ "@typescript-eslint/rule-name": "error"
+ }
+}
+```
+
+You can also enable all the recommended rules for our plugin. Add `plugin:@typescript-eslint/recommended` in extends:
+
+```json
+{
+ "extends": ["plugin:@typescript-eslint/recommended"]
+}
+```
+
+**Note: Make sure to use `eslint --ext .js,.ts` since by [default](https://eslint.org/docs/user-guide/command-line-interface#--ext) `eslint` will only search for `.js` files.**
+
+### Recommended Configs
+
+You can also use [`eslint:recommended`](https://eslint.org/docs/rules/) (the set of rules which are recommended for all projects by the ESLint Team) with this plugin:
+
+```json
+{
+ "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"]
+}
+```
+
+As of version 2 of this plugin, _by design_, none of the rules in the main `recommended` config require type-checking in order to run. This means that they are more lightweight and faster to run.
+
+Some highly valuable rules simply require type-checking in order to be implemented correctly, however, so we provide an additional config you can extend from called `recommended-requiring-type-checking`. You would apply this _in addition_ to the recommended configs previously mentioned, e.g.:
+
+```json
+{
+ "extends": [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:@typescript-eslint/recommended-requiring-type-checking"
+ ]
+}
+```
+
+Pro Tip: For larger codebases you may want to consider splitting our linting into two separate stages: 1. fast feedback rules which operate purely based on syntax (no type-checking), 2. rules which are based on semantics (type-checking).
+
+**[You can read more about linting with type information here](../../docs/getting-started/linting/TYPED_LINTING.md)**
+
+## Supported Rules
+
+
+
+**Key**: :heavy_check_mark: = recommended, :wrench: = fixable, :thought_balloon: = requires type information
+
+| Name | Description | :heavy_check_mark: | :wrench: | :thought_balloon: |
+| --------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ------------------ | -------- | ----------------- |
+| [`@typescript-eslint/adjacent-overload-signatures`](./docs/rules/adjacent-overload-signatures.md) | Require that member overloads be consecutive | :heavy_check_mark: | | |
+| [`@typescript-eslint/array-type`](./docs/rules/array-type.md) | Requires using either `T[]` or `Array` for arrays | | :wrench: | |
+| [`@typescript-eslint/await-thenable`](./docs/rules/await-thenable.md) | Disallows awaiting a value that is not a Thenable | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/ban-ts-comment`](./docs/rules/ban-ts-comment.md) | Bans `// @ts-` comments from being used or requires descriptions after directive | :heavy_check_mark: | | |
+| [`@typescript-eslint/ban-tslint-comment`](./docs/rules/ban-tslint-comment.md) | Bans `// tslint:` comments from being used | | :wrench: | |
+| [`@typescript-eslint/ban-types`](./docs/rules/ban-types.md) | Bans specific types from being used | :heavy_check_mark: | :wrench: | |
+| [`@typescript-eslint/class-literal-property-style`](./docs/rules/class-literal-property-style.md) | Ensures that literals on classes are exposed in a consistent style | | :wrench: | |
+| [`@typescript-eslint/consistent-type-assertions`](./docs/rules/consistent-type-assertions.md) | Enforces consistent usage of type assertions | | | |
+| [`@typescript-eslint/consistent-type-definitions`](./docs/rules/consistent-type-definitions.md) | Consistent with type definition either `interface` or `type` | | :wrench: | |
+| [`@typescript-eslint/consistent-type-imports`](./docs/rules/consistent-type-imports.md) | Enforces consistent usage of type imports | | :wrench: | |
+| [`@typescript-eslint/explicit-function-return-type`](./docs/rules/explicit-function-return-type.md) | Require explicit return types on functions and class methods | | | |
+| [`@typescript-eslint/explicit-member-accessibility`](./docs/rules/explicit-member-accessibility.md) | Require explicit accessibility modifiers on class properties and methods | | :wrench: | |
+| [`@typescript-eslint/explicit-module-boundary-types`](./docs/rules/explicit-module-boundary-types.md) | Require explicit return and argument types on exported functions' and classes' public class methods | :heavy_check_mark: | | |
+| [`@typescript-eslint/member-delimiter-style`](./docs/rules/member-delimiter-style.md) | Require a specific member delimiter style for interfaces and type literals | | :wrench: | |
+| [`@typescript-eslint/member-ordering`](./docs/rules/member-ordering.md) | Require a consistent member declaration order | | | |
+| [`@typescript-eslint/method-signature-style`](./docs/rules/method-signature-style.md) | Enforces using a particular method signature syntax. | | :wrench: | |
+| [`@typescript-eslint/naming-convention`](./docs/rules/naming-convention.md) | Enforces naming conventions for everything across a codebase | | | :thought_balloon: |
+| [`@typescript-eslint/no-base-to-string`](./docs/rules/no-base-to-string.md) | Requires that `.toString()` is only called on objects which provide useful information when stringified | | | :thought_balloon: |
+| [`@typescript-eslint/no-confusing-non-null-assertion`](./docs/rules/no-confusing-non-null-assertion.md) | Disallow non-null assertion in locations that may be confusing | | :wrench: | |
+| [`@typescript-eslint/no-dynamic-delete`](./docs/rules/no-dynamic-delete.md) | Disallow the delete operator with computed key expressions | | :wrench: | |
+| [`@typescript-eslint/no-empty-interface`](./docs/rules/no-empty-interface.md) | Disallow the declaration of empty interfaces | :heavy_check_mark: | :wrench: | |
+| [`@typescript-eslint/no-explicit-any`](./docs/rules/no-explicit-any.md) | Disallow usage of the `any` type | :heavy_check_mark: | :wrench: | |
+| [`@typescript-eslint/no-extra-non-null-assertion`](./docs/rules/no-extra-non-null-assertion.md) | Disallow extra non-null assertion | :heavy_check_mark: | :wrench: | |
+| [`@typescript-eslint/no-extraneous-class`](./docs/rules/no-extraneous-class.md) | Forbids the use of classes as namespaces | | | |
+| [`@typescript-eslint/no-floating-promises`](./docs/rules/no-floating-promises.md) | Requires Promise-like values to be handled appropriately | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/no-for-in-array`](./docs/rules/no-for-in-array.md) | Disallow iterating over an array with a for-in loop | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/no-implicit-any-catch`](./docs/rules/no-implicit-any-catch.md) | Disallow usage of the implicit `any` type in catch clauses | | :wrench: | |
+| [`@typescript-eslint/no-implied-eval`](./docs/rules/no-implied-eval.md) | Disallow the use of `eval()`-like methods | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/no-inferrable-types`](./docs/rules/no-inferrable-types.md) | Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean | :heavy_check_mark: | :wrench: | |
+| [`@typescript-eslint/no-invalid-void-type`](./docs/rules/no-invalid-void-type.md) | Disallows usage of `void` type outside of generic or return types | | | |
+| [`@typescript-eslint/no-misused-new`](./docs/rules/no-misused-new.md) | Enforce valid definition of `new` and `constructor` | :heavy_check_mark: | | |
+| [`@typescript-eslint/no-misused-promises`](./docs/rules/no-misused-promises.md) | Avoid using promises in places not designed to handle them | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/no-namespace`](./docs/rules/no-namespace.md) | Disallow the use of custom TypeScript modules and namespaces | :heavy_check_mark: | | |
+| [`@typescript-eslint/no-non-null-asserted-optional-chain`](./docs/rules/no-non-null-asserted-optional-chain.md) | Disallows using a non-null assertion after an optional chain expression | :heavy_check_mark: | | |
+| [`@typescript-eslint/no-non-null-assertion`](./docs/rules/no-non-null-assertion.md) | Disallows non-null assertions using the `!` postfix operator | :heavy_check_mark: | | |
+| [`@typescript-eslint/no-parameter-properties`](./docs/rules/no-parameter-properties.md) | Disallow the use of parameter properties in class constructors | | | |
+| [`@typescript-eslint/no-require-imports`](./docs/rules/no-require-imports.md) | Disallows invocation of `require()` | | | |
+| [`@typescript-eslint/no-this-alias`](./docs/rules/no-this-alias.md) | Disallow aliasing `this` | :heavy_check_mark: | | |
+| [`@typescript-eslint/no-throw-literal`](./docs/rules/no-throw-literal.md) | Disallow throwing literals as exceptions | | | :thought_balloon: |
+| [`@typescript-eslint/no-type-alias`](./docs/rules/no-type-alias.md) | Disallow the use of type aliases | | | |
+| [`@typescript-eslint/no-unnecessary-boolean-literal-compare`](./docs/rules/no-unnecessary-boolean-literal-compare.md) | Flags unnecessary equality comparisons against boolean literals | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/no-unnecessary-condition`](./docs/rules/no-unnecessary-condition.md) | Prevents conditionals where the type is always truthy or always falsy | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/no-unnecessary-qualifier`](./docs/rules/no-unnecessary-qualifier.md) | Warns when a namespace qualifier is unnecessary | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/no-unnecessary-type-arguments`](./docs/rules/no-unnecessary-type-arguments.md) | Enforces that type arguments will not be used if not required | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/no-unnecessary-type-assertion`](./docs/rules/no-unnecessary-type-assertion.md) | Warns if a type assertion does not change the type of an expression | :heavy_check_mark: | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/no-unsafe-assignment`](./docs/rules/no-unsafe-assignment.md) | Disallows assigning any to variables and properties | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/no-unsafe-call`](./docs/rules/no-unsafe-call.md) | Disallows calling an any type value | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/no-unsafe-member-access`](./docs/rules/no-unsafe-member-access.md) | Disallows member access on any typed variables | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/no-unsafe-return`](./docs/rules/no-unsafe-return.md) | Disallows returning any from a function | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/no-var-requires`](./docs/rules/no-var-requires.md) | Disallows the use of require statements except in import statements | :heavy_check_mark: | | |
+| [`@typescript-eslint/prefer-as-const`](./docs/rules/prefer-as-const.md) | Prefer usage of `as const` over literal type | :heavy_check_mark: | :wrench: | |
+| [`@typescript-eslint/prefer-enum-initializers`](./docs/rules/prefer-enum-initializers.md) | Prefer initializing each enums member value | | | |
+| [`@typescript-eslint/prefer-for-of`](./docs/rules/prefer-for-of.md) | Prefer a ‘for-of’ loop over a standard ‘for’ loop if the index is only used to access the array being iterated | | | |
+| [`@typescript-eslint/prefer-function-type`](./docs/rules/prefer-function-type.md) | Use function types instead of interfaces with call signatures | | :wrench: | |
+| [`@typescript-eslint/prefer-includes`](./docs/rules/prefer-includes.md) | Enforce `includes` method over `indexOf` method | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/prefer-literal-enum-member`](./docs/rules/prefer-literal-enum-member.md) | Require that all enum members be literal values to prevent unintended enum member name shadow issues | | | |
+| [`@typescript-eslint/prefer-namespace-keyword`](./docs/rules/prefer-namespace-keyword.md) | Require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules | :heavy_check_mark: | :wrench: | |
+| [`@typescript-eslint/prefer-nullish-coalescing`](./docs/rules/prefer-nullish-coalescing.md) | Enforce the usage of the nullish coalescing operator instead of logical chaining | | | :thought_balloon: |
+| [`@typescript-eslint/prefer-optional-chain`](./docs/rules/prefer-optional-chain.md) | Prefer using concise optional chain expressions instead of chained logical ands | | | |
+| [`@typescript-eslint/prefer-readonly`](./docs/rules/prefer-readonly.md) | Requires that private members are marked as `readonly` if they're never modified outside of the constructor | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/prefer-readonly-parameter-types`](./docs/rules/prefer-readonly-parameter-types.md) | Requires that function parameters are typed as readonly to prevent accidental mutation of inputs | | | :thought_balloon: |
+| [`@typescript-eslint/prefer-reduce-type-parameter`](./docs/rules/prefer-reduce-type-parameter.md) | Prefer using type parameter when calling `Array#reduce` instead of casting | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/prefer-regexp-exec`](./docs/rules/prefer-regexp-exec.md) | Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/prefer-string-starts-ends-with`](./docs/rules/prefer-string-starts-ends-with.md) | Enforce the use of `String#startsWith` and `String#endsWith` instead of other equivalent methods of checking substrings | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/prefer-ts-expect-error`](./docs/rules/prefer-ts-expect-error.md) | Recommends using `// @ts-expect-error` over `// @ts-ignore` | | :wrench: | |
+| [`@typescript-eslint/promise-function-async`](./docs/rules/promise-function-async.md) | Requires any function or method that returns a Promise to be marked async | | | :thought_balloon: |
+| [`@typescript-eslint/require-array-sort-compare`](./docs/rules/require-array-sort-compare.md) | Requires `Array#sort` calls to always provide a `compareFunction` | | | :thought_balloon: |
+| [`@typescript-eslint/restrict-plus-operands`](./docs/rules/restrict-plus-operands.md) | When adding two variables, operands must both be of type number or of type string | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/restrict-template-expressions`](./docs/rules/restrict-template-expressions.md) | Enforce template literal expressions to be of string type | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/strict-boolean-expressions`](./docs/rules/strict-boolean-expressions.md) | Restricts the types allowed in boolean expressions | | | :thought_balloon: |
+| [`@typescript-eslint/switch-exhaustiveness-check`](./docs/rules/switch-exhaustiveness-check.md) | Exhaustiveness checking in switch with union type | | | :thought_balloon: |
+| [`@typescript-eslint/triple-slash-reference`](./docs/rules/triple-slash-reference.md) | Sets preference level for triple slash directives versus ES6-style import declarations | :heavy_check_mark: | | |
+| [`@typescript-eslint/type-annotation-spacing`](./docs/rules/type-annotation-spacing.md) | Require consistent spacing around type annotations | | :wrench: | |
+| [`@typescript-eslint/typedef`](./docs/rules/typedef.md) | Requires type annotations to exist | | | |
+| [`@typescript-eslint/unbound-method`](./docs/rules/unbound-method.md) | Enforces unbound methods are called with their expected scope | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/unified-signatures`](./docs/rules/unified-signatures.md) | Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter | | | |
+
+
+
+### Extension Rules
+
+In some cases, ESLint provides a rule itself, but it doesn't support TypeScript syntax; either it crashes, or it ignores the syntax, or it falsely reports against it.
+In these cases, we create what we call an extension rule; a rule within our plugin that has the same functionality, but also supports TypeScript.
+
+
+
+**Key**: :heavy_check_mark: = recommended, :wrench: = fixable, :thought_balloon: = requires type information
+
+| Name | Description | :heavy_check_mark: | :wrench: | :thought_balloon: |
+| ----------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------ | ------------------ | -------- | ----------------- |
+| [`@typescript-eslint/brace-style`](./docs/rules/brace-style.md) | Enforce consistent brace style for blocks | | :wrench: | |
+| [`@typescript-eslint/comma-spacing`](./docs/rules/comma-spacing.md) | Enforces consistent spacing before and after commas | | :wrench: | |
+| [`@typescript-eslint/default-param-last`](./docs/rules/default-param-last.md) | Enforce default parameters to be last | | | |
+| [`@typescript-eslint/dot-notation`](./docs/rules/dot-notation.md) | enforce dot notation whenever possible | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/func-call-spacing`](./docs/rules/func-call-spacing.md) | Require or disallow spacing between function identifiers and their invocations | | :wrench: | |
+| [`@typescript-eslint/indent`](./docs/rules/indent.md) | Enforce consistent indentation | | :wrench: | |
+| [`@typescript-eslint/init-declarations`](./docs/rules/init-declarations.md) | require or disallow initialization in variable declarations | | | |
+| [`@typescript-eslint/keyword-spacing`](./docs/rules/keyword-spacing.md) | Enforce consistent spacing before and after keywords | | :wrench: | |
+| [`@typescript-eslint/lines-between-class-members`](./docs/rules/lines-between-class-members.md) | Require or disallow an empty line between class members | | :wrench: | |
+| [`@typescript-eslint/no-array-constructor`](./docs/rules/no-array-constructor.md) | Disallow generic `Array` constructors | :heavy_check_mark: | :wrench: | |
+| [`@typescript-eslint/no-dupe-class-members`](./docs/rules/no-dupe-class-members.md) | Disallow duplicate class members | | | |
+| [`@typescript-eslint/no-empty-function`](./docs/rules/no-empty-function.md) | Disallow empty functions | :heavy_check_mark: | | |
+| [`@typescript-eslint/no-extra-parens`](./docs/rules/no-extra-parens.md) | Disallow unnecessary parentheses | | :wrench: | |
+| [`@typescript-eslint/no-extra-semi`](./docs/rules/no-extra-semi.md) | Disallow unnecessary semicolons | :heavy_check_mark: | :wrench: | |
+| [`@typescript-eslint/no-invalid-this`](./docs/rules/no-invalid-this.md) | disallow `this` keywords outside of classes or class-like objects | | | |
+| [`@typescript-eslint/no-loop-func`](./docs/rules/no-loop-func.md) | Disallow function declarations that contain unsafe references inside loop statements | | | |
+| [`@typescript-eslint/no-loss-of-precision`](./docs/rules/no-loss-of-precision.md) | Disallow literal numbers that lose precision | | | |
+| [`@typescript-eslint/no-magic-numbers`](./docs/rules/no-magic-numbers.md) | Disallow magic numbers | | | |
+| [`@typescript-eslint/no-redeclare`](./docs/rules/no-redeclare.md) | Disallow variable redeclaration | | | |
+| [`@typescript-eslint/no-shadow`](./docs/rules/no-shadow.md) | Disallow variable declarations from shadowing variables declared in the outer scope | | | |
+| [`@typescript-eslint/no-unused-expressions`](./docs/rules/no-unused-expressions.md) | Disallow unused expressions | | | |
+| [`@typescript-eslint/no-unused-vars`](./docs/rules/no-unused-vars.md) | Disallow unused variables | :heavy_check_mark: | | |
+| [`@typescript-eslint/no-use-before-define`](./docs/rules/no-use-before-define.md) | Disallow the use of variables before they are defined | | | |
+| [`@typescript-eslint/no-useless-constructor`](./docs/rules/no-useless-constructor.md) | Disallow unnecessary constructors | | | |
+| [`@typescript-eslint/quotes`](./docs/rules/quotes.md) | Enforce the consistent use of either backticks, double, or single quotes | | :wrench: | |
+| [`@typescript-eslint/require-await`](./docs/rules/require-await.md) | Disallow async functions which have no `await` expression | :heavy_check_mark: | | :thought_balloon: |
+| [`@typescript-eslint/return-await`](./docs/rules/return-await.md) | Enforces consistent returning of awaited values | | :wrench: | :thought_balloon: |
+| [`@typescript-eslint/semi`](./docs/rules/semi.md) | Require or disallow semicolons instead of ASI | | :wrench: | |
+| [`@typescript-eslint/space-before-function-paren`](./docs/rules/space-before-function-paren.md) | Enforces consistent spacing before function parenthesis | | :wrench: | |
+
+
+
+## Contributing
+
+[See the contributing guide here](../../CONTRIBUTING.md).
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js
new file mode 100644
index 000000000..037b3ca81
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js
@@ -0,0 +1,144 @@
+"use strict";
+// THIS CODE WAS AUTOMATICALLY GENERATED
+// DO NOT EDIT THIS CODE BY HAND
+// YOU CAN REGENERATE IT USING yarn generate:configs
+module.exports = {
+ extends: ['./configs/base', './configs/eslint-recommended'],
+ rules: {
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
+ '@typescript-eslint/array-type': 'error',
+ '@typescript-eslint/await-thenable': 'error',
+ '@typescript-eslint/ban-ts-comment': 'error',
+ '@typescript-eslint/ban-tslint-comment': 'error',
+ '@typescript-eslint/ban-types': 'error',
+ 'brace-style': 'off',
+ '@typescript-eslint/brace-style': 'error',
+ '@typescript-eslint/class-literal-property-style': 'error',
+ 'comma-spacing': 'off',
+ '@typescript-eslint/comma-spacing': 'error',
+ '@typescript-eslint/consistent-type-assertions': 'error',
+ '@typescript-eslint/consistent-type-definitions': 'error',
+ '@typescript-eslint/consistent-type-imports': 'error',
+ 'default-param-last': 'off',
+ '@typescript-eslint/default-param-last': 'error',
+ 'dot-notation': 'off',
+ '@typescript-eslint/dot-notation': 'error',
+ '@typescript-eslint/explicit-function-return-type': 'error',
+ '@typescript-eslint/explicit-member-accessibility': 'error',
+ '@typescript-eslint/explicit-module-boundary-types': 'error',
+ 'func-call-spacing': 'off',
+ '@typescript-eslint/func-call-spacing': 'error',
+ indent: 'off',
+ '@typescript-eslint/indent': 'error',
+ 'init-declarations': 'off',
+ '@typescript-eslint/init-declarations': 'error',
+ 'keyword-spacing': 'off',
+ '@typescript-eslint/keyword-spacing': 'error',
+ 'lines-between-class-members': 'off',
+ '@typescript-eslint/lines-between-class-members': 'error',
+ '@typescript-eslint/member-delimiter-style': 'error',
+ '@typescript-eslint/member-ordering': 'error',
+ '@typescript-eslint/method-signature-style': 'error',
+ '@typescript-eslint/naming-convention': 'error',
+ 'no-array-constructor': 'off',
+ '@typescript-eslint/no-array-constructor': 'error',
+ '@typescript-eslint/no-base-to-string': 'error',
+ '@typescript-eslint/no-confusing-non-null-assertion': 'error',
+ 'no-dupe-class-members': 'off',
+ '@typescript-eslint/no-dupe-class-members': 'error',
+ '@typescript-eslint/no-dynamic-delete': 'error',
+ 'no-empty-function': 'off',
+ '@typescript-eslint/no-empty-function': 'error',
+ '@typescript-eslint/no-empty-interface': 'error',
+ '@typescript-eslint/no-explicit-any': 'error',
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
+ 'no-extra-parens': 'off',
+ '@typescript-eslint/no-extra-parens': 'error',
+ 'no-extra-semi': 'off',
+ '@typescript-eslint/no-extra-semi': 'error',
+ '@typescript-eslint/no-extraneous-class': 'error',
+ '@typescript-eslint/no-floating-promises': 'error',
+ '@typescript-eslint/no-for-in-array': 'error',
+ '@typescript-eslint/no-implicit-any-catch': 'error',
+ '@typescript-eslint/no-implied-eval': 'error',
+ '@typescript-eslint/no-inferrable-types': 'error',
+ 'no-invalid-this': 'off',
+ '@typescript-eslint/no-invalid-this': 'error',
+ '@typescript-eslint/no-invalid-void-type': 'error',
+ 'no-loop-func': 'off',
+ '@typescript-eslint/no-loop-func': 'error',
+ 'no-loss-of-precision': 'off',
+ '@typescript-eslint/no-loss-of-precision': 'error',
+ 'no-magic-numbers': 'off',
+ '@typescript-eslint/no-magic-numbers': 'error',
+ '@typescript-eslint/no-misused-new': 'error',
+ '@typescript-eslint/no-misused-promises': 'error',
+ '@typescript-eslint/no-namespace': 'error',
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
+ '@typescript-eslint/no-non-null-assertion': 'error',
+ '@typescript-eslint/no-parameter-properties': 'error',
+ 'no-redeclare': 'off',
+ '@typescript-eslint/no-redeclare': 'error',
+ '@typescript-eslint/no-require-imports': 'error',
+ 'no-shadow': 'off',
+ '@typescript-eslint/no-shadow': 'error',
+ '@typescript-eslint/no-this-alias': 'error',
+ '@typescript-eslint/no-throw-literal': 'error',
+ '@typescript-eslint/no-type-alias': 'error',
+ '@typescript-eslint/no-unnecessary-boolean-literal-compare': 'error',
+ '@typescript-eslint/no-unnecessary-condition': 'error',
+ '@typescript-eslint/no-unnecessary-qualifier': 'error',
+ '@typescript-eslint/no-unnecessary-type-arguments': 'error',
+ '@typescript-eslint/no-unnecessary-type-assertion': 'error',
+ '@typescript-eslint/no-unsafe-assignment': 'error',
+ '@typescript-eslint/no-unsafe-call': 'error',
+ '@typescript-eslint/no-unsafe-member-access': 'error',
+ '@typescript-eslint/no-unsafe-return': 'error',
+ 'no-unused-expressions': 'off',
+ '@typescript-eslint/no-unused-expressions': 'error',
+ 'no-unused-vars': 'off',
+ '@typescript-eslint/no-unused-vars': 'error',
+ 'no-use-before-define': 'off',
+ '@typescript-eslint/no-use-before-define': 'error',
+ 'no-useless-constructor': 'off',
+ '@typescript-eslint/no-useless-constructor': 'error',
+ '@typescript-eslint/no-var-requires': 'error',
+ '@typescript-eslint/prefer-as-const': 'error',
+ '@typescript-eslint/prefer-enum-initializers': 'error',
+ '@typescript-eslint/prefer-for-of': 'error',
+ '@typescript-eslint/prefer-function-type': 'error',
+ '@typescript-eslint/prefer-includes': 'error',
+ '@typescript-eslint/prefer-literal-enum-member': 'error',
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
+ '@typescript-eslint/prefer-nullish-coalescing': 'error',
+ '@typescript-eslint/prefer-optional-chain': 'error',
+ '@typescript-eslint/prefer-readonly': 'error',
+ '@typescript-eslint/prefer-readonly-parameter-types': 'error',
+ '@typescript-eslint/prefer-reduce-type-parameter': 'error',
+ '@typescript-eslint/prefer-regexp-exec': 'error',
+ '@typescript-eslint/prefer-string-starts-ends-with': 'error',
+ '@typescript-eslint/prefer-ts-expect-error': 'error',
+ '@typescript-eslint/promise-function-async': 'error',
+ quotes: 'off',
+ '@typescript-eslint/quotes': 'error',
+ '@typescript-eslint/require-array-sort-compare': 'error',
+ 'require-await': 'off',
+ '@typescript-eslint/require-await': 'error',
+ '@typescript-eslint/restrict-plus-operands': 'error',
+ '@typescript-eslint/restrict-template-expressions': 'error',
+ 'no-return-await': 'off',
+ '@typescript-eslint/return-await': 'error',
+ semi: 'off',
+ '@typescript-eslint/semi': 'error',
+ 'space-before-function-paren': 'off',
+ '@typescript-eslint/space-before-function-paren': 'error',
+ '@typescript-eslint/strict-boolean-expressions': 'error',
+ '@typescript-eslint/switch-exhaustiveness-check': 'error',
+ '@typescript-eslint/triple-slash-reference': 'error',
+ '@typescript-eslint/type-annotation-spacing': 'error',
+ '@typescript-eslint/typedef': 'error',
+ '@typescript-eslint/unbound-method': 'error',
+ '@typescript-eslint/unified-signatures': 'error',
+ },
+};
+//# sourceMappingURL=all.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map
new file mode 100644
index 000000000..e3533ccde
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/all.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"all.js","sourceRoot":"","sources":["../../src/configs/all.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,oDAAoD;AAEpD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,iDAAiD,EAAE,OAAO;QAC1D,+BAA+B,EAAE,OAAO;QACxC,mCAAmC,EAAE,OAAO;QAC5C,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;QAChD,8BAA8B,EAAE,OAAO;QACvC,aAAa,EAAE,KAAK;QACpB,gCAAgC,EAAE,OAAO;QACzC,iDAAiD,EAAE,OAAO;QAC1D,eAAe,EAAE,KAAK;QACtB,kCAAkC,EAAE,OAAO;QAC3C,+CAA+C,EAAE,OAAO;QACxD,gDAAgD,EAAE,OAAO;QACzD,4CAA4C,EAAE,OAAO;QACrD,oBAAoB,EAAE,KAAK;QAC3B,uCAAuC,EAAE,OAAO;QAChD,cAAc,EAAE,KAAK;QACrB,iCAAiC,EAAE,OAAO;QAC1C,kDAAkD,EAAE,OAAO;QAC3D,kDAAkD,EAAE,OAAO;QAC3D,mDAAmD,EAAE,OAAO;QAC5D,mBAAmB,EAAE,KAAK;QAC1B,sCAAsC,EAAE,OAAO;QAC/C,MAAM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,2BAA2B,EAAE,OAAO;QACpC,+CAA+C,EAAE,OAAO;QACxD,eAAe,EAAE,KAAK;QACtB,kCAAkC,EAAE,OAAO;QAC3C,2CAA2C,EAAE,OAAO;QACpD,kDAAkD,EAAE,OAAO;QAC3D,iBAAiB,EAAE,KAAK;QACxB,iCAAiC,EAAE,OAAO;QAC1C,IAAI,EAAE,KAAK;QACX,yBAAyB,EAAE,OAAO;QAClC,6BAA6B,EAAE,KAAK;QACpC,gDAAgD,EAAE,OAAO;QACzD,+CAA+C,EAAE,OAAO;QACxD,gDAAgD,EAAE,OAAO;QACzD,2CAA2C,EAAE,OAAO;QACpD,4CAA4C,EAAE,OAAO;QACrD,4BAA4B,EAAE,OAAO;QACrC,mCAAmC,EAAE,OAAO;QAC5C,uCAAuC,EAAE,OAAO;KACjD;CACF,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js
new file mode 100644
index 000000000..52d1fe8b0
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js
@@ -0,0 +1,10 @@
+"use strict";
+// THIS CODE WAS AUTOMATICALLY GENERATED
+// DO NOT EDIT THIS CODE BY HAND
+// YOU CAN REGENERATE IT USING yarn generate:configs
+module.exports = {
+ parser: '@typescript-eslint/parser',
+ parserOptions: { sourceType: 'module' },
+ plugins: ['@typescript-eslint'],
+};
+//# sourceMappingURL=base.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js.map
new file mode 100644
index 000000000..a2f415fc4
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/base.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/configs/base.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,oDAAoD;AAEpD,iBAAS;IACP,MAAM,EAAE,2BAA2B;IACnC,aAAa,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE;IACvC,OAAO,EAAE,CAAC,oBAAoB,CAAC;CAChC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js
new file mode 100644
index 000000000..f1b5191e8
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js
@@ -0,0 +1,32 @@
+"use strict";
+module.exports = {
+ overrides: [
+ {
+ files: ['*.ts', '*.tsx'],
+ rules: {
+ 'constructor-super': 'off',
+ 'getter-return': 'off',
+ 'no-const-assign': 'off',
+ 'no-dupe-args': 'off',
+ 'no-dupe-class-members': 'off',
+ 'no-dupe-keys': 'off',
+ 'no-func-assign': 'off',
+ 'no-import-assign': 'off',
+ 'no-new-symbol': 'off',
+ 'no-obj-calls': 'off',
+ 'no-redeclare': 'off',
+ 'no-setter-return': 'off',
+ 'no-this-before-super': 'off',
+ 'no-undef': 'off',
+ 'no-unreachable': 'off',
+ 'no-unsafe-negation': 'off',
+ 'no-var': 'error',
+ 'prefer-const': 'error',
+ 'prefer-rest-params': 'error',
+ 'prefer-spread': 'error',
+ 'valid-typeof': 'off',
+ },
+ },
+ ],
+};
+//# sourceMappingURL=eslint-recommended.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js.map
new file mode 100644
index 000000000..8181881ac
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/eslint-recommended.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"eslint-recommended.js","sourceRoot":"","sources":["../../src/configs/eslint-recommended.ts"],"names":[],"mappings":";AAKA,iBAAS;IACP,SAAS,EAAE;QACT;YACE,KAAK,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;YACxB,KAAK,EAAE;gBACL,mBAAmB,EAAE,KAAK;gBAC1B,eAAe,EAAE,KAAK;gBACtB,iBAAiB,EAAE,KAAK;gBACxB,cAAc,EAAE,KAAK;gBACrB,uBAAuB,EAAE,KAAK;gBAC9B,cAAc,EAAE,KAAK;gBACrB,gBAAgB,EAAE,KAAK;gBACvB,kBAAkB,EAAE,KAAK;gBACzB,eAAe,EAAE,KAAK;gBACtB,cAAc,EAAE,KAAK;gBACrB,cAAc,EAAE,KAAK;gBACrB,kBAAkB,EAAE,KAAK;gBACzB,sBAAsB,EAAE,KAAK;gBAC7B,UAAU,EAAE,KAAK;gBACjB,gBAAgB,EAAE,KAAK;gBACvB,oBAAoB,EAAE,KAAK;gBAC3B,QAAQ,EAAE,OAAO;gBACjB,cAAc,EAAE,OAAO;gBACvB,oBAAoB,EAAE,OAAO;gBAC7B,eAAe,EAAE,OAAO;gBACxB,cAAc,EAAE,KAAK;aACtB;SACF;KACF;CACF,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended-requiring-type-checking.js b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended-requiring-type-checking.js
new file mode 100644
index 000000000..cb31319f0
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended-requiring-type-checking.js
@@ -0,0 +1,26 @@
+"use strict";
+// THIS CODE WAS AUTOMATICALLY GENERATED
+// DO NOT EDIT THIS CODE BY HAND
+// YOU CAN REGENERATE IT USING yarn generate:configs
+module.exports = {
+ extends: ['./configs/base', './configs/eslint-recommended'],
+ rules: {
+ '@typescript-eslint/await-thenable': 'error',
+ '@typescript-eslint/no-floating-promises': 'error',
+ '@typescript-eslint/no-for-in-array': 'error',
+ '@typescript-eslint/no-implied-eval': 'error',
+ '@typescript-eslint/no-misused-promises': 'error',
+ '@typescript-eslint/no-unnecessary-type-assertion': 'error',
+ '@typescript-eslint/no-unsafe-assignment': 'error',
+ '@typescript-eslint/no-unsafe-call': 'error',
+ '@typescript-eslint/no-unsafe-member-access': 'error',
+ '@typescript-eslint/no-unsafe-return': 'error',
+ '@typescript-eslint/prefer-regexp-exec': 'error',
+ 'require-await': 'off',
+ '@typescript-eslint/require-await': 'error',
+ '@typescript-eslint/restrict-plus-operands': 'error',
+ '@typescript-eslint/restrict-template-expressions': 'error',
+ '@typescript-eslint/unbound-method': 'error',
+ },
+};
+//# sourceMappingURL=recommended-requiring-type-checking.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended-requiring-type-checking.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended-requiring-type-checking.js.map
new file mode 100644
index 000000000..ef219919f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended-requiring-type-checking.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"recommended-requiring-type-checking.js","sourceRoot":"","sources":["../../src/configs/recommended-requiring-type-checking.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,oDAAoD;AAEpD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,mCAAmC,EAAE,OAAO;QAC5C,yCAAyC,EAAE,OAAO;QAClD,oCAAoC,EAAE,OAAO;QAC7C,oCAAoC,EAAE,OAAO;QAC7C,wCAAwC,EAAE,OAAO;QACjD,kDAAkD,EAAE,OAAO;QAC3D,yCAAyC,EAAE,OAAO;QAClD,mCAAmC,EAAE,OAAO;QAC5C,4CAA4C,EAAE,OAAO;QACrD,qCAAqC,EAAE,OAAO;QAC9C,uCAAuC,EAAE,OAAO;QAChD,eAAe,EAAE,KAAK;QACtB,kCAAkC,EAAE,OAAO;QAC3C,2CAA2C,EAAE,OAAO;QACpD,kDAAkD,EAAE,OAAO;QAC3D,mCAAmC,EAAE,OAAO;KAC7C;CACF,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended.js b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended.js
new file mode 100644
index 000000000..e8e5a6f7b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended.js
@@ -0,0 +1,35 @@
+"use strict";
+// THIS CODE WAS AUTOMATICALLY GENERATED
+// DO NOT EDIT THIS CODE BY HAND
+// YOU CAN REGENERATE IT USING yarn generate:configs
+module.exports = {
+ extends: ['./configs/base', './configs/eslint-recommended'],
+ rules: {
+ '@typescript-eslint/adjacent-overload-signatures': 'error',
+ '@typescript-eslint/ban-ts-comment': 'error',
+ '@typescript-eslint/ban-types': 'error',
+ '@typescript-eslint/explicit-module-boundary-types': 'warn',
+ 'no-array-constructor': 'off',
+ '@typescript-eslint/no-array-constructor': 'error',
+ 'no-empty-function': 'off',
+ '@typescript-eslint/no-empty-function': 'error',
+ '@typescript-eslint/no-empty-interface': 'error',
+ '@typescript-eslint/no-explicit-any': 'warn',
+ '@typescript-eslint/no-extra-non-null-assertion': 'error',
+ 'no-extra-semi': 'off',
+ '@typescript-eslint/no-extra-semi': 'error',
+ '@typescript-eslint/no-inferrable-types': 'error',
+ '@typescript-eslint/no-misused-new': 'error',
+ '@typescript-eslint/no-namespace': 'error',
+ '@typescript-eslint/no-non-null-asserted-optional-chain': 'error',
+ '@typescript-eslint/no-non-null-assertion': 'warn',
+ '@typescript-eslint/no-this-alias': 'error',
+ 'no-unused-vars': 'off',
+ '@typescript-eslint/no-unused-vars': 'warn',
+ '@typescript-eslint/no-var-requires': 'error',
+ '@typescript-eslint/prefer-as-const': 'error',
+ '@typescript-eslint/prefer-namespace-keyword': 'error',
+ '@typescript-eslint/triple-slash-reference': 'error',
+ },
+};
+//# sourceMappingURL=recommended.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended.js.map
new file mode 100644
index 000000000..406ea3ff6
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/configs/recommended.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"recommended.js","sourceRoot":"","sources":["../../src/configs/recommended.ts"],"names":[],"mappings":";AAAA,wCAAwC;AACxC,gCAAgC;AAChC,oDAAoD;AAEpD,iBAAS;IACP,OAAO,EAAE,CAAC,gBAAgB,EAAE,8BAA8B,CAAC;IAC3D,KAAK,EAAE;QACL,iDAAiD,EAAE,OAAO;QAC1D,mCAAmC,EAAE,OAAO;QAC5C,8BAA8B,EAAE,OAAO;QACvC,mDAAmD,EAAE,MAAM;QAC3D,sBAAsB,EAAE,KAAK;QAC7B,yCAAyC,EAAE,OAAO;QAClD,mBAAmB,EAAE,KAAK;QAC1B,sCAAsC,EAAE,OAAO;QAC/C,uCAAuC,EAAE,OAAO;QAChD,oCAAoC,EAAE,MAAM;QAC5C,gDAAgD,EAAE,OAAO;QACzD,eAAe,EAAE,KAAK;QACtB,kCAAkC,EAAE,OAAO;QAC3C,wCAAwC,EAAE,OAAO;QACjD,mCAAmC,EAAE,OAAO;QAC5C,iCAAiC,EAAE,OAAO;QAC1C,wDAAwD,EAAE,OAAO;QACjE,0CAA0C,EAAE,MAAM;QAClD,kCAAkC,EAAE,OAAO;QAC3C,gBAAgB,EAAE,KAAK;QACvB,mCAAmC,EAAE,MAAM;QAC3C,oCAAoC,EAAE,OAAO;QAC7C,oCAAoC,EAAE,OAAO;QAC7C,6CAA6C,EAAE,OAAO;QACtD,2CAA2C,EAAE,OAAO;KACrD;CACF,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/index.js b/node_modules/@typescript-eslint/eslint-plugin/dist/index.js
new file mode 100644
index 000000000..37426f23f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/index.js
@@ -0,0 +1,21 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+const rules_1 = __importDefault(require("./rules"));
+const all_1 = __importDefault(require("./configs/all"));
+const base_1 = __importDefault(require("./configs/base"));
+const recommended_1 = __importDefault(require("./configs/recommended"));
+const recommended_requiring_type_checking_1 = __importDefault(require("./configs/recommended-requiring-type-checking"));
+const eslint_recommended_1 = __importDefault(require("./configs/eslint-recommended"));
+module.exports = {
+ rules: rules_1.default,
+ configs: {
+ all: all_1.default,
+ base: base_1.default,
+ recommended: recommended_1.default,
+ 'eslint-recommended': eslint_recommended_1.default,
+ 'recommended-requiring-type-checking': recommended_requiring_type_checking_1.default,
+ },
+};
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/index.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/index.js.map
new file mode 100644
index 000000000..24698092b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,oDAA4B;AAE5B,wDAAgC;AAChC,0DAAkC;AAClC,wEAAgD;AAChD,wHAA6F;AAC7F,sFAA6D;AAE7D,iBAAS;IACP,KAAK,EAAL,eAAK;IACL,OAAO,EAAE;QACP,GAAG,EAAH,aAAG;QACH,IAAI,EAAJ,cAAI;QACJ,WAAW,EAAX,qBAAW;QACX,oBAAoB,EAAE,4BAAiB;QACvC,qCAAqC,EAAE,6CAAgC;KACxE;CACF,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js
new file mode 100644
index 000000000..6b6871465
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js
@@ -0,0 +1,159 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'adjacent-overload-signatures',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Require that member overloads be consecutive',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ schema: [],
+ messages: {
+ adjacentSignature: "All '{{name}}' signatures should be adjacent.",
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ /**
+ * Gets the name and attribute of the member being processed.
+ * @param member the member being processed.
+ * @returns the name and attribute of the member or null if it's a member not relevant to the rule.
+ */
+ function getMemberMethod(member) {
+ var _a, _b;
+ if (!member) {
+ return null;
+ }
+ const isStatic = 'static' in member && !!member.static;
+ switch (member.type) {
+ case experimental_utils_1.AST_NODE_TYPES.ExportDefaultDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.ExportNamedDeclaration: {
+ // export statements (e.g. export { a };)
+ // have no declarations, so ignore them
+ if (!member.declaration) {
+ return null;
+ }
+ return getMemberMethod(member.declaration);
+ }
+ case experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction:
+ case experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration: {
+ const name = (_b = (_a = member.id) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : null;
+ if (name === null) {
+ return null;
+ }
+ return {
+ name,
+ static: isStatic,
+ callSignature: false,
+ };
+ }
+ case experimental_utils_1.AST_NODE_TYPES.TSMethodSignature:
+ return {
+ name: util.getNameFromMember(member, sourceCode),
+ static: isStatic,
+ callSignature: false,
+ };
+ case experimental_utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration:
+ return {
+ name: 'call',
+ static: isStatic,
+ callSignature: true,
+ };
+ case experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration:
+ return {
+ name: 'new',
+ static: isStatic,
+ callSignature: false,
+ };
+ case experimental_utils_1.AST_NODE_TYPES.MethodDefinition:
+ return {
+ name: util.getNameFromMember(member, sourceCode),
+ static: isStatic,
+ callSignature: false,
+ };
+ }
+ return null;
+ }
+ function isSameMethod(method1, method2) {
+ return (!!method2 &&
+ method1.name === method2.name &&
+ method1.static === method2.static &&
+ method1.callSignature === method2.callSignature);
+ }
+ function getMembers(node) {
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.ClassBody:
+ case experimental_utils_1.AST_NODE_TYPES.Program:
+ case experimental_utils_1.AST_NODE_TYPES.TSModuleBlock:
+ case experimental_utils_1.AST_NODE_TYPES.TSInterfaceBody:
+ return node.body;
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeLiteral:
+ return node.members;
+ }
+ }
+ /**
+ * Check the body for overload methods.
+ * @param {ASTNode} node the body to be inspected.
+ */
+ function checkBodyForOverloadMethods(node) {
+ const members = getMembers(node);
+ if (members) {
+ let lastMethod = null;
+ const seenMethods = [];
+ members.forEach(member => {
+ const method = getMemberMethod(member);
+ if (method === null) {
+ lastMethod = null;
+ return;
+ }
+ const index = seenMethods.findIndex(seenMethod => isSameMethod(method, seenMethod));
+ if (index > -1 && !isSameMethod(method, lastMethod)) {
+ context.report({
+ node: member,
+ messageId: 'adjacentSignature',
+ data: {
+ name: (method.static ? 'static ' : '') + method.name,
+ },
+ });
+ }
+ else if (index === -1) {
+ seenMethods.push(method);
+ }
+ lastMethod = method;
+ });
+ }
+ }
+ return {
+ ClassBody: checkBodyForOverloadMethods,
+ Program: checkBodyForOverloadMethods,
+ TSModuleBlock: checkBodyForOverloadMethods,
+ TSTypeLiteral: checkBodyForOverloadMethods,
+ TSInterfaceBody: checkBodyForOverloadMethods,
+ };
+ },
+});
+//# sourceMappingURL=adjacent-overload-signatures.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js.map
new file mode 100644
index 000000000..737109074
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/adjacent-overload-signatures.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"adjacent-overload-signatures.js","sourceRoot":"","sources":["../../src/rules/adjacent-overload-signatures.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAahC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;SACrB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,iBAAiB,EAAE,+CAA+C;SACnE;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAQ3C;;;;WAIG;QACH,SAAS,eAAe,CAAC,MAAqB;;YAC5C,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,IAAI,CAAC;aACb;YAED,MAAM,QAAQ,GAAG,QAAQ,IAAI,MAAM,IAAI,CAAC,CAAC,MAAM,CAAC,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,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,EAAE;wBACnD,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI,EAAE,MAAM;4BACZ,SAAS,EAAE,mBAAmB;4BAC9B,IAAI,EAAE;gCACJ,IAAI,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI;6BACrD;yBACF,CAAC,CAAC;qBACJ;yBAAM,IAAI,KAAK,KAAK,CAAC,CAAC,EAAE;wBACvB,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;qBAC1B;oBAED,UAAU,GAAG,MAAM,CAAC;gBACtB,CAAC,CAAC,CAAC;aACJ;QACH,CAAC;QAED,OAAO;YACL,SAAS,EAAE,2BAA2B;YACtC,OAAO,EAAE,2BAA2B;YACpC,aAAa,EAAE,2BAA2B;YAC1C,aAAa,EAAE,2BAA2B;YAC1C,eAAe,EAAE,2BAA2B;SAC7C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js
new file mode 100644
index 000000000..4f4d2d195
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js
@@ -0,0 +1,275 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+/**
+ * Check whatever node can be considered as simple
+ * @param node the node to be evaluated.
+ */
+function isSimpleType(node) {
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ case experimental_utils_1.AST_NODE_TYPES.TSAnyKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSBooleanKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSNeverKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSNumberKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSObjectKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSStringKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSSymbolKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSUnknownKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSVoidKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSNullKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSArrayType:
+ case experimental_utils_1.AST_NODE_TYPES.TSUndefinedKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSThisType:
+ case experimental_utils_1.AST_NODE_TYPES.TSQualifiedName:
+ return true;
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeReference:
+ if (node.typeName &&
+ node.typeName.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ node.typeName.name === 'Array') {
+ if (!node.typeParameters) {
+ return true;
+ }
+ if (node.typeParameters.params.length === 1) {
+ return isSimpleType(node.typeParameters.params[0]);
+ }
+ }
+ else {
+ if (node.typeParameters) {
+ return false;
+ }
+ return isSimpleType(node.typeName);
+ }
+ return false;
+ default:
+ return false;
+ }
+}
+/**
+ * Check if node needs parentheses
+ * @param node the node to be evaluated.
+ */
+function typeNeedsParentheses(node) {
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeReference:
+ return typeNeedsParentheses(node.typeName);
+ case experimental_utils_1.AST_NODE_TYPES.TSUnionType:
+ case experimental_utils_1.AST_NODE_TYPES.TSFunctionType:
+ case experimental_utils_1.AST_NODE_TYPES.TSIntersectionType:
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeOperator:
+ case experimental_utils_1.AST_NODE_TYPES.TSInferType:
+ return true;
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ return node.name === 'ReadonlyArray';
+ default:
+ return false;
+ }
+}
+const arrayOption = { enum: ['array', 'generic', 'array-simple'] };
+exports.default = util.createRule({
+ name: 'array-type',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Requires using either `T[]` or `Array` for arrays',
+ category: 'Stylistic Issues',
+ // too opinionated to be recommended
+ recommended: false,
+ },
+ fixable: 'code',
+ messages: {
+ errorStringGeneric: "Array type using '{{type}}[]' is forbidden. Use 'Array<{{type}}>' instead.",
+ errorStringGenericSimple: "Array type using '{{type}}[]' is forbidden for non-simple types. Use 'Array<{{type}}>' instead.",
+ errorStringArray: "Array type using 'Array<{{type}}>' is forbidden. Use '{{type}}[]' instead.",
+ errorStringArraySimple: "Array type using 'Array<{{type}}>' is forbidden for simple types. Use '{{type}}[]' instead.",
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ default: arrayOption,
+ readonly: arrayOption,
+ },
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ default: 'array',
+ },
+ ],
+ create(context, [options]) {
+ var _a;
+ const sourceCode = context.getSourceCode();
+ const defaultOption = options.default;
+ const readonlyOption = (_a = options.readonly) !== null && _a !== void 0 ? _a : defaultOption;
+ const isArraySimpleOption = defaultOption === 'array-simple' && readonlyOption === 'array-simple';
+ const isArrayOption = defaultOption === 'array' && readonlyOption === 'array';
+ const isGenericOption = defaultOption === 'generic' && readonlyOption === 'generic';
+ /**
+ * Check if whitespace is needed before this node
+ * @param node the node to be evaluated.
+ */
+ function requireWhitespaceBefore(node) {
+ const prevToken = sourceCode.getTokenBefore(node);
+ if (!prevToken) {
+ return false;
+ }
+ const nextToken = sourceCode.getTokenAfter(prevToken);
+ if (nextToken && sourceCode.isSpaceBetweenTokens(prevToken, nextToken)) {
+ return false;
+ }
+ return prevToken.type === experimental_utils_1.AST_TOKEN_TYPES.Identifier;
+ }
+ /**
+ * @param node the node to be evaluated.
+ */
+ function getMessageType(node) {
+ if (node) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.TSParenthesizedType) {
+ return getMessageType(node.typeAnnotation);
+ }
+ if (isSimpleType(node)) {
+ return sourceCode.getText(node);
+ }
+ }
+ return 'T';
+ }
+ /**
+ * @param node the node to be evaluated
+ */
+ function getTypeOpNodeRange(node) {
+ if (!node) {
+ return undefined;
+ }
+ const firstToken = sourceCode.getFirstToken(node);
+ const nextToken = sourceCode.getTokenAfter(firstToken);
+ return [firstToken.range[0], nextToken.range[0]];
+ }
+ return {
+ TSArrayType(node) {
+ if (isArrayOption ||
+ (isArraySimpleOption && isSimpleType(node.elementType))) {
+ return;
+ }
+ const isReadonly = node.parent &&
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.TSTypeOperator &&
+ node.parent.operator === 'readonly';
+ const isReadonlyGeneric = readonlyOption === 'generic' && defaultOption !== 'generic';
+ const isReadonlyArray = readonlyOption !== 'generic' && defaultOption === 'generic';
+ if ((isReadonlyGeneric && !isReadonly) ||
+ (isReadonlyArray && isReadonly)) {
+ return;
+ }
+ const messageId = defaultOption === 'generic'
+ ? 'errorStringGeneric'
+ : 'errorStringGenericSimple';
+ const typeOpNode = isReadonly ? node.parent : null;
+ context.report({
+ node: isReadonly ? node.parent : node,
+ messageId,
+ data: {
+ type: getMessageType(node.elementType),
+ },
+ fix(fixer) {
+ const toFix = [
+ fixer.replaceTextRange([node.range[1] - 2, node.range[1]], '>'),
+ ];
+ const startText = requireWhitespaceBefore(node);
+ const typeOpNodeRange = getTypeOpNodeRange(typeOpNode);
+ if (typeOpNodeRange) {
+ toFix.unshift(fixer.removeRange(typeOpNodeRange));
+ }
+ else {
+ toFix.push(fixer.insertTextBefore(node, `${startText ? ' ' : ''}`));
+ }
+ toFix.push(fixer.insertTextBefore(node, `${isReadonly ? 'Readonly' : ''}Array<`));
+ if (node.elementType.type === experimental_utils_1.AST_NODE_TYPES.TSParenthesizedType) {
+ const first = sourceCode.getFirstToken(node.elementType);
+ const last = sourceCode.getLastToken(node.elementType);
+ if (!first || !last) {
+ return null;
+ }
+ toFix.push(fixer.remove(first));
+ toFix.push(fixer.remove(last));
+ }
+ return toFix;
+ },
+ });
+ },
+ TSTypeReference(node) {
+ var _a;
+ if (isGenericOption ||
+ node.typeName.type !== experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ return;
+ }
+ const isReadonlyArrayType = node.typeName.name === 'ReadonlyArray';
+ const isArrayType = node.typeName.name === 'Array';
+ if (!(isArrayType || isReadonlyArrayType) ||
+ (readonlyOption === 'generic' && isReadonlyArrayType) ||
+ (defaultOption === 'generic' && !isReadonlyArrayType)) {
+ return;
+ }
+ const readonlyPrefix = isReadonlyArrayType ? 'readonly ' : '';
+ const typeParams = (_a = node.typeParameters) === null || _a === void 0 ? void 0 : _a.params;
+ const messageId = defaultOption === 'array'
+ ? 'errorStringArray'
+ : 'errorStringArraySimple';
+ if (!typeParams || typeParams.length === 0) {
+ // Create an 'any' array
+ context.report({
+ node,
+ messageId,
+ data: {
+ type: 'any',
+ },
+ fix(fixer) {
+ return fixer.replaceText(node, `${readonlyPrefix}any[]`);
+ },
+ });
+ return;
+ }
+ if (typeParams.length !== 1 ||
+ (defaultOption === 'array-simple' && !isSimpleType(typeParams[0]))) {
+ return;
+ }
+ const type = typeParams[0];
+ const parens = typeNeedsParentheses(type);
+ context.report({
+ node,
+ messageId,
+ data: {
+ type: getMessageType(type),
+ },
+ fix(fixer) {
+ return [
+ fixer.replaceTextRange([node.range[0], type.range[0]], `${readonlyPrefix}${parens ? '(' : ''}`),
+ fixer.replaceTextRange([type.range[1], node.range[1]], parens ? ')[]' : '[]'),
+ ];
+ },
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=array-type.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map
new file mode 100644
index 000000000..2acd2d280
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/array-type.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"array-type.js","sourceRoot":"","sources":["../../src/rules/array-type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8CAAgC;AAEhC;;;GAGG;AACH,SAAS,YAAY,CAAC,IAAmB;IACvC,QAAQ,IAAI,CAAC,IAAI,EAAE;QACjB,KAAK,mCAAc,CAAC,UAAU,CAAC;QAC/B,KAAK,mCAAc,CAAC,YAAY,CAAC;QACjC,KAAK,mCAAc,CAAC,gBAAgB,CAAC;QACrC,KAAK,mCAAc,CAAC,cAAc,CAAC;QACnC,KAAK,mCAAc,CAAC,eAAe,CAAC;QACpC,KAAK,mCAAc,CAAC,eAAe,CAAC;QACpC,KAAK,mCAAc,CAAC,eAAe,CAAC;QACpC,KAAK,mCAAc,CAAC,eAAe,CAAC;QACpC,KAAK,mCAAc,CAAC,gBAAgB,CAAC;QACrC,KAAK,mCAAc,CAAC,aAAa,CAAC;QAClC,KAAK,mCAAc,CAAC,aAAa,CAAC;QAClC,KAAK,mCAAc,CAAC,WAAW,CAAC;QAChC,KAAK,mCAAc,CAAC,kBAAkB,CAAC;QACvC,KAAK,mCAAc,CAAC,UAAU,CAAC;QAC/B,KAAK,mCAAc,CAAC,eAAe;YACjC,OAAO,IAAI,CAAC;QACd,KAAK,mCAAc,CAAC,eAAe;YACjC,IACE,IAAI,CAAC,QAAQ;gBACb,IAAI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CAAC,CAAC,CAAC,EAC9B,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CACtB;yBACF,CAAC;oBACJ,CAAC;iBACF,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js
new file mode 100644
index 000000000..e00e853dd
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js
@@ -0,0 +1,59 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const tsutils = __importStar(require("tsutils"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'await-thenable',
+ meta: {
+ docs: {
+ description: 'Disallows awaiting a value that is not a Thenable',
+ category: 'Best Practices',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ await: 'Unexpected `await` of a non-Promise (non-"Thenable") value.',
+ },
+ schema: [],
+ type: 'problem',
+ },
+ defaultOptions: [],
+ create(context) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ return {
+ AwaitExpression(node) {
+ const originalNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const type = checker.getTypeAtLocation(originalNode.expression);
+ if (!util.isTypeAnyType(type) &&
+ !util.isTypeUnknownType(type) &&
+ !tsutils.isThenableType(checker, originalNode.expression, type)) {
+ context.report({
+ messageId: 'await',
+ node,
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=await-thenable.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js.map
new file mode 100644
index 000000000..b53e8dc88
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/await-thenable.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"await-thenable.js","sourceRoot":"","sources":["../../src/rules/await-thenable.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AAEnC,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,6DAA6D;SACrE;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KAChB;IACD,cAAc,EAAE,EAAE;IAElB,MAAM,CAAC,OAAO;QACZ,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACvD,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAExD,OAAO;YACL,eAAe,CAAC,IAAI;gBAClB,MAAM,YAAY,GAAG,cAAc,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBACpE,MAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;gBAEhE,IACE,CAAC,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC;oBACzB,CAAC,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC;oBAC7B,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,EAC/D;oBACA,OAAO,CAAC,MAAM,CAAC;wBACb,SAAS,EAAE,OAAO;wBAClB,IAAI;qBACL,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js
new file mode 100644
index 000000000..d2a19b45d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js
@@ -0,0 +1,141 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.defaultMinimumDescriptionLength = void 0;
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.defaultMinimumDescriptionLength = 3;
+exports.default = util.createRule({
+ name: 'ban-ts-comment',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Bans `// @ts-` comments from being used or requires descriptions after directive',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ messages: {
+ tsDirectiveComment: 'Do not use "// @ts-{{directive}}" because it alters compilation errors.',
+ tsDirectiveCommentRequiresDescription: 'Include a description after the "// @ts-{{directive}}" directive to explain why the @ts-{{directive}} is necessary. The description must be {{minimumDescriptionLength}} characters or longer.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ 'ts-expect-error': {
+ oneOf: [
+ {
+ type: 'boolean',
+ default: true,
+ },
+ {
+ enum: ['allow-with-description'],
+ },
+ ],
+ },
+ 'ts-ignore': {
+ oneOf: [
+ {
+ type: 'boolean',
+ default: true,
+ },
+ {
+ enum: ['allow-with-description'],
+ },
+ ],
+ },
+ 'ts-nocheck': {
+ oneOf: [
+ {
+ type: 'boolean',
+ default: true,
+ },
+ {
+ enum: ['allow-with-description'],
+ },
+ ],
+ },
+ 'ts-check': {
+ oneOf: [
+ {
+ type: 'boolean',
+ default: true,
+ },
+ {
+ enum: ['allow-with-description'],
+ },
+ ],
+ },
+ minimumDescriptionLength: {
+ type: 'number',
+ default: exports.defaultMinimumDescriptionLength,
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ 'ts-expect-error': 'allow-with-description',
+ 'ts-ignore': true,
+ 'ts-nocheck': true,
+ 'ts-check': false,
+ minimumDescriptionLength: exports.defaultMinimumDescriptionLength,
+ },
+ ],
+ create(context, [options]) {
+ const tsCommentRegExp = /^\/*\s*@ts-(expect-error|ignore|check|nocheck)(.*)/;
+ const sourceCode = context.getSourceCode();
+ return {
+ Program() {
+ const comments = sourceCode.getAllComments();
+ comments.forEach(comment => {
+ var _a;
+ if (comment.type !== experimental_utils_1.AST_TOKEN_TYPES.Line) {
+ return;
+ }
+ const [, directive, description] = (_a = tsCommentRegExp.exec(comment.value)) !== null && _a !== void 0 ? _a : [];
+ const fullDirective = `ts-${directive}`;
+ const option = options[fullDirective];
+ if (option === true) {
+ context.report({
+ data: { directive },
+ node: comment,
+ messageId: 'tsDirectiveComment',
+ });
+ }
+ if (option === 'allow-with-description') {
+ const { minimumDescriptionLength = exports.defaultMinimumDescriptionLength, } = options;
+ if (description.trim().length < minimumDescriptionLength) {
+ context.report({
+ data: { directive, minimumDescriptionLength },
+ node: comment,
+ messageId: 'tsDirectiveCommentRequiresDescription',
+ });
+ }
+ }
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=ban-ts-comment.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map
new file mode 100644
index 000000000..7d6e42109
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-ts-comment.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ban-ts-comment.js","sourceRoot":"","sources":["../../src/rules/ban-ts-comment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,8EAAwE;AACxE,8CAAgC;AAUnB,QAAA,+BAA+B,GAAG,CAAC,CAAC;AAMjD,kBAAe,IAAI,CAAC,UAAU,CAAwB;IACpD,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,6FAA6F;YAC/F,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;SACrB;QACD,QAAQ,EAAE;YACR,kBAAkB,EAChB,yEAAyE;YAC3E,qCAAqC,EACnC,gMAAgM;SACnM;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,iBAAiB,EAAE;wBACjB,KAAK,EAAE;4BACL;gCACE,IAAI,EAAE,SAAS;gCAC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CAAC,EAAE,SAAS,EAAE,WAAW,CAAC,SAC9B,eAAe,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,mCAAI,EAAE,CAAC;oBAE5C,MAAM,aAAa,GAAG,MAAM,SAAS,EAAmB,CAAC;oBAEzD,MAAM,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;oBACtC,IAAI,MAAM,KAAK,IAAI,EAAE;wBACnB,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI,EAAE,EAAE,SAAS,EAAE;4BACnB,IAAI,EAAE,OAAO;4BACb,SAAS,EAAE,oBAAoB;yBAChC,CAAC,CAAC;qBACJ;oBAED,IAAI,MAAM,KAAK,wBAAwB,EAAE;wBACvC,MAAM,EACJ,wBAAwB,GAAG,uCAA+B,GAC3D,GAAG,OAAO,CAAC;wBACZ,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,wBAAwB,EAAE;4BACxD,OAAO,CAAC,MAAM,CAAC;gCACb,IAAI,EAAE,EAAE,SAAS,EAAE,wBAAwB,EAAE;gCAC7C,IAAI,EAAE,OAAO;gCACb,SAAS,EAAE,uCAAuC;6BACnD,CAAC,CAAC;yBACJ;qBACF;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js
new file mode 100644
index 000000000..46cab0dee
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js
@@ -0,0 +1,75 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+// tslint regex
+// https://github.com/palantir/tslint/blob/95d9d958833fd9dc0002d18cbe34db20d0fbf437/src/enableDisableRules.ts#L32
+const ENABLE_DISABLE_REGEX = /^\s*tslint:(enable|disable)(?:-(line|next-line))?(:|\s|$)/;
+const toText = (text, type) => type === experimental_utils_1.AST_TOKEN_TYPES.Line
+ ? ['//', text.trim()].join(' ')
+ : ['/*', text.trim(), '*/'].join(' ');
+exports.default = util.createRule({
+ name: 'ban-tslint-comment',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Bans `// tslint:` comments from being used',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ messages: {
+ commentDetected: 'tslint comment detected: "{{ text }}"',
+ },
+ schema: [],
+ fixable: 'code',
+ },
+ defaultOptions: [],
+ create: context => {
+ const sourceCode = context.getSourceCode();
+ return {
+ Program() {
+ const comments = sourceCode.getAllComments();
+ comments.forEach(c => {
+ if (ENABLE_DISABLE_REGEX.test(c.value)) {
+ context.report({
+ data: { text: toText(c.value, c.type) },
+ node: c,
+ messageId: 'commentDetected',
+ fix(fixer) {
+ const rangeStart = sourceCode.getIndexFromLoc({
+ column: c.loc.start.column > 0 ? c.loc.start.column - 1 : 0,
+ line: c.loc.start.line,
+ });
+ const rangeEnd = sourceCode.getIndexFromLoc({
+ column: c.loc.end.column,
+ line: c.loc.end.line,
+ });
+ return fixer.removeRange([rangeStart, rangeEnd + 1]);
+ },
+ });
+ }
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=ban-tslint-comment.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js.map
new file mode 100644
index 000000000..301958f15
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-tslint-comment.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ban-tslint-comment.js","sourceRoot":"","sources":["../../src/rules/ban-tslint-comment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAAwE;AACxE,8CAAgC;AAEhC,eAAe;AACf,iHAAiH;AACjH,MAAM,oBAAoB,GAAG,2DAA2D,CAAC;AAEzF,MAAM,MAAM,GAAG,CACb,IAAY,EACZ,IAAkD,EAC1C,EAAE,CACV,IAAI,KAAK,oCAAe,CAAC,IAAI;IAC3B,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;IAC/B,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAE1C,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,uDAAuD;YACpE,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,eAAe,EAAE,uCAAuC;SACzD;QACD,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,MAAM;KAChB;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,EAAE,OAAO,CAAC,EAAE;QAChB,MAAM,UAAU,GAAG,OAAO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ules/ban-types.js
new file mode 100644
index 000000000..eb9fc2d5f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js
@@ -0,0 +1,189 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TYPE_KEYWORDS = void 0;
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+function removeSpaces(str) {
+ return str.replace(/ /g, '');
+}
+function stringifyTypeName(node, sourceCode) {
+ return removeSpaces(sourceCode.getText(node));
+}
+function getCustomMessage(bannedType) {
+ if (bannedType === null) {
+ return '';
+ }
+ if (typeof bannedType === 'string') {
+ return ` ${bannedType}`;
+ }
+ if (bannedType.message) {
+ return ` ${bannedType.message}`;
+ }
+ return '';
+}
+const defaultTypes = {
+ String: {
+ message: 'Use string instead',
+ fixWith: 'string',
+ },
+ Boolean: {
+ message: 'Use boolean instead',
+ fixWith: 'boolean',
+ },
+ Number: {
+ message: 'Use number instead',
+ fixWith: 'number',
+ },
+ Symbol: {
+ message: 'Use symbol instead',
+ fixWith: 'symbol',
+ },
+ Function: {
+ message: [
+ 'The `Function` type accepts any function-like value.',
+ 'It provides no type safety when calling the function, which can be a common source of bugs.',
+ 'It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.',
+ 'If you are expecting the function to accept certain arguments, you should explicitly define the function shape.',
+ ].join('\n'),
+ },
+ // object typing
+ Object: {
+ message: [
+ 'The `Object` type actually means "any non-nullish value", so it is marginally better than `unknown`.',
+ '- If you want a type meaning "any object", you probably want `Record` instead.',
+ '- If you want a type meaning "any value", you probably want `unknown` instead.',
+ ].join('\n'),
+ },
+ '{}': {
+ message: [
+ '`{}` actually means "any non-nullish value".',
+ '- If you want a type meaning "any object", you probably want `Record` instead.',
+ '- If you want a type meaning "any value", you probably want `unknown` instead.',
+ ].join('\n'),
+ },
+ object: {
+ message: [
+ 'The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).',
+ 'Consider using `Record` instead, as it allows you to more easily inspect and use the keys.',
+ ].join('\n'),
+ },
+};
+exports.TYPE_KEYWORDS = {
+ bigint: experimental_utils_1.AST_NODE_TYPES.TSBigIntKeyword,
+ boolean: experimental_utils_1.AST_NODE_TYPES.TSBooleanKeyword,
+ never: experimental_utils_1.AST_NODE_TYPES.TSNeverKeyword,
+ null: experimental_utils_1.AST_NODE_TYPES.TSNullKeyword,
+ number: experimental_utils_1.AST_NODE_TYPES.TSNumberKeyword,
+ object: experimental_utils_1.AST_NODE_TYPES.TSObjectKeyword,
+ string: experimental_utils_1.AST_NODE_TYPES.TSStringKeyword,
+ symbol: experimental_utils_1.AST_NODE_TYPES.TSSymbolKeyword,
+ undefined: experimental_utils_1.AST_NODE_TYPES.TSUndefinedKeyword,
+ unknown: experimental_utils_1.AST_NODE_TYPES.TSUnknownKeyword,
+ void: experimental_utils_1.AST_NODE_TYPES.TSVoidKeyword,
+};
+exports.default = util.createRule({
+ name: 'ban-types',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Bans specific types from being used',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ fixable: 'code',
+ messages: {
+ bannedTypeMessage: "Don't use `{{name}}` as a type.{{customMessage}}",
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ types: {
+ type: 'object',
+ additionalProperties: {
+ oneOf: [
+ { type: 'null' },
+ { type: 'boolean' },
+ { type: 'string' },
+ {
+ type: 'object',
+ properties: {
+ message: { type: 'string' },
+ fixWith: { type: 'string' },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ },
+ extendDefaults: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [{}],
+ create(context, [options]) {
+ var _a, _b;
+ const extendDefaults = (_a = options.extendDefaults) !== null && _a !== void 0 ? _a : true;
+ const customTypes = (_b = options.types) !== null && _b !== void 0 ? _b : {};
+ const types = Object.assign({}, extendDefaults ? defaultTypes : {}, customTypes);
+ const bannedTypes = new Map(Object.entries(types).map(([type, data]) => [removeSpaces(type), data]));
+ function checkBannedTypes(typeNode, name = stringifyTypeName(typeNode, context.getSourceCode())) {
+ const bannedType = bannedTypes.get(name);
+ if (bannedType === undefined || bannedType === false) {
+ return;
+ }
+ const customMessage = getCustomMessage(bannedType);
+ const fixWith = bannedType && typeof bannedType === 'object' && bannedType.fixWith;
+ context.report({
+ node: typeNode,
+ messageId: 'bannedTypeMessage',
+ data: {
+ name,
+ customMessage,
+ },
+ fix: fixWith
+ ? (fixer) => fixer.replaceText(typeNode, fixWith)
+ : null,
+ });
+ }
+ const keywordSelectors = util.objectReduceKey(exports.TYPE_KEYWORDS, (acc, keyword) => {
+ if (bannedTypes.has(keyword)) {
+ acc[exports.TYPE_KEYWORDS[keyword]] = (node) => checkBannedTypes(node, keyword);
+ }
+ return acc;
+ }, {});
+ return Object.assign(Object.assign({}, keywordSelectors), { TSTypeLiteral(node) {
+ if (node.members.length) {
+ return;
+ }
+ checkBannedTypes(node);
+ },
+ TSTypeReference({ typeName }) {
+ checkBannedTypes(typeName);
+ } });
+ },
+});
+//# sourceMappingURL=ban-types.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map
new file mode 100644
index 000000000..3f3eb618b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/ban-types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"ban-types.js","sourceRoot":"","sources":["../../src/rules/ban-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8CAAgC;AAqBhC,SAAS,YAAY,CAAC,GAAW;IAC/B,OAAO,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;AAC/B,CAAC;AAED,SAAS,iBAAiB,CACxB,IAAmB,EACnB,UAA+B;IAE/B,OAAO,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAChD,CAAC;AAED,SAAS,gBAAgB,CACvB,UAAkE;IAElE,IAAI,UAAU,KAAK,IAAI,EAAE;QACvB,OAAO,EAAE,CAAC;KACX;IAED,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE;QAClC,OAAO,IAAI,UAAU,EAAE,CAAC;KACzB;IAED,IAAI,UAAU,CAAC,OAAO,EAAE;QACtB,OAAO,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;KACjC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC;AAED,MAAM,YAAY,GAAU;IAC1B,MAAM,EAAE;QACN,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EAAE,QAAQ;KAClB;IACD,OAAO,EAAE;QACP,OAAO,EAAE,qBAAqB;QAC9B,OAAO,EAAE,SAAS;KACnB;IACD,MAAM,EAAE;QACN,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EAAE,QAAQ;KAClB;IACD,MAAM,EAAE;QACN,OAAO,EAAE,oBAAoB;QAC7B,OAAO,EAAE,QAAQ;KAClB;IAED,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,sDAAsD;YACtD,6FAA6F;YAC7F,oHAAoH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rules/brace-style.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js
new file mode 100644
index 000000000..5709f0a9a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js
@@ -0,0 +1,94 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const brace_style_1 = __importDefault(require("eslint/lib/rules/brace-style"));
+const util_1 = require("../util");
+exports.default = util_1.createRule({
+ name: 'brace-style',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Enforce consistent brace style for blocks',
+ category: 'Stylistic Issues',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ messages: brace_style_1.default.meta.messages,
+ fixable: brace_style_1.default.meta.fixable,
+ schema: brace_style_1.default.meta.schema,
+ },
+ defaultOptions: ['1tbs'],
+ create(context) {
+ const [style, { allowSingleLine } = { allowSingleLine: false },] = context.options;
+ const isAllmanStyle = style === 'allman';
+ const sourceCode = context.getSourceCode();
+ const rules = brace_style_1.default.create(context);
+ /**
+ * Checks a pair of curly brackets based on the user's config
+ */
+ function validateCurlyPair(openingCurlyToken, closingCurlyToken) {
+ if (allowSingleLine &&
+ util_1.isTokenOnSameLine(openingCurlyToken, closingCurlyToken)) {
+ return;
+ }
+ const tokenBeforeOpeningCurly = sourceCode.getTokenBefore(openingCurlyToken);
+ const tokenBeforeClosingCurly = sourceCode.getTokenBefore(closingCurlyToken);
+ const tokenAfterOpeningCurly = sourceCode.getTokenAfter(openingCurlyToken);
+ if (!isAllmanStyle &&
+ !util_1.isTokenOnSameLine(tokenBeforeOpeningCurly, openingCurlyToken)) {
+ context.report({
+ node: openingCurlyToken,
+ messageId: 'nextLineOpen',
+ fix: fixer => {
+ const textRange = [
+ tokenBeforeOpeningCurly.range[1],
+ openingCurlyToken.range[0],
+ ];
+ const textBetween = sourceCode.text.slice(textRange[0], textRange[1]);
+ if (textBetween.trim()) {
+ return null;
+ }
+ return fixer.replaceTextRange(textRange, ' ');
+ },
+ });
+ }
+ if (isAllmanStyle &&
+ util_1.isTokenOnSameLine(tokenBeforeOpeningCurly, openingCurlyToken)) {
+ context.report({
+ node: openingCurlyToken,
+ messageId: 'sameLineOpen',
+ fix: fixer => fixer.insertTextBefore(openingCurlyToken, '\n'),
+ });
+ }
+ if (util_1.isTokenOnSameLine(openingCurlyToken, tokenAfterOpeningCurly) &&
+ tokenAfterOpeningCurly !== closingCurlyToken) {
+ context.report({
+ node: openingCurlyToken,
+ messageId: 'blockSameLine',
+ fix: fixer => fixer.insertTextAfter(openingCurlyToken, '\n'),
+ });
+ }
+ if (util_1.isTokenOnSameLine(tokenBeforeClosingCurly, closingCurlyToken) &&
+ tokenBeforeClosingCurly !== openingCurlyToken) {
+ context.report({
+ node: closingCurlyToken,
+ messageId: 'singleLineClose',
+ fix: fixer => fixer.insertTextBefore(closingCurlyToken, '\n'),
+ });
+ }
+ }
+ return Object.assign(Object.assign({}, rules), { 'TSInterfaceBody, TSModuleBlock'(node) {
+ const openingCurly = sourceCode.getFirstToken(node);
+ const closingCurly = sourceCode.getLastToken(node);
+ validateCurlyPair(openingCurly, closingCurly);
+ },
+ TSEnumDeclaration(node) {
+ const closingCurly = sourceCode.getLastToken(node);
+ const openingCurly = sourceCode.getTokenBefore(node.members.length ? node.members[0] : closingCurly);
+ validateCurlyPair(openingCurly, closingCurly);
+ } });
+ },
+});
+//# sourceMappingURL=brace-style.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js.map
new file mode 100644
index 000000000..8bfa2a874
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/brace-style.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"brace-style.js","sourceRoot":"","sources":["../../src/rules/brace-style.ts"],"names":[],"mappings":";;;;;AACA,+EAAoD;A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,iBAAiB;oBACvB,SAAS,EAAE,iBAAiB;oBAC5B,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,IAAI,CAAC;iBAC9D,CAAC,CAAC;aACJ;QACH,CAAC;QAED,uCACK,KAAK,KACR,gCAAgC,CAC9B,IAAuD;gBAEvD,MAAM,YAAY,GAAG,UAAU,CAAC,aAAa,CAAC,IAAI,CAAE,CAAC;gBACrD,MAAM,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC,IAAI,CAAE,CAAC;gBAEpD,iBAAiB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YAChD,CAAC;YACD,iBAAiB,CAAC,IAAI;gBACpB,MAAM,YAAY,GAAG,UAAU,CAAC,YAAY,CAAC,IAAI,CAAE,CAAC;gBACpD,MAAM,YAAY,GAAG,UAAU,CAAC,cAAc,CAC5C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CACpD,CAAC;gBAEH,iBAAiB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;YAChD,CAAC,IACD;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js
new file mode 100644
index 000000000..2d6e06248
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js
@@ -0,0 +1,114 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+const printNodeModifiers = (node, final) => {
+ var _a;
+ return `${(_a = node.accessibility) !== null && _a !== void 0 ? _a : ''}${node.static ? ' static' : ''} ${final} `.trimLeft();
+};
+const isSupportedLiteral = (node) => {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.Literal) {
+ return true;
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.TaggedTemplateExpression ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.TemplateLiteral) {
+ return ('quasi' in node ? node.quasi.quasis : node.quasis).length === 1;
+ }
+ return false;
+};
+exports.default = util.createRule({
+ name: 'class-literal-property-style',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Ensures that literals on classes are exposed in a consistent style',
+ category: 'Best Practices',
+ recommended: false,
+ },
+ fixable: 'code',
+ messages: {
+ preferFieldStyle: 'Literals should be exposed using readonly fields.',
+ preferGetterStyle: 'Literals should be exposed using getters.',
+ },
+ schema: [{ enum: ['fields', 'getters'] }],
+ },
+ defaultOptions: ['fields'],
+ create(context, [style]) {
+ if (style === 'fields') {
+ return {
+ MethodDefinition(node) {
+ if (node.kind !== 'get' ||
+ !node.value.body ||
+ !node.value.body.body.length) {
+ return;
+ }
+ const [statement] = node.value.body.body;
+ if (statement.type !== experimental_utils_1.AST_NODE_TYPES.ReturnStatement) {
+ return;
+ }
+ const { argument } = statement;
+ if (!argument || !isSupportedLiteral(argument)) {
+ return;
+ }
+ context.report({
+ node: node.key,
+ messageId: 'preferFieldStyle',
+ fix(fixer) {
+ const sourceCode = context.getSourceCode();
+ const name = sourceCode.getText(node.key);
+ let text = '';
+ text += printNodeModifiers(node, 'readonly');
+ text += node.computed ? `[${name}]` : name;
+ text += ` = ${sourceCode.getText(argument)};`;
+ return fixer.replaceText(node, text);
+ },
+ });
+ },
+ };
+ }
+ return {
+ ClassProperty(node) {
+ if (!node.readonly || node.declare) {
+ return;
+ }
+ const { value } = node;
+ if (!value || !isSupportedLiteral(value)) {
+ return;
+ }
+ context.report({
+ node: node.key,
+ messageId: 'preferGetterStyle',
+ fix(fixer) {
+ const sourceCode = context.getSourceCode();
+ const name = sourceCode.getText(node.key);
+ let text = '';
+ text += printNodeModifiers(node, 'get');
+ text += node.computed ? `[${name}]` : name;
+ text += `() { return ${sourceCode.getText(value)}; }`;
+ return fixer.replaceText(node, text);
+ },
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=class-literal-property-style.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js.map
new file mode 100644
index 000000000..99fba142f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/class-literal-property-style.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"class-literal-property-style.js","sourceRoot":"","sources":["../../src/rules/class-literal-property-style.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAUhC,MAAM,kBAAkB,GAAG,CACzB,IAAuB,EACvB,KAAyB,EACjB,EAAE;;IACV,OAAA,GAAG,MAAA,IAAI,CAAC,aAAa,mCAAI,EAAE,GACzB,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAC5B,IAAI,KAAK,GAAG,CAAC,QAAQ,EAAE,CAAA;CAAA,CAAC;AAE1B,MAAM,kBAAkB,GAAG,CACzB,IAA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AG;oBACd,SAAS,EAAE,mBAAmB;oBAC9B,GAAG,CAAC,KAAK;wBACP,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;wBAC3C,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;wBAE1C,IAAI,IAAI,GAAG,EAAE,CAAC;wBAEd,IAAI,IAAI,kBAAkB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;wBACxC,IAAI,IAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;wBAC3C,IAAI,IAAI,eAAe,UAAU,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;wBAEtD,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;oBACvC,CAAC;iBACF,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js
new file mode 100644
index 000000000..6e2c44066
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js
@@ -0,0 +1,141 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util_1 = require("../util");
+exports.default = util_1.createRule({
+ name: 'comma-spacing',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Enforces consistent spacing before and after commas',
+ category: 'Stylistic Issues',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ fixable: 'whitespace',
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ before: {
+ type: 'boolean',
+ default: false,
+ },
+ after: {
+ type: 'boolean',
+ default: true,
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ messages: {
+ unexpected: `There should be no space {{loc}} ','.`,
+ missing: `A space is required {{loc}} ','.`,
+ },
+ },
+ defaultOptions: [
+ {
+ before: false,
+ after: true,
+ },
+ ],
+ create(context, [{ before: spaceBefore, after: spaceAfter }]) {
+ const sourceCode = context.getSourceCode();
+ const tokensAndComments = sourceCode.tokensAndComments;
+ const ignoredTokens = new Set();
+ /**
+ * Adds null elements of the ArrayExpression or ArrayPattern node to the ignore list
+ * @param node node to evaluate
+ */
+ function addNullElementsToIgnoreList(node) {
+ let previousToken = sourceCode.getFirstToken(node);
+ for (const element of node.elements) {
+ let token;
+ if (element === null) {
+ token = sourceCode.getTokenAfter(previousToken);
+ if (token && util_1.isCommaToken(token)) {
+ ignoredTokens.add(token);
+ }
+ }
+ else {
+ token = sourceCode.getTokenAfter(element);
+ }
+ previousToken = token;
+ }
+ }
+ /**
+ * Adds type parameters trailing comma token to the ignore list
+ * @param node node to evaluate
+ */
+ function addTypeParametersTrailingCommaToIgnoreList(node) {
+ const param = node.params[node.params.length - 1];
+ const afterToken = sourceCode.getTokenAfter(param);
+ if (afterToken && util_1.isCommaToken(afterToken)) {
+ ignoredTokens.add(afterToken);
+ }
+ }
+ /**
+ * Validates the spacing around a comma token.
+ * @param commaToken The token representing the comma
+ * @param prevToken The last token before the comma
+ * @param nextToken The first token after the comma
+ */
+ function validateCommaSpacing(commaToken, prevToken, nextToken) {
+ if (prevToken &&
+ util_1.isTokenOnSameLine(prevToken, commaToken) &&
+ spaceBefore !== sourceCode.isSpaceBetweenTokens(prevToken, commaToken)) {
+ context.report({
+ node: commaToken,
+ data: {
+ loc: 'before',
+ },
+ messageId: spaceBefore ? 'missing' : 'unexpected',
+ fix: fixer => spaceBefore
+ ? fixer.insertTextBefore(commaToken, ' ')
+ : fixer.replaceTextRange([prevToken.range[1], commaToken.range[0]], ''),
+ });
+ }
+ if (nextToken && util_1.isClosingParenToken(nextToken)) {
+ return;
+ }
+ if (!spaceAfter && nextToken && nextToken.type === experimental_utils_1.AST_TOKEN_TYPES.Line) {
+ return;
+ }
+ if (nextToken &&
+ util_1.isTokenOnSameLine(commaToken, nextToken) &&
+ spaceAfter !== sourceCode.isSpaceBetweenTokens(commaToken, nextToken)) {
+ context.report({
+ node: commaToken,
+ data: {
+ loc: 'after',
+ },
+ messageId: spaceAfter ? 'missing' : 'unexpected',
+ fix: fixer => spaceAfter
+ ? fixer.insertTextAfter(commaToken, ' ')
+ : fixer.replaceTextRange([commaToken.range[1], nextToken.range[0]], ''),
+ });
+ }
+ }
+ return {
+ TSTypeParameterDeclaration: addTypeParametersTrailingCommaToIgnoreList,
+ ArrayExpression: addNullElementsToIgnoreList,
+ ArrayPattern: addNullElementsToIgnoreList,
+ 'Program:exit'() {
+ tokensAndComments.forEach((token, i) => {
+ if (!util_1.isCommaToken(token)) {
+ return;
+ }
+ const prevToken = tokensAndComments[i - 1];
+ const nextToken = tokensAndComments[i + 1];
+ validateCommaSpacing(token, util_1.isCommaToken(prevToken) || ignoredTokens.has(token)
+ ? null
+ : prevToken, util_1.isCommaToken(nextToken) || ignoredTokens.has(token)
+ ? null
+ : nextToken);
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=comma-spacing.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map
new file mode 100644
index 000000000..9ddd17a65
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/comma-spacing.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"comma-spacing.js","sourceRoot":"","sources":["../../src/rules/comma-spacing.ts"],"names":[],"mappings":";;AAAA,8EAG+C;AAC/C,kCAKiB;AAUjB,kBAAe,iBAAU,CAAsB;IAC7C,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,kBAAkB;YA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CAAC,KAAK,CAAC;wBACjD,CAAC,CAAC,IAAI;wBACN,CAAC,CAAC,SAAS,CACd,CAAC;gBACJ,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js
new file mode 100644
index 000000000..00e292ad4
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js
@@ -0,0 +1,153 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+exports.default = util.createRule({
+ name: 'consistent-type-assertions',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ category: 'Best Practices',
+ description: 'Enforces consistent usage of type assertions',
+ recommended: false,
+ },
+ messages: {
+ as: "Use 'as {{cast}}' instead of '<{{cast}}>'.",
+ 'angle-bracket': "Use '<{{cast}}>' instead of 'as {{cast}}'.",
+ never: 'Do not use any type assertions.',
+ unexpectedObjectTypeAssertion: 'Always prefer const x: T = { ... }.',
+ },
+ schema: [
+ {
+ oneOf: [
+ {
+ type: 'object',
+ properties: {
+ assertionStyle: {
+ enum: ['never'],
+ },
+ },
+ additionalProperties: false,
+ required: ['assertionStyle'],
+ },
+ {
+ type: 'object',
+ properties: {
+ assertionStyle: {
+ enum: ['as', 'angle-bracket'],
+ },
+ objectLiteralTypeAssertions: {
+ enum: ['allow', 'allow-as-parameter', 'never'],
+ },
+ },
+ additionalProperties: false,
+ required: ['assertionStyle'],
+ },
+ ],
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ assertionStyle: 'as',
+ objectLiteralTypeAssertions: 'allow',
+ },
+ ],
+ create(context, [options]) {
+ const sourceCode = context.getSourceCode();
+ function isConst(node) {
+ if (node.type !== experimental_utils_1.AST_NODE_TYPES.TSTypeReference) {
+ return false;
+ }
+ return (node.typeName.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ node.typeName.name === 'const');
+ }
+ function reportIncorrectAssertionType(node) {
+ // If this node is `as const`, then don't report an error.
+ if (isConst(node.typeAnnotation)) {
+ return;
+ }
+ const messageId = options.assertionStyle;
+ context.report({
+ node,
+ messageId,
+ data: messageId !== 'never'
+ ? { cast: sourceCode.getText(node.typeAnnotation) }
+ : {},
+ });
+ }
+ function checkType(node) {
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSAnyKeyword:
+ case experimental_utils_1.AST_NODE_TYPES.TSUnknownKeyword:
+ return false;
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeReference:
+ return (
+ // Ignore `as const` and ``
+ !isConst(node) ||
+ // Allow qualified names which have dots between identifiers, `Foo.Bar`
+ node.typeName.type === experimental_utils_1.AST_NODE_TYPES.TSQualifiedName);
+ default:
+ return true;
+ }
+ }
+ function checkExpression(node) {
+ if (options.assertionStyle === 'never' ||
+ options.objectLiteralTypeAssertions === 'allow' ||
+ node.expression.type !== experimental_utils_1.AST_NODE_TYPES.ObjectExpression) {
+ return;
+ }
+ if (options.objectLiteralTypeAssertions === 'allow-as-parameter' &&
+ node.parent &&
+ (node.parent.type === experimental_utils_1.AST_NODE_TYPES.NewExpression ||
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.CallExpression ||
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.ThrowStatement ||
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.AssignmentPattern)) {
+ return;
+ }
+ if (checkType(node.typeAnnotation) &&
+ node.expression.type === experimental_utils_1.AST_NODE_TYPES.ObjectExpression) {
+ context.report({
+ node,
+ messageId: 'unexpectedObjectTypeAssertion',
+ });
+ }
+ }
+ return {
+ TSTypeAssertion(node) {
+ if (options.assertionStyle !== 'angle-bracket') {
+ reportIncorrectAssertionType(node);
+ return;
+ }
+ checkExpression(node);
+ },
+ TSAsExpression(node) {
+ if (options.assertionStyle !== 'as') {
+ reportIncorrectAssertionType(node);
+ return;
+ }
+ checkExpression(node);
+ },
+ };
+ },
+});
+//# sourceMappingURL=consistent-type-assertions.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map
new file mode 100644
index 000000000..41dd8b124
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-assertions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"consistent-type-assertions.js","sourceRoot":"","sources":["../../src/rules/consistent-type-assertions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgC;AAChC,8EAG+C;AAkB/C,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,8CAA8C;YAC3D,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,EAAE,EAAE,4CAA4C;YAChD,eA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S,CAAC,IAAI,CAAC,cAAc,CAAC;gBAC9B,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,mCAAc,CAAC,gBAAgB,EACxD;gBACA,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,SAAS,EAAE,+BAA+B;iBAC3C,CAAC,CAAC;aACJ;QACH,CAAC;QAED,OAAO;YACL,eAAe,CAAC,IAAI;gBAClB,IAAI,OAAO,CAAC,cAAc,KAAK,eAAe,EAAE;oBAC9C,4BAA4B,CAAC,IAAI,CAAC,CAAC;oBACnC,OAAO;iBACR;gBAED,eAAe,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;YACD,cAAc,CAAC,IAAI;gBACjB,IAAI,OAAO,CAAC,cAAc,KAAK,IAAI,EAAE;oBACnC,4BAA4B,CAAC,IAAI,CAAC,CAAC;oBACnC,OAAO;iBACR;gBAED,eAAe,CAAC,IAAI,CAAC,CAAC;YACxB,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js
new file mode 100644
index 000000000..cd0de69e5
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js
@@ -0,0 +1,102 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'consistent-type-definitions',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Consistent with type definition either `interface` or `type`',
+ category: 'Stylistic Issues',
+ // too opinionated to be recommended
+ recommended: false,
+ },
+ messages: {
+ interfaceOverType: 'Use an `interface` instead of a `type`.',
+ typeOverInterface: 'Use a `type` instead of an `interface`.',
+ },
+ schema: [
+ {
+ enum: ['interface', 'type'],
+ },
+ ],
+ fixable: 'code',
+ },
+ defaultOptions: ['interface'],
+ create(context, [option]) {
+ const sourceCode = context.getSourceCode();
+ return {
+ "TSTypeAliasDeclaration[typeAnnotation.type='TSTypeLiteral']"(node) {
+ if (option === 'interface') {
+ context.report({
+ node: node.id,
+ messageId: 'interfaceOverType',
+ fix(fixer) {
+ var _a;
+ const typeNode = (_a = node.typeParameters) !== null && _a !== void 0 ? _a : node.id;
+ const fixes = [];
+ const firstToken = sourceCode.getFirstToken(node);
+ if (firstToken) {
+ fixes.push(fixer.replaceText(firstToken, 'interface'));
+ fixes.push(fixer.replaceTextRange([typeNode.range[1], node.typeAnnotation.range[0]], ' '));
+ }
+ const afterToken = sourceCode.getTokenAfter(node.typeAnnotation);
+ if (afterToken &&
+ afterToken.type === experimental_utils_1.AST_TOKEN_TYPES.Punctuator &&
+ afterToken.value === ';') {
+ fixes.push(fixer.remove(afterToken));
+ }
+ return fixes;
+ },
+ });
+ }
+ },
+ TSInterfaceDeclaration(node) {
+ if (option === 'type') {
+ context.report({
+ node: node.id,
+ messageId: 'typeOverInterface',
+ fix(fixer) {
+ var _a;
+ const typeNode = (_a = node.typeParameters) !== null && _a !== void 0 ? _a : node.id;
+ const fixes = [];
+ const firstToken = sourceCode.getFirstToken(node);
+ if (firstToken) {
+ fixes.push(fixer.replaceText(firstToken, 'type'));
+ fixes.push(fixer.replaceTextRange([typeNode.range[1], node.body.range[0]], ' = '));
+ }
+ if (node.extends) {
+ node.extends.forEach(heritage => {
+ const typeIdentifier = sourceCode.getText(heritage);
+ fixes.push(fixer.insertTextAfter(node.body, ` & ${typeIdentifier}`));
+ });
+ }
+ return fixes;
+ },
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=consistent-type-definitions.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js.map
new file mode 100644
index 000000000..a9d96cba8
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-definitions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"consistent-type-definitions.js","sourceRoot":"","sources":["../../src/rules/consistent-type-definitions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,8DAA8D;YAChE,QAAQ,EAAE,kBAAkB;YAC5B,oCAAoC;YACpC,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,yCAAyC;YAC5D,iBAAiB,EAAE,yCAAyC;SAC7D;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,CAAC,WAAW,EAAE,MAAM,CAAC;aAC5B;SACF;QACD,OAAO,EAAE,MAAM;KAChB;IACD,cAAc,EAAE,CAAC,WAAW,CAAC;IAC7B,MAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;QACtB,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;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AM,QAAQ,SAAG,IAAI,CAAC,cAAc,mCAAI,IAAI,CAAC,EAAE,CAAC;4BAChD,MAAM,KAAK,GAAuB,EAAE,CAAC;4BAErC,MAAM,UAAU,GAAG,UAAU,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;4BAClD,IAAI,UAAU,EAAE;gCACd,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC;gCAClD,KAAK,CAAC,IAAI,CACR,KAAK,CAAC,gBAAgB,CACpB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACvC,KAAK,CACN,CACF,CAAC;6BACH;4BAED,IAAI,IAAI,CAAC,OAAO,EAAE;gCAChB,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oCAC9B,MAAM,cAAc,GAAG,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;oCACpD,KAAK,CAAC,IAAI,CACR,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,cAAc,EAAE,CAAC,CACzD,CAAC;gCACJ,CAAC,CAAC,CAAC;6BACJ;4BAED,OAAO,KAAK,CAAC;wBACf,CAAC;qBACF,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js
new file mode 100644
index 000000000..c61196c54
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js
@@ -0,0 +1,392 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+function isImportToken(token) {
+ return token.type === experimental_utils_1.AST_TOKEN_TYPES.Keyword && token.value === 'import';
+}
+function isTypeToken(token) {
+ return token.type === experimental_utils_1.AST_TOKEN_TYPES.Identifier && token.value === 'type';
+}
+exports.default = util.createRule({
+ name: 'consistent-type-imports',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Enforces consistent usage of type imports',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ messages: {
+ typeOverValue: 'All imports in the declaration are only used as types. Use `import type`',
+ someImportsAreOnlyTypes: 'Imports {{typeImports}} are only used as types',
+ aImportIsOnlyTypes: 'Import {{typeImports}} is only used as types',
+ valueOverType: 'Use an `import` instead of an `import type`.',
+ noImportTypeAnnotations: '`import()` type annotations are forbidden.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ prefer: {
+ enum: ['type-imports', 'no-type-imports'],
+ },
+ disallowTypeAnnotations: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ fixable: 'code',
+ },
+ defaultOptions: [
+ {
+ prefer: 'type-imports',
+ disallowTypeAnnotations: true,
+ },
+ ],
+ create(context, [option]) {
+ var _a;
+ const prefer = (_a = option.prefer) !== null && _a !== void 0 ? _a : 'type-imports';
+ const disallowTypeAnnotations = option.disallowTypeAnnotations !== false;
+ const sourceCode = context.getSourceCode();
+ const sourceImportsMap = {};
+ return Object.assign(Object.assign({}, (prefer === 'type-imports'
+ ? {
+ // prefer type imports
+ ImportDeclaration(node) {
+ var _a;
+ const source = node.source.value;
+ const sourceImports = (_a = sourceImportsMap[source]) !== null && _a !== void 0 ? _a : (sourceImportsMap[source] = {
+ source,
+ reportValueImports: [],
+ typeOnlyNamedImport: null,
+ });
+ if (node.importKind === 'type') {
+ if (!sourceImports.typeOnlyNamedImport &&
+ node.specifiers.every(specifier => specifier.type === experimental_utils_1.AST_NODE_TYPES.ImportSpecifier)) {
+ sourceImports.typeOnlyNamedImport = node;
+ }
+ return;
+ }
+ // if importKind === 'value'
+ const typeSpecifiers = [];
+ const valueSpecifiers = [];
+ const unusedSpecifiers = [];
+ for (const specifier of node.specifiers) {
+ const [variable] = context.getDeclaredVariables(specifier);
+ if (variable.references.length === 0) {
+ unusedSpecifiers.push(specifier);
+ }
+ else {
+ const onlyHasTypeReferences = variable.references.every(ref => {
+ if (ref.isValueReference) {
+ // `type T = typeof foo` will create a value reference because "foo" must be a value type
+ // however this value reference is safe to use with type-only imports
+ let parent = ref.identifier.parent;
+ while (parent) {
+ if (parent.type === experimental_utils_1.AST_NODE_TYPES.TSTypeQuery) {
+ return true;
+ }
+ // TSTypeQuery must have a TSESTree.EntityName as its child, so we can filter here and break early
+ if (parent.type !== experimental_utils_1.AST_NODE_TYPES.TSQualifiedName) {
+ break;
+ }
+ parent = parent.parent;
+ }
+ return false;
+ }
+ return ref.isTypeReference;
+ });
+ if (onlyHasTypeReferences) {
+ typeSpecifiers.push(specifier);
+ }
+ else {
+ valueSpecifiers.push(specifier);
+ }
+ }
+ }
+ if (typeSpecifiers.length) {
+ sourceImports.reportValueImports.push({
+ node,
+ typeSpecifiers,
+ valueSpecifiers,
+ unusedSpecifiers,
+ });
+ }
+ },
+ 'Program:exit'() {
+ for (const sourceImports of Object.values(sourceImportsMap)) {
+ if (sourceImports.reportValueImports.length === 0) {
+ continue;
+ }
+ for (const report of sourceImports.reportValueImports) {
+ if (report.valueSpecifiers.length === 0 &&
+ report.unusedSpecifiers.length === 0) {
+ // import is all type-only, convert the entire import to `import type`
+ context.report({
+ node: report.node,
+ messageId: 'typeOverValue',
+ *fix(fixer) {
+ yield* fixToTypeImport(fixer, report, sourceImports);
+ },
+ });
+ }
+ else {
+ // we have a mixed type/value import, so we need to split them out into multiple exports
+ const typeImportNames = report.typeSpecifiers.map(specifier => `"${specifier.local.name}"`);
+ context.report({
+ node: report.node,
+ messageId: typeImportNames.length === 1
+ ? 'aImportIsOnlyTypes'
+ : 'someImportsAreOnlyTypes',
+ data: {
+ typeImports: typeImportNames.length === 1
+ ? typeImportNames[0]
+ : [
+ typeImportNames.slice(0, -1).join(', '),
+ typeImportNames.slice(-1)[0],
+ ].join(' and '),
+ },
+ *fix(fixer) {
+ yield* fixToTypeImport(fixer, report, sourceImports);
+ },
+ });
+ }
+ }
+ }
+ },
+ }
+ : {
+ // prefer no type imports
+ 'ImportDeclaration[importKind = "type"]'(node) {
+ context.report({
+ node,
+ messageId: 'valueOverType',
+ fix(fixer) {
+ return fixToValueImport(fixer, node);
+ },
+ });
+ },
+ })), (disallowTypeAnnotations
+ ? {
+ // disallow `import()` type
+ TSImportType(node) {
+ context.report({
+ node,
+ messageId: 'noImportTypeAnnotations',
+ });
+ },
+ }
+ : {}));
+ function* fixToTypeImport(fixer, report, sourceImports) {
+ const { node } = report;
+ const defaultSpecifier = node.specifiers[0].type === experimental_utils_1.AST_NODE_TYPES.ImportDefaultSpecifier
+ ? node.specifiers[0]
+ : null;
+ const namespaceSpecifier = node.specifiers[0].type === experimental_utils_1.AST_NODE_TYPES.ImportNamespaceSpecifier
+ ? node.specifiers[0]
+ : null;
+ const namedSpecifiers = node.specifiers.filter((specifier) => specifier.type === experimental_utils_1.AST_NODE_TYPES.ImportSpecifier);
+ if (namespaceSpecifier) {
+ // e.g.
+ // import * as types from 'foo'
+ yield* fixToTypeImportByInsertType(fixer, node, false);
+ return;
+ }
+ else if (defaultSpecifier) {
+ if (report.typeSpecifiers.includes(defaultSpecifier) &&
+ namedSpecifiers.length === 0) {
+ // e.g.
+ // import Type from 'foo'
+ yield* fixToTypeImportByInsertType(fixer, node, true);
+ return;
+ }
+ }
+ else {
+ if (namedSpecifiers.every(specifier => report.typeSpecifiers.includes(specifier))) {
+ // e.g.
+ // import {Type1, Type2} from 'foo'
+ yield* fixToTypeImportByInsertType(fixer, node, false);
+ return;
+ }
+ }
+ const typeNamedSpecifiers = namedSpecifiers.filter(specifier => report.typeSpecifiers.includes(specifier));
+ const fixesNamedSpecifiers = getFixesNamedSpecifiers(typeNamedSpecifiers, namedSpecifiers);
+ const afterFixes = [];
+ if (typeNamedSpecifiers.length) {
+ if (sourceImports.typeOnlyNamedImport) {
+ const closingBraceToken = util.nullThrows(sourceCode.getFirstTokenBetween(sourceCode.getFirstToken(sourceImports.typeOnlyNamedImport), sourceImports.typeOnlyNamedImport.source, util.isClosingBraceToken), util.NullThrowsReasons.MissingToken('}', sourceImports.typeOnlyNamedImport.type));
+ let insertText = fixesNamedSpecifiers.typeNamedSpecifiersText;
+ const before = sourceCode.getTokenBefore(closingBraceToken);
+ if (!util.isCommaToken(before) && !util.isOpeningBraceToken(before)) {
+ insertText = ',' + insertText;
+ }
+ // import type { Already, Type1, Type2 } from 'foo'
+ // ^^^^^^^^^^^^^ insert
+ const insertTypeNamedSpecifiers = fixer.insertTextBefore(closingBraceToken, insertText);
+ if (sourceImports.typeOnlyNamedImport.range[1] <= node.range[0]) {
+ yield insertTypeNamedSpecifiers;
+ }
+ else {
+ afterFixes.push(insertTypeNamedSpecifiers);
+ }
+ }
+ else {
+ yield fixer.insertTextBefore(node, `import type {${fixesNamedSpecifiers.typeNamedSpecifiersText}} from ${sourceCode.getText(node.source)};\n`);
+ }
+ }
+ if (defaultSpecifier &&
+ report.typeSpecifiers.includes(defaultSpecifier)) {
+ if (typeNamedSpecifiers.length === namedSpecifiers.length) {
+ const importToken = util.nullThrows(sourceCode.getFirstToken(node, isImportToken), util.NullThrowsReasons.MissingToken('import', node.type));
+ // import type Type from 'foo'
+ // ^^^^ insert
+ yield fixer.insertTextAfter(importToken, ' type');
+ }
+ else {
+ yield fixer.insertTextBefore(node, `import type ${sourceCode.getText(defaultSpecifier)} from ${sourceCode.getText(node.source)};\n`);
+ // import Type , {...} from 'foo'
+ // ^^^^^^ remove
+ yield fixer.remove(defaultSpecifier);
+ yield fixer.remove(sourceCode.getTokenAfter(defaultSpecifier));
+ }
+ }
+ yield* fixesNamedSpecifiers.removeTypeNamedSpecifiers;
+ yield* afterFixes;
+ /**
+ * Returns information for fixing named specifiers.
+ */
+ function getFixesNamedSpecifiers(typeNamedSpecifiers, allNamedSpecifiers) {
+ const typeNamedSpecifiersTexts = [];
+ const removeTypeNamedSpecifiers = [];
+ if (typeNamedSpecifiers.length === allNamedSpecifiers.length) {
+ // e.g.
+ // import Foo, {Type1, Type2} from 'foo'
+ // import DefType, {Type1, Type2} from 'foo'
+ const openingBraceToken = util.nullThrows(sourceCode.getTokenBefore(typeNamedSpecifiers[0], util.isOpeningBraceToken), util.NullThrowsReasons.MissingToken('{', node.type));
+ const commaToken = util.nullThrows(sourceCode.getTokenBefore(openingBraceToken, util.isCommaToken), util.NullThrowsReasons.MissingToken(',', node.type));
+ const closingBraceToken = util.nullThrows(sourceCode.getFirstTokenBetween(openingBraceToken, node.source, util.isClosingBraceToken), util.NullThrowsReasons.MissingToken('}', node.type));
+ // import DefType, {...} from 'foo'
+ // ^^^^^^^ remove
+ removeTypeNamedSpecifiers.push(fixer.removeRange([
+ commaToken.range[0],
+ closingBraceToken.range[1],
+ ]));
+ typeNamedSpecifiersTexts.push(sourceCode.text.slice(openingBraceToken.range[1], closingBraceToken.range[0]));
+ }
+ else {
+ const typeNamedSpecifierGroups = [];
+ let group = [];
+ for (const namedSpecifier of allNamedSpecifiers) {
+ if (typeNamedSpecifiers.includes(namedSpecifier)) {
+ group.push(namedSpecifier);
+ }
+ else if (group.length) {
+ typeNamedSpecifierGroups.push(group);
+ group = [];
+ }
+ }
+ if (group.length) {
+ typeNamedSpecifierGroups.push(group);
+ }
+ for (const namedSpecifiers of typeNamedSpecifierGroups) {
+ const { removeRange, textRange } = getNamedSpecifierRanges(namedSpecifiers, allNamedSpecifiers);
+ removeTypeNamedSpecifiers.push(fixer.removeRange(removeRange));
+ typeNamedSpecifiersTexts.push(sourceCode.text.slice(...textRange));
+ }
+ }
+ return {
+ typeNamedSpecifiersText: typeNamedSpecifiersTexts.join(','),
+ removeTypeNamedSpecifiers,
+ };
+ }
+ /**
+ * Returns ranges for fixing named specifier.
+ */
+ function getNamedSpecifierRanges(namedSpecifierGroup, allNamedSpecifiers) {
+ const first = namedSpecifierGroup[0];
+ const last = namedSpecifierGroup[namedSpecifierGroup.length - 1];
+ const removeRange = [first.range[0], last.range[1]];
+ const textRange = [...removeRange];
+ const before = sourceCode.getTokenBefore(first);
+ textRange[0] = before.range[1];
+ if (util.isCommaToken(before)) {
+ removeRange[0] = before.range[0];
+ }
+ else {
+ removeRange[0] = before.range[1];
+ }
+ const isFirst = allNamedSpecifiers[0] === first;
+ const isLast = allNamedSpecifiers[allNamedSpecifiers.length - 1] === last;
+ const after = sourceCode.getTokenAfter(last);
+ textRange[1] = after.range[0];
+ if (isFirst || isLast) {
+ if (util.isCommaToken(after)) {
+ removeRange[1] = after.range[1];
+ }
+ }
+ return {
+ textRange,
+ removeRange,
+ };
+ }
+ }
+ function* fixToTypeImportByInsertType(fixer, node, isDefaultImport) {
+ // import type Foo from 'foo'
+ // ^^^^^ insert
+ const importToken = util.nullThrows(sourceCode.getFirstToken(node, isImportToken), util.NullThrowsReasons.MissingToken('import', node.type));
+ yield fixer.insertTextAfter(importToken, ' type');
+ if (isDefaultImport) {
+ // Has default import
+ const openingBraceToken = sourceCode.getFirstTokenBetween(importToken, node.source, util.isOpeningBraceToken);
+ if (openingBraceToken) {
+ // Only braces. e.g. import Foo, {} from 'foo'
+ const commaToken = util.nullThrows(sourceCode.getTokenBefore(openingBraceToken, util.isCommaToken), util.NullThrowsReasons.MissingToken(',', node.type));
+ const closingBraceToken = util.nullThrows(sourceCode.getFirstTokenBetween(openingBraceToken, node.source, util.isClosingBraceToken), util.NullThrowsReasons.MissingToken('}', node.type));
+ // import type Foo, {} from 'foo'
+ // ^^ remove
+ yield fixer.removeRange([
+ commaToken.range[0],
+ closingBraceToken.range[1],
+ ]);
+ const specifiersText = sourceCode.text.slice(commaToken.range[1], closingBraceToken.range[1]);
+ if (node.specifiers.length > 1) {
+ // import type Foo from 'foo'
+ // import type {...} from 'foo' // <- insert
+ yield fixer.insertTextAfter(node, `\nimport type${specifiersText} from ${sourceCode.getText(node.source)};`);
+ }
+ }
+ }
+ }
+ function fixToValueImport(fixer, node) {
+ var _a, _b;
+ // import type Foo from 'foo'
+ // ^^^^ remove
+ const importToken = util.nullThrows(sourceCode.getFirstToken(node, isImportToken), util.NullThrowsReasons.MissingToken('import', node.type));
+ const typeToken = util.nullThrows(sourceCode.getFirstTokenBetween(importToken, (_b = (_a = node.specifiers[0]) === null || _a === void 0 ? void 0 : _a.local) !== null && _b !== void 0 ? _b : node.source, isTypeToken), util.NullThrowsReasons.MissingToken('type', node.type));
+ return fixer.remove(typeToken);
+ }
+ },
+});
+//# sourceMappingURL=consistent-type-imports.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js.map
new file mode 100644
index 000000000..ce74bfdb2
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/consistent-type-imports.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"consistent-type-imports.js","sourceRoot":"","sources":["../../src/rules/consistent-type-imports.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAK+C;AAC/C,8CAAgC;A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AC;oBACH,MAAM,cAAc,GAAG,UAAU,CAAC,IAAI,CAAC,KAAK,CAC1C,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,EACnB,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAC3B,CAAC;oBACF,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE;wBAC9B,6BAA6B;wBAC7B,4CAA4C;wBAC5C,MAAM,KAAK,CAAC,eAAe,CACzB,IAAI,EACJ,gBAAgB,cAAc,SAAS,UAAU,CAAC,OAAO,CACvD,IAAI,CAAC,MAAM,CACZ,GAAG,CACL,CAAC;qBACH;iBACF;aACF;QACH,CAAC;QAED,SAAS,gBAAgB,CACvB,KAAyB,EACzB,IAAgC;;YAEhC,6BAA6B;YAC7B,qBAAqB;YACrB,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CACjC,UAAU,CAAC,aAAa,CAAC,IAAI,EAAE,aAAa,CAAC,EAC7C,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CACzD,CAAC;YACF,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAC/B,UAAU,CAAC,oBAAoB,CAC7B,WAAW,cACX,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,0CAAE,KAAK,mCAAI,IAAI,CAAC,MAAM,EACxC,WAAW,CACZ,EACD,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CACvD,CAAC;YACF,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACjC,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js
new file mode 100644
index 000000000..95769d056
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js
@@ -0,0 +1,65 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const util_1 = require("../util");
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+exports.default = util_1.createRule({
+ name: 'default-param-last',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Enforce default parameters to be last',
+ category: 'Best Practices',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ schema: [],
+ messages: {
+ shouldBeLast: 'Default parameters should be last.',
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ /**
+ * checks if node is optional parameter
+ * @param node the node to be evaluated
+ * @private
+ */
+ function isOptionalParam(node) {
+ return 'optional' in node && node.optional === true;
+ }
+ /**
+ * checks if node is plain parameter
+ * @param node the node to be evaluated
+ * @private
+ */
+ function isPlainParam(node) {
+ return !(node.type === experimental_utils_1.AST_NODE_TYPES.AssignmentPattern ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.RestElement ||
+ isOptionalParam(node));
+ }
+ function checkDefaultParamLast(node) {
+ let hasSeenPlainParam = false;
+ for (let i = node.params.length - 1; i >= 0; i--) {
+ const current = node.params[i];
+ const param = current.type === experimental_utils_1.AST_NODE_TYPES.TSParameterProperty
+ ? current.parameter
+ : current;
+ if (isPlainParam(param)) {
+ hasSeenPlainParam = true;
+ continue;
+ }
+ if (hasSeenPlainParam &&
+ (isOptionalParam(param) ||
+ param.type === experimental_utils_1.AST_NODE_TYPES.AssignmentPattern)) {
+ context.report({ node: current, messageId: 'shouldBeLast' });
+ }
+ }
+ }
+ return {
+ ArrowFunctionExpression: checkDefaultParamLast,
+ FunctionDeclaration: checkDefaultParamLast,
+ FunctionExpression: checkDefaultParamLast,
+ };
+ },
+});
+//# sourceMappingURL=default-param-last.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js.map
new file mode 100644
index 000000000..00180529d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/default-param-last.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"default-param-last.js","sourceRoot":"","sources":["../../src/rules/default-param-last.ts"],"names":[],"mappings":";;AAAA,kCAAqC;AACrC,8EAG+C;AAE/C,kBAAe,iBAAU,CAAC;IACxB,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,YAAY,EAAE,oCAAoC;SACnD;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ;;;;WAIG;QACH,SAAS,eAAe,CAAC,IAAwB;YAC/C,OAAO,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC;QACtD,CAAC;QAED;;;;WAIG;QACH,SAAS,YAAY,CAAC,IAAwB;YAC5C,OAAO,CAAC,CACN,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,iBAAiB;gBAC9C,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,WAAW;gBACxC,eAAe,CAAC,IAAI,CAAC,CACtB,CAAC;QACJ,CAAC;QAED,SAAS,qBAAqB,CAC5B,IAG+B;YAE/B,IAAI,iBAAiB,GAAG,KAAK,CAAC;YAC9B,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,EAAE;gBAChD,MAAM,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;gBAC/B,MAAM,KAAK,GACT,OAAO,CAAC,IAAI,KAAK,mCAAc,CAAC,mBAAmB;oBACjD,CAAC,CAAC,OAAO,CAAC,SAAS;oBACnB,CAAC,CAAC,OAAO,CAAC;gBAEd,IAAI,YAAY,CAAC,KAAK,CAAC,EAAE;oBACvB,iBAAiB,GAAG,IAAI,CAAC;oBACzB,SAAS;iBACV;gBAED,IACE,iBAAiB;oBACjB,CAAC,eAAe,CAAC,KAAK,CAAC;wBACrB,KAAK,CAAC,IAAI,KAAK,mCAAc,CAAC,iBAAiB,CAAC,EAClD;oBACA,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,CAAC,CAAC;iBAC9D;aACF;QACH,CAAC;QAED,OAAO;YACL,uBAAuB,EAAE,qBAAqB;YAC9C,mBAAmB,EAAE,qBAAqB;YAC1C,kBAAkB,EAAE,qBAAqB;SAC1C,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js
new file mode 100644
index 000000000..a4a89d0a8
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js
@@ -0,0 +1,90 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const ts = __importStar(require("typescript"));
+const dot_notation_1 = __importDefault(require("eslint/lib/rules/dot-notation"));
+const util_1 = require("../util");
+exports.default = util_1.createRule({
+ name: 'dot-notation',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'enforce dot notation whenever possible',
+ category: 'Best Practices',
+ recommended: false,
+ extendsBaseRule: true,
+ requiresTypeChecking: true,
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowKeywords: {
+ type: 'boolean',
+ default: true,
+ },
+ allowPattern: {
+ type: 'string',
+ default: '',
+ },
+ allowPrivateClassPropertyAccess: {
+ type: 'boolean',
+ default: false,
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ fixable: dot_notation_1.default.meta.fixable,
+ messages: dot_notation_1.default.meta.messages,
+ },
+ defaultOptions: [
+ {
+ allowPrivateClassPropertyAccess: false,
+ allowKeywords: true,
+ allowPattern: '',
+ },
+ ],
+ create(context, [options]) {
+ const rules = dot_notation_1.default.create(context);
+ const allowPrivateClassPropertyAccess = options.allowPrivateClassPropertyAccess;
+ const parserServices = util_1.getParserServices(context);
+ const typeChecker = parserServices.program.getTypeChecker();
+ return {
+ MemberExpression(node) {
+ var _a, _b, _c;
+ if (allowPrivateClassPropertyAccess && node.computed) {
+ // for perf reasons - only fetch the symbol if we have to
+ const objectSymbol = typeChecker.getSymbolAtLocation(parserServices.esTreeNodeToTSNodeMap.get(node.property));
+ if (((_c = (_b = (_a = objectSymbol === null || objectSymbol === void 0 ? void 0 : objectSymbol.getDeclarations()) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.modifiers) === null || _c === void 0 ? void 0 : _c[0].kind) ===
+ ts.SyntaxKind.PrivateKeyword) {
+ return;
+ }
+ }
+ rules.MemberExpression(node);
+ },
+ };
+ },
+});
+//# sourceMappingURL=dot-notation.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js.map
new file mode 100644
index 000000000..297244e7d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/dot-notation.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"dot-notation.js","sourceRoot":"","sources":["../../src/rules/dot-notation.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAAiC;AACjC,iFAAqD;AACrD,kCAKiB;AAKjB,kBAAe,iBAAU,CAAsB;IAC7C,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,wCAAwC;YACrD,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;YACrB,oBAAoB,EAAE,IAAI;SAC3B;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,aAAa,EAAE;wBACb,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,IAAI;qBACd;oBACD,YAAY,EAAE;wBACZ,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,EAAE;qBACZ;oBACD,+BAA+B,EAAE;wBAC/B,IAAI,EAAE,SAAS;wBACf,OAAO,EAAE,KAAK;qBACf;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;QACD,OAAO,EAAE,sBAAQ,CAAC,IAAI,CAAC,OAAO;QAC9B,QAAQ,EAAE,sBAAQ,CAAC,IAAI,CAAC,QAAQ;KACjC;IACD,cAAc,EAAE;QACd;YACE,+BAA+B,EAAE,KAAK;YACtC,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,EAAE;SACjB;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC;QACvB,MAAM,KAAK,GAAG,sBAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM,+BAA+B,GACnC,OAAO,CAAC,+BAA+B,CAAC;QAE1C,MAAM,cAAc,GAAG,wBAAiB,CAAC,OAAO,CAAC,CAAC;QAClD,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAE5D,OAAO;YACL,gBAAgB,CAAC,IAA+B;;gBAC9C,IAAI,+BAA+B,IAAI,IAAI,CAAC,QAAQ,EAAE;oBACpD,yDAAyD;oBACzD,MAAM,YAAY,GAAG,WAAW,CAAC,mBAAmB,CAClD,cAAc,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CACxD,CAAC;oBACF,IACE,mBAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,eAAe,4CAAK,CAAC,2CAAG,SAAS,0CAAG,CAAC,EAAE,IAAI;wBACzD,EAAE,CAAC,UAAU,CAAC,cAAc,EAC5B;wBACA,OAAO;qBACR;iBACF;gBACD,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js
new file mode 100644
index 000000000..5f3916806
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js
@@ -0,0 +1,97 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+const explicitReturnTypeUtils_1 = require("../util/explicitReturnTypeUtils");
+exports.default = util.createRule({
+ name: 'explicit-function-return-type',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Require explicit return types on functions and class methods',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ messages: {
+ missingReturnType: 'Missing return type on function.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowExpressions: {
+ type: 'boolean',
+ },
+ allowTypedFunctionExpressions: {
+ type: 'boolean',
+ },
+ allowHigherOrderFunctions: {
+ type: 'boolean',
+ },
+ allowDirectConstAssertionInArrowFunctions: {
+ type: 'boolean',
+ },
+ allowConciseArrowFunctionExpressionsStartingWithVoid: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ allowExpressions: false,
+ allowTypedFunctionExpressions: true,
+ allowHigherOrderFunctions: true,
+ allowDirectConstAssertionInArrowFunctions: true,
+ allowConciseArrowFunctionExpressionsStartingWithVoid: false,
+ },
+ ],
+ create(context, [options]) {
+ const sourceCode = context.getSourceCode();
+ return {
+ 'ArrowFunctionExpression, FunctionExpression'(node) {
+ if (options.allowConciseArrowFunctionExpressionsStartingWithVoid &&
+ node.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression &&
+ node.expression &&
+ node.body.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ node.body.operator === 'void') {
+ return;
+ }
+ explicitReturnTypeUtils_1.checkFunctionExpressionReturnType(node, options, sourceCode, loc => context.report({
+ node,
+ loc,
+ messageId: 'missingReturnType',
+ }));
+ },
+ FunctionDeclaration(node) {
+ explicitReturnTypeUtils_1.checkFunctionReturnType(node, options, sourceCode, loc => context.report({
+ node,
+ loc,
+ messageId: 'missingReturnType',
+ }));
+ },
+ };
+ },
+});
+//# sourceMappingURL=explicit-function-return-type.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map
new file mode 100644
index 000000000..6384a05eb
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-function-return-type.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"explicit-function-return-type.js","sourceRoot":"","sources":["../../src/rules/explicit-function-return-type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAChC,6EAGyC;AAazC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,8DAA8D;YAChE,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,kCAAkC;SACtD;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,gBAAgB,EAAE;wBAChB,IAAI,EAAE,SAAS;qBAChB;oBACD,6BAA6B,EAAE;wBAC7B,IAAI,EAAE,SAAS;qBAChB;oBACD,yBAAyB,EAAE;wBACzB,IAAI,EAAE,SAAS;qBAChB;oBACD,yCAAyC,EAAE;wBACzC,IAAI,EAAE,SAAS;qBAChB;oBACD,oDAAoD,EAAE;wBACpD,IAAI,EAAE,SAAS;qBAChB;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;KACF;IACD,cAAc,EAAE;QACd;YACE,gBAAgB,EAAE,KAAK;YACvB,6BAA6B,EAAE,IAAI;YACnC,yBAAyB,EAAE,IAAI;YAC/B,yCAAyC,EAAE,IAAI;YAC/C,oDAAoD,EAAE,KAAK;SAC5D;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC;QACvB,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C,OAAO;YACL,6CAA6C,CAC3C,IAAoE;gBAEpE,IACE,OAAO,CAAC,oDAAoD;oBAC5D,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,uBAAuB;oBACpD,IAAI,CAAC,UAAU;oBACf,IAAI,CAAC,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,eAAe;oBACjD,IAAI,CAAC,IAAI,CAAC,QAAQ,KAAK,MAAM,EAC7B;oBACA,OAAO;iBACR;gBAED,2DAAiC,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,CACjE,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,GAAG;oBACH,SAAS,EAAE,mBAAmB;iBAC/B,CAAC,CACH,CAAC;YACJ,CAAC;YACD,mBAAmB,CAAC,IAAI;gBACtB,iDAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,CAAC,EAAE,CACvD,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,GAAG;oBACH,SAAS,EAAE,mBAAmB;iBAC/B,CAAC,CACH,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js
new file mode 100644
index 000000000..d6d706306
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js
@@ -0,0 +1,209 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+const accessibilityLevel = { enum: ['explicit', 'no-public', 'off'] };
+exports.default = util.createRule({
+ name: 'explicit-member-accessibility',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Require explicit accessibility modifiers on class properties and methods',
+ category: 'Stylistic Issues',
+ // too opinionated to be recommended
+ recommended: false,
+ },
+ fixable: 'code',
+ messages: {
+ missingAccessibility: 'Missing accessibility modifier on {{type}} {{name}}.',
+ unwantedPublicAccessibility: 'Public accessibility modifier on {{type}} {{name}}.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ accessibility: accessibilityLevel,
+ overrides: {
+ type: 'object',
+ properties: {
+ accessors: accessibilityLevel,
+ constructors: accessibilityLevel,
+ methods: accessibilityLevel,
+ properties: accessibilityLevel,
+ parameterProperties: accessibilityLevel,
+ },
+ additionalProperties: false,
+ },
+ ignoredMethodNames: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [{ accessibility: 'explicit' }],
+ create(context, [option]) {
+ var _a, _b, _c, _d, _e, _f, _g, _h;
+ const sourceCode = context.getSourceCode();
+ const baseCheck = (_a = option.accessibility) !== null && _a !== void 0 ? _a : 'explicit';
+ const overrides = (_b = option.overrides) !== null && _b !== void 0 ? _b : {};
+ const ctorCheck = (_c = overrides.constructors) !== null && _c !== void 0 ? _c : baseCheck;
+ const accessorCheck = (_d = overrides.accessors) !== null && _d !== void 0 ? _d : baseCheck;
+ const methodCheck = (_e = overrides.methods) !== null && _e !== void 0 ? _e : baseCheck;
+ const propCheck = (_f = overrides.properties) !== null && _f !== void 0 ? _f : baseCheck;
+ const paramPropCheck = (_g = overrides.parameterProperties) !== null && _g !== void 0 ? _g : baseCheck;
+ const ignoredMethodNames = new Set((_h = option.ignoredMethodNames) !== null && _h !== void 0 ? _h : []);
+ /**
+ * Generates the report for rule violations
+ */
+ function reportIssue(messageId, nodeType, node, nodeName, fix = null) {
+ context.report({
+ node: node,
+ messageId: messageId,
+ data: {
+ type: nodeType,
+ name: nodeName,
+ },
+ fix: fix,
+ });
+ }
+ /**
+ * Checks if a method declaration has an accessibility modifier.
+ * @param methodDefinition The node representing a MethodDefinition.
+ */
+ function checkMethodAccessibilityModifier(methodDefinition) {
+ let nodeType = 'method definition';
+ let check = baseCheck;
+ switch (methodDefinition.kind) {
+ case 'method':
+ check = methodCheck;
+ break;
+ case 'constructor':
+ check = ctorCheck;
+ break;
+ case 'get':
+ case 'set':
+ check = accessorCheck;
+ nodeType = `${methodDefinition.kind} property accessor`;
+ break;
+ }
+ const methodName = util.getNameFromMember(methodDefinition, sourceCode);
+ if (check === 'off' || ignoredMethodNames.has(methodName)) {
+ return;
+ }
+ if (check === 'no-public' &&
+ methodDefinition.accessibility === 'public') {
+ reportIssue('unwantedPublicAccessibility', nodeType, methodDefinition, methodName, getUnwantedPublicAccessibilityFixer(methodDefinition));
+ }
+ else if (check === 'explicit' && !methodDefinition.accessibility) {
+ reportIssue('missingAccessibility', nodeType, methodDefinition, methodName);
+ }
+ }
+ /**
+ * Creates a fixer that removes a "public" keyword with following spaces
+ */
+ function getUnwantedPublicAccessibilityFixer(node) {
+ return function (fixer) {
+ const tokens = sourceCode.getTokens(node);
+ let rangeToRemove;
+ for (let i = 0; i < tokens.length; i++) {
+ const token = tokens[i];
+ if (token.type === experimental_utils_1.AST_TOKEN_TYPES.Keyword &&
+ token.value === 'public') {
+ const commensAfterPublicKeyword = sourceCode.getCommentsAfter(token);
+ if (commensAfterPublicKeyword.length) {
+ // public /* Hi there! */ static foo()
+ // ^^^^^^^
+ rangeToRemove = [
+ token.range[0],
+ commensAfterPublicKeyword[0].range[0],
+ ];
+ break;
+ }
+ else {
+ // public static foo()
+ // ^^^^^^^
+ rangeToRemove = [token.range[0], tokens[i + 1].range[0]];
+ break;
+ }
+ }
+ }
+ return fixer.removeRange(rangeToRemove);
+ };
+ }
+ /**
+ * Checks if property has an accessibility modifier.
+ * @param classProperty The node representing a ClassProperty.
+ */
+ function checkPropertyAccessibilityModifier(classProperty) {
+ const nodeType = 'class property';
+ const propertyName = util.getNameFromMember(classProperty, sourceCode);
+ if (propCheck === 'no-public' &&
+ classProperty.accessibility === 'public') {
+ reportIssue('unwantedPublicAccessibility', nodeType, classProperty, propertyName, getUnwantedPublicAccessibilityFixer(classProperty));
+ }
+ else if (propCheck === 'explicit' && !classProperty.accessibility) {
+ reportIssue('missingAccessibility', nodeType, classProperty, propertyName);
+ }
+ }
+ /**
+ * Checks that the parameter property has the desired accessibility modifiers set.
+ * @param node The node representing a Parameter Property
+ */
+ function checkParameterPropertyAccessibilityModifier(node) {
+ const nodeType = 'parameter property';
+ // HAS to be an identifier or assignment or TSC will throw
+ if (node.parameter.type !== experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ node.parameter.type !== experimental_utils_1.AST_NODE_TYPES.AssignmentPattern) {
+ return;
+ }
+ const nodeName = node.parameter.type === experimental_utils_1.AST_NODE_TYPES.Identifier
+ ? node.parameter.name
+ : // has to be an Identifier or TSC will throw an error
+ node.parameter.left.name;
+ switch (paramPropCheck) {
+ case 'explicit': {
+ if (!node.accessibility) {
+ reportIssue('missingAccessibility', nodeType, node, nodeName);
+ }
+ break;
+ }
+ case 'no-public': {
+ if (node.accessibility === 'public' && node.readonly) {
+ reportIssue('unwantedPublicAccessibility', nodeType, node, nodeName, getUnwantedPublicAccessibilityFixer(node));
+ }
+ break;
+ }
+ }
+ }
+ return {
+ TSParameterProperty: checkParameterPropertyAccessibilityModifier,
+ ClassProperty: checkPropertyAccessibilityModifier,
+ MethodDefinition: checkMethodAccessibilityModifier,
+ };
+ },
+});
+//# sourceMappingURL=explicit-member-accessibility.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js.map
new file mode 100644
index 000000000..ba2416f7b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-member-accessibility.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"explicit-member-accessibility.js","sourceRoot":"","sources":["../../src/rules/explicit-member-accessibility.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAK+C;AAC/C,8CAAgC;AAuBhC,MAAM,kBAAkB,GAAG,EAAE,IAAI,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC;AAEtE,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,0EAA0E;YAC5E,QAAQ,EAAE,kBAAkB;YAC5B,oCAAoC;YACpC,WAAW,EAAE,KAAK;SACnB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,oBAAoB,EAClB,sDAAsD;YACxD,2BAA2B,EACzB,qDAAqD;SACxD;QACD,MAAM,EAAE;YACN;gBACE,IAAI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,kCAAkC;YACjD,gBAAgB,EAAE,gCAAgC;SACnD,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js
new file mode 100644
index 000000000..61858dcc2
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js
@@ -0,0 +1,412 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+const explicitReturnTypeUtils_1 = require("../util/explicitReturnTypeUtils");
+exports.default = util.createRule({
+ name: 'explicit-module-boundary-types',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: "Require explicit return and argument types on exported functions' and classes' public class methods",
+ category: 'Stylistic Issues',
+ recommended: 'warn',
+ },
+ messages: {
+ missingReturnType: 'Missing return type on function.',
+ missingArgType: "Argument '{{name}}' should be typed.",
+ missingArgTypeUnnamed: '{{type}} argument should be typed.',
+ anyTypedArg: "Argument '{{name}}' should be typed with a non-any type.",
+ anyTypedArgUnnamed: '{{type}} argument should be typed with a non-any type.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowArgumentsExplicitlyTypedAsAny: {
+ type: 'boolean',
+ },
+ allowDirectConstAssertionInArrowFunctions: {
+ type: 'boolean',
+ },
+ allowedNames: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ allowHigherOrderFunctions: {
+ type: 'boolean',
+ },
+ allowTypedFunctionExpressions: {
+ type: 'boolean',
+ },
+ // DEPRECATED - To be removed in next major
+ shouldTrackReferences: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ allowArgumentsExplicitlyTypedAsAny: false,
+ allowDirectConstAssertionInArrowFunctions: true,
+ allowedNames: [],
+ allowHigherOrderFunctions: true,
+ allowTypedFunctionExpressions: true,
+ },
+ ],
+ create(context, [options]) {
+ const sourceCode = context.getSourceCode();
+ // tracks all of the functions we've already checked
+ const checkedFunctions = new Set();
+ // tracks functions that were found whilst traversing
+ const foundFunctions = [];
+ // all nodes visited, avoids infinite recursion for cyclic references
+ // (such as class member referring to itself)
+ const alreadyVisited = new Set();
+ /*
+ # How the rule works:
+
+ As the rule traverses the AST, it immediately checks every single function that it finds is exported.
+ "exported" means that it is either directly exported, or that its name is exported.
+
+ It also collects a list of every single function it finds on the way, but does not check them.
+ After it's finished traversing the AST, it then iterates through the list of found functions, and checks to see if
+ any of them are part of a higher-order function
+ */
+ return {
+ ExportDefaultDeclaration(node) {
+ checkNode(node.declaration);
+ },
+ 'ExportNamedDeclaration:not([source])'(node) {
+ if (node.declaration) {
+ checkNode(node.declaration);
+ }
+ else {
+ for (const specifier of node.specifiers) {
+ followReference(specifier.local);
+ }
+ }
+ },
+ TSExportAssignment(node) {
+ checkNode(node.expression);
+ },
+ 'ArrowFunctionExpression, FunctionDeclaration, FunctionExpression'(node) {
+ foundFunctions.push(node);
+ },
+ 'Program:exit'() {
+ for (const func of foundFunctions) {
+ if (isExportedHigherOrderFunction(func)) {
+ checkNode(func);
+ }
+ }
+ },
+ };
+ function checkParameters(node) {
+ function checkParameter(param) {
+ function report(namedMessageId, unnamedMessageId) {
+ if (param.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ context.report({
+ node: param,
+ messageId: namedMessageId,
+ data: { name: param.name },
+ });
+ }
+ else if (param.type === experimental_utils_1.AST_NODE_TYPES.ArrayPattern) {
+ context.report({
+ node: param,
+ messageId: unnamedMessageId,
+ data: { type: 'Array pattern' },
+ });
+ }
+ else if (param.type === experimental_utils_1.AST_NODE_TYPES.ObjectPattern) {
+ context.report({
+ node: param,
+ messageId: unnamedMessageId,
+ data: { type: 'Object pattern' },
+ });
+ }
+ else if (param.type === experimental_utils_1.AST_NODE_TYPES.RestElement) {
+ if (param.argument.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ context.report({
+ node: param,
+ messageId: namedMessageId,
+ data: { name: param.argument.name },
+ });
+ }
+ else {
+ context.report({
+ node: param,
+ messageId: unnamedMessageId,
+ data: { type: 'Rest' },
+ });
+ }
+ }
+ }
+ switch (param.type) {
+ case experimental_utils_1.AST_NODE_TYPES.ArrayPattern:
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ case experimental_utils_1.AST_NODE_TYPES.ObjectPattern:
+ case experimental_utils_1.AST_NODE_TYPES.RestElement:
+ if (!param.typeAnnotation) {
+ report('missingArgType', 'missingArgTypeUnnamed');
+ }
+ else if (options.allowArgumentsExplicitlyTypedAsAny !== true &&
+ param.typeAnnotation.typeAnnotation.type ===
+ experimental_utils_1.AST_NODE_TYPES.TSAnyKeyword) {
+ report('anyTypedArg', 'anyTypedArgUnnamed');
+ }
+ return;
+ case experimental_utils_1.AST_NODE_TYPES.TSParameterProperty:
+ return checkParameter(param.parameter);
+ case experimental_utils_1.AST_NODE_TYPES.AssignmentPattern: // ignored as it has a type via its assignment
+ return;
+ }
+ }
+ for (const arg of node.params) {
+ checkParameter(arg);
+ }
+ }
+ /**
+ * Checks if a function name is allowed and should not be checked.
+ */
+ function isAllowedName(node) {
+ if (!node || !options.allowedNames || !options.allowedNames.length) {
+ return false;
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.VariableDeclarator) {
+ return (node.id.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ options.allowedNames.includes(node.id.name));
+ }
+ else if (node.type === experimental_utils_1.AST_NODE_TYPES.MethodDefinition ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition) {
+ if (node.key.type === experimental_utils_1.AST_NODE_TYPES.Literal &&
+ typeof node.key.value === 'string') {
+ return options.allowedNames.includes(node.key.value);
+ }
+ if (node.key.type === experimental_utils_1.AST_NODE_TYPES.TemplateLiteral &&
+ node.key.expressions.length === 0) {
+ return options.allowedNames.includes(node.key.quasis[0].value.raw);
+ }
+ if (!node.computed && node.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ return options.allowedNames.includes(node.key.name);
+ }
+ }
+ return false;
+ }
+ function isExportedHigherOrderFunction(node) {
+ var _a;
+ let current = node.parent;
+ while (current) {
+ if (current.type === experimental_utils_1.AST_NODE_TYPES.ReturnStatement) {
+ // the parent of a return will always be a block statement, so we can skip over it
+ current = (_a = current.parent) === null || _a === void 0 ? void 0 : _a.parent;
+ continue;
+ }
+ if (!util.isFunction(current) ||
+ !explicitReturnTypeUtils_1.doesImmediatelyReturnFunctionExpression(current)) {
+ return false;
+ }
+ if (checkedFunctions.has(current)) {
+ return true;
+ }
+ current = current.parent;
+ }
+ return false;
+ }
+ function followReference(node) {
+ const scope = context.getScope();
+ const variable = scope.set.get(node.name);
+ /* istanbul ignore if */ if (!variable) {
+ return;
+ }
+ // check all of the definitions
+ for (const definition of variable.defs) {
+ // cases we don't care about in this rule
+ if (definition.type === 'ImplicitGlobalVariable' ||
+ definition.type === 'ImportBinding' ||
+ // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum
+ definition.type === 'CatchClause' ||
+ definition.type === 'Parameter') {
+ continue;
+ }
+ checkNode(definition.node);
+ }
+ // follow references to find writes to the variable
+ for (const reference of variable.references) {
+ if (
+ // we don't want to check the initialization ref, as this is handled by the declaration check
+ !reference.init &&
+ reference.writeExpr) {
+ checkNode(reference.writeExpr);
+ }
+ }
+ }
+ function checkNode(node) {
+ if (node == null || alreadyVisited.has(node)) {
+ return;
+ }
+ alreadyVisited.add(node);
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
+ case experimental_utils_1.AST_NODE_TYPES.FunctionExpression:
+ return checkFunctionExpression(node);
+ case experimental_utils_1.AST_NODE_TYPES.ArrayExpression:
+ for (const element of node.elements) {
+ checkNode(element);
+ }
+ return;
+ case experimental_utils_1.AST_NODE_TYPES.ClassProperty:
+ case experimental_utils_1.AST_NODE_TYPES.TSAbstractClassProperty:
+ if (node.accessibility === 'private') {
+ return;
+ }
+ return checkNode(node.value);
+ case experimental_utils_1.AST_NODE_TYPES.ClassDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.ClassExpression:
+ for (const element of node.body.body) {
+ checkNode(element);
+ }
+ return;
+ case experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration:
+ return checkFunction(node);
+ case experimental_utils_1.AST_NODE_TYPES.MethodDefinition:
+ case experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition:
+ if (node.accessibility === 'private') {
+ return;
+ }
+ return checkNode(node.value);
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ return followReference(node);
+ case experimental_utils_1.AST_NODE_TYPES.ObjectExpression:
+ for (const property of node.properties) {
+ checkNode(property);
+ }
+ return;
+ case experimental_utils_1.AST_NODE_TYPES.Property:
+ return checkNode(node.value);
+ case experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression:
+ return checkEmptyBodyFunctionExpression(node);
+ case experimental_utils_1.AST_NODE_TYPES.VariableDeclaration:
+ for (const declaration of node.declarations) {
+ checkNode(declaration);
+ }
+ return;
+ case experimental_utils_1.AST_NODE_TYPES.VariableDeclarator:
+ return checkNode(node.init);
+ }
+ }
+ /**
+ * Check whether any ancestor of the provided function has a valid return type.
+ * This function assumes that the function either:
+ * - belongs to an exported function chain validated by isExportedHigherOrderFunction
+ * - is directly exported itself
+ */
+ function ancestorHasReturnType(node) {
+ let ancestor = node.parent;
+ // if the ancestor is not a return, then this function was not returned at all, so we can exit early
+ const isReturnStatement = (ancestor === null || ancestor === void 0 ? void 0 : ancestor.type) === experimental_utils_1.AST_NODE_TYPES.ReturnStatement;
+ const isBodylessArrow = (ancestor === null || ancestor === void 0 ? void 0 : ancestor.type) === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression &&
+ ancestor.body.type !== experimental_utils_1.AST_NODE_TYPES.BlockStatement;
+ if (!isReturnStatement && !isBodylessArrow) {
+ return false;
+ }
+ while (ancestor) {
+ switch (ancestor.type) {
+ case experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
+ case experimental_utils_1.AST_NODE_TYPES.FunctionExpression:
+ case experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration:
+ if (ancestor.returnType) {
+ return true;
+ }
+ // assume
+ break;
+ // const x: Foo = () => {};
+ // Assume that a typed variable types the function expression
+ case experimental_utils_1.AST_NODE_TYPES.VariableDeclarator:
+ if (ancestor.id.typeAnnotation) {
+ return true;
+ }
+ break;
+ }
+ ancestor = ancestor.parent;
+ }
+ return false;
+ }
+ function checkEmptyBodyFunctionExpression(node) {
+ var _a, _b, _c;
+ const isConstructor = ((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.MethodDefinition &&
+ node.parent.kind === 'constructor';
+ const isSetAccessor = (((_b = node.parent) === null || _b === void 0 ? void 0 : _b.type) === experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition ||
+ ((_c = node.parent) === null || _c === void 0 ? void 0 : _c.type) === experimental_utils_1.AST_NODE_TYPES.MethodDefinition) &&
+ node.parent.kind === 'set';
+ if (!isConstructor && !isSetAccessor && !node.returnType) {
+ context.report({
+ node,
+ messageId: 'missingReturnType',
+ });
+ }
+ checkParameters(node);
+ }
+ function checkFunctionExpression(node) {
+ if (checkedFunctions.has(node)) {
+ return;
+ }
+ checkedFunctions.add(node);
+ if (isAllowedName(node.parent) ||
+ explicitReturnTypeUtils_1.isTypedFunctionExpression(node, options) ||
+ ancestorHasReturnType(node)) {
+ return;
+ }
+ explicitReturnTypeUtils_1.checkFunctionExpressionReturnType(node, options, sourceCode, loc => {
+ context.report({
+ node,
+ loc,
+ messageId: 'missingReturnType',
+ });
+ });
+ checkParameters(node);
+ }
+ function checkFunction(node) {
+ if (checkedFunctions.has(node)) {
+ return;
+ }
+ checkedFunctions.add(node);
+ if (isAllowedName(node.parent) || ancestorHasReturnType(node)) {
+ return;
+ }
+ explicitReturnTypeUtils_1.checkFunctionReturnType(node, options, sourceCode, loc => {
+ context.report({
+ node,
+ loc,
+ messageId: 'missingReturnType',
+ });
+ });
+ checkParameters(node);
+ }
+ },
+});
+//# sourceMappingURL=explicit-module-boundary-types.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js.map
new file mode 100644
index 000000000..564b7928f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/explicit-module-boundary-types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"explicit-module-boundary-types.js","sourceRoot":"","sources":["../../src/rules/explicit-module-boundary-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAChC,6EAOyC;AAmBzC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,gCAAgC;IACtC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,qGAAqG;YACvG,QAAQ,EAAE,kBAAkB;YAC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AAC;QACxB,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js
new file mode 100644
index 000000000..ab51deeac
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js
@@ -0,0 +1,165 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'func-call-spacing',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Require or disallow spacing between function identifiers and their invocations',
+ category: 'Stylistic Issues',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ fixable: 'whitespace',
+ schema: {
+ anyOf: [
+ {
+ type: 'array',
+ items: [
+ {
+ enum: ['never'],
+ },
+ ],
+ minItems: 0,
+ maxItems: 1,
+ },
+ {
+ type: 'array',
+ items: [
+ {
+ enum: ['always'],
+ },
+ {
+ type: 'object',
+ properties: {
+ allowNewlines: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ minItems: 0,
+ maxItems: 2,
+ },
+ ],
+ },
+ messages: {
+ unexpectedWhitespace: 'Unexpected whitespace between function name and paren.',
+ unexpectedNewline: 'Unexpected newline between function name and paren.',
+ missing: 'Missing space between function name and paren.',
+ },
+ },
+ defaultOptions: ['never', {}],
+ create(context, [option, config]) {
+ const sourceCode = context.getSourceCode();
+ const text = sourceCode.getText();
+ /**
+ * Check if open space is present in a function name
+ * @param {ASTNode} node node to evaluate
+ * @returns {void}
+ * @private
+ */
+ function checkSpacing(node) {
+ var _a;
+ const isOptionalCall = util.isOptionalCallExpression(node);
+ const closingParenToken = sourceCode.getLastToken(node);
+ const lastCalleeTokenWithoutPossibleParens = sourceCode.getLastToken((_a = node.typeParameters) !== null && _a !== void 0 ? _a : node.callee);
+ const openingParenToken = sourceCode.getFirstTokenBetween(lastCalleeTokenWithoutPossibleParens, closingParenToken, util.isOpeningParenToken);
+ if (!openingParenToken || openingParenToken.range[1] >= node.range[1]) {
+ // new expression with no parens...
+ return;
+ }
+ const lastCalleeToken = sourceCode.getTokenBefore(openingParenToken, util.isNotOptionalChainPunctuator);
+ const textBetweenTokens = text
+ .slice(lastCalleeToken.range[1], openingParenToken.range[0])
+ .replace(/\/\*.*?\*\//gu, '');
+ const hasWhitespace = /\s/u.test(textBetweenTokens);
+ const hasNewline = hasWhitespace && util.LINEBREAK_MATCHER.test(textBetweenTokens);
+ if (option === 'never') {
+ if (hasWhitespace) {
+ return context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ messageId: 'unexpectedWhitespace',
+ fix(fixer) {
+ /*
+ * Only autofix if there is no newline
+ * https://github.com/eslint/eslint/issues/7787
+ */
+ if (!hasNewline &&
+ // don't fix optional calls
+ !isOptionalCall) {
+ return fixer.removeRange([
+ lastCalleeToken.range[1],
+ openingParenToken.range[0],
+ ]);
+ }
+ return null;
+ },
+ });
+ }
+ }
+ else if (isOptionalCall) {
+ // disallow:
+ // foo?. ();
+ // foo ?.();
+ // foo ?. ();
+ if (hasWhitespace || hasNewline) {
+ context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ messageId: 'unexpectedWhitespace',
+ });
+ }
+ }
+ else {
+ if (!hasWhitespace) {
+ context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ messageId: 'missing',
+ fix(fixer) {
+ return fixer.insertTextBefore(openingParenToken, ' ');
+ },
+ });
+ }
+ else if (!config.allowNewlines && hasNewline) {
+ context.report({
+ node,
+ loc: lastCalleeToken.loc.start,
+ messageId: 'unexpectedNewline',
+ fix(fixer) {
+ return fixer.replaceTextRange([lastCalleeToken.range[1], openingParenToken.range[0]], ' ');
+ },
+ });
+ }
+ }
+ }
+ return {
+ CallExpression: checkSpacing,
+ NewExpression: checkSpacing,
+ };
+ },
+});
+//# sourceMappingURL=func-call-spacing.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js.map
new file mode 100644
index 000000000..a677e9d2f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/func-call-spacing.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"func-call-spacing.js","sourceRoot":"","sources":["../../src/rules/func-call-spacing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,8CAAgC;AAahC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE;YACJ,WAAW,EACT,gFAAgF;YAClF,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE;YACN,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL;4BACE,IAAI,EAAE,CAAC,OAAO,CAAC;yBAChB;qBACF;oBACD,QAAQ,EAAE,CAAC;oBACX,QAAQ,EAAE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,CAAC,aAAa,EAAE;oBAClB,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,GAAG,EAAE,eAAe,CAAC,GAAG,CAAC,KAAK;wBAC9B,SAAS,EAAE,SAAS;wBACpB,GAAG,CAAC,KAAK;4BACP,OAAO,KAAK,CAAC,gBAAgB,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC;wBACxD,CAAC;qBACF,CAAC,CAAC;iBACJ;qBAAM,IAAI,CAAC,MAAO,CAAC,aAAa,IAAI,UAAU,EAAE;oBAC/C,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,GAAG,EAAE,eAAe,CAAC,GAAG,CAAC,KAAK;wBAC9B,SAAS,EAAE,mBAAmB;wBAC9B,GAAG,CAAC,KAAK;4BACP,OAAO,KAAK,CAAC,gBAAgB,CAC3B,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACtD,GAAG,CACJ,CAAC;wBACJ,CAAC;qBACF,CAAC,CAAC;iBACJ;aACF;QACH,CAAC;QAED,OAAO;YACL,cAAc,EAAE,YAAY;YAC5B,aAAa,EAAE,YAAY;SAC5B,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/BinarySearchTree.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/BinarySearchTree.js
new file mode 100644
index 000000000..9ae710624
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/BinarySearchTree.js
@@ -0,0 +1,55 @@
+"use strict";
+// The following code is adapted from the the code in eslint.
+// License: https://github.com/eslint/eslint/blob/48700fc8408f394887cdedd071b22b757700fdcb/LICENSE
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.BinarySearchTree = void 0;
+const functional_red_black_tree_1 = __importDefault(require("functional-red-black-tree"));
+/**
+ * A mutable balanced binary search tree that stores (key, value) pairs. The keys are numeric, and must be unique.
+ * This is intended to be a generic wrapper around a balanced binary search tree library, so that the underlying implementation
+ * can easily be swapped out.
+ */
+class BinarySearchTree {
+ constructor() {
+ this.rbTree = functional_red_black_tree_1.default();
+ }
+ /**
+ * Inserts an entry into the tree.
+ */
+ insert(key, value) {
+ const iterator = this.rbTree.find(key);
+ if (iterator.valid) {
+ this.rbTree = iterator.update(value);
+ }
+ else {
+ this.rbTree = this.rbTree.insert(key, value);
+ }
+ }
+ /**
+ * Finds the entry with the largest key less than or equal to the provided key
+ * @returns The found entry, or null if no such entry exists.
+ */
+ findLe(key) {
+ const iterator = this.rbTree.le(key);
+ return { key: iterator.key, value: iterator.value };
+ }
+ /**
+ * Deletes all of the keys in the interval [start, end)
+ */
+ deleteRange(start, end) {
+ // Exit without traversing the tree if the range has zero size.
+ if (start === end) {
+ return;
+ }
+ const iterator = this.rbTree.ge(start);
+ while (iterator.valid && iterator.key < end) {
+ this.rbTree = this.rbTree.remove(iterator.key);
+ iterator.next();
+ }
+ }
+}
+exports.BinarySearchTree = BinarySearchTree;
+//# sourceMappingURL=BinarySearchTree.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/BinarySearchTree.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/BinarySearchTree.js.map
new file mode 100644
index 000000000..6f0c20ea0
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/BinarySearchTree.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"BinarySearchTree.js","sourceRoot":"","sources":["../../../src/rules/indent-new-do-not-use/BinarySearchTree.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,kGAAkG;;;;;;AAGlG,0FAAmD;AASnD;;;;GAIG;AACH,MAAa,gBAAgB;IAA7B;QACU,WAAM,GAAG,mCAAU,EAAa,CAAC;IAwC3C,CAAC;IAtCC;;OAEG;IACI,MAAM,CAAC,GAAW,EAAE,KAAgB;QACzC,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAEvC,IAAI,QAAQ,CAAC,KAAK,EAAE;YAClB,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;SACtC;aAAM;YACL,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;SAC9C;IACH,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,GAAW;QACvB,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;QAErC,OAAO,EAAE,GAAG,EAAE,QAAQ,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC;IACtD,CAAC;IAED;;OAEG;IACI,WAAW,CAAC,KAAa,EAAE,GAAW;QAC3C,+DAA+D;QAC/D,IAAI,KAAK,KAAK,GAAG,EAAE;YACjB,OAAO;SACR;QACD,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;QAEvC,OAAO,QAAQ,CAAC,KAAK,IAAI,QAAQ,CAAC,GAAG,GAAG,GAAG,EAAE;YAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YAC/C,QAAQ,CAAC,IAAI,EAAE,CAAC;SACjB;IACH,CAAC;CACF;AAzCD,4CAyCC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/OffsetStorage.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/OffsetStorage.js
new file mode 100644
index 000000000..a48651d89
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/OffsetStorage.js
@@ -0,0 +1,221 @@
+"use strict";
+// The following code is adapted from the the code in eslint.
+// License: https://github.com/eslint/eslint/blob/48700fc8408f394887cdedd071b22b757700fdcb/LICENSE
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.OffsetStorage = void 0;
+const BinarySearchTree_1 = require("./BinarySearchTree");
+/**
+ * A class to store information on desired offsets of tokens from each other
+ */
+class OffsetStorage {
+ /**
+ * @param tokenInfo a TokenInfo instance
+ * @param indentSize The desired size of each indentation level
+ * @param indentType The indentation character
+ */
+ constructor(tokenInfo, indentSize, indentType) {
+ this.tokenInfo = tokenInfo;
+ this.indentSize = indentSize;
+ this.indentType = indentType;
+ this.tree = new BinarySearchTree_1.BinarySearchTree();
+ this.tree.insert(0, { offset: 0, from: null, force: false });
+ this.lockedFirstTokens = new WeakMap();
+ this.desiredIndentCache = new WeakMap();
+ this.ignoredTokens = new WeakSet();
+ }
+ getOffsetDescriptor(token) {
+ return this.tree.findLe(token.range[0]).value;
+ }
+ /**
+ * Sets the offset column of token B to match the offset column of token A.
+ * **WARNING**: This matches a *column*, even if baseToken is not the first token on its line. In
+ * most cases, `setDesiredOffset` should be used instead.
+ * @param baseToken The first token
+ * @param offsetToken The second token, whose offset should be matched to the first token
+ */
+ matchOffsetOf(baseToken, offsetToken) {
+ /*
+ * lockedFirstTokens is a map from a token whose indentation is controlled by the "first" option to
+ * the token that it depends on. For example, with the `ArrayExpression: first` option, the first
+ * token of each element in the array after the first will be mapped to the first token of the first
+ * element. The desired indentation of each of these tokens is computed based on the desired indentation
+ * of the "first" element, rather than through the normal offset mechanism.
+ */
+ this.lockedFirstTokens.set(offsetToken, baseToken);
+ }
+ /**
+ * Sets the desired offset of a token.
+ *
+ * This uses a line-based offset collapsing behavior to handle tokens on the same line.
+ * For example, consider the following two cases:
+ *
+ * (
+ * [
+ * bar
+ * ]
+ * )
+ *
+ * ([
+ * bar
+ * ])
+ *
+ * Based on the first case, it's clear that the `bar` token needs to have an offset of 1 indent level (4 spaces) from
+ * the `[` token, and the `[` token has to have an offset of 1 indent level from the `(` token. Since the `(` token is
+ * the first on its line (with an indent of 0 spaces), the `bar` token needs to be offset by 2 indent levels (8 spaces)
+ * from the start of its line.
+ *
+ * However, in the second case `bar` should only be indented by 4 spaces. This is because the offset of 1 indent level
+ * between the `(` and the `[` tokens gets "collapsed" because the two tokens are on the same line. As a result, the
+ * `(` token is mapped to the `[` token with an offset of 0, and the rule correctly decides that `bar` should be indented
+ * by 1 indent level from the start of the line.
+ *
+ * This is useful because rule listeners can usually just call `setDesiredOffset` for all the tokens in the node,
+ * without needing to check which lines those tokens are on.
+ *
+ * Note that since collapsing only occurs when two tokens are on the same line, there are a few cases where non-intuitive
+ * behavior can occur. For example, consider the following cases:
+ *
+ * foo(
+ * ).
+ * bar(
+ * baz
+ * )
+ *
+ * foo(
+ * ).bar(
+ * baz
+ * )
+ *
+ * Based on the first example, it would seem that `bar` should be offset by 1 indent level from `foo`, and `baz`
+ * should be offset by 1 indent level from `bar`. However, this is not correct, because it would result in `baz`
+ * being indented by 2 indent levels in the second case (since `foo`, `bar`, and `baz` are all on separate lines, no
+ * collapsing would occur).
+ *
+ * Instead, the correct way would be to offset `baz` by 1 level from `bar`, offset `bar` by 1 level from the `)`, and
+ * offset the `)` by 0 levels from `foo`. This ensures that the offset between `bar` and the `)` are correctly collapsed
+ * in the second case.
+ *
+ * @param token The token
+ * @param fromToken The token that `token` should be offset from
+ * @param offset The desired indent level
+ */
+ setDesiredOffset(token, fromToken, offset) {
+ this.setDesiredOffsets(token.range, fromToken, offset);
+ }
+ /**
+ * Sets the desired offset of all tokens in a range
+ * It's common for node listeners in this file to need to apply the same offset to a large, contiguous range of tokens.
+ * Moreover, the offset of any given token is usually updated multiple times (roughly once for each node that contains
+ * it). This means that the offset of each token is updated O(AST depth) times.
+ * It would not be performant to store and update the offsets for each token independently, because the rule would end
+ * up having a time complexity of O(number of tokens * AST depth), which is quite slow for large files.
+ *
+ * Instead, the offset tree is represented as a collection of contiguous offset ranges in a file. For example, the following
+ * list could represent the state of the offset tree at a given point:
+ *
+ * * Tokens starting in the interval [0, 15) are aligned with the beginning of the file
+ * * Tokens starting in the interval [15, 30) are offset by 1 indent level from the `bar` token
+ * * Tokens starting in the interval [30, 43) are offset by 1 indent level from the `foo` token
+ * * Tokens starting in the interval [43, 820) are offset by 2 indent levels from the `bar` token
+ * * Tokens starting in the interval [820, ∞) are offset by 1 indent level from the `baz` token
+ *
+ * The `setDesiredOffsets` methods inserts ranges like the ones above. The third line above would be inserted by using:
+ * `setDesiredOffsets([30, 43], fooToken, 1);`
+ *
+ * @param range A [start, end] pair. All tokens with range[0] <= token.start < range[1] will have the offset applied.
+ * @param fromToken The token that this is offset from
+ * @param offset The desired indent level
+ * @param force `true` if this offset should not use the normal collapsing behavior. This should almost always be false.
+ */
+ setDesiredOffsets(range, fromToken, offset = 0, force = false) {
+ /*
+ * Offset ranges are stored as a collection of nodes, where each node maps a numeric key to an offset
+ * descriptor. The tree for the example above would have the following nodes:
+ *
+ * * key: 0, value: { offset: 0, from: null }
+ * * key: 15, value: { offset: 1, from: barToken }
+ * * key: 30, value: { offset: 1, from: fooToken }
+ * * key: 43, value: { offset: 2, from: barToken }
+ * * key: 820, value: { offset: 1, from: bazToken }
+ *
+ * To find the offset descriptor for any given token, one needs to find the node with the largest key
+ * which is <= token.start. To make this operation fast, the nodes are stored in a balanced binary
+ * search tree indexed by key.
+ */
+ const descriptorToInsert = { offset, from: fromToken, force };
+ const descriptorAfterRange = this.tree.findLe(range[1]).value;
+ const fromTokenIsInRange = fromToken &&
+ fromToken.range[0] >= range[0] &&
+ fromToken.range[1] <= range[1];
+ // this has to be before the delete + insert below or else you'll get into a cycle
+ const fromTokenDescriptor = fromTokenIsInRange
+ ? this.getOffsetDescriptor(fromToken)
+ : null;
+ // First, remove any existing nodes in the range from the tree.
+ this.tree.deleteRange(range[0] + 1, range[1]);
+ // Insert a new node into the tree for this range
+ this.tree.insert(range[0], descriptorToInsert);
+ /*
+ * To avoid circular offset dependencies, keep the `fromToken` token mapped to whatever it was mapped to previously,
+ * even if it's in the current range.
+ */
+ if (fromTokenIsInRange) {
+ this.tree.insert(fromToken.range[0], fromTokenDescriptor);
+ this.tree.insert(fromToken.range[1], descriptorToInsert);
+ }
+ /*
+ * To avoid modifying the offset of tokens after the range, insert another node to keep the offset of the following
+ * tokens the same as it was before.
+ */
+ this.tree.insert(range[1], descriptorAfterRange);
+ }
+ /**
+ * Gets the desired indent of a token
+ * @returns The desired indent of the token
+ */
+ getDesiredIndent(token) {
+ if (!this.desiredIndentCache.has(token)) {
+ if (this.ignoredTokens.has(token)) {
+ /*
+ * If the token is ignored, use the actual indent of the token as the desired indent.
+ * This ensures that no errors are reported for this token.
+ */
+ this.desiredIndentCache.set(token, this.tokenInfo.getTokenIndent(token));
+ }
+ else if (this.lockedFirstTokens.has(token)) {
+ const firstToken = this.lockedFirstTokens.get(token);
+ this.desiredIndentCache.set(token,
+ // (indentation for the first element's line)
+ this.getDesiredIndent(this.tokenInfo.getFirstTokenOfLine(firstToken)) +
+ // (space between the start of the first element's line and the first element)
+ this.indentType.repeat(firstToken.loc.start.column -
+ this.tokenInfo.getFirstTokenOfLine(firstToken).loc.start.column));
+ }
+ else {
+ const offsetInfo = this.getOffsetDescriptor(token);
+ const offset = offsetInfo.from &&
+ offsetInfo.from.loc.start.line === token.loc.start.line &&
+ !/^\s*?\n/u.test(token.value) &&
+ !offsetInfo.force
+ ? 0
+ : offsetInfo.offset * this.indentSize;
+ this.desiredIndentCache.set(token, (offsetInfo.from ? this.getDesiredIndent(offsetInfo.from) : '') +
+ this.indentType.repeat(offset));
+ }
+ }
+ return this.desiredIndentCache.get(token);
+ }
+ /**
+ * Ignores a token, preventing it from being reported.
+ */
+ ignoreToken(token) {
+ if (this.tokenInfo.isFirstTokenOfLine(token)) {
+ this.ignoredTokens.add(token);
+ }
+ }
+ getFirstDependency(token) {
+ return this.getOffsetDescriptor(token).from;
+ }
+}
+exports.OffsetStorage = OffsetStorage;
+//# sourceMappingURL=OffsetStorage.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/OffsetStorage.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/OffsetStorage.js.map
new file mode 100644
index 000000000..dc3aa6671
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/OffsetStorage.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"OffsetStorage.js","sourceRoot":"","sources":["../../../src/rules/indent-new-do-not-use/OffsetStorage.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,kGAAkG;;;AAGlG,yDAI4B;AAG5B;;GAEG;AACH,MAAa,aAAa;IAQxB;;;;OAIG;IACH,YAAY,SAAoB,EAAE,UAAkB,EAAE,UAAkB;QACtE,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAC3B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAE7B,IAAI,CAAC,IAAI,GAAG,IAAI,mCAAgB,EAAE,CAAC;QACnC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;QAE7D,IAAI,CAAC,iBAAiB,GAAG,IAAI,OAAO,EAAE,CAAC;QACvC,IAAI,CAAC,kBAAkB,GAAG,IAAI,OAAO,EAAE,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,IAAI,OAAO,EAAE,CAAC;IACrC,CAAC;IAEO,mBAAmB,CAAC,KAAqB;QAC/C,OAAO,IAAI,CAAC,IAAI,CAAC,MA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node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/TokenInfo.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/TokenInfo.js
new file mode 100644
index 000000000..5da8a48b4
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/TokenInfo.js
@@ -0,0 +1,49 @@
+"use strict";
+// The following code is adapted from the the code in eslint.
+// License: https://github.com/eslint/eslint/blob/48700fc8408f394887cdedd071b22b757700fdcb/LICENSE
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.TokenInfo = void 0;
+/**
+ * A helper class to get token-based info related to indentation
+ */
+class TokenInfo {
+ constructor(sourceCode) {
+ this.sourceCode = sourceCode;
+ this.firstTokensByLineNumber = sourceCode.tokensAndComments.reduce((map, token) => {
+ if (!map.has(token.loc.start.line)) {
+ map.set(token.loc.start.line, token);
+ }
+ if (!map.has(token.loc.end.line) &&
+ sourceCode.text
+ .slice(token.range[1] - token.loc.end.column, token.range[1])
+ .trim()) {
+ map.set(token.loc.end.line, token);
+ }
+ return map;
+ }, new Map());
+ }
+ /**
+ * Gets the first token on a given token's line
+ * @returns The first token on the given line
+ */
+ getFirstTokenOfLine(token) {
+ return this.firstTokensByLineNumber.get(token.loc.start.line);
+ }
+ /**
+ * Determines whether a token is the first token in its line
+ * @returns `true` if the token is the first on its line
+ */
+ isFirstTokenOfLine(token) {
+ return this.getFirstTokenOfLine(token) === token;
+ }
+ /**
+ * Get the actual indent of a token
+ * @param token Token to examine. This should be the first token on its line.
+ * @returns The indentation characters that precede the token
+ */
+ getTokenIndent(token) {
+ return this.sourceCode.text.slice(token.range[0] - token.loc.start.column, token.range[0]);
+ }
+}
+exports.TokenInfo = TokenInfo;
+//# sourceMappingURL=TokenInfo.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/TokenInfo.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/TokenInfo.js.map
new file mode 100644
index 000000000..7bc04ad44
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/TokenInfo.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"TokenInfo.js","sourceRoot":"","sources":["../../../src/rules/indent-new-do-not-use/TokenInfo.ts"],"names":[],"mappings":";AAAA,6DAA6D;AAC7D,kGAAkG;;;AAKlG;;GAEG;AACH,MAAa,SAAS;IAIpB,YAAY,UAA+B;QACzC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,uBAAuB,GAAG,UAAU,CAAC,iBAAiB,CAAC,MAAM,CAChE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;YACb,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE;gBAClC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACtC;YACD,IACE,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;gBAC5B,UAAU,CAAC,IAAI;qBACZ,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;qBAC5D,IAAI,EAAE,EACT;gBACA,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;aACpC;YACD,OAAO,GAAG,CAAC;QACb,CAAC,EACD,IAAI,GAAG,EAAE,CACV,CAAC;IACJ,CAAC;IAED;;;OAGG;IACI,mBAAmB,CACxB,KAAqC;QAErC,OAAO,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAE,CAAC;IACjE,CAAC;IAED;;;OAGG;IACI,kBAAkB,CAAC,KAAqB;QAC7C,OAAO,IAAI,CAAC,mBAAmB,CAAC,KAAK,CAAC,KAAK,KAAK,CAAC;IACnD,CAAC;IAED;;;;OAIG;IACI,cAAc,CAAC,KAAqB;QACzC,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAC/B,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,EACvC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CACf,CAAC;IACJ,CAAC;CACF;AAtDD,8BAsDC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/index.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/index.js
new file mode 100644
index 000000000..c43a8a373
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/index.js
@@ -0,0 +1,1143 @@
+"use strict";
+//------------------------------------------------------------------------------
+// Requirements
+//------------------------------------------------------------------------------
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const OffsetStorage_1 = require("./OffsetStorage");
+const TokenInfo_1 = require("./TokenInfo");
+const util_1 = require("../../util");
+const GLOBAL_LINEBREAK_REGEX = /\r\n|[\r\n\u2028\u2029]/gu;
+const WHITESPACE_REGEX = /\s*$/u;
+//------------------------------------------------------------------------------
+// Rule Definition
+//------------------------------------------------------------------------------
+const KNOWN_NODES = new Set([
+ experimental_utils_1.AST_NODE_TYPES.AssignmentExpression,
+ experimental_utils_1.AST_NODE_TYPES.AssignmentPattern,
+ experimental_utils_1.AST_NODE_TYPES.ArrayExpression,
+ experimental_utils_1.AST_NODE_TYPES.ArrayPattern,
+ experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.AwaitExpression,
+ experimental_utils_1.AST_NODE_TYPES.BlockStatement,
+ experimental_utils_1.AST_NODE_TYPES.BinaryExpression,
+ experimental_utils_1.AST_NODE_TYPES.BreakStatement,
+ experimental_utils_1.AST_NODE_TYPES.CallExpression,
+ experimental_utils_1.AST_NODE_TYPES.CatchClause,
+ experimental_utils_1.AST_NODE_TYPES.ClassBody,
+ experimental_utils_1.AST_NODE_TYPES.ClassDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.ClassExpression,
+ experimental_utils_1.AST_NODE_TYPES.ConditionalExpression,
+ experimental_utils_1.AST_NODE_TYPES.ContinueStatement,
+ experimental_utils_1.AST_NODE_TYPES.DoWhileStatement,
+ experimental_utils_1.AST_NODE_TYPES.DebuggerStatement,
+ experimental_utils_1.AST_NODE_TYPES.EmptyStatement,
+ experimental_utils_1.AST_NODE_TYPES.ExpressionStatement,
+ experimental_utils_1.AST_NODE_TYPES.ForStatement,
+ experimental_utils_1.AST_NODE_TYPES.ForInStatement,
+ experimental_utils_1.AST_NODE_TYPES.ForOfStatement,
+ experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.FunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.Identifier,
+ experimental_utils_1.AST_NODE_TYPES.IfStatement,
+ experimental_utils_1.AST_NODE_TYPES.Literal,
+ experimental_utils_1.AST_NODE_TYPES.LabeledStatement,
+ experimental_utils_1.AST_NODE_TYPES.LogicalExpression,
+ experimental_utils_1.AST_NODE_TYPES.MemberExpression,
+ experimental_utils_1.AST_NODE_TYPES.MetaProperty,
+ experimental_utils_1.AST_NODE_TYPES.MethodDefinition,
+ experimental_utils_1.AST_NODE_TYPES.NewExpression,
+ experimental_utils_1.AST_NODE_TYPES.ObjectExpression,
+ experimental_utils_1.AST_NODE_TYPES.ObjectPattern,
+ experimental_utils_1.AST_NODE_TYPES.Program,
+ experimental_utils_1.AST_NODE_TYPES.Property,
+ experimental_utils_1.AST_NODE_TYPES.RestElement,
+ experimental_utils_1.AST_NODE_TYPES.ReturnStatement,
+ experimental_utils_1.AST_NODE_TYPES.SequenceExpression,
+ experimental_utils_1.AST_NODE_TYPES.SpreadElement,
+ experimental_utils_1.AST_NODE_TYPES.Super,
+ experimental_utils_1.AST_NODE_TYPES.SwitchCase,
+ experimental_utils_1.AST_NODE_TYPES.SwitchStatement,
+ experimental_utils_1.AST_NODE_TYPES.TaggedTemplateExpression,
+ experimental_utils_1.AST_NODE_TYPES.TemplateElement,
+ experimental_utils_1.AST_NODE_TYPES.TemplateLiteral,
+ experimental_utils_1.AST_NODE_TYPES.ThisExpression,
+ experimental_utils_1.AST_NODE_TYPES.ThrowStatement,
+ experimental_utils_1.AST_NODE_TYPES.TryStatement,
+ experimental_utils_1.AST_NODE_TYPES.UnaryExpression,
+ experimental_utils_1.AST_NODE_TYPES.UpdateExpression,
+ experimental_utils_1.AST_NODE_TYPES.VariableDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.VariableDeclarator,
+ experimental_utils_1.AST_NODE_TYPES.WhileStatement,
+ experimental_utils_1.AST_NODE_TYPES.WithStatement,
+ experimental_utils_1.AST_NODE_TYPES.YieldExpression,
+ experimental_utils_1.AST_NODE_TYPES.JSXIdentifier,
+ experimental_utils_1.AST_NODE_TYPES.JSXMemberExpression,
+ experimental_utils_1.AST_NODE_TYPES.JSXEmptyExpression,
+ experimental_utils_1.AST_NODE_TYPES.JSXExpressionContainer,
+ experimental_utils_1.AST_NODE_TYPES.JSXElement,
+ experimental_utils_1.AST_NODE_TYPES.JSXClosingElement,
+ experimental_utils_1.AST_NODE_TYPES.JSXOpeningElement,
+ experimental_utils_1.AST_NODE_TYPES.JSXAttribute,
+ experimental_utils_1.AST_NODE_TYPES.JSXSpreadAttribute,
+ experimental_utils_1.AST_NODE_TYPES.JSXText,
+ experimental_utils_1.AST_NODE_TYPES.ExportDefaultDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.ExportNamedDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.ExportAllDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.ExportSpecifier,
+ experimental_utils_1.AST_NODE_TYPES.ImportDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.ImportSpecifier,
+ experimental_utils_1.AST_NODE_TYPES.ImportDefaultSpecifier,
+ experimental_utils_1.AST_NODE_TYPES.ImportNamespaceSpecifier,
+ // Class properties aren't yet supported by eslint...
+ experimental_utils_1.AST_NODE_TYPES.ClassProperty,
+ // ts keywords
+ experimental_utils_1.AST_NODE_TYPES.TSAbstractKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSAnyKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSBooleanKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSNeverKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSNumberKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSStringKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSSymbolKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSUndefinedKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSUnknownKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSVoidKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSNullKeyword,
+ // ts specific nodes we want to support
+ experimental_utils_1.AST_NODE_TYPES.TSAbstractClassProperty,
+ experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition,
+ experimental_utils_1.AST_NODE_TYPES.TSArrayType,
+ experimental_utils_1.AST_NODE_TYPES.TSAsExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSConditionalType,
+ experimental_utils_1.AST_NODE_TYPES.TSConstructorType,
+ experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction,
+ experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSEnumDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSEnumMember,
+ experimental_utils_1.AST_NODE_TYPES.TSExportAssignment,
+ experimental_utils_1.AST_NODE_TYPES.TSExternalModuleReference,
+ experimental_utils_1.AST_NODE_TYPES.TSFunctionType,
+ experimental_utils_1.AST_NODE_TYPES.TSImportType,
+ experimental_utils_1.AST_NODE_TYPES.TSIndexedAccessType,
+ experimental_utils_1.AST_NODE_TYPES.TSIndexSignature,
+ experimental_utils_1.AST_NODE_TYPES.TSInferType,
+ experimental_utils_1.AST_NODE_TYPES.TSInterfaceBody,
+ experimental_utils_1.AST_NODE_TYPES.TSInterfaceDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSInterfaceHeritage,
+ experimental_utils_1.AST_NODE_TYPES.TSIntersectionType,
+ experimental_utils_1.AST_NODE_TYPES.TSImportEqualsDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSLiteralType,
+ experimental_utils_1.AST_NODE_TYPES.TSMappedType,
+ experimental_utils_1.AST_NODE_TYPES.TSMethodSignature,
+ 'TSMinusToken',
+ experimental_utils_1.AST_NODE_TYPES.TSModuleBlock,
+ experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSNonNullExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSParameterProperty,
+ experimental_utils_1.AST_NODE_TYPES.TSParenthesizedType,
+ 'TSPlusToken',
+ experimental_utils_1.AST_NODE_TYPES.TSPropertySignature,
+ experimental_utils_1.AST_NODE_TYPES.TSQualifiedName,
+ 'TSQuestionToken',
+ experimental_utils_1.AST_NODE_TYPES.TSRestType,
+ experimental_utils_1.AST_NODE_TYPES.TSThisType,
+ experimental_utils_1.AST_NODE_TYPES.TSTupleType,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeAnnotation,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeLiteral,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeOperator,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeParameter,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeParameterDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeReference,
+ experimental_utils_1.AST_NODE_TYPES.TSUnionType,
+]);
+const STATEMENT_LIST_PARENTS = new Set([
+ experimental_utils_1.AST_NODE_TYPES.Program,
+ experimental_utils_1.AST_NODE_TYPES.BlockStatement,
+ experimental_utils_1.AST_NODE_TYPES.SwitchCase,
+]);
+const DEFAULT_VARIABLE_INDENT = 1;
+const DEFAULT_PARAMETER_INDENT = 1;
+const DEFAULT_FUNCTION_BODY_INDENT = 1;
+/*
+ * General rule strategy:
+ * 1. An OffsetStorage instance stores a map of desired offsets, where each token has a specified offset from another
+ * specified token or to the first column.
+ * 2. As the AST is traversed, modify the desired offsets of tokens accordingly. For example, when entering a
+ * BlockStatement, offset all of the tokens in the BlockStatement by 1 indent level from the opening curly
+ * brace of the BlockStatement.
+ * 3. After traversing the AST, calculate the expected indentation levels of every token according to the
+ * OffsetStorage container.
+ * 4. For each line, compare the expected indentation of the first token to the actual indentation in the file,
+ * and report the token if the two values are not equal.
+ */
+const ELEMENT_LIST_SCHEMA = {
+ oneOf: [
+ {
+ type: 'integer',
+ minimum: 0,
+ },
+ {
+ enum: ['first', 'off'],
+ },
+ ],
+};
+exports.default = util_1.createRule({
+ name: 'indent',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Enforce consistent indentation.',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ fixable: 'whitespace',
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ['tab'],
+ },
+ {
+ type: 'integer',
+ minimum: 0,
+ },
+ ],
+ },
+ {
+ type: 'object',
+ properties: {
+ SwitchCase: {
+ type: 'integer',
+ minimum: 0,
+ default: 0,
+ },
+ VariableDeclarator: {
+ oneOf: [
+ ELEMENT_LIST_SCHEMA,
+ {
+ type: 'object',
+ properties: {
+ var: ELEMENT_LIST_SCHEMA,
+ let: ELEMENT_LIST_SCHEMA,
+ const: ELEMENT_LIST_SCHEMA,
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ outerIIFEBody: {
+ type: 'integer',
+ minimum: 0,
+ },
+ MemberExpression: {
+ oneOf: [
+ {
+ type: 'integer',
+ minimum: 0,
+ },
+ {
+ enum: ['off'],
+ },
+ ],
+ },
+ FunctionDeclaration: {
+ type: 'object',
+ properties: {
+ parameters: ELEMENT_LIST_SCHEMA,
+ body: {
+ type: 'integer',
+ minimum: 0,
+ },
+ },
+ additionalProperties: false,
+ },
+ FunctionExpression: {
+ type: 'object',
+ properties: {
+ parameters: ELEMENT_LIST_SCHEMA,
+ body: {
+ type: 'integer',
+ minimum: 0,
+ },
+ },
+ additionalProperties: false,
+ },
+ CallExpression: {
+ type: 'object',
+ properties: {
+ arguments: ELEMENT_LIST_SCHEMA,
+ },
+ additionalProperties: false,
+ },
+ ArrayExpression: ELEMENT_LIST_SCHEMA,
+ ObjectExpression: ELEMENT_LIST_SCHEMA,
+ ImportDeclaration: ELEMENT_LIST_SCHEMA,
+ flatTernaryExpressions: {
+ type: 'boolean',
+ default: false,
+ },
+ ignoredNodes: {
+ type: 'array',
+ items: {
+ type: 'string',
+ not: {
+ pattern: ':exit$',
+ },
+ },
+ },
+ ignoreComments: {
+ type: 'boolean',
+ default: false,
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ messages: {
+ wrongIndentation: 'Expected indentation of {{expected}} but found {{actual}}.',
+ },
+ },
+ defaultOptions: [
+ // typescript docs and playground use 4 space indent
+ 4,
+ {
+ // typescript docs indent the case from the switch
+ // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-1-8.html#example-4
+ SwitchCase: 1,
+ VariableDeclarator: {
+ var: DEFAULT_VARIABLE_INDENT,
+ let: DEFAULT_VARIABLE_INDENT,
+ const: DEFAULT_VARIABLE_INDENT,
+ },
+ outerIIFEBody: 1,
+ FunctionDeclaration: {
+ parameters: DEFAULT_PARAMETER_INDENT,
+ body: DEFAULT_FUNCTION_BODY_INDENT,
+ },
+ FunctionExpression: {
+ parameters: DEFAULT_PARAMETER_INDENT,
+ body: DEFAULT_FUNCTION_BODY_INDENT,
+ },
+ CallExpression: {
+ arguments: DEFAULT_PARAMETER_INDENT,
+ },
+ MemberExpression: 1,
+ ArrayExpression: 1,
+ ObjectExpression: 1,
+ ImportDeclaration: 1,
+ flatTernaryExpressions: false,
+ ignoredNodes: [],
+ ignoreComments: false,
+ },
+ ],
+ create(context, [userIndent, userOptions]) {
+ const indentType = userIndent === 'tab' ? 'tab' : 'space';
+ const indentSize = userIndent === 'tab' ? 1 : userIndent;
+ const options = userOptions;
+ if (typeof userOptions.VariableDeclarator === 'number' ||
+ userOptions.VariableDeclarator === 'first') {
+ // typescript doesn't narrow the type for some reason
+ options.VariableDeclarator = {
+ var: userOptions.VariableDeclarator,
+ let: userOptions.VariableDeclarator,
+ const: userOptions.VariableDeclarator,
+ };
+ }
+ const sourceCode = context.getSourceCode();
+ const tokenInfo = new TokenInfo_1.TokenInfo(sourceCode);
+ const offsets = new OffsetStorage_1.OffsetStorage(tokenInfo, indentSize, indentType === 'space' ? ' ' : '\t');
+ const parameterParens = new WeakSet();
+ /**
+ * Creates an error message for a line, given the expected/actual indentation.
+ * @param expectedAmount The expected amount of indentation characters for this line
+ * @param actualSpaces The actual number of indentation spaces that were found on this line
+ * @param actualTabs The actual number of indentation tabs that were found on this line
+ * @returns An error message for this line
+ */
+ function createErrorMessageData(expectedAmount, actualSpaces, actualTabs) {
+ const expectedStatement = `${expectedAmount} ${indentType}${expectedAmount === 1 ? '' : 's'}`; // e.g. "2 tabs"
+ const foundSpacesWord = `space${actualSpaces === 1 ? '' : 's'}`; // e.g. "space"
+ const foundTabsWord = `tab${actualTabs === 1 ? '' : 's'}`; // e.g. "tabs"
+ let foundStatement;
+ if (actualSpaces > 0) {
+ /*
+ * Abbreviate the message if the expected indentation is also spaces.
+ * e.g. 'Expected 4 spaces but found 2' rather than 'Expected 4 spaces but found 2 spaces'
+ */
+ foundStatement =
+ indentType === 'space'
+ ? actualSpaces
+ : `${actualSpaces} ${foundSpacesWord}`;
+ }
+ else if (actualTabs > 0) {
+ foundStatement =
+ indentType === 'tab' ? actualTabs : `${actualTabs} ${foundTabsWord}`;
+ }
+ else {
+ foundStatement = '0';
+ }
+ return {
+ expected: expectedStatement,
+ actual: foundStatement,
+ };
+ }
+ /**
+ * Reports a given indent violation
+ * @param token Token violating the indent rule
+ * @param neededIndent Expected indentation string
+ */
+ function report(token, neededIndent) {
+ const actualIndent = Array.from(tokenInfo.getTokenIndent(token));
+ const numSpaces = actualIndent.filter(char => char === ' ').length;
+ const numTabs = actualIndent.filter(char => char === '\t').length;
+ context.report({
+ node: token,
+ messageId: 'wrongIndentation',
+ data: createErrorMessageData(neededIndent.length, numSpaces, numTabs),
+ loc: {
+ start: { line: token.loc.start.line, column: 0 },
+ end: { line: token.loc.start.line, column: token.loc.start.column },
+ },
+ fix(fixer) {
+ return fixer.replaceTextRange([token.range[0] - token.loc.start.column, token.range[0]], neededIndent);
+ },
+ });
+ }
+ /**
+ * Checks if a token's indentation is correct
+ * @param token Token to examine
+ * @param desiredIndent Desired indentation of the string
+ * @returns `true` if the token's indentation is correct
+ */
+ function validateTokenIndent(token, desiredIndent) {
+ const indentation = tokenInfo.getTokenIndent(token);
+ return (indentation === desiredIndent ||
+ // To avoid conflicts with no-mixed-spaces-and-tabs, don't report mixed spaces and tabs.
+ (indentation.includes(' ') && indentation.includes('\t')));
+ }
+ /**
+ * Check to see if the node is a file level IIFE
+ * @param node The function node to check.
+ * @returns True if the node is the outer IIFE
+ */
+ function isOuterIIFE(node) {
+ var _a;
+ /*
+ * Verify that the node is an IIFE
+ */
+ if (!node.parent ||
+ node.parent.type !== experimental_utils_1.AST_NODE_TYPES.CallExpression ||
+ node.parent.callee !== node) {
+ return false;
+ }
+ /*
+ * Navigate legal ancestors to determine whether this IIFE is outer.
+ * A "legal ancestor" is an expression or statement that causes the function to get executed immediately.
+ * For example, `!(function(){})()` is an outer IIFE even though it is preceded by a ! operator.
+ */
+ let statement = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent;
+ while (statement &&
+ ((statement.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ ['!', '~', '+', '-'].includes(statement.operator)) ||
+ statement.type === experimental_utils_1.AST_NODE_TYPES.AssignmentExpression ||
+ statement.type === experimental_utils_1.AST_NODE_TYPES.LogicalExpression ||
+ statement.type === experimental_utils_1.AST_NODE_TYPES.SequenceExpression ||
+ statement.type === experimental_utils_1.AST_NODE_TYPES.VariableDeclarator)) {
+ statement = statement.parent;
+ }
+ return (!!statement &&
+ (statement.type === experimental_utils_1.AST_NODE_TYPES.ExpressionStatement ||
+ statement.type === experimental_utils_1.AST_NODE_TYPES.VariableDeclaration) &&
+ !!statement.parent &&
+ statement.parent.type === experimental_utils_1.AST_NODE_TYPES.Program);
+ }
+ /**
+ * Counts the number of linebreaks that follow the last non-whitespace character in a string
+ * @param str The string to check
+ * @returns The number of JavaScript linebreaks that follow the last non-whitespace character,
+ * or the total number of linebreaks if the string is all whitespace.
+ */
+ function countTrailingLinebreaks(str) {
+ const trailingWhitespace = WHITESPACE_REGEX.exec(str)[0];
+ const linebreakMatches = GLOBAL_LINEBREAK_REGEX.exec(trailingWhitespace);
+ return linebreakMatches === null ? 0 : linebreakMatches.length;
+ }
+ /**
+ * Check indentation for lists of elements (arrays, objects, function params)
+ * @param elements List of elements that should be offset
+ * @param startToken The start token of the list that element should be aligned against, e.g. '['
+ * @param endToken The end token of the list, e.g. ']'
+ * @param offset The amount that the elements should be offset
+ */
+ function addElementListIndent(elements, startToken, endToken, offset) {
+ /**
+ * Gets the first token of a given element, including surrounding parentheses.
+ * @param element A node in the `elements` list
+ * @returns The first token of this element
+ */
+ function getFirstToken(element) {
+ let token = sourceCode.getTokenBefore(element);
+ while (util_1.isOpeningParenToken(token) && token !== startToken) {
+ token = sourceCode.getTokenBefore(token);
+ }
+ return sourceCode.getTokenAfter(token);
+ }
+ // Run through all the tokens in the list, and offset them by one indent level (mainly for comments, other things will end up overridden)
+ offsets.setDesiredOffsets([startToken.range[1], endToken.range[0]], startToken, typeof offset === 'number' ? offset : 1);
+ offsets.setDesiredOffset(endToken, startToken, 0);
+ // If the preference is "first" but there is no first element (e.g. sparse arrays w/ empty first slot), fall back to 1 level.
+ const firstElement = elements[0];
+ if (offset === 'first' && elements.length && !firstElement) {
+ return;
+ }
+ elements.forEach((element, index) => {
+ if (!element) {
+ // Skip holes in arrays
+ return;
+ }
+ if (offset === 'off') {
+ // Ignore the first token of every element if the "off" option is used
+ offsets.ignoreToken(getFirstToken(element));
+ }
+ // Offset the following elements correctly relative to the first element
+ if (index === 0) {
+ return;
+ }
+ if (offset === 'first' &&
+ tokenInfo.isFirstTokenOfLine(getFirstToken(element))) {
+ offsets.matchOffsetOf(getFirstToken(firstElement), getFirstToken(element));
+ }
+ else {
+ const previousElement = elements[index - 1];
+ const firstTokenOfPreviousElement = previousElement && getFirstToken(previousElement);
+ const previousElementLastToken = previousElement && sourceCode.getLastToken(previousElement);
+ if (previousElement &&
+ previousElementLastToken &&
+ previousElementLastToken.loc.end.line -
+ countTrailingLinebreaks(previousElementLastToken.value) >
+ startToken.loc.end.line) {
+ offsets.setDesiredOffsets([previousElement.range[1], element.range[1]], firstTokenOfPreviousElement, 0);
+ }
+ }
+ });
+ }
+ /**
+ * Check and decide whether to check for indentation for blockless nodes
+ * Scenarios are for or while statements without braces around them
+ */
+ function addBlocklessNodeIndent(node) {
+ if (node.type !== experimental_utils_1.AST_NODE_TYPES.BlockStatement) {
+ const lastParentToken = sourceCode.getTokenBefore(node, util_1.isNotOpeningParenToken);
+ let firstBodyToken = sourceCode.getFirstToken(node);
+ let lastBodyToken = sourceCode.getLastToken(node);
+ while (util_1.isOpeningParenToken(sourceCode.getTokenBefore(firstBodyToken)) &&
+ util_1.isClosingParenToken(sourceCode.getTokenAfter(lastBodyToken))) {
+ firstBodyToken = sourceCode.getTokenBefore(firstBodyToken);
+ lastBodyToken = sourceCode.getTokenAfter(lastBodyToken);
+ }
+ offsets.setDesiredOffsets([firstBodyToken.range[0], lastBodyToken.range[1]], lastParentToken, 1);
+ /*
+ * For blockless nodes with semicolon-first style, don't indent the semicolon.
+ * e.g.
+ * if (foo) bar()
+ * ; [1, 2, 3].map(foo)
+ */
+ const lastToken = sourceCode.getLastToken(node);
+ if (lastToken &&
+ node.type !== experimental_utils_1.AST_NODE_TYPES.EmptyStatement &&
+ util_1.isSemicolonToken(lastToken)) {
+ offsets.setDesiredOffset(lastToken, lastParentToken, 0);
+ }
+ }
+ }
+ /**
+ * Checks the indentation for nodes that are like function calls
+ */
+ function addFunctionCallIndent(node) {
+ const openingParen = node.arguments.length
+ ? sourceCode.getFirstTokenBetween(node.callee, node.arguments[0], util_1.isOpeningParenToken)
+ : sourceCode.getLastToken(node, 1);
+ const closingParen = sourceCode.getLastToken(node);
+ parameterParens.add(openingParen);
+ parameterParens.add(closingParen);
+ offsets.setDesiredOffset(openingParen, sourceCode.getTokenBefore(openingParen), 0);
+ addElementListIndent(node.arguments, openingParen, closingParen, options.CallExpression.arguments);
+ }
+ /**
+ * Checks the indentation of parenthesized values, given a list of tokens in a program
+ * @param tokens A list of tokens
+ */
+ function addParensIndent(tokens) {
+ const parenStack = [];
+ const parenPairs = [];
+ tokens.forEach(nextToken => {
+ // Accumulate a list of parenthesis pairs
+ if (util_1.isOpeningParenToken(nextToken)) {
+ parenStack.push(nextToken);
+ }
+ else if (util_1.isClosingParenToken(nextToken)) {
+ parenPairs.unshift({ left: parenStack.pop(), right: nextToken });
+ }
+ });
+ parenPairs.forEach(pair => {
+ const leftParen = pair.left;
+ const rightParen = pair.right;
+ // We only want to handle parens around expressions, so exclude parentheses that are in function parameters and function call arguments.
+ if (!parameterParens.has(leftParen) &&
+ !parameterParens.has(rightParen)) {
+ const parenthesizedTokens = new Set(sourceCode.getTokensBetween(leftParen, rightParen));
+ parenthesizedTokens.forEach(token => {
+ if (!parenthesizedTokens.has(offsets.getFirstDependency(token))) {
+ offsets.setDesiredOffset(token, leftParen, 1);
+ }
+ });
+ }
+ offsets.setDesiredOffset(rightParen, leftParen, 0);
+ });
+ }
+ /**
+ * Ignore all tokens within an unknown node whose offset do not depend
+ * on another token's offset within the unknown node
+ */
+ function ignoreNode(node) {
+ const unknownNodeTokens = new Set(sourceCode.getTokens(node, { includeComments: true }));
+ unknownNodeTokens.forEach(token => {
+ if (!unknownNodeTokens.has(offsets.getFirstDependency(token))) {
+ const firstTokenOfLine = tokenInfo.getFirstTokenOfLine(token);
+ if (token === firstTokenOfLine) {
+ offsets.ignoreToken(token);
+ }
+ else {
+ offsets.setDesiredOffset(token, firstTokenOfLine, 0);
+ }
+ }
+ });
+ }
+ /**
+ * Check whether the given token is on the first line of a statement.
+ * @param leafNode The expression node that the token belongs directly.
+ * @returns `true` if the token is on the first line of a statement.
+ */
+ function isOnFirstLineOfStatement(token, leafNode) {
+ let node = leafNode;
+ while (node.parent &&
+ !node.parent.type.endsWith('Statement') &&
+ !node.parent.type.endsWith('Declaration')) {
+ node = node.parent;
+ }
+ node = node.parent;
+ return !node || node.loc.start.line === token.loc.start.line;
+ }
+ /**
+ * Check whether there are any blank (whitespace-only) lines between
+ * two tokens on separate lines.
+ * @returns `true` if the tokens are on separate lines and
+ * there exists a blank line between them, `false` otherwise.
+ */
+ function hasBlankLinesBetween(firstToken, secondToken) {
+ const firstTokenLine = firstToken.loc.end.line;
+ const secondTokenLine = secondToken.loc.start.line;
+ if (firstTokenLine === secondTokenLine ||
+ firstTokenLine === secondTokenLine - 1) {
+ return false;
+ }
+ for (let line = firstTokenLine + 1; line < secondTokenLine; ++line) {
+ if (!tokenInfo.firstTokensByLineNumber.has(line)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ const ignoredNodeFirstTokens = new Set();
+ const baseOffsetListeners = {
+ 'ArrayExpression, ArrayPattern'(node) {
+ var _a;
+ const openingBracket = sourceCode.getFirstToken(node);
+ const closingBracket = sourceCode.getTokenAfter((_a = node.elements[node.elements.length - 1]) !== null && _a !== void 0 ? _a : openingBracket, util_1.isClosingBracketToken);
+ addElementListIndent(node.elements, openingBracket, closingBracket, options.ArrayExpression);
+ },
+ ArrowFunctionExpression(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+ if (util_1.isOpeningParenToken(firstToken)) {
+ const openingParen = firstToken;
+ const closingParen = sourceCode.getTokenBefore(node.body, util_1.isClosingParenToken);
+ parameterParens.add(openingParen);
+ parameterParens.add(closingParen);
+ addElementListIndent(node.params, openingParen, closingParen, options.FunctionExpression.parameters);
+ }
+ addBlocklessNodeIndent(node.body);
+ },
+ AssignmentExpression(node) {
+ const operator = sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator);
+ offsets.setDesiredOffsets([operator.range[0], node.range[1]], sourceCode.getLastToken(node.left), 1);
+ offsets.ignoreToken(operator);
+ offsets.ignoreToken(sourceCode.getTokenAfter(operator));
+ },
+ 'BinaryExpression, LogicalExpression'(node) {
+ const operator = sourceCode.getFirstTokenBetween(node.left, node.right, token => token.value === node.operator);
+ /*
+ * For backwards compatibility, don't check BinaryExpression indents, e.g.
+ * var foo = bar &&
+ * baz;
+ */
+ const tokenAfterOperator = sourceCode.getTokenAfter(operator);
+ offsets.ignoreToken(operator);
+ offsets.ignoreToken(tokenAfterOperator);
+ offsets.setDesiredOffset(tokenAfterOperator, operator, 0);
+ },
+ 'BlockStatement, ClassBody'(node) {
+ let blockIndentLevel;
+ if (node.parent && isOuterIIFE(node.parent)) {
+ blockIndentLevel = options.outerIIFEBody;
+ }
+ else if (node.parent &&
+ (node.parent.type === experimental_utils_1.AST_NODE_TYPES.FunctionExpression ||
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression)) {
+ blockIndentLevel = options.FunctionExpression.body;
+ }
+ else if (node.parent &&
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration) {
+ blockIndentLevel = options.FunctionDeclaration.body;
+ }
+ else {
+ blockIndentLevel = 1;
+ }
+ /*
+ * For blocks that aren't lone statements, ensure that the opening curly brace
+ * is aligned with the parent.
+ */
+ if (node.parent && !STATEMENT_LIST_PARENTS.has(node.parent.type)) {
+ offsets.setDesiredOffset(sourceCode.getFirstToken(node), sourceCode.getFirstToken(node.parent), 0);
+ }
+ addElementListIndent(node.body, sourceCode.getFirstToken(node), sourceCode.getLastToken(node), blockIndentLevel);
+ },
+ CallExpression: addFunctionCallIndent,
+ 'ClassDeclaration[superClass], ClassExpression[superClass]'(node) {
+ const classToken = sourceCode.getFirstToken(node);
+ const extendsToken = sourceCode.getTokenBefore(node.superClass, util_1.isNotOpeningParenToken);
+ offsets.setDesiredOffsets([extendsToken.range[0], node.body.range[0]], classToken, 1);
+ },
+ ConditionalExpression(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+ // `flatTernaryExpressions` option is for the following style:
+ // var a =
+ // foo > 0 ? bar :
+ // foo < 0 ? baz :
+ // /*else*/ qiz ;
+ if (!options.flatTernaryExpressions ||
+ node.test.loc.end.line !== node.consequent.loc.start.line ||
+ isOnFirstLineOfStatement(firstToken, node)) {
+ const questionMarkToken = sourceCode.getFirstTokenBetween(node.test, node.consequent, token => token.type === experimental_utils_1.AST_TOKEN_TYPES.Punctuator && token.value === '?');
+ const colonToken = sourceCode.getFirstTokenBetween(node.consequent, node.alternate, token => token.type === experimental_utils_1.AST_TOKEN_TYPES.Punctuator && token.value === ':');
+ const firstConsequentToken = sourceCode.getTokenAfter(questionMarkToken);
+ const lastConsequentToken = sourceCode.getTokenBefore(colonToken);
+ const firstAlternateToken = sourceCode.getTokenAfter(colonToken);
+ offsets.setDesiredOffset(questionMarkToken, firstToken, 1);
+ offsets.setDesiredOffset(colonToken, firstToken, 1);
+ offsets.setDesiredOffset(firstConsequentToken, firstToken, 1);
+ /*
+ * The alternate and the consequent should usually have the same indentation.
+ * If they share part of a line, align the alternate against the first token of the consequent.
+ * This allows the alternate to be indented correctly in cases like this:
+ * foo ? (
+ * bar
+ * ) : ( // this '(' is aligned with the '(' above, so it's considered to be aligned with `foo`
+ * baz // as a result, `baz` is offset by 1 rather than 2
+ * )
+ */
+ if (lastConsequentToken.loc.end.line ===
+ firstAlternateToken.loc.start.line) {
+ offsets.setDesiredOffset(firstAlternateToken, firstConsequentToken, 0);
+ }
+ else {
+ /**
+ * If the alternate and consequent do not share part of a line, offset the alternate from the first
+ * token of the conditional expression. For example:
+ * foo ? bar
+ * : baz
+ *
+ * If `baz` were aligned with `bar` rather than being offset by 1 from `foo`, `baz` would end up
+ * having no expected indentation.
+ */
+ offsets.setDesiredOffset(firstAlternateToken, firstToken, 1);
+ }
+ }
+ },
+ 'DoWhileStatement, WhileStatement, ForInStatement, ForOfStatement': (node) => {
+ addBlocklessNodeIndent(node.body);
+ },
+ ExportNamedDeclaration(node) {
+ if (node.declaration === null) {
+ const closingCurly = sourceCode.getLastToken(node, util_1.isClosingBraceToken);
+ // Indent the specifiers in `export {foo, bar, baz}`
+ addElementListIndent(node.specifiers, sourceCode.getFirstToken(node, { skip: 1 }), closingCurly, 1);
+ if (node.source) {
+ // Indent everything after and including the `from` token in `export {foo, bar, baz} from 'qux'`
+ offsets.setDesiredOffsets([closingCurly.range[1], node.range[1]], sourceCode.getFirstToken(node), 1);
+ }
+ }
+ },
+ ForStatement(node) {
+ const forOpeningParen = sourceCode.getFirstToken(node, 1);
+ if (node.init) {
+ offsets.setDesiredOffsets(node.init.range, forOpeningParen, 1);
+ }
+ if (node.test) {
+ offsets.setDesiredOffsets(node.test.range, forOpeningParen, 1);
+ }
+ if (node.update) {
+ offsets.setDesiredOffsets(node.update.range, forOpeningParen, 1);
+ }
+ addBlocklessNodeIndent(node.body);
+ },
+ 'FunctionDeclaration, FunctionExpression'(node) {
+ const closingParen = sourceCode.getTokenBefore(node.body);
+ const openingParen = sourceCode.getTokenBefore(node.params.length ? node.params[0] : closingParen);
+ parameterParens.add(openingParen);
+ parameterParens.add(closingParen);
+ addElementListIndent(node.params, openingParen, closingParen, options[node.type].parameters);
+ },
+ IfStatement(node) {
+ addBlocklessNodeIndent(node.consequent);
+ if (node.alternate &&
+ node.alternate.type !== experimental_utils_1.AST_NODE_TYPES.IfStatement) {
+ addBlocklessNodeIndent(node.alternate);
+ }
+ },
+ ImportDeclaration(node) {
+ if (node.specifiers.some(specifier => specifier.type === experimental_utils_1.AST_NODE_TYPES.ImportSpecifier)) {
+ const openingCurly = sourceCode.getFirstToken(node, util_1.isOpeningBraceToken);
+ const closingCurly = sourceCode.getLastToken(node, util_1.isClosingBraceToken);
+ addElementListIndent(node.specifiers.filter(specifier => specifier.type === experimental_utils_1.AST_NODE_TYPES.ImportSpecifier), openingCurly, closingCurly, options.ImportDeclaration);
+ }
+ const fromToken = sourceCode.getLastToken(node, token => token.type === experimental_utils_1.AST_TOKEN_TYPES.Identifier && token.value === 'from');
+ const sourceToken = sourceCode.getLastToken(node, token => token.type === experimental_utils_1.AST_TOKEN_TYPES.String);
+ const semiToken = sourceCode.getLastToken(node, token => token.type === experimental_utils_1.AST_TOKEN_TYPES.Punctuator && token.value === ';');
+ if (fromToken) {
+ const end = semiToken && semiToken.range[1] === sourceToken.range[1]
+ ? node.range[1]
+ : sourceToken.range[1];
+ offsets.setDesiredOffsets([fromToken.range[0], end], sourceCode.getFirstToken(node), 1);
+ }
+ },
+ 'MemberExpression, JSXMemberExpression, MetaProperty'(node) {
+ const object = node.type === experimental_utils_1.AST_NODE_TYPES.MetaProperty ? node.meta : node.object;
+ const isComputed = 'computed' in node && node.computed;
+ const firstNonObjectToken = sourceCode.getFirstTokenBetween(object, node.property, util_1.isNotClosingParenToken);
+ const secondNonObjectToken = sourceCode.getTokenAfter(firstNonObjectToken);
+ const objectParenCount = sourceCode.getTokensBetween(object, node.property, { filter: util_1.isClosingParenToken }).length;
+ const firstObjectToken = objectParenCount
+ ? sourceCode.getTokenBefore(object, { skip: objectParenCount - 1 })
+ : sourceCode.getFirstToken(object);
+ const lastObjectToken = sourceCode.getTokenBefore(firstNonObjectToken);
+ const firstPropertyToken = isComputed
+ ? firstNonObjectToken
+ : secondNonObjectToken;
+ if (isComputed) {
+ // For computed MemberExpressions, match the closing bracket with the opening bracket.
+ offsets.setDesiredOffset(sourceCode.getLastToken(node), firstNonObjectToken, 0);
+ offsets.setDesiredOffsets(node.property.range, firstNonObjectToken, 1);
+ }
+ /*
+ * If the object ends on the same line that the property starts, match against the last token
+ * of the object, to ensure that the MemberExpression is not indented.
+ *
+ * Otherwise, match against the first token of the object, e.g.
+ * foo
+ * .bar
+ * .baz // <-- offset by 1 from `foo`
+ */
+ const offsetBase = lastObjectToken.loc.end.line === firstPropertyToken.loc.start.line
+ ? lastObjectToken
+ : firstObjectToken;
+ if (typeof options.MemberExpression === 'number') {
+ // Match the dot (for non-computed properties) or the opening bracket (for computed properties) against the object.
+ offsets.setDesiredOffset(firstNonObjectToken, offsetBase, options.MemberExpression);
+ /*
+ * For computed MemberExpressions, match the first token of the property against the opening bracket.
+ * Otherwise, match the first token of the property against the object.
+ */
+ offsets.setDesiredOffset(secondNonObjectToken, isComputed ? firstNonObjectToken : offsetBase, options.MemberExpression);
+ }
+ else {
+ // If the MemberExpression option is off, ignore the dot and the first token of the property.
+ offsets.ignoreToken(firstNonObjectToken);
+ offsets.ignoreToken(secondNonObjectToken);
+ // To ignore the property indentation, ensure that the property tokens depend on the ignored tokens.
+ offsets.setDesiredOffset(firstNonObjectToken, offsetBase, 0);
+ offsets.setDesiredOffset(secondNonObjectToken, firstNonObjectToken, 0);
+ }
+ },
+ NewExpression(node) {
+ // Only indent the arguments if the NewExpression has parens (e.g. `new Foo(bar)` or `new Foo()`, but not `new Foo`
+ if (node.arguments.length > 0 ||
+ (util_1.isClosingParenToken(sourceCode.getLastToken(node)) &&
+ util_1.isOpeningParenToken(sourceCode.getLastToken(node, 1)))) {
+ addFunctionCallIndent(node);
+ }
+ },
+ 'ObjectExpression, ObjectPattern'(node) {
+ const openingCurly = sourceCode.getFirstToken(node);
+ const closingCurly = sourceCode.getTokenAfter(node.properties.length
+ ? node.properties[node.properties.length - 1]
+ : openingCurly, util_1.isClosingBraceToken);
+ addElementListIndent(node.properties, openingCurly, closingCurly, options.ObjectExpression);
+ },
+ Property(node) {
+ if (!node.shorthand && !node.method && node.kind === 'init') {
+ const colon = sourceCode.getFirstTokenBetween(node.key, node.value, util_1.isColonToken);
+ offsets.ignoreToken(sourceCode.getTokenAfter(colon));
+ }
+ },
+ SwitchStatement(node) {
+ const openingCurly = sourceCode.getTokenAfter(node.discriminant, util_1.isOpeningBraceToken);
+ const closingCurly = sourceCode.getLastToken(node);
+ offsets.setDesiredOffsets([openingCurly.range[1], closingCurly.range[0]], openingCurly, options.SwitchCase);
+ if (node.cases.length) {
+ sourceCode
+ .getTokensBetween(node.cases[node.cases.length - 1], closingCurly, {
+ includeComments: true,
+ filter: util_1.isCommentToken,
+ })
+ .forEach(token => offsets.ignoreToken(token));
+ }
+ },
+ SwitchCase(node) {
+ if (!(node.consequent.length === 1 &&
+ node.consequent[0].type === experimental_utils_1.AST_NODE_TYPES.BlockStatement)) {
+ const caseKeyword = sourceCode.getFirstToken(node);
+ const tokenAfterCurrentCase = sourceCode.getTokenAfter(node);
+ offsets.setDesiredOffsets([caseKeyword.range[1], tokenAfterCurrentCase.range[0]], caseKeyword, 1);
+ }
+ },
+ TemplateLiteral(node) {
+ node.expressions.forEach((_, index) => {
+ const previousQuasi = node.quasis[index];
+ const nextQuasi = node.quasis[index + 1];
+ const tokenToAlignFrom = previousQuasi.loc.start.line === previousQuasi.loc.end.line
+ ? sourceCode.getFirstToken(previousQuasi)
+ : null;
+ offsets.setDesiredOffsets([previousQuasi.range[1], nextQuasi.range[0]], tokenToAlignFrom, 1);
+ offsets.setDesiredOffset(sourceCode.getFirstToken(nextQuasi), tokenToAlignFrom, 0);
+ });
+ },
+ VariableDeclaration(node) {
+ if (node.declarations.length === 0) {
+ return;
+ }
+ let variableIndent = Object.prototype.hasOwnProperty.call(options.VariableDeclarator, node.kind)
+ ? options.VariableDeclarator[node.kind]
+ : DEFAULT_VARIABLE_INDENT;
+ const firstToken = sourceCode.getFirstToken(node);
+ const lastToken = sourceCode.getLastToken(node);
+ if (variableIndent === 'first') {
+ if (node.declarations.length > 1) {
+ addElementListIndent(node.declarations, firstToken, lastToken, 'first');
+ return;
+ }
+ variableIndent = DEFAULT_VARIABLE_INDENT;
+ }
+ if (node.declarations[node.declarations.length - 1].loc.start.line >
+ node.loc.start.line) {
+ /*
+ * VariableDeclarator indentation is a bit different from other forms of indentation, in that the
+ * indentation of an opening bracket sometimes won't match that of a closing bracket. For example,
+ * the following indentations are correct:
+ *
+ * var foo = {
+ * ok: true
+ * };
+ *
+ * var foo = {
+ * ok: true,
+ * },
+ * bar = 1;
+ *
+ * Account for when exiting the AST (after indentations have already been set for the nodes in
+ * the declaration) by manually increasing the indentation level of the tokens in this declarator
+ * on the same line as the start of the declaration, provided that there are declarators that
+ * follow this one.
+ */
+ offsets.setDesiredOffsets(node.range, firstToken, variableIndent, true);
+ }
+ else {
+ offsets.setDesiredOffsets(node.range, firstToken, variableIndent);
+ }
+ if (util_1.isSemicolonToken(lastToken)) {
+ offsets.ignoreToken(lastToken);
+ }
+ },
+ VariableDeclarator(node) {
+ if (node.init) {
+ const equalOperator = sourceCode.getTokenBefore(node.init, util_1.isNotOpeningParenToken);
+ const tokenAfterOperator = sourceCode.getTokenAfter(equalOperator);
+ offsets.ignoreToken(equalOperator);
+ offsets.ignoreToken(tokenAfterOperator);
+ offsets.setDesiredOffsets([tokenAfterOperator.range[0], node.range[1]], equalOperator, 1);
+ offsets.setDesiredOffset(equalOperator, sourceCode.getLastToken(node.id), 0);
+ }
+ },
+ 'JSXAttribute[value]'(node) {
+ const nodeValue = node.value;
+ const equalsToken = sourceCode.getFirstTokenBetween(node.name, nodeValue, token => token.type === experimental_utils_1.AST_TOKEN_TYPES.Punctuator && token.value === '=');
+ offsets.setDesiredOffsets([equalsToken.range[0], nodeValue.range[1]], sourceCode.getFirstToken(node.name), 1);
+ },
+ JSXElement(node) {
+ if (node.closingElement) {
+ addElementListIndent(node.children, sourceCode.getFirstToken(node.openingElement), sourceCode.getFirstToken(node.closingElement), 1);
+ }
+ },
+ JSXOpeningElement(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+ let closingToken;
+ if (node.selfClosing) {
+ closingToken = sourceCode.getLastToken(node, { skip: 1 });
+ offsets.setDesiredOffset(sourceCode.getLastToken(node), closingToken, 0);
+ }
+ else {
+ closingToken = sourceCode.getLastToken(node);
+ }
+ offsets.setDesiredOffsets(node.name.range, sourceCode.getFirstToken(node));
+ addElementListIndent(node.attributes, firstToken, closingToken, 1);
+ },
+ JSXClosingElement(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+ offsets.setDesiredOffsets(node.name.range, firstToken, 1);
+ },
+ JSXExpressionContainer(node) {
+ const openingCurly = sourceCode.getFirstToken(node);
+ const closingCurly = sourceCode.getLastToken(node);
+ offsets.setDesiredOffsets([openingCurly.range[1], closingCurly.range[0]], openingCurly, 1);
+ },
+ '*'(node) {
+ const firstToken = sourceCode.getFirstToken(node);
+ // Ensure that the children of every node are indented at least as much as the first token.
+ if (firstToken && !ignoredNodeFirstTokens.has(firstToken)) {
+ offsets.setDesiredOffsets(node.range, firstToken, 0);
+ }
+ },
+ };
+ const listenerCallQueue = [];
+ /*
+ * To ignore the indentation of a node:
+ * 1. Don't call the node's listener when entering it (if it has a listener)
+ * 2. Don't set any offsets against the first token of the node.
+ * 3. Call `ignoreNode` on the node sometime after exiting it and before validating offsets.
+ */
+ const offsetListeners = Object.keys(baseOffsetListeners).reduce(
+ /*
+ * Offset listener calls are deferred until traversal is finished, and are called as
+ * part of the final `Program:exit` listener. This is necessary because a node might
+ * be matched by multiple selectors.
+ *
+ * Example: Suppose there is an offset listener for `Identifier`, and the user has
+ * specified in configuration that `MemberExpression > Identifier` should be ignored.
+ * Due to selector specificity rules, the `Identifier` listener will get called first. However,
+ * if a given Identifier node is supposed to be ignored, then the `Identifier` offset listener
+ * should not have been called at all. Without doing extra selector matching, we don't know
+ * whether the Identifier matches the `MemberExpression > Identifier` selector until the
+ * `MemberExpression > Identifier` listener is called.
+ *
+ * To avoid this, the `Identifier` listener isn't called until traversal finishes and all
+ * ignored nodes are known.
+ */
+ (acc, key) => {
+ const listener = baseOffsetListeners[key];
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
+ acc[key] = node => listenerCallQueue.push({ listener, node });
+ return acc;
+ }, {});
+ // For each ignored node selector, set up a listener to collect it into the `ignoredNodes` set.
+ const ignoredNodes = new Set();
+ /**
+ * Ignores a node
+ * @param node The node to ignore
+ */
+ function addToIgnoredNodes(node) {
+ ignoredNodes.add(node);
+ ignoredNodeFirstTokens.add(sourceCode.getFirstToken(node));
+ }
+ const ignoredNodeListeners = options.ignoredNodes.reduce((listeners, ignoredSelector) => Object.assign(listeners, { [ignoredSelector]: addToIgnoredNodes }), {});
+ /*
+ * Join the listeners, and add a listener to verify that all tokens actually have the correct indentation
+ * at the end.
+ *
+ * Using Object.assign will cause some offset listeners to be overwritten if the same selector also appears
+ * in `ignoredNodeListeners`. This isn't a problem because all of the matching nodes will be ignored,
+ * so those listeners wouldn't be called anyway.
+ */
+ return Object.assign(offsetListeners, ignoredNodeListeners, {
+ '*:exit'(node) {
+ // If a node's type is nonstandard, we can't tell how its children should be offset, so ignore it.
+ if (!KNOWN_NODES.has(node.type)) {
+ addToIgnoredNodes(node);
+ }
+ },
+ 'Program:exit'() {
+ // If ignoreComments option is enabled, ignore all comment tokens.
+ if (options.ignoreComments) {
+ sourceCode
+ .getAllComments()
+ .forEach(comment => offsets.ignoreToken(comment));
+ }
+ // Invoke the queued offset listeners for the nodes that aren't ignored.
+ listenerCallQueue
+ .filter(nodeInfo => !ignoredNodes.has(nodeInfo.node))
+ .forEach(nodeInfo => nodeInfo.listener(nodeInfo.node));
+ // Update the offsets for ignored nodes to prevent their child tokens from being reported.
+ ignoredNodes.forEach(ignoreNode);
+ addParensIndent(sourceCode.ast.tokens);
+ /*
+ * Create a Map from (tokenOrComment) => (precedingToken).
+ * This is necessary because sourceCode.getTokenBefore does not handle a comment as an argument correctly.
+ */
+ const precedingTokens = sourceCode.ast.comments.reduce((commentMap, comment) => {
+ const tokenOrCommentBefore = sourceCode.getTokenBefore(comment, {
+ includeComments: true,
+ });
+ return commentMap.set(comment, commentMap.has(tokenOrCommentBefore)
+ ? commentMap.get(tokenOrCommentBefore)
+ : tokenOrCommentBefore);
+ }, new WeakMap());
+ sourceCode.lines.forEach((_, lineIndex) => {
+ const lineNumber = lineIndex + 1;
+ if (!tokenInfo.firstTokensByLineNumber.has(lineNumber)) {
+ // Don't check indentation on blank lines
+ return;
+ }
+ const firstTokenOfLine = tokenInfo.firstTokensByLineNumber.get(lineNumber);
+ if (firstTokenOfLine.loc.start.line !== lineNumber) {
+ // Don't check the indentation of multi-line tokens (e.g. template literals or block comments) twice.
+ return;
+ }
+ // If the token matches the expected expected indentation, don't report it.
+ if (validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine))) {
+ return;
+ }
+ if (util_1.isCommentToken(firstTokenOfLine)) {
+ const tokenBefore = precedingTokens.get(firstTokenOfLine);
+ const tokenAfter = tokenBefore
+ ? sourceCode.getTokenAfter(tokenBefore)
+ : sourceCode.ast.tokens[0];
+ const mayAlignWithBefore = tokenBefore &&
+ !hasBlankLinesBetween(tokenBefore, firstTokenOfLine);
+ const mayAlignWithAfter = tokenAfter && !hasBlankLinesBetween(firstTokenOfLine, tokenAfter);
+ // If a comment matches the expected indentation of the token immediately before or after, don't report it.
+ if ((mayAlignWithBefore &&
+ validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenBefore))) ||
+ (mayAlignWithAfter &&
+ validateTokenIndent(firstTokenOfLine, offsets.getDesiredIndent(tokenAfter)))) {
+ return;
+ }
+ }
+ // Otherwise, report the token/comment.
+ report(firstTokenOfLine, offsets.getDesiredIndent(firstTokenOfLine));
+ });
+ },
+ });
+ },
+});
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/index.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/index.js.map
new file mode 100644
index 000000000..5556626d7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent-new-do-not-use/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/rules/indent-new-do-not-use/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,eAAe;AACf,gFAAgF;;AAEhF,8EAK+C;AAG/C,mDAAgD;AAChD,2CAAwC;AACxC,qCAcoB;AAEpB,MAAM,sBAAsB,GAAG,2BAA2B,CAAC;AAC3D,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAEjC,gFAAgF;AAChF,kBAAkB;AAClB,gFAAgF;AAEhF,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,mCAAc,CAAC,oBAAoB;IACnC,mCAAc,CAAC,iBAAiB;IAChC,mCAAc,CAAC,eAAe;IAC9B,mCAAc,CAAC,YAAY;IAC3B,mCAAc,CAAC,uBAAuB;IACtC,mCAAc,CAAC,eAAe;IAC9B,mCAAc,CAAC,cAAc;IAC7B,mCAAc,CAAC,gBAAgB;IAC/B,mCAAc,CAAC,cAAc;IAC7B,mCAAc,CAAC,cAAc;IAC7B,mCAAc,CAAC,WAAW;IAC1B,mCAAc,CAAC,SAAS;IACxB,mCAAc,CAAC,gBAAgB;IAC/B,mCAAc,CAAC,eAAe;IAC9B,mCAAc,CAAC,qBAAqB;IACpC,mCAAc,CAAC,iBAAiB;IAChC,mCAAc,CAAC,gBAAgB;IAC/B,mCAAc,CAAC,iBAAiB;IAChC,mCAAc,CAAC,cAAc;IAC7B,mCAAc,CAAC,mBAAmB;IAClC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CAAC,CAC3C,EACD;wBACA,OAAO;qBACR;oBAED,IAAI,qBAAc,CAAC,gBAAgB,CAAC,EAAE;wBACpC,MAAM,WAAW,GAAG,eAAe,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;wBAC1D,MAAM,UAAU,GAAG,WAAW;4BAC5B,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAE;4BACxC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;wBAE7B,MAAM,kBAAkB,GACtB,WAAW;4BACX,CAAC,oBAAoB,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC;wBACvD,MAAM,iBAAiB,GACrB,UAAU,IAAI,CAAC,oBAAoB,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;wBAEpE,2GAA2G;wBAC3G,IACE,CAAC,kBAAkB;4BACjB,mBAAmB,CACjB,gBAAgB,EAChB,OAAO,CAAC,gBAAgB,CAAC,WAAW,CAAC,CACtC,CAAC;4BACJ,CAAC,iBAAiB;gCAChB,mBAAmB,CACjB,gBAAgB,EAChB,OAAO,CAAC,gBAAgB,CAAC,UAAU,CAAC,CACrC,CAAC,EACJ;4BACA,OAAO;yBACR;qBACF;oBAED,uCAAuC;oBACvC,MAAM,CAAC,gBAAgB,EAAE,OAAO,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,CAAC,CAAC;gBACvE,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js
new file mode 100644
index 000000000..bdb0d7a29
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js
@@ -0,0 +1,412 @@
+"use strict";
+/**
+ * Note this file is rather type-unsafe in its current state.
+ * This is due to some really funky type conversions between different node types.
+ * This is done intentionally based on the internal implementation of the base indent rule.
+ */
+/* eslint-disable @typescript-eslint/no-explicit-any */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const indent_1 = __importDefault(require("eslint/lib/rules/indent"));
+const util = __importStar(require("../util"));
+const KNOWN_NODES = new Set([
+ // Class properties aren't yet supported by eslint...
+ experimental_utils_1.AST_NODE_TYPES.ClassProperty,
+ // ts keywords
+ experimental_utils_1.AST_NODE_TYPES.TSAbstractKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSAnyKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSBooleanKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSNeverKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSNumberKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSStringKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSSymbolKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSUndefinedKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSUnknownKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSVoidKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSNullKeyword,
+ // ts specific nodes we want to support
+ experimental_utils_1.AST_NODE_TYPES.TSAbstractClassProperty,
+ experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition,
+ experimental_utils_1.AST_NODE_TYPES.TSArrayType,
+ experimental_utils_1.AST_NODE_TYPES.TSAsExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSConditionalType,
+ experimental_utils_1.AST_NODE_TYPES.TSConstructorType,
+ experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction,
+ experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSEnumDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSEnumMember,
+ experimental_utils_1.AST_NODE_TYPES.TSExportAssignment,
+ experimental_utils_1.AST_NODE_TYPES.TSExternalModuleReference,
+ experimental_utils_1.AST_NODE_TYPES.TSFunctionType,
+ experimental_utils_1.AST_NODE_TYPES.TSImportType,
+ experimental_utils_1.AST_NODE_TYPES.TSIndexedAccessType,
+ experimental_utils_1.AST_NODE_TYPES.TSIndexSignature,
+ experimental_utils_1.AST_NODE_TYPES.TSInferType,
+ experimental_utils_1.AST_NODE_TYPES.TSInterfaceBody,
+ experimental_utils_1.AST_NODE_TYPES.TSInterfaceDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSInterfaceHeritage,
+ experimental_utils_1.AST_NODE_TYPES.TSIntersectionType,
+ experimental_utils_1.AST_NODE_TYPES.TSImportEqualsDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSLiteralType,
+ experimental_utils_1.AST_NODE_TYPES.TSMappedType,
+ experimental_utils_1.AST_NODE_TYPES.TSMethodSignature,
+ 'TSMinusToken',
+ experimental_utils_1.AST_NODE_TYPES.TSModuleBlock,
+ experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSNonNullExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSParameterProperty,
+ experimental_utils_1.AST_NODE_TYPES.TSParenthesizedType,
+ 'TSPlusToken',
+ experimental_utils_1.AST_NODE_TYPES.TSPropertySignature,
+ experimental_utils_1.AST_NODE_TYPES.TSQualifiedName,
+ 'TSQuestionToken',
+ experimental_utils_1.AST_NODE_TYPES.TSRestType,
+ experimental_utils_1.AST_NODE_TYPES.TSThisType,
+ experimental_utils_1.AST_NODE_TYPES.TSTupleType,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeAnnotation,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeLiteral,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeOperator,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeParameter,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeParameterDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeReference,
+ experimental_utils_1.AST_NODE_TYPES.TSUnionType,
+ experimental_utils_1.AST_NODE_TYPES.Decorator,
+]);
+exports.default = util.createRule({
+ name: 'indent',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Enforce consistent indentation',
+ category: 'Stylistic Issues',
+ // too opinionated to be recommended
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ fixable: 'whitespace',
+ schema: indent_1.default.meta.schema,
+ messages: (_a = indent_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ wrongIndentation: 'Expected indentation of {{expected}} but found {{actual}}.',
+ },
+ },
+ defaultOptions: [
+ // typescript docs and playground use 4 space indent
+ 4,
+ {
+ // typescript docs indent the case from the switch
+ // https://www.typescriptlang.org/docs/handbook/release-notes/typescript-1-8.html#example-4
+ SwitchCase: 1,
+ flatTernaryExpressions: false,
+ ignoredNodes: [],
+ },
+ ],
+ create(context, optionsWithDefaults) {
+ // because we extend the base rule, have to update opts on the context
+ // the context defines options as readonly though...
+ const contextWithDefaults = Object.create(context, {
+ options: {
+ writable: false,
+ configurable: false,
+ value: optionsWithDefaults,
+ },
+ });
+ const rules = indent_1.default.create(contextWithDefaults);
+ /**
+ * Converts from a TSPropertySignature to a Property
+ * @param node a TSPropertySignature node
+ * @param [type] the type to give the new node
+ * @returns a Property node
+ */
+ function TSPropertySignatureToProperty(node, type = experimental_utils_1.AST_NODE_TYPES.Property) {
+ const base = {
+ // indent doesn't actually use these
+ key: null,
+ value: null,
+ // Property flags
+ computed: false,
+ method: false,
+ kind: 'init',
+ // this will stop eslint from interrogating the type literal
+ shorthand: true,
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ };
+ if (type === experimental_utils_1.AST_NODE_TYPES.Property) {
+ return Object.assign({ type }, base);
+ }
+ else {
+ return Object.assign({ type, static: false, readonly: false, declare: false }, base);
+ }
+ }
+ return Object.assign({}, rules, {
+ // overwrite the base rule here so we can use our KNOWN_NODES list instead
+ '*:exit'(node) {
+ // For nodes we care about, skip the default handling, because it just marks the node as ignored...
+ if (!KNOWN_NODES.has(node.type)) {
+ rules['*:exit'](node);
+ }
+ },
+ VariableDeclaration(node) {
+ // https://github.com/typescript-eslint/typescript-eslint/issues/441
+ if (node.declarations.length === 0) {
+ return;
+ }
+ return rules.VariableDeclaration(node);
+ },
+ TSAsExpression(node) {
+ // transform it to a BinaryExpression
+ return rules['BinaryExpression, LogicalExpression']({
+ type: experimental_utils_1.AST_NODE_TYPES.BinaryExpression,
+ operator: 'as',
+ left: node.expression,
+ // the first typeAnnotation includes the as token
+ right: node.typeAnnotation,
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ TSConditionalType(node) {
+ // transform it to a ConditionalExpression
+ return rules.ConditionalExpression({
+ type: experimental_utils_1.AST_NODE_TYPES.ConditionalExpression,
+ test: {
+ type: experimental_utils_1.AST_NODE_TYPES.BinaryExpression,
+ operator: 'extends',
+ left: node.checkType,
+ right: node.extendsType,
+ // location data
+ range: [node.checkType.range[0], node.extendsType.range[1]],
+ loc: {
+ start: node.checkType.loc.start,
+ end: node.extendsType.loc.end,
+ },
+ },
+ consequent: node.trueType,
+ alternate: node.falseType,
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ 'TSEnumDeclaration, TSTypeLiteral'(node) {
+ // transform it to an ObjectExpression
+ return rules['ObjectExpression, ObjectPattern']({
+ type: experimental_utils_1.AST_NODE_TYPES.ObjectExpression,
+ properties: node.members.map(member => TSPropertySignatureToProperty(member)),
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ TSImportEqualsDeclaration(node) {
+ // transform it to an VariableDeclaration
+ // use VariableDeclaration instead of ImportDeclaration because it's essentially the same thing
+ const { id, moduleReference } = node;
+ return rules.VariableDeclaration({
+ type: experimental_utils_1.AST_NODE_TYPES.VariableDeclaration,
+ kind: 'const',
+ declarations: [
+ {
+ type: experimental_utils_1.AST_NODE_TYPES.VariableDeclarator,
+ range: [id.range[0], moduleReference.range[1]],
+ loc: {
+ start: id.loc.start,
+ end: moduleReference.loc.end,
+ },
+ id: id,
+ init: {
+ type: experimental_utils_1.AST_NODE_TYPES.CallExpression,
+ callee: {
+ type: experimental_utils_1.AST_NODE_TYPES.Identifier,
+ name: 'require',
+ range: [
+ moduleReference.range[0],
+ moduleReference.range[0] + 'require'.length,
+ ],
+ loc: {
+ start: moduleReference.loc.start,
+ end: {
+ line: moduleReference.loc.end.line,
+ column: moduleReference.loc.start.line + 'require'.length,
+ },
+ },
+ },
+ arguments: 'expression' in moduleReference
+ ? [moduleReference.expression]
+ : [],
+ // location data
+ range: moduleReference.range,
+ loc: moduleReference.loc,
+ },
+ },
+ ],
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ TSIndexedAccessType(node) {
+ // convert to a MemberExpression
+ return rules['MemberExpression, JSXMemberExpression, MetaProperty']({
+ type: experimental_utils_1.AST_NODE_TYPES.MemberExpression,
+ object: node.objectType,
+ property: node.indexType,
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ optional: false,
+ computed: true,
+ });
+ },
+ TSInterfaceBody(node) {
+ // transform it to an ClassBody
+ return rules['BlockStatement, ClassBody']({
+ type: experimental_utils_1.AST_NODE_TYPES.ClassBody,
+ body: node.body.map(p => TSPropertySignatureToProperty(p, experimental_utils_1.AST_NODE_TYPES.ClassProperty)),
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ 'TSInterfaceDeclaration[extends.length > 0]'(node) {
+ // transform it to a ClassDeclaration
+ return rules['ClassDeclaration[superClass], ClassExpression[superClass]']({
+ type: experimental_utils_1.AST_NODE_TYPES.ClassDeclaration,
+ body: node.body,
+ id: null,
+ // TODO: This is invalid, there can be more than one extends in interface
+ superClass: node.extends[0].expression,
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ TSMappedType(node) {
+ const sourceCode = context.getSourceCode();
+ const squareBracketStart = sourceCode.getTokenBefore(node.typeParameter);
+ // transform it to an ObjectExpression
+ return rules['ObjectExpression, ObjectPattern']({
+ type: experimental_utils_1.AST_NODE_TYPES.ObjectExpression,
+ properties: [
+ {
+ type: experimental_utils_1.AST_NODE_TYPES.Property,
+ key: node.typeParameter,
+ value: node.typeAnnotation,
+ // location data
+ range: [
+ squareBracketStart.range[0],
+ node.typeAnnotation
+ ? node.typeAnnotation.range[1]
+ : squareBracketStart.range[0],
+ ],
+ loc: {
+ start: squareBracketStart.loc.start,
+ end: node.typeAnnotation
+ ? node.typeAnnotation.loc.end
+ : squareBracketStart.loc.end,
+ },
+ kind: 'init',
+ computed: false,
+ method: false,
+ shorthand: false,
+ },
+ ],
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ TSModuleBlock(node) {
+ // transform it to a BlockStatement
+ return rules['BlockStatement, ClassBody']({
+ type: experimental_utils_1.AST_NODE_TYPES.BlockStatement,
+ body: node.body,
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ TSQualifiedName(node) {
+ return rules['MemberExpression, JSXMemberExpression, MetaProperty']({
+ type: experimental_utils_1.AST_NODE_TYPES.MemberExpression,
+ object: node.left,
+ property: node.right,
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ optional: false,
+ computed: false,
+ });
+ },
+ TSTupleType(node) {
+ // transform it to an ArrayExpression
+ return rules['ArrayExpression, ArrayPattern']({
+ type: experimental_utils_1.AST_NODE_TYPES.ArrayExpression,
+ elements: node.elementTypes,
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ TSTypeParameterDeclaration(node) {
+ if (!node.params.length) {
+ return;
+ }
+ const [name, ...attributes] = node.params;
+ // JSX is about the closest we can get because the angle brackets
+ // it's not perfect but it works!
+ return rules.JSXOpeningElement({
+ type: experimental_utils_1.AST_NODE_TYPES.JSXOpeningElement,
+ selfClosing: false,
+ name: name,
+ attributes: attributes,
+ // location data
+ parent: node.parent,
+ range: node.range,
+ loc: node.loc,
+ });
+ },
+ });
+ },
+});
+//# sourceMappingURL=indent.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js.map
new file mode 100644
index 000000000..9ec4bd57d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/indent.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"indent.js","sourceRoot":"","sources":["../../src/rules/indent.ts"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,8EAG+C;AAC/C,qEAA+C;AAC/C,8CAAgC;AAKhC,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC;IAC1B,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oBACb,QAAQ,EAAE,KAAK;oBACf,QAAQ,EAAE,KAAK;iBAChB,CAAC,CAAC;YACL,CAAC;YAED,WAAW,CAAC,IAA0B;gBACpC,qCAAqC;gBACrC,OAAO,KAAK,CAAC,+BAA+B,CAAC,CAAC;oBAC5C,IAAI,EAAE,mCAAc,CAAC,eAAe;oBACpC,QAAQ,EAAE,IAAI,CAAC,YAAmB;oBAElC,gBAAgB;oBAChB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd,CAAC,CAAC;YACL,CAAC;YAED,0BAA0B,CAAC,IAAyC;gBAClE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;oBACvB,OAAO;iBACR;gBAED,MAAM,CAAC,IAAI,EAAE,GAAG,UAAU,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC;gBAE1C,iEAAiE;gBACjE,iCAAiC;gBACjC,OAAO,KAAK,CAAC,iBAAiB,CAAC;oBAC7B,IAAI,EAAE,mCAAc,CAAC,iBAAiB;oBACtC,WAAW,EAAE,KAAK;oBAClB,IAAI,EAAE,IAAW;oBACjB,UAAU,EAAE,UAAiB;oBAE7B,gBAAgB;oBAChB,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,GAAG,EAAE,IAAI,CAAC,GAAG;iBACd,CAAC,CAAC;YACL,CAAC;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
new file mode 100644
index 000000000..3f69b8b27
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js
@@ -0,0 +1,220 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const adjacent_overload_signatures_1 = __importDefault(require("./adjacent-overload-signatures"));
+const array_type_1 = __importDefault(require("./array-type"));
+const await_thenable_1 = __importDefault(require("./await-thenable"));
+const ban_ts_comment_1 = __importDefault(require("./ban-ts-comment"));
+const ban_tslint_comment_1 = __importDefault(require("./ban-tslint-comment"));
+const ban_types_1 = __importDefault(require("./ban-types"));
+const brace_style_1 = __importDefault(require("./brace-style"));
+const class_literal_property_style_1 = __importDefault(require("./class-literal-property-style"));
+const comma_spacing_1 = __importDefault(require("./comma-spacing"));
+const no_confusing_non_null_assertion_1 = __importDefault(require("./no-confusing-non-null-assertion"));
+const consistent_type_assertions_1 = __importDefault(require("./consistent-type-assertions"));
+const consistent_type_definitions_1 = __importDefault(require("./consistent-type-definitions"));
+const consistent_type_imports_1 = __importDefault(require("./consistent-type-imports"));
+const default_param_last_1 = __importDefault(require("./default-param-last"));
+const dot_notation_1 = __importDefault(require("./dot-notation"));
+const explicit_function_return_type_1 = __importDefault(require("./explicit-function-return-type"));
+const explicit_member_accessibility_1 = __importDefault(require("./explicit-member-accessibility"));
+const explicit_module_boundary_types_1 = __importDefault(require("./explicit-module-boundary-types"));
+const func_call_spacing_1 = __importDefault(require("./func-call-spacing"));
+const indent_1 = __importDefault(require("./indent"));
+const init_declarations_1 = __importDefault(require("./init-declarations"));
+const keyword_spacing_1 = __importDefault(require("./keyword-spacing"));
+const lines_between_class_members_1 = __importDefault(require("./lines-between-class-members"));
+const member_delimiter_style_1 = __importDefault(require("./member-delimiter-style"));
+const member_ordering_1 = __importDefault(require("./member-ordering"));
+const method_signature_style_1 = __importDefault(require("./method-signature-style"));
+const naming_convention_1 = __importDefault(require("./naming-convention"));
+const no_array_constructor_1 = __importDefault(require("./no-array-constructor"));
+const no_base_to_string_1 = __importDefault(require("./no-base-to-string"));
+const no_dupe_class_members_1 = __importDefault(require("./no-dupe-class-members"));
+const no_dynamic_delete_1 = __importDefault(require("./no-dynamic-delete"));
+const no_empty_function_1 = __importDefault(require("./no-empty-function"));
+const no_empty_interface_1 = __importDefault(require("./no-empty-interface"));
+const no_explicit_any_1 = __importDefault(require("./no-explicit-any"));
+const no_implicit_any_catch_1 = __importDefault(require("./no-implicit-any-catch"));
+const no_extraneous_class_1 = __importDefault(require("./no-extraneous-class"));
+const no_extra_non_null_assertion_1 = __importDefault(require("./no-extra-non-null-assertion"));
+const no_extra_parens_1 = __importDefault(require("./no-extra-parens"));
+const no_extra_semi_1 = __importDefault(require("./no-extra-semi"));
+const no_floating_promises_1 = __importDefault(require("./no-floating-promises"));
+const no_for_in_array_1 = __importDefault(require("./no-for-in-array"));
+const prefer_literal_enum_member_1 = __importDefault(require("./prefer-literal-enum-member"));
+const no_implied_eval_1 = __importDefault(require("./no-implied-eval"));
+const no_inferrable_types_1 = __importDefault(require("./no-inferrable-types"));
+const no_invalid_this_1 = __importDefault(require("./no-invalid-this"));
+const no_invalid_void_type_1 = __importDefault(require("./no-invalid-void-type"));
+const no_loss_of_precision_1 = __importDefault(require("./no-loss-of-precision"));
+const no_loop_func_1 = __importDefault(require("./no-loop-func"));
+const no_magic_numbers_1 = __importDefault(require("./no-magic-numbers"));
+const no_misused_new_1 = __importDefault(require("./no-misused-new"));
+const no_misused_promises_1 = __importDefault(require("./no-misused-promises"));
+const no_namespace_1 = __importDefault(require("./no-namespace"));
+const no_non_null_asserted_optional_chain_1 = __importDefault(require("./no-non-null-asserted-optional-chain"));
+const no_non_null_assertion_1 = __importDefault(require("./no-non-null-assertion"));
+const no_parameter_properties_1 = __importDefault(require("./no-parameter-properties"));
+const no_redeclare_1 = __importDefault(require("./no-redeclare"));
+const no_require_imports_1 = __importDefault(require("./no-require-imports"));
+const no_shadow_1 = __importDefault(require("./no-shadow"));
+const no_this_alias_1 = __importDefault(require("./no-this-alias"));
+const no_throw_literal_1 = __importDefault(require("./no-throw-literal"));
+const no_type_alias_1 = __importDefault(require("./no-type-alias"));
+const no_unnecessary_boolean_literal_compare_1 = __importDefault(require("./no-unnecessary-boolean-literal-compare"));
+const no_unnecessary_condition_1 = __importDefault(require("./no-unnecessary-condition"));
+const no_unnecessary_qualifier_1 = __importDefault(require("./no-unnecessary-qualifier"));
+const no_unnecessary_type_arguments_1 = __importDefault(require("./no-unnecessary-type-arguments"));
+const no_unnecessary_type_assertion_1 = __importDefault(require("./no-unnecessary-type-assertion"));
+const no_unsafe_assignment_1 = __importDefault(require("./no-unsafe-assignment"));
+const no_unsafe_call_1 = __importDefault(require("./no-unsafe-call"));
+const no_unsafe_member_access_1 = __importDefault(require("./no-unsafe-member-access"));
+const no_unsafe_return_1 = __importDefault(require("./no-unsafe-return"));
+const no_unused_expressions_1 = __importDefault(require("./no-unused-expressions"));
+const no_unused_vars_1 = __importDefault(require("./no-unused-vars"));
+const no_unused_vars_experimental_1 = __importDefault(require("./no-unused-vars-experimental"));
+const no_use_before_define_1 = __importDefault(require("./no-use-before-define"));
+const no_useless_constructor_1 = __importDefault(require("./no-useless-constructor"));
+const no_var_requires_1 = __importDefault(require("./no-var-requires"));
+const prefer_as_const_1 = __importDefault(require("./prefer-as-const"));
+const prefer_enum_initializers_1 = __importDefault(require("./prefer-enum-initializers"));
+const prefer_for_of_1 = __importDefault(require("./prefer-for-of"));
+const prefer_function_type_1 = __importDefault(require("./prefer-function-type"));
+const prefer_includes_1 = __importDefault(require("./prefer-includes"));
+const prefer_namespace_keyword_1 = __importDefault(require("./prefer-namespace-keyword"));
+const prefer_nullish_coalescing_1 = __importDefault(require("./prefer-nullish-coalescing"));
+const prefer_optional_chain_1 = __importDefault(require("./prefer-optional-chain"));
+const prefer_readonly_1 = __importDefault(require("./prefer-readonly"));
+const prefer_readonly_parameter_types_1 = __importDefault(require("./prefer-readonly-parameter-types"));
+const prefer_reduce_type_parameter_1 = __importDefault(require("./prefer-reduce-type-parameter"));
+const prefer_regexp_exec_1 = __importDefault(require("./prefer-regexp-exec"));
+const prefer_string_starts_ends_with_1 = __importDefault(require("./prefer-string-starts-ends-with"));
+const prefer_ts_expect_error_1 = __importDefault(require("./prefer-ts-expect-error"));
+const promise_function_async_1 = __importDefault(require("./promise-function-async"));
+const quotes_1 = __importDefault(require("./quotes"));
+const require_array_sort_compare_1 = __importDefault(require("./require-array-sort-compare"));
+const require_await_1 = __importDefault(require("./require-await"));
+const restrict_plus_operands_1 = __importDefault(require("./restrict-plus-operands"));
+const restrict_template_expressions_1 = __importDefault(require("./restrict-template-expressions"));
+const return_await_1 = __importDefault(require("./return-await"));
+const semi_1 = __importDefault(require("./semi"));
+const space_before_function_paren_1 = __importDefault(require("./space-before-function-paren"));
+const strict_boolean_expressions_1 = __importDefault(require("./strict-boolean-expressions"));
+const switch_exhaustiveness_check_1 = __importDefault(require("./switch-exhaustiveness-check"));
+const triple_slash_reference_1 = __importDefault(require("./triple-slash-reference"));
+const type_annotation_spacing_1 = __importDefault(require("./type-annotation-spacing"));
+const typedef_1 = __importDefault(require("./typedef"));
+const unbound_method_1 = __importDefault(require("./unbound-method"));
+const unified_signatures_1 = __importDefault(require("./unified-signatures"));
+exports.default = {
+ 'adjacent-overload-signatures': adjacent_overload_signatures_1.default,
+ 'array-type': array_type_1.default,
+ 'await-thenable': await_thenable_1.default,
+ 'ban-ts-comment': ban_ts_comment_1.default,
+ 'ban-tslint-comment': ban_tslint_comment_1.default,
+ 'ban-types': ban_types_1.default,
+ 'brace-style': brace_style_1.default,
+ 'class-literal-property-style': class_literal_property_style_1.default,
+ 'comma-spacing': comma_spacing_1.default,
+ 'consistent-type-assertions': consistent_type_assertions_1.default,
+ 'consistent-type-definitions': consistent_type_definitions_1.default,
+ 'consistent-type-imports': consistent_type_imports_1.default,
+ 'default-param-last': default_param_last_1.default,
+ 'dot-notation': dot_notation_1.default,
+ 'explicit-function-return-type': explicit_function_return_type_1.default,
+ 'explicit-member-accessibility': explicit_member_accessibility_1.default,
+ 'explicit-module-boundary-types': explicit_module_boundary_types_1.default,
+ 'func-call-spacing': func_call_spacing_1.default,
+ 'init-declarations': init_declarations_1.default,
+ 'keyword-spacing': keyword_spacing_1.default,
+ 'lines-between-class-members': lines_between_class_members_1.default,
+ 'member-delimiter-style': member_delimiter_style_1.default,
+ 'member-ordering': member_ordering_1.default,
+ 'method-signature-style': method_signature_style_1.default,
+ 'naming-convention': naming_convention_1.default,
+ 'no-array-constructor': no_array_constructor_1.default,
+ 'no-base-to-string': no_base_to_string_1.default,
+ 'no-confusing-non-null-assertion': no_confusing_non_null_assertion_1.default,
+ 'no-dupe-class-members': no_dupe_class_members_1.default,
+ 'no-dynamic-delete': no_dynamic_delete_1.default,
+ 'no-empty-function': no_empty_function_1.default,
+ 'no-empty-interface': no_empty_interface_1.default,
+ 'no-explicit-any': no_explicit_any_1.default,
+ 'no-extra-non-null-assertion': no_extra_non_null_assertion_1.default,
+ 'no-extra-parens': no_extra_parens_1.default,
+ 'no-extra-semi': no_extra_semi_1.default,
+ 'no-extraneous-class': no_extraneous_class_1.default,
+ 'no-floating-promises': no_floating_promises_1.default,
+ 'no-for-in-array': no_for_in_array_1.default,
+ 'no-implicit-any-catch': no_implicit_any_catch_1.default,
+ 'no-implied-eval': no_implied_eval_1.default,
+ 'no-inferrable-types': no_inferrable_types_1.default,
+ 'no-invalid-this': no_invalid_this_1.default,
+ 'no-invalid-void-type': no_invalid_void_type_1.default,
+ 'no-loop-func': no_loop_func_1.default,
+ 'no-loss-of-precision': no_loss_of_precision_1.default,
+ 'no-magic-numbers': no_magic_numbers_1.default,
+ 'no-misused-new': no_misused_new_1.default,
+ 'no-misused-promises': no_misused_promises_1.default,
+ 'no-namespace': no_namespace_1.default,
+ 'no-non-null-asserted-optional-chain': no_non_null_asserted_optional_chain_1.default,
+ 'no-non-null-assertion': no_non_null_assertion_1.default,
+ 'no-parameter-properties': no_parameter_properties_1.default,
+ 'no-redeclare': no_redeclare_1.default,
+ 'no-require-imports': no_require_imports_1.default,
+ 'no-shadow': no_shadow_1.default,
+ 'no-this-alias': no_this_alias_1.default,
+ 'no-throw-literal': no_throw_literal_1.default,
+ 'no-type-alias': no_type_alias_1.default,
+ 'no-unnecessary-boolean-literal-compare': no_unnecessary_boolean_literal_compare_1.default,
+ 'no-unnecessary-condition': no_unnecessary_condition_1.default,
+ 'no-unnecessary-qualifier': no_unnecessary_qualifier_1.default,
+ 'no-unnecessary-type-arguments': no_unnecessary_type_arguments_1.default,
+ 'no-unnecessary-type-assertion': no_unnecessary_type_assertion_1.default,
+ 'no-unsafe-assignment': no_unsafe_assignment_1.default,
+ 'no-unsafe-call': no_unsafe_call_1.default,
+ 'no-unsafe-member-access': no_unsafe_member_access_1.default,
+ 'no-unsafe-return': no_unsafe_return_1.default,
+ 'no-unused-expressions': no_unused_expressions_1.default,
+ 'no-unused-vars-experimental': no_unused_vars_experimental_1.default,
+ 'no-unused-vars': no_unused_vars_1.default,
+ 'no-use-before-define': no_use_before_define_1.default,
+ 'no-useless-constructor': no_useless_constructor_1.default,
+ 'no-var-requires': no_var_requires_1.default,
+ 'prefer-as-const': prefer_as_const_1.default,
+ 'prefer-enum-initializers': prefer_enum_initializers_1.default,
+ 'prefer-for-of': prefer_for_of_1.default,
+ 'prefer-function-type': prefer_function_type_1.default,
+ 'prefer-includes': prefer_includes_1.default,
+ 'prefer-literal-enum-member': prefer_literal_enum_member_1.default,
+ 'prefer-namespace-keyword': prefer_namespace_keyword_1.default,
+ 'prefer-nullish-coalescing': prefer_nullish_coalescing_1.default,
+ 'prefer-optional-chain': prefer_optional_chain_1.default,
+ 'prefer-readonly-parameter-types': prefer_readonly_parameter_types_1.default,
+ 'prefer-readonly': prefer_readonly_1.default,
+ 'prefer-reduce-type-parameter': prefer_reduce_type_parameter_1.default,
+ 'prefer-regexp-exec': prefer_regexp_exec_1.default,
+ 'prefer-string-starts-ends-with': prefer_string_starts_ends_with_1.default,
+ 'prefer-ts-expect-error': prefer_ts_expect_error_1.default,
+ 'promise-function-async': promise_function_async_1.default,
+ 'require-array-sort-compare': require_array_sort_compare_1.default,
+ 'require-await': require_await_1.default,
+ 'restrict-plus-operands': restrict_plus_operands_1.default,
+ 'restrict-template-expressions': restrict_template_expressions_1.default,
+ 'return-await': return_await_1.default,
+ 'space-before-function-paren': space_before_function_paren_1.default,
+ 'strict-boolean-expressions': strict_boolean_expressions_1.default,
+ 'switch-exhaustiveness-check': switch_exhaustiveness_check_1.default,
+ 'triple-slash-reference': triple_slash_reference_1.default,
+ 'type-annotation-spacing': type_annotation_spacing_1.default,
+ 'unbound-method': unbound_method_1.default,
+ 'unified-signatures': unified_signatures_1.default,
+ indent: indent_1.default,
+ quotes: quotes_1.default,
+ semi: semi_1.default,
+ typedef: typedef_1.default,
+};
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map
new file mode 100644
index 000000000..3d62e0eeb
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":";;;;;AAAA,kGAAwE;AACxE,8DAAqC;AACrC,sEAA6C;AAC7C,sEAA4C;AAC5C,8EAAoD;AACpD,4DAAmC;AACnC,gEAAuC;AACvC,kGAAuE;AACvE,oEAA2C;AAC3C,wGAAsF;AACtF,8FAAoE;AACpE,gGAAsE;AACtE,wFAA8D;AAC9D,8EAAoD;AACpD,kEAAyC;AACzC,oGAAyE;AACzE,oGAA0E;AAC1E,sGAA2E;AAC3E,4EAAkD;AAClD,sDAA8B;AAC9B,4EAAmD;AACnD,wEAA+C;AAC/C,gGAAqE;AACrE,sFAA4D;AAC5D,wEAA+C;AAC/C,sFAA4D;AAC5D,4EAAmD;AACnD,kFAAwD;AACxD,4EAAiD;AACjD,oFAAyD;AACzD,4EAAkD;AAClD,4EAAkD;AAClD,8EAAoD;AACpD,wEAA8C;AAC9C,oFAAyD;AACzD,gFAAsD;AAC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BAAwB,EAAE,gCAAoB;IAC9C,+BAA+B,EAAE,uCAA2B;IAC5D,cAAc,EAAE,sBAAW;IAC3B,6BAA6B,EAAE,qCAAwB;IACvD,4BAA4B,EAAE,oCAAwB;IACtD,6BAA6B,EAAE,qCAAyB;IACxD,wBAAwB,EAAE,gCAAoB;IAC9C,yBAAyB,EAAE,iCAAqB;IAChD,gBAAgB,EAAE,wBAAa;IAC/B,oBAAoB,EAAE,4BAAiB;IACvC,MAAM,EAAE,gBAAM;IACd,MAAM,EAAE,gBAAM;IACd,IAAI,EAAE,cAAI;IACV,OAAO,EAAE,iBAAO;CACjB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js
new file mode 100644
index 000000000..9b4b3311f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js
@@ -0,0 +1,47 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const init_declarations_1 = __importDefault(require("eslint/lib/rules/init-declarations"));
+const util_1 = require("../util");
+exports.default = util_1.createRule({
+ name: 'init-declarations',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'require or disallow initialization in variable declarations',
+ category: 'Variables',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ schema: init_declarations_1.default.meta.schema,
+ messages: (_a = init_declarations_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ initialized: "Variable '{{idName}}' should be initialized on declaration.",
+ notInitialized: "Variable '{{idName}}' should not be initialized on declaration.",
+ },
+ },
+ defaultOptions: ['always'],
+ create(context) {
+ const rules = init_declarations_1.default.create(context);
+ const mode = context.options[0] || 'always';
+ return {
+ 'VariableDeclaration:exit'(node) {
+ var _a, _b, _c;
+ if (mode === 'always') {
+ if (node.declare) {
+ return;
+ }
+ if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.TSModuleBlock &&
+ ((_b = node.parent.parent) === null || _b === void 0 ? void 0 : _b.type) === experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration && ((_c = node.parent.parent) === null || _c === void 0 ? void 0 : _c.declare)) {
+ return;
+ }
+ }
+ rules['VariableDeclaration:exit'](node);
+ },
+ };
+ },
+});
+//# sourceMappingURL=init-declarations.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js.map
new file mode 100644
index 000000000..99bf077b7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/init-declarations.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"init-declarations.js","sourceRoot":"","sources":["../../src/rules/init-declarations.ts"],"names":[],"mappings":";;;;;;AAAA,8EAG+C;AAC/C,2FAA0D;AAC1D,kCAIiB;AAKjB,kBAAe,iBAAU,CAAsB;IAC7C,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,6DAA6D;YAC/D,QAAQ,EAAE,WAAW;YACrB,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE,2BAAQ,CAAC,IAAI,CAAC,MAAM;QAC5B,QAAQ,QAAE,2BAAQ,CAAC,IAAI,CAAC,QAAQ,mCAAI;YAClC,WAAW,EACT,6DAA6D;YAC/D,cAAc,EACZ,iEAAiE;SACpE;KACF;IACD,cAAc,EAAE,CAAC,QAAQ,CAAC;IAC1B,MAAM,CAAC,OAAO;QACZ,MAAM,KAAK,GAAG,2BAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,QAAQ,CAAC;QAE5C,OAAO;YACL,0BAA0B,CAAC,IAAkC;;gBAC3D,IAAI,IAAI,KAAK,QAAQ,EAAE;oBACrB,IAAI,IAAI,CAAC,OAAO,EAAE;wBAChB,OAAO;qBACR;oBACD,IACE,OAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,MAAK,mCAAc,CAAC,aAAa;wBAClD,OAAA,IAAI,CAAC,MAAM,CAAC,MAAM,0CAAE,IAAI,MAAK,mCAAc,CAAC,mBAAmB,WAC/D,IAAI,CAAC,MAAM,CAAC,MAAM,0CAAE,OAAO,CAAA,EAC3B;wBACA,OAAO;qBACR;iBACF;gBAED,KAAK,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,CAAC;YAC1C,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js
new file mode 100644
index 000000000..a0d987180
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js
@@ -0,0 +1,67 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const keyword_spacing_1 = __importDefault(require("eslint/lib/rules/keyword-spacing"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'keyword-spacing',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Enforce consistent spacing before and after keywords',
+ category: 'Stylistic Issues',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ fixable: 'whitespace',
+ schema: keyword_spacing_1.default.meta.schema,
+ messages: (_a = keyword_spacing_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ expectedBefore: 'Expected space(s) before "{{value}}".',
+ expectedAfter: 'Expected space(s) after "{{value}}".',
+ unexpectedBefore: 'Unexpected space(s) before "{{value}}".',
+ unexpectedAfter: 'Unexpected space(s) after "{{value}}".',
+ },
+ },
+ defaultOptions: [{}],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const baseRules = keyword_spacing_1.default.create(context);
+ return Object.assign(Object.assign({}, baseRules), { TSAsExpression(node) {
+ const asToken = util.nullThrows(sourceCode.getTokenAfter(node.expression, token => token.value === 'as'), util.NullThrowsReasons.MissingToken('as', node.type));
+ const oldTokenType = asToken.type;
+ // as is a contextual keyword, so it's always reported as an Identifier
+ // the rule looks for keyword tokens, so we temporarily override it
+ // we mutate it at the token level because the rule calls sourceCode.getFirstToken,
+ // so mutating a copy would not change the underlying copy returned by that method
+ asToken.type = experimental_utils_1.AST_TOKEN_TYPES.Keyword;
+ // use this selector just because it is just a call to `checkSpacingAroundFirstToken`
+ baseRules.DebuggerStatement(asToken);
+ // make sure to reset the type afterward so we don't permanently mutate the AST
+ asToken.type = oldTokenType;
+ } });
+ },
+});
+//# sourceMappingURL=keyword-spacing.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js.map
new file mode 100644
index 000000000..181f8eea5
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/keyword-spacing.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"keyword-spacing.js","sourceRoot":"","sources":["../../src/rules/keyword-spacing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAAwE;AACxE,uFAAwD;AACxD,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE;YACJ,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,OAAO,EAAE,YAAY;QACrB,MAAM,EAAE,yBAAQ,CAAC,IAAI,CAAC,MAAM;QAC5B,QAAQ,QAAE,yBAAQ,CAAC,IAAI,CAAC,QAAQ,mCAAI;YAClC,cAAc,EAAE,uCAAuC;YACvD,aAAa,EAAE,sCAAsC;YACrD,gBAAgB,EAAE,yCAAyC;YAC3D,eAAe,EAAE,wCAAwC;SAC1D;KACF;IACD,cAAc,EAAE,CAAC,EAAE,CAAC;IAEpB,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3C,MAAM,SAAS,GAAG,yBAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAC3C,uCACK,SAAS,KACZ,cAAc,CAAC,IAAI;gBACjB,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAC7B,UAAU,CAAC,aAAa,CACtB,IAAI,CAAC,UAAU,EACf,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAC9B,EACD,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CACrD,CAAC;gBACF,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;gBAClC,uEAAuE;gBACvE,mEAAmE;gBACnE,mFAAmF;gBACnF,kFAAkF;gBAClF,OAAO,CAAC,IAAI,GAAG,oCAAe,CAAC,OAAO,CAAC;gBAEvC,qFAAqF;gBACrF,SAAS,CAAC,iBAAiB,CAAC,OAAgB,CAAC,CAAC;gBAE9C,+EAA+E;gBAC/E,OAAO,CAAC,IAAI,GAAG,YAAY,CAAC;YAC9B,CAAC,IACD;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-between-class-members.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-between-class-members.js
new file mode 100644
index 000000000..7d55e4333
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-between-class-members.js
@@ -0,0 +1,79 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const lines_between_class_members_1 = __importDefault(require("eslint/lib/rules/lines-between-class-members"));
+const util = __importStar(require("../util"));
+const schema = util.deepMerge(Object.assign({}, lines_between_class_members_1.default.meta.schema), {
+ 1: {
+ exceptAfterOverload: {
+ type: 'booleean',
+ default: true,
+ },
+ },
+});
+exports.default = util.createRule({
+ name: 'lines-between-class-members',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Require or disallow an empty line between class members',
+ category: 'Stylistic Issues',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ fixable: 'whitespace',
+ schema,
+ messages: (_a = lines_between_class_members_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ never: 'Unexpected blank line between class members.',
+ always: 'Expected blank line between class members.',
+ },
+ },
+ defaultOptions: [
+ 'always',
+ {
+ exceptAfterOverload: true,
+ exceptAfterSingleLine: false,
+ },
+ ],
+ create(context, options) {
+ var _a;
+ const rules = lines_between_class_members_1.default.create(context);
+ const exceptAfterOverload = ((_a = options[1]) === null || _a === void 0 ? void 0 : _a.exceptAfterOverload) && options[0] === 'always';
+ function isOverload(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.MethodDefinition &&
+ node.value.type === experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression);
+ }
+ return {
+ ClassBody(node) {
+ const body = exceptAfterOverload
+ ? node.body.filter(node => !isOverload(node))
+ : node.body;
+ rules.ClassBody(Object.assign(Object.assign({}, node), { body }));
+ },
+ };
+ },
+});
+//# sourceMappingURL=lines-between-class-members.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-between-class-members.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-between-class-members.js.map
new file mode 100644
index 000000000..f8300c0e3
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/lines-between-class-members.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"lines-between-class-members.js","sour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O;YACL,SAAS,CAAC,IAAI;gBACZ,MAAM,IAAI,GAAG,mBAAmB;oBAC9B,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;oBAC7C,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;gBAEd,KAAK,CAAC,SAAS,iCAAM,IAAI,KAAE,IAAI,IAAG,CAAC;YACrC,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js
new file mode 100644
index 000000000..2faac1c36
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js
@@ -0,0 +1,208 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+const definition = {
+ type: 'object',
+ properties: {
+ multiline: {
+ type: 'object',
+ properties: {
+ delimiter: { enum: ['none', 'semi', 'comma'] },
+ requireLast: { type: 'boolean' },
+ },
+ additionalProperties: false,
+ },
+ singleline: {
+ type: 'object',
+ properties: {
+ // note can't have "none" for single line delimiter as it's invalid syntax
+ delimiter: { enum: ['semi', 'comma'] },
+ requireLast: { type: 'boolean' },
+ },
+ additionalProperties: false,
+ },
+ },
+ additionalProperties: false,
+};
+exports.default = util.createRule({
+ name: 'member-delimiter-style',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Require a specific member delimiter style for interfaces and type literals',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ fixable: 'code',
+ messages: {
+ unexpectedComma: 'Unexpected separator (,).',
+ unexpectedSemi: 'Unexpected separator (;).',
+ expectedComma: 'Expected a comma.',
+ expectedSemi: 'Expected a semicolon.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: Object.assign({}, definition.properties, {
+ overrides: {
+ type: 'object',
+ properties: {
+ interface: definition,
+ typeLiteral: definition,
+ },
+ additionalProperties: false,
+ },
+ }),
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ multiline: {
+ delimiter: 'semi',
+ requireLast: true,
+ },
+ singleline: {
+ delimiter: 'semi',
+ requireLast: false,
+ },
+ },
+ ],
+ create(context, [options]) {
+ var _a;
+ const sourceCode = context.getSourceCode();
+ // use the base options as the defaults for the cases
+ const baseOptions = options;
+ const overrides = (_a = baseOptions.overrides) !== null && _a !== void 0 ? _a : {};
+ const interfaceOptions = util.deepMerge(baseOptions, overrides.interface);
+ const typeLiteralOptions = util.deepMerge(baseOptions, overrides.typeLiteral);
+ /**
+ * Check the last token in the given member.
+ * @param member the member to be evaluated.
+ * @param opts the options to be validated.
+ * @param isLast a flag indicating `member` is the last in the interface or type literal.
+ */
+ function checkLastToken(member, opts, isLast) {
+ /**
+ * Resolves the boolean value for the given setting enum value
+ * @param type the option name
+ */
+ function getOption(type) {
+ if (isLast && !opts.requireLast) {
+ // only turn the option on if its expecting no delimiter for the last member
+ return type === 'none';
+ }
+ return opts.delimiter === type;
+ }
+ let messageId = null;
+ let missingDelimiter = false;
+ const lastToken = sourceCode.getLastToken(member, {
+ includeComments: false,
+ });
+ if (!lastToken) {
+ return;
+ }
+ const optsSemi = getOption('semi');
+ const optsComma = getOption('comma');
+ const optsNone = getOption('none');
+ if (lastToken.value === ';') {
+ if (optsComma) {
+ messageId = 'expectedComma';
+ }
+ else if (optsNone) {
+ missingDelimiter = true;
+ messageId = 'unexpectedSemi';
+ }
+ }
+ else if (lastToken.value === ',') {
+ if (optsSemi) {
+ messageId = 'expectedSemi';
+ }
+ else if (optsNone) {
+ missingDelimiter = true;
+ messageId = 'unexpectedComma';
+ }
+ }
+ else {
+ if (optsSemi) {
+ missingDelimiter = true;
+ messageId = 'expectedSemi';
+ }
+ else if (optsComma) {
+ missingDelimiter = true;
+ messageId = 'expectedComma';
+ }
+ }
+ if (messageId) {
+ context.report({
+ node: lastToken,
+ loc: {
+ start: {
+ line: lastToken.loc.end.line,
+ column: lastToken.loc.end.column,
+ },
+ end: {
+ line: lastToken.loc.end.line,
+ column: lastToken.loc.end.column,
+ },
+ },
+ messageId,
+ fix(fixer) {
+ if (optsNone) {
+ // remove the unneeded token
+ return fixer.remove(lastToken);
+ }
+ const token = optsSemi ? ';' : ',';
+ if (missingDelimiter) {
+ // add the missing delimiter
+ return fixer.insertTextAfter(lastToken, token);
+ }
+ // correct the current delimiter
+ return fixer.replaceText(lastToken, token);
+ },
+ });
+ }
+ }
+ /**
+ * Check the member separator being used matches the delimiter.
+ * @param {ASTNode} node the node to be evaluated.
+ */
+ function checkMemberSeparatorStyle(node) {
+ const isSingleLine = node.loc.start.line === node.loc.end.line;
+ const members = node.type === experimental_utils_1.AST_NODE_TYPES.TSInterfaceBody ? node.body : node.members;
+ const typeOpts = node.type === experimental_utils_1.AST_NODE_TYPES.TSInterfaceBody
+ ? interfaceOptions
+ : typeLiteralOptions;
+ const opts = isSingleLine ? typeOpts.singleline : typeOpts.multiline;
+ members.forEach((member, index) => {
+ checkLastToken(member, opts !== null && opts !== void 0 ? opts : {}, index === members.length - 1);
+ });
+ }
+ return {
+ TSInterfaceBody: checkMemberSeparatorStyle,
+ TSTypeLiteral: checkMemberSeparatorStyle,
+ };
+ },
+});
+//# sourceMappingURL=member-delimiter-style.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js.map
new file mode 100644
index 000000000..f48cf7b4e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-delimiter-style.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"member-delimiter-style.js","sourceRoot":"","sources":["../../src/rules/member-delimiter-style.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AA2BhC,MAAM,UAAU,GAAG;IACjB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;gBAC9C,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;aACjC;YACD,oBAAoB,EAAE,KAAK;SAC5B;QACD,UAAU,EAAE;YACV,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,0EAA0E;gBAC1E,SAAS,EAAE,EAAE,IAAI,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE;gBACtC,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;aACjC;YACD,oBAAoB,EAAE,KAAK;SAC5B;KACF;IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAC;AAEF,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT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C,IAAI,KAAK,mCAAc,CAAC,eAAe;gBAC1C,CAAC,CAAC,gBAAgB;gBAClB,CAAC,CAAC,kBAAkB,CAAC;YACzB,MAAM,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC;YAErE,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;gBAChC,cAAc,CAAC,MAAM,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,EAAE,KAAK,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YACnE,CAAC,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,eAAe,EAAE,yBAAyB;YAC1C,aAAa,EAAE,yBAAyB;SACzC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js
new file mode 100644
index 000000000..2dbbe7df7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js
@@ -0,0 +1,468 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.defaultOrder = void 0;
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+const neverConfig = {
+ type: 'string',
+ enum: ['never'],
+};
+const arrayConfig = (memberTypes) => ({
+ type: 'array',
+ items: {
+ enum: memberTypes,
+ },
+});
+const objectConfig = (memberTypes) => ({
+ type: 'object',
+ properties: {
+ memberTypes: {
+ oneOf: [arrayConfig(memberTypes), neverConfig],
+ },
+ order: {
+ type: 'string',
+ enum: ['alphabetically', 'as-written'],
+ },
+ },
+ additionalProperties: false,
+});
+exports.defaultOrder = [
+ // Index signature
+ 'signature',
+ // Fields
+ 'public-static-field',
+ 'protected-static-field',
+ 'private-static-field',
+ 'public-decorated-field',
+ 'protected-decorated-field',
+ 'private-decorated-field',
+ 'public-instance-field',
+ 'protected-instance-field',
+ 'private-instance-field',
+ 'public-abstract-field',
+ 'protected-abstract-field',
+ 'private-abstract-field',
+ 'public-field',
+ 'protected-field',
+ 'private-field',
+ 'static-field',
+ 'instance-field',
+ 'abstract-field',
+ 'decorated-field',
+ 'field',
+ // Constructors
+ 'public-constructor',
+ 'protected-constructor',
+ 'private-constructor',
+ 'constructor',
+ // Methods
+ 'public-static-method',
+ 'protected-static-method',
+ 'private-static-method',
+ 'public-decorated-method',
+ 'protected-decorated-method',
+ 'private-decorated-method',
+ 'public-instance-method',
+ 'protected-instance-method',
+ 'private-instance-method',
+ 'public-abstract-method',
+ 'protected-abstract-method',
+ 'private-abstract-method',
+ 'public-method',
+ 'protected-method',
+ 'private-method',
+ 'static-method',
+ 'instance-method',
+ 'abstract-method',
+ 'decorated-method',
+ 'method',
+];
+const allMemberTypes = ['signature', 'field', 'method', 'constructor'].reduce((all, type) => {
+ all.push(type);
+ ['public', 'protected', 'private'].forEach(accessibility => {
+ if (type !== 'signature') {
+ all.push(`${accessibility}-${type}`); // e.g. `public-field`
+ }
+ // Only class instance fields and methods can have decorators attached to them
+ if (type === 'field' || type === 'method') {
+ const decoratedMemberType = `${accessibility}-decorated-${type}`;
+ const decoratedMemberTypeNoAccessibility = `decorated-${type}`;
+ if (!all.includes(decoratedMemberType)) {
+ all.push(decoratedMemberType);
+ }
+ if (!all.includes(decoratedMemberTypeNoAccessibility)) {
+ all.push(decoratedMemberTypeNoAccessibility);
+ }
+ }
+ if (type !== 'constructor' && type !== 'signature') {
+ // There is no `static-constructor` or `instance-constructor` or `abstract-constructor`
+ ['static', 'instance', 'abstract'].forEach(scope => {
+ if (!all.includes(`${scope}-${type}`)) {
+ all.push(`${scope}-${type}`);
+ }
+ all.push(`${accessibility}-${scope}-${type}`);
+ });
+ }
+ });
+ return all;
+}, []);
+const functionExpressions = [
+ experimental_utils_1.AST_NODE_TYPES.FunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression,
+];
+/**
+ * Gets the node type.
+ *
+ * @param node the node to be evaluated.
+ */
+function getNodeType(node) {
+ // TODO: add missing TSCallSignatureDeclaration
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition:
+ case experimental_utils_1.AST_NODE_TYPES.MethodDefinition:
+ return node.kind;
+ case experimental_utils_1.AST_NODE_TYPES.TSMethodSignature:
+ return 'method';
+ case experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration:
+ return 'constructor';
+ case experimental_utils_1.AST_NODE_TYPES.TSAbstractClassProperty:
+ case experimental_utils_1.AST_NODE_TYPES.ClassProperty:
+ return node.value && functionExpressions.includes(node.value.type)
+ ? 'method'
+ : 'field';
+ case experimental_utils_1.AST_NODE_TYPES.TSPropertySignature:
+ return 'field';
+ case experimental_utils_1.AST_NODE_TYPES.TSIndexSignature:
+ return 'signature';
+ default:
+ return null;
+ }
+}
+/**
+ * Gets the member name based on the member type.
+ *
+ * @param node the node to be evaluated.
+ * @param sourceCode
+ */
+function getMemberName(node, sourceCode) {
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSPropertySignature:
+ case experimental_utils_1.AST_NODE_TYPES.TSMethodSignature:
+ case experimental_utils_1.AST_NODE_TYPES.TSAbstractClassProperty:
+ case experimental_utils_1.AST_NODE_TYPES.ClassProperty:
+ return util.getNameFromMember(node, sourceCode);
+ case experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition:
+ case experimental_utils_1.AST_NODE_TYPES.MethodDefinition:
+ return node.kind === 'constructor'
+ ? 'constructor'
+ : util.getNameFromMember(node, sourceCode);
+ case experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration:
+ return 'new';
+ case experimental_utils_1.AST_NODE_TYPES.TSIndexSignature:
+ return util.getNameFromIndexSignature(node);
+ default:
+ return null;
+ }
+}
+/**
+ * Gets the calculated rank using the provided method definition.
+ * The algorithm is as follows:
+ * - Get the rank based on the accessibility-scope-type name, e.g. public-instance-field
+ * - If there is no order for accessibility-scope-type, then strip out the accessibility.
+ * - If there is no order for scope-type, then strip out the scope.
+ * - If there is no order for type, then return -1
+ * @param memberGroups the valid names to be validated.
+ * @param orderConfig the current order to be validated.
+ *
+ * @return Index of the matching member type in the order configuration.
+ */
+function getRankOrder(memberGroups, orderConfig) {
+ let rank = -1;
+ const stack = memberGroups.slice(); // Get a copy of the member groups
+ while (stack.length > 0 && rank === -1) {
+ rank = orderConfig.indexOf(stack.shift());
+ }
+ return rank;
+}
+/**
+ * Gets the rank of the node given the order.
+ * @param node the node to be evaluated.
+ * @param orderConfig the current order to be validated.
+ * @param supportsModifiers a flag indicating whether the type supports modifiers (scope or accessibility) or not.
+ */
+function getRank(node, orderConfig, supportsModifiers) {
+ const type = getNodeType(node);
+ if (type === null) {
+ // shouldn't happen but just in case, put it on the end
+ return orderConfig.length - 1;
+ }
+ const abstract = node.type === experimental_utils_1.AST_NODE_TYPES.TSAbstractClassProperty ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition;
+ const scope = 'static' in node && node.static
+ ? 'static'
+ : abstract
+ ? 'abstract'
+ : 'instance';
+ const accessibility = 'accessibility' in node && node.accessibility
+ ? node.accessibility
+ : 'public';
+ // Collect all existing member groups (e.g. 'public-instance-field', 'instance-field', 'public-field', 'constructor' etc.)
+ const memberGroups = [];
+ if (supportsModifiers) {
+ const decorated = 'decorators' in node && node.decorators.length > 0;
+ if (decorated && (type === 'field' || type === 'method')) {
+ memberGroups.push(`${accessibility}-decorated-${type}`);
+ memberGroups.push(`decorated-${type}`);
+ }
+ if (type !== 'constructor') {
+ // Constructors have no scope
+ memberGroups.push(`${accessibility}-${scope}-${type}`);
+ memberGroups.push(`${scope}-${type}`);
+ }
+ memberGroups.push(`${accessibility}-${type}`);
+ }
+ memberGroups.push(type);
+ return getRankOrder(memberGroups, orderConfig);
+}
+/**
+ * Gets the lowest possible rank higher than target.
+ * e.g. given the following order:
+ * ...
+ * public-static-method
+ * protected-static-method
+ * private-static-method
+ * public-instance-method
+ * protected-instance-method
+ * private-instance-method
+ * ...
+ * and considering that a public-instance-method has already been declared, so ranks contains
+ * public-instance-method, then the lowest possible rank for public-static-method is
+ * public-instance-method.
+ * @param ranks the existing ranks in the object.
+ * @param target the target rank.
+ * @param order the current order to be validated.
+ * @returns the name of the lowest possible rank without dashes (-).
+ */
+function getLowestRank(ranks, target, order) {
+ let lowest = ranks[ranks.length - 1];
+ ranks.forEach(rank => {
+ if (rank > target) {
+ lowest = Math.min(lowest, rank);
+ }
+ });
+ return order[lowest].replace(/-/g, ' ');
+}
+exports.default = util.createRule({
+ name: 'member-ordering',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Require a consistent member declaration order',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ messages: {
+ incorrectOrder: 'Member "{{member}}" should be declared before member "{{beforeMember}}".',
+ incorrectGroupOrder: 'Member {{name}} should be declared before all {{rank}} definitions.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ default: {
+ oneOf: [
+ neverConfig,
+ arrayConfig(allMemberTypes),
+ objectConfig(allMemberTypes),
+ ],
+ },
+ classes: {
+ oneOf: [
+ neverConfig,
+ arrayConfig(allMemberTypes),
+ objectConfig(allMemberTypes),
+ ],
+ },
+ classExpressions: {
+ oneOf: [
+ neverConfig,
+ arrayConfig(allMemberTypes),
+ objectConfig(allMemberTypes),
+ ],
+ },
+ interfaces: {
+ oneOf: [
+ neverConfig,
+ arrayConfig(['signature', 'field', 'method', 'constructor']),
+ objectConfig(['signature', 'field', 'method', 'constructor']),
+ ],
+ },
+ typeLiterals: {
+ oneOf: [
+ neverConfig,
+ arrayConfig(['signature', 'field', 'method', 'constructor']),
+ objectConfig(['signature', 'field', 'method', 'constructor']),
+ ],
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ default: exports.defaultOrder,
+ },
+ ],
+ create(context, [options]) {
+ /**
+ * Checks if the member groups are correctly sorted.
+ *
+ * @param members Members to be validated.
+ * @param groupOrder Group order to be validated.
+ * @param supportsModifiers A flag indicating whether the type supports modifiers (scope or accessibility) or not.
+ *
+ * @return Array of member groups or null if one of the groups is not correctly sorted.
+ */
+ function checkGroupSort(members, groupOrder, supportsModifiers) {
+ const previousRanks = [];
+ const memberGroups = [];
+ let isCorrectlySorted = true;
+ // Find first member which isn't correctly sorted
+ members.forEach(member => {
+ const rank = getRank(member, groupOrder, supportsModifiers);
+ const name = getMemberName(member, context.getSourceCode());
+ const rankLastMember = previousRanks[previousRanks.length - 1];
+ if (rank === -1) {
+ return;
+ }
+ // Works for 1st item because x < undefined === false for any x (typeof string)
+ if (rank < rankLastMember) {
+ context.report({
+ node: member,
+ messageId: 'incorrectGroupOrder',
+ data: {
+ name,
+ rank: getLowestRank(previousRanks, rank, groupOrder),
+ },
+ });
+ isCorrectlySorted = false;
+ }
+ else if (rank === rankLastMember) {
+ // Same member group --> Push to existing member group array
+ memberGroups[memberGroups.length - 1].push(member);
+ }
+ else {
+ // New member group --> Create new member group array
+ previousRanks.push(rank);
+ memberGroups.push([member]);
+ }
+ });
+ return isCorrectlySorted ? memberGroups : null;
+ }
+ /**
+ * Checks if the members are alphabetically sorted.
+ *
+ * @param members Members to be validated.
+ *
+ * @return True if all members are correctly sorted.
+ */
+ function checkAlphaSort(members) {
+ let previousName = '';
+ let isCorrectlySorted = true;
+ // Find first member which isn't correctly sorted
+ members.forEach(member => {
+ const name = getMemberName(member, context.getSourceCode());
+ // Note: Not all members have names
+ if (name) {
+ if (name < previousName) {
+ context.report({
+ node: member,
+ messageId: 'incorrectOrder',
+ data: {
+ member: name,
+ beforeMember: previousName,
+ },
+ });
+ isCorrectlySorted = false;
+ }
+ previousName = name;
+ }
+ });
+ return isCorrectlySorted;
+ }
+ /**
+ * Validates if all members are correctly sorted.
+ *
+ * @param members Members to be validated.
+ * @param orderConfig Order config to be validated.
+ * @param supportsModifiers A flag indicating whether the type supports modifiers (scope or accessibility) or not.
+ */
+ function validateMembersOrder(members, orderConfig, supportsModifiers) {
+ if (orderConfig === 'never') {
+ return;
+ }
+ // Standardize config
+ let order = null;
+ let memberTypes;
+ if (Array.isArray(orderConfig)) {
+ memberTypes = orderConfig;
+ }
+ else {
+ order = orderConfig.order;
+ memberTypes = orderConfig.memberTypes;
+ }
+ // Check order
+ if (Array.isArray(memberTypes)) {
+ const grouped = checkGroupSort(members, memberTypes, supportsModifiers);
+ if (grouped === null) {
+ return;
+ }
+ if (order === 'alphabetically') {
+ grouped.some(groupMember => !checkAlphaSort(groupMember));
+ }
+ }
+ else if (order === 'alphabetically') {
+ checkAlphaSort(members);
+ }
+ }
+ return {
+ ClassDeclaration(node) {
+ var _a;
+ validateMembersOrder(node.body.body, (_a = options.classes) !== null && _a !== void 0 ? _a : options.default, true);
+ },
+ ClassExpression(node) {
+ var _a;
+ validateMembersOrder(node.body.body, (_a = options.classExpressions) !== null && _a !== void 0 ? _a : options.default, true);
+ },
+ TSInterfaceDeclaration(node) {
+ var _a;
+ validateMembersOrder(node.body.body, (_a = options.interfaces) !== null && _a !== void 0 ? _a : options.default, false);
+ },
+ TSTypeLiteral(node) {
+ var _a;
+ validateMembersOrder(node.members, (_a = options.typeLiterals) !== null && _a !== void 0 ? _a : options.default, false);
+ },
+ };
+ },
+});
+//# sourceMappingURL=member-ordering.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map
new file mode 100644
index 000000000..912eb4b43
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/member-ordering.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"member-ordering.js","sourceRoot":"","sources":["../../src/rules/member-ordering.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,8EAK+C;AAC/C,8CAAgC;AAsBhC,MAAM,WAAW,GAA2B;IAC1C,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,CAAC,OAAO,CAAC;CAChB,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,WAAqB,EAA0B,EAAE,CAAC,CAAC;IACtE,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACL,IAAI,EAAE,WAAW;KAClB;CACF,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,CAAC,WAAqB,EAA0B,EAAE,CAAC,CAAC;IACvE,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACV,WAAW,EAAE;YACX,KAAK,EAAE,CAAC,WAAW,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC;SAC/C;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,gBAAgB,EAAE,YAAY,CAAC;SACvC;KACF;IACD,oBAAoB,EAAE,KAAK;CAC5B,CAAC,CAAC;AAEU,QAAA,YAAY,GAAG;IAC1B,kBAAkB;IAClB,WAAW;IAEX,SAAS;IACT,qBAAqB;IACrB,wBAAwB;IACxB,sBAAsB;IAEtB,wBAAwB;IACxB,2BAA2B;IAC3B,yBAAyB;IAEzB,uBA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,CAAC;aACzB;QACH,CAAC;QAED,OAAO;YACL,gBAAgB,CAAC,IAAI;;gBACnB,oBAAoB,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,QACd,OAAO,CAAC,OAAO,mCAAI,OAAO,CAAC,OAAQ,EACnC,IAAI,CACL,CAAC;YACJ,CAAC;YACD,eAAe,CAAC,IAAI;;gBAClB,oBAAoB,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,QACd,OAAO,CAAC,gBAAgB,mCAAI,OAAO,CAAC,OAAQ,EAC5C,IAAI,CACL,CAAC;YACJ,CAAC;YACD,sBAAsB,CAAC,IAAI;;gBACzB,oBAAoB,CAClB,IAAI,CAAC,IAAI,CAAC,IAAI,QACd,OAAO,CAAC,UAAU,mCAAI,OAAO,CAAC,OAAQ,EACtC,KAAK,CACN,CAAC;YACJ,CAAC;YACD,aAAa,CAAC,IAAI;;gBAChB,oBAAoB,CAClB,IAAI,CAAC,OAAO,QACZ,OAAO,CAAC,YAAY,mCAAI,OAAO,CAAC,OAAQ,EACxC,KAAK,CACN,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js
new file mode 100644
index 000000000..f73a0173d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js
@@ -0,0 +1,162 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'method-signature-style',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Enforces using a particular method signature syntax.',
+ category: 'Best Practices',
+ recommended: false,
+ },
+ fixable: 'code',
+ messages: {
+ errorMethod: 'Shorthand method signature is forbidden. Use a function property instead.',
+ errorProperty: 'Function property signature is forbidden. Use a method shorthand instead.',
+ },
+ schema: [
+ {
+ enum: ['property', 'method'],
+ },
+ ],
+ },
+ defaultOptions: ['property'],
+ create(context, [mode]) {
+ const sourceCode = context.getSourceCode();
+ function getMethodKey(node) {
+ let key = sourceCode.getText(node.key);
+ if (node.computed) {
+ key = `[${key}]`;
+ }
+ if (node.optional) {
+ key = `${key}?`;
+ }
+ if (node.readonly) {
+ key = `readonly ${key}`;
+ }
+ return key;
+ }
+ function getMethodParams(node) {
+ let params = '()';
+ if (node.params.length > 0) {
+ const openingParen = util.nullThrows(sourceCode.getTokenBefore(node.params[0], util.isOpeningParenToken), 'Missing opening paren before first parameter');
+ const closingParen = util.nullThrows(sourceCode.getTokenAfter(node.params[node.params.length - 1], util.isClosingParenToken), 'Missing closing paren after last parameter');
+ params = sourceCode.text.substring(openingParen.range[0], closingParen.range[1]);
+ }
+ if (node.typeParameters != null) {
+ const typeParams = sourceCode.getText(node.typeParameters);
+ params = `${typeParams}${params}`;
+ }
+ return params;
+ }
+ function getMethodReturnType(node) {
+ return sourceCode.getText(node.returnType.typeAnnotation);
+ }
+ function getDelimiter(node) {
+ const lastToken = sourceCode.getLastToken(node);
+ if (lastToken &&
+ (util.isSemicolonToken(lastToken) || util.isCommaToken(lastToken))) {
+ return lastToken.value;
+ }
+ return '';
+ }
+ return {
+ TSMethodSignature(methodNode) {
+ var _a;
+ if (mode === 'method') {
+ return;
+ }
+ const duplicatedKeyMethodNodes = ((_a = methodNode.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.TSInterfaceBody
+ ? methodNode.parent.body.filter((element) => element.type === experimental_utils_1.AST_NODE_TYPES.TSMethodSignature &&
+ element !== methodNode &&
+ getMethodKey(element) === getMethodKey(methodNode))
+ : [];
+ if (duplicatedKeyMethodNodes.length > 0) {
+ context.report({
+ node: methodNode,
+ messageId: 'errorMethod',
+ *fix(fixer) {
+ const methodNodes = [
+ methodNode,
+ ...duplicatedKeyMethodNodes,
+ ].sort((a, b) => (a.range[0] < b.range[0] ? -1 : 1));
+ const typeString = methodNodes.reduce((str, node, idx, nodes) => {
+ const params = getMethodParams(node);
+ const returnType = getMethodReturnType(node);
+ return `${str}(${params} => ${returnType})${idx !== nodes.length - 1 ? ' & ' : ''}`;
+ }, '');
+ const key = getMethodKey(methodNode);
+ const delimiter = getDelimiter(methodNode);
+ yield fixer.replaceText(methodNode, `${key}: ${typeString}${delimiter}`);
+ for (const node of duplicatedKeyMethodNodes) {
+ const lastToken = sourceCode.getLastToken(node);
+ if (lastToken) {
+ const nextToken = sourceCode.getTokenAfter(lastToken);
+ if (nextToken) {
+ yield fixer.remove(node);
+ yield fixer.replaceTextRange([lastToken.range[1], nextToken.range[0]], '');
+ }
+ }
+ }
+ },
+ });
+ return;
+ }
+ context.report({
+ node: methodNode,
+ messageId: 'errorMethod',
+ fix: fixer => {
+ const key = getMethodKey(methodNode);
+ const params = getMethodParams(methodNode);
+ const returnType = getMethodReturnType(methodNode);
+ const delimiter = getDelimiter(methodNode);
+ return fixer.replaceText(methodNode, `${key}: ${params} => ${returnType}${delimiter}`);
+ },
+ });
+ },
+ TSPropertySignature(propertyNode) {
+ var _a;
+ const typeNode = (_a = propertyNode.typeAnnotation) === null || _a === void 0 ? void 0 : _a.typeAnnotation;
+ if ((typeNode === null || typeNode === void 0 ? void 0 : typeNode.type) !== experimental_utils_1.AST_NODE_TYPES.TSFunctionType) {
+ return;
+ }
+ if (mode === 'property') {
+ return;
+ }
+ context.report({
+ node: propertyNode,
+ messageId: 'errorProperty',
+ fix: fixer => {
+ const key = getMethodKey(propertyNode);
+ const params = getMethodParams(typeNode);
+ const returnType = getMethodReturnType(typeNode);
+ const delimiter = getDelimiter(propertyNode);
+ return fixer.replaceText(propertyNode, `${key}${params}: ${returnType}${delimiter}`);
+ },
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=method-signature-style.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js.map
new file mode 100644
index 000000000..e7081d2cf
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/method-signature-style.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"method-signature-style.js","sourceRoot":"","sources":["../../src/rules/method-signature-style.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,sDAAsD;YACnE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;SACnB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,WAAW,EACT,2EAA2E;YAC7E,aAAa,EACX,2EAA2E;SAC9E;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,CAAC,UAAU,EAAE,QAAQ,CAAC;aAC7B;SACF;KACF;IACD,cAAc,EAAE,CAAC,UAAU,CAAC;IAE5B,MAAM,CAAC,OAAO,EAAE,CAAC,I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CAAC,WAAW,CACtB,YAAY,EACZ,GAAG,GAAG,GAAG,MAAM,KAAK,UAAU,GAAG,SAAS,EAAE,CAC7C,CAAC;oBACJ,CAAC;iBACF,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js
new file mode 100644
index 000000000..212c77311
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js
@@ -0,0 +1,999 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.selectorTypeToMessageString = void 0;
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+// #region Options Type Config
+var PredefinedFormats;
+(function (PredefinedFormats) {
+ PredefinedFormats[PredefinedFormats["camelCase"] = 1] = "camelCase";
+ PredefinedFormats[PredefinedFormats["strictCamelCase"] = 2] = "strictCamelCase";
+ PredefinedFormats[PredefinedFormats["PascalCase"] = 4] = "PascalCase";
+ PredefinedFormats[PredefinedFormats["StrictPascalCase"] = 8] = "StrictPascalCase";
+ PredefinedFormats[PredefinedFormats["snake_case"] = 16] = "snake_case";
+ PredefinedFormats[PredefinedFormats["UPPER_CASE"] = 32] = "UPPER_CASE";
+})(PredefinedFormats || (PredefinedFormats = {}));
+var UnderscoreOptions;
+(function (UnderscoreOptions) {
+ UnderscoreOptions[UnderscoreOptions["forbid"] = 1] = "forbid";
+ UnderscoreOptions[UnderscoreOptions["allow"] = 2] = "allow";
+ UnderscoreOptions[UnderscoreOptions["require"] = 4] = "require";
+})(UnderscoreOptions || (UnderscoreOptions = {}));
+var Selectors;
+(function (Selectors) {
+ // variableLike
+ Selectors[Selectors["variable"] = 1] = "variable";
+ Selectors[Selectors["function"] = 2] = "function";
+ Selectors[Selectors["parameter"] = 4] = "parameter";
+ // memberLike
+ Selectors[Selectors["property"] = 8] = "property";
+ Selectors[Selectors["parameterProperty"] = 16] = "parameterProperty";
+ Selectors[Selectors["method"] = 32] = "method";
+ Selectors[Selectors["accessor"] = 64] = "accessor";
+ Selectors[Selectors["enumMember"] = 128] = "enumMember";
+ // typeLike
+ Selectors[Selectors["class"] = 256] = "class";
+ Selectors[Selectors["interface"] = 512] = "interface";
+ Selectors[Selectors["typeAlias"] = 1024] = "typeAlias";
+ Selectors[Selectors["enum"] = 2048] = "enum";
+ Selectors[Selectors["typeParameter"] = 4096] = "typeParameter";
+})(Selectors || (Selectors = {}));
+const SELECTOR_COUNT = util.getEnumNames(Selectors).length;
+var MetaSelectors;
+(function (MetaSelectors) {
+ MetaSelectors[MetaSelectors["default"] = -1] = "default";
+ MetaSelectors[MetaSelectors["variableLike"] = 7] = "variableLike";
+ MetaSelectors[MetaSelectors["memberLike"] = 248] = "memberLike";
+ MetaSelectors[MetaSelectors["typeLike"] = 7936] = "typeLike";
+})(MetaSelectors || (MetaSelectors = {}));
+var Modifiers;
+(function (Modifiers) {
+ Modifiers[Modifiers["const"] = 1] = "const";
+ Modifiers[Modifiers["readonly"] = 2] = "readonly";
+ Modifiers[Modifiers["static"] = 4] = "static";
+ Modifiers[Modifiers["public"] = 8] = "public";
+ Modifiers[Modifiers["protected"] = 16] = "protected";
+ Modifiers[Modifiers["private"] = 32] = "private";
+ Modifiers[Modifiers["abstract"] = 64] = "abstract";
+})(Modifiers || (Modifiers = {}));
+var TypeModifiers;
+(function (TypeModifiers) {
+ TypeModifiers[TypeModifiers["boolean"] = 1024] = "boolean";
+ TypeModifiers[TypeModifiers["string"] = 2048] = "string";
+ TypeModifiers[TypeModifiers["number"] = 4096] = "number";
+ TypeModifiers[TypeModifiers["function"] = 8192] = "function";
+ TypeModifiers[TypeModifiers["array"] = 16384] = "array";
+})(TypeModifiers || (TypeModifiers = {}));
+// #endregion Options Type Config
+// #region Schema Config
+const UNDERSCORE_SCHEMA = {
+ type: 'string',
+ enum: util.getEnumNames(UnderscoreOptions),
+};
+const PREFIX_SUFFIX_SCHEMA = {
+ type: 'array',
+ items: {
+ type: 'string',
+ minLength: 1,
+ },
+ additionalItems: false,
+};
+const MATCH_REGEX_SCHEMA = {
+ type: 'object',
+ properties: {
+ match: { type: 'boolean' },
+ regex: { type: 'string' },
+ },
+ required: ['match', 'regex'],
+};
+const FORMAT_OPTIONS_PROPERTIES = {
+ format: {
+ oneOf: [
+ {
+ type: 'array',
+ items: {
+ type: 'string',
+ enum: util.getEnumNames(PredefinedFormats),
+ },
+ additionalItems: false,
+ },
+ {
+ type: 'null',
+ },
+ ],
+ },
+ custom: MATCH_REGEX_SCHEMA,
+ leadingUnderscore: UNDERSCORE_SCHEMA,
+ trailingUnderscore: UNDERSCORE_SCHEMA,
+ prefix: PREFIX_SUFFIX_SCHEMA,
+ suffix: PREFIX_SUFFIX_SCHEMA,
+};
+function selectorSchema(selectorString, allowType, modifiers) {
+ const selector = {
+ filter: {
+ oneOf: [
+ {
+ type: 'string',
+ minLength: 1,
+ },
+ MATCH_REGEX_SCHEMA,
+ ],
+ },
+ selector: {
+ type: 'string',
+ enum: [selectorString],
+ },
+ };
+ if (modifiers && modifiers.length > 0) {
+ selector.modifiers = {
+ type: 'array',
+ items: {
+ type: 'string',
+ enum: modifiers,
+ },
+ additionalItems: false,
+ };
+ }
+ if (allowType) {
+ selector.types = {
+ type: 'array',
+ items: {
+ type: 'string',
+ enum: util.getEnumNames(TypeModifiers),
+ },
+ additionalItems: false,
+ };
+ }
+ return [
+ {
+ type: 'object',
+ properties: Object.assign(Object.assign({}, FORMAT_OPTIONS_PROPERTIES), selector),
+ required: ['selector', 'format'],
+ additionalProperties: false,
+ },
+ ];
+}
+function selectorsSchema() {
+ return {
+ type: 'object',
+ properties: Object.assign(Object.assign({}, FORMAT_OPTIONS_PROPERTIES), {
+ filter: {
+ oneOf: [
+ {
+ type: 'string',
+ minLength: 1,
+ },
+ MATCH_REGEX_SCHEMA,
+ ],
+ },
+ selector: {
+ type: 'array',
+ items: {
+ type: 'string',
+ enum: [
+ ...util.getEnumNames(MetaSelectors),
+ ...util.getEnumNames(Selectors),
+ ],
+ },
+ additionalItems: false,
+ },
+ }),
+ modifiers: {
+ type: 'array',
+ items: {
+ type: 'string',
+ enum: util.getEnumNames(Modifiers),
+ },
+ additionalItems: false,
+ },
+ types: {
+ type: 'array',
+ items: {
+ type: 'string',
+ enum: util.getEnumNames(TypeModifiers),
+ },
+ additionalItems: false,
+ },
+ required: ['selector', 'format'],
+ additionalProperties: false,
+ };
+}
+const SCHEMA = {
+ type: 'array',
+ items: {
+ oneOf: [
+ selectorsSchema(),
+ ...selectorSchema('default', false, util.getEnumNames(Modifiers)),
+ ...selectorSchema('variableLike', false),
+ ...selectorSchema('variable', true, ['const']),
+ ...selectorSchema('function', false),
+ ...selectorSchema('parameter', true),
+ ...selectorSchema('memberLike', false, [
+ 'private',
+ 'protected',
+ 'public',
+ 'static',
+ 'readonly',
+ 'abstract',
+ ]),
+ ...selectorSchema('property', true, [
+ 'private',
+ 'protected',
+ 'public',
+ 'static',
+ 'readonly',
+ 'abstract',
+ ]),
+ ...selectorSchema('parameterProperty', true, [
+ 'private',
+ 'protected',
+ 'public',
+ 'readonly',
+ ]),
+ ...selectorSchema('method', false, [
+ 'private',
+ 'protected',
+ 'public',
+ 'static',
+ 'abstract',
+ ]),
+ ...selectorSchema('accessor', true, [
+ 'private',
+ 'protected',
+ 'public',
+ 'static',
+ 'abstract',
+ ]),
+ ...selectorSchema('enumMember', false),
+ ...selectorSchema('typeLike', false, ['abstract']),
+ ...selectorSchema('class', false, ['abstract']),
+ ...selectorSchema('interface', false),
+ ...selectorSchema('typeAlias', false),
+ ...selectorSchema('enum', false),
+ ...selectorSchema('typeParameter', false),
+ ],
+ },
+ additionalItems: false,
+};
+// #endregion Schema Config
+// This essentially mirrors ESLint's `camelcase` rule
+// note that that rule ignores leading and trailing underscores and only checks those in the middle of a variable name
+const defaultCamelCaseAllTheThingsConfig = [
+ {
+ selector: 'default',
+ format: ['camelCase'],
+ leadingUnderscore: 'allow',
+ trailingUnderscore: 'allow',
+ },
+ {
+ selector: 'variable',
+ format: ['camelCase', 'UPPER_CASE'],
+ leadingUnderscore: 'allow',
+ trailingUnderscore: 'allow',
+ },
+ {
+ selector: 'typeLike',
+ format: ['PascalCase'],
+ },
+];
+exports.default = util.createRule({
+ name: 'naming-convention',
+ meta: {
+ docs: {
+ category: 'Variables',
+ description: 'Enforces naming conventions for everything across a codebase',
+ recommended: false,
+ // technically only requires type checking if the user uses "type" modifiers
+ requiresTypeChecking: true,
+ },
+ type: 'suggestion',
+ messages: {
+ unexpectedUnderscore: '{{type}} name `{{name}}` must not have a {{position}} underscore.',
+ missingUnderscore: '{{type}} name `{{name}}` must have a {{position}} underscore.',
+ missingAffix: '{{type}} name `{{name}}` must have one of the following {{position}}es: {{affixes}}',
+ satisfyCustom: '{{type}} name `{{name}}` must {{regexMatch}} the RegExp: {{regex}}',
+ doesNotMatchFormat: '{{type}} name `{{name}}` must match one of the following formats: {{formats}}',
+ doesNotMatchFormatTrimmed: '{{type}} name `{{name}}` trimmed as `{{processedName}}` must match one of the following formats: {{formats}}',
+ },
+ schema: SCHEMA,
+ },
+ defaultOptions: defaultCamelCaseAllTheThingsConfig,
+ create(contextWithoutDefaults) {
+ const context = contextWithoutDefaults.options &&
+ contextWithoutDefaults.options.length > 0
+ ? contextWithoutDefaults
+ : // only apply the defaults when the user provides no config
+ Object.setPrototypeOf({
+ options: defaultCamelCaseAllTheThingsConfig,
+ }, contextWithoutDefaults);
+ const validators = parseOptions(context);
+ function handleMember(validator, node, modifiers) {
+ if (!validator) {
+ return;
+ }
+ const key = node.key;
+ validator(key, modifiers);
+ }
+ function getMemberModifiers(node) {
+ const modifiers = new Set();
+ if (node.accessibility) {
+ modifiers.add(Modifiers[node.accessibility]);
+ }
+ else {
+ modifiers.add(Modifiers.public);
+ }
+ if (node.static) {
+ modifiers.add(Modifiers.static);
+ }
+ if ('readonly' in node && node.readonly) {
+ modifiers.add(Modifiers.readonly);
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.TSAbstractClassProperty ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition) {
+ modifiers.add(Modifiers.abstract);
+ }
+ return modifiers;
+ }
+ return {
+ // #region variable
+ VariableDeclarator(node) {
+ const validator = validators.variable;
+ if (!validator) {
+ return;
+ }
+ const identifiers = [];
+ getIdentifiersFromPattern(node.id, identifiers);
+ const modifiers = new Set();
+ const parent = node.parent;
+ if (parent &&
+ parent.type === experimental_utils_1.AST_NODE_TYPES.VariableDeclaration &&
+ parent.kind === 'const') {
+ modifiers.add(Modifiers.const);
+ }
+ identifiers.forEach(i => {
+ validator(i, modifiers);
+ });
+ },
+ // #endregion
+ // #region function
+ 'FunctionDeclaration, TSDeclareFunction, FunctionExpression'(node) {
+ const validator = validators.function;
+ if (!validator || node.id === null) {
+ return;
+ }
+ validator(node.id);
+ },
+ // #endregion function
+ // #region parameter
+ 'FunctionDeclaration, TSDeclareFunction, FunctionExpression, ArrowFunctionExpression'(node) {
+ const validator = validators.parameter;
+ if (!validator) {
+ return;
+ }
+ node.params.forEach(param => {
+ if (param.type === experimental_utils_1.AST_NODE_TYPES.TSParameterProperty) {
+ return;
+ }
+ const identifiers = [];
+ getIdentifiersFromPattern(param, identifiers);
+ identifiers.forEach(i => {
+ validator(i);
+ });
+ });
+ },
+ // #endregion parameter
+ // #region parameterProperty
+ TSParameterProperty(node) {
+ const validator = validators.parameterProperty;
+ if (!validator) {
+ return;
+ }
+ const modifiers = getMemberModifiers(node);
+ const identifiers = [];
+ getIdentifiersFromPattern(node.parameter, identifiers);
+ identifiers.forEach(i => {
+ validator(i, modifiers);
+ });
+ },
+ // #endregion parameterProperty
+ // #region property
+ 'Property[computed = false][kind = "init"][value.type != "ArrowFunctionExpression"][value.type != "FunctionExpression"][value.type != "TSEmptyBodyFunctionExpression"]'(node) {
+ const modifiers = new Set([Modifiers.public]);
+ handleMember(validators.property, node, modifiers);
+ },
+ ':matches(ClassProperty, TSAbstractClassProperty)[computed = false][value.type != "ArrowFunctionExpression"][value.type != "FunctionExpression"][value.type != "TSEmptyBodyFunctionExpression"]'(node) {
+ const modifiers = getMemberModifiers(node);
+ handleMember(validators.property, node, modifiers);
+ },
+ 'TSPropertySignature[computed = false]'(node) {
+ const modifiers = new Set([Modifiers.public]);
+ if (node.readonly) {
+ modifiers.add(Modifiers.readonly);
+ }
+ handleMember(validators.property, node, modifiers);
+ },
+ // #endregion property
+ // #region method
+ [[
+ 'Property[computed = false][kind = "init"][value.type = "ArrowFunctionExpression"]',
+ 'Property[computed = false][kind = "init"][value.type = "FunctionExpression"]',
+ 'Property[computed = false][kind = "init"][value.type = "TSEmptyBodyFunctionExpression"]',
+ 'TSMethodSignature[computed = false]',
+ ].join(', ')](node) {
+ const modifiers = new Set([Modifiers.public]);
+ handleMember(validators.method, node, modifiers);
+ },
+ [[
+ ':matches(ClassProperty, TSAbstractClassProperty)[computed = false][value.type = "ArrowFunctionExpression"]',
+ ':matches(ClassProperty, TSAbstractClassProperty)[computed = false][value.type = "FunctionExpression"]',
+ ':matches(ClassProperty, TSAbstractClassProperty)[computed = false][value.type = "TSEmptyBodyFunctionExpression"]',
+ ':matches(MethodDefinition, TSAbstractMethodDefinition)[computed = false][kind = "method"]',
+ ].join(', ')](node) {
+ const modifiers = getMemberModifiers(node);
+ handleMember(validators.method, node, modifiers);
+ },
+ // #endregion method
+ // #region accessor
+ 'Property[computed = false]:matches([kind = "get"], [kind = "set"])'(node) {
+ const modifiers = new Set([Modifiers.public]);
+ handleMember(validators.accessor, node, modifiers);
+ },
+ 'MethodDefinition[computed = false]:matches([kind = "get"], [kind = "set"])'(node) {
+ const modifiers = getMemberModifiers(node);
+ handleMember(validators.accessor, node, modifiers);
+ },
+ // #endregion accessor
+ // #region enumMember
+ // computed is optional, so can't do [computed = false]
+ 'TSEnumMember[computed != true]'(node) {
+ const validator = validators.enumMember;
+ if (!validator) {
+ return;
+ }
+ const id = node.id;
+ validator(id);
+ },
+ // #endregion enumMember
+ // #region class
+ 'ClassDeclaration, ClassExpression'(node) {
+ const validator = validators.class;
+ if (!validator) {
+ return;
+ }
+ const id = node.id;
+ if (id === null) {
+ return;
+ }
+ const modifiers = new Set();
+ if (node.abstract) {
+ modifiers.add(Modifiers.abstract);
+ }
+ validator(id, modifiers);
+ },
+ // #endregion class
+ // #region interface
+ TSInterfaceDeclaration(node) {
+ const validator = validators.interface;
+ if (!validator) {
+ return;
+ }
+ validator(node.id);
+ },
+ // #endregion interface
+ // #region typeAlias
+ TSTypeAliasDeclaration(node) {
+ const validator = validators.typeAlias;
+ if (!validator) {
+ return;
+ }
+ validator(node.id);
+ },
+ // #endregion typeAlias
+ // #region enum
+ TSEnumDeclaration(node) {
+ const validator = validators.enum;
+ if (!validator) {
+ return;
+ }
+ validator(node.id);
+ },
+ // #endregion enum
+ // #region typeParameter
+ 'TSTypeParameterDeclaration > TSTypeParameter'(node) {
+ const validator = validators.typeParameter;
+ if (!validator) {
+ return;
+ }
+ validator(node.name);
+ },
+ };
+ },
+});
+function getIdentifiersFromPattern(pattern, identifiers) {
+ switch (pattern.type) {
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ identifiers.push(pattern);
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.ArrayPattern:
+ pattern.elements.forEach(element => {
+ if (element !== null) {
+ getIdentifiersFromPattern(element, identifiers);
+ }
+ });
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.ObjectPattern:
+ pattern.properties.forEach(property => {
+ if (property.type === experimental_utils_1.AST_NODE_TYPES.RestElement) {
+ getIdentifiersFromPattern(property, identifiers);
+ }
+ else {
+ // this is a bit weird, but it's because ESTree doesn't have a new node type
+ // for object destructuring properties - it just reuses Property...
+ // https://github.com/estree/estree/blob/9ae284b71130d53226e7153b42f01bf819e6e657/es2015.md#L206-L211
+ // However, the parser guarantees this is safe (and there is error handling)
+ getIdentifiersFromPattern(property.value, identifiers);
+ }
+ });
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.RestElement:
+ getIdentifiersFromPattern(pattern.argument, identifiers);
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.AssignmentPattern:
+ getIdentifiersFromPattern(pattern.left, identifiers);
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.MemberExpression:
+ // ignore member expressions, as the everything must already be defined
+ break;
+ default:
+ // https://github.com/typescript-eslint/typescript-eslint/issues/1282
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
+ throw new Error(`Unexpected pattern type ${pattern.type}`);
+ }
+}
+function parseOptions(context) {
+ const normalizedOptions = context.options.map(opt => normalizeOption(opt));
+ return util.getEnumNames(Selectors).reduce((acc, k) => {
+ acc[k] = createValidator(k, context, normalizedOptions);
+ return acc;
+ }, {});
+}
+function createValidator(type, context, allConfigs) {
+ // make sure the "highest priority" configs are checked first
+ const selectorType = Selectors[type];
+ const configs = allConfigs
+ // gather all of the applicable selectors
+ .filter(c => (c.selector & selectorType) !== 0 ||
+ c.selector === MetaSelectors.default)
+ .sort((a, b) => {
+ if (a.selector === b.selector) {
+ // in the event of the same selector, order by modifier weight
+ // sort descending - the type modifiers are "more important"
+ return b.modifierWeight - a.modifierWeight;
+ }
+ /*
+ meta selectors will always be larger numbers than the normal selectors they contain, as they are the sum of all
+ of the selectors that they contain.
+ to give normal selectors a higher priority, shift them all SELECTOR_COUNT bits to the left before comparison, so
+ they are instead always guaranteed to be larger than the meta selectors.
+ */
+ const aSelector = isMetaSelector(a.selector)
+ ? a.selector
+ : a.selector << SELECTOR_COUNT;
+ const bSelector = isMetaSelector(b.selector)
+ ? b.selector
+ : b.selector << SELECTOR_COUNT;
+ // sort descending - the meta selectors are "least important"
+ return bSelector - aSelector;
+ });
+ return (node, modifiers = new Set()) => {
+ var _a, _b, _c;
+ const originalName = node.type === experimental_utils_1.AST_NODE_TYPES.Identifier ? node.name : `${node.value}`;
+ // return will break the loop and stop checking configs
+ // it is only used when the name is known to have failed or succeeded a config.
+ for (const config of configs) {
+ if (((_a = config.filter) === null || _a === void 0 ? void 0 : _a.regex.test(originalName)) !== ((_b = config.filter) === null || _b === void 0 ? void 0 : _b.match)) {
+ // name does not match the filter
+ continue;
+ }
+ if ((_c = config.modifiers) === null || _c === void 0 ? void 0 : _c.some(modifier => !modifiers.has(modifier))) {
+ // does not have the required modifiers
+ continue;
+ }
+ if (!isCorrectType(node, config, context)) {
+ // is not the correct type
+ continue;
+ }
+ let name = originalName;
+ name = validateUnderscore('leading', config, name, node, originalName);
+ if (name === null) {
+ // fail
+ return;
+ }
+ name = validateUnderscore('trailing', config, name, node, originalName);
+ if (name === null) {
+ // fail
+ return;
+ }
+ name = validateAffix('prefix', config, name, node, originalName);
+ if (name === null) {
+ // fail
+ return;
+ }
+ name = validateAffix('suffix', config, name, node, originalName);
+ if (name === null) {
+ // fail
+ return;
+ }
+ if (!validateCustom(config, name, node, originalName)) {
+ // fail
+ return;
+ }
+ if (!validatePredefinedFormat(config, name, node, originalName)) {
+ // fail
+ return;
+ }
+ // it's valid for this config, so we don't need to check any more configs
+ return;
+ }
+ };
+ // centralizes the logic for formatting the report data
+ function formatReportData({ affixes, formats, originalName, processedName, position, custom, }) {
+ var _a;
+ return {
+ type: selectorTypeToMessageString(type),
+ name: originalName,
+ processedName,
+ position,
+ affixes: affixes === null || affixes === void 0 ? void 0 : affixes.join(', '),
+ formats: formats === null || formats === void 0 ? void 0 : formats.map(f => PredefinedFormats[f]).join(', '),
+ regex: (_a = custom === null || custom === void 0 ? void 0 : custom.regex) === null || _a === void 0 ? void 0 : _a.toString(),
+ regexMatch: (custom === null || custom === void 0 ? void 0 : custom.match) === true
+ ? 'match'
+ : (custom === null || custom === void 0 ? void 0 : custom.match) === false
+ ? 'not match'
+ : null,
+ };
+ }
+ /**
+ * @returns the name with the underscore removed, if it is valid according to the specified underscore option, null otherwise
+ */
+ function validateUnderscore(position, config, name, node, originalName) {
+ const option = position === 'leading'
+ ? config.leadingUnderscore
+ : config.trailingUnderscore;
+ if (!option) {
+ return name;
+ }
+ const hasUnderscore = position === 'leading' ? name.startsWith('_') : name.endsWith('_');
+ const trimUnderscore = position === 'leading'
+ ? () => name.slice(1)
+ : () => name.slice(0, -1);
+ switch (option) {
+ case UnderscoreOptions.allow:
+ // no check - the user doesn't care if it's there or not
+ break;
+ case UnderscoreOptions.forbid:
+ if (hasUnderscore) {
+ context.report({
+ node,
+ messageId: 'unexpectedUnderscore',
+ data: formatReportData({
+ originalName,
+ position,
+ }),
+ });
+ return null;
+ }
+ break;
+ case UnderscoreOptions.require:
+ if (!hasUnderscore) {
+ context.report({
+ node,
+ messageId: 'missingUnderscore',
+ data: formatReportData({
+ originalName,
+ position,
+ }),
+ });
+ return null;
+ }
+ }
+ return hasUnderscore ? trimUnderscore() : name;
+ }
+ /**
+ * @returns the name with the affix removed, if it is valid according to the specified affix option, null otherwise
+ */
+ function validateAffix(position, config, name, node, originalName) {
+ const affixes = config[position];
+ if (!affixes || affixes.length === 0) {
+ return name;
+ }
+ for (const affix of affixes) {
+ const hasAffix = position === 'prefix' ? name.startsWith(affix) : name.endsWith(affix);
+ const trimAffix = position === 'prefix'
+ ? () => name.slice(affix.length)
+ : () => name.slice(0, -affix.length);
+ if (hasAffix) {
+ // matches, so trim it and return
+ return trimAffix();
+ }
+ }
+ context.report({
+ node,
+ messageId: 'missingAffix',
+ data: formatReportData({
+ originalName,
+ position,
+ affixes,
+ }),
+ });
+ return null;
+ }
+ /**
+ * @returns true if the name is valid according to the `regex` option, false otherwise
+ */
+ function validateCustom(config, name, node, originalName) {
+ const custom = config.custom;
+ if (!custom) {
+ return true;
+ }
+ const result = custom.regex.test(name);
+ if (custom.match && result) {
+ return true;
+ }
+ if (!custom.match && !result) {
+ return true;
+ }
+ context.report({
+ node,
+ messageId: 'satisfyCustom',
+ data: formatReportData({
+ originalName,
+ custom,
+ }),
+ });
+ return false;
+ }
+ /**
+ * @returns true if the name is valid according to the `format` option, false otherwise
+ */
+ function validatePredefinedFormat(config, name, node, originalName) {
+ const formats = config.format;
+ if (formats === null || formats.length === 0) {
+ return true;
+ }
+ for (const format of formats) {
+ const checker = PredefinedFormatToCheckFunction[format];
+ if (checker(name)) {
+ return true;
+ }
+ }
+ context.report({
+ node,
+ messageId: originalName === name
+ ? 'doesNotMatchFormat'
+ : 'doesNotMatchFormatTrimmed',
+ data: formatReportData({
+ originalName,
+ processedName: name,
+ formats,
+ }),
+ });
+ return false;
+ }
+}
+// #region Predefined Format Functions
+/*
+These format functions are taken from `tslint-consistent-codestyle/naming-convention`:
+https://github.com/ajafff/tslint-consistent-codestyle/blob/ab156cc8881bcc401236d999f4ce034b59039e81/rules/namingConventionRule.ts#L603-L645
+
+The licence for the code can be viewed here:
+https://github.com/ajafff/tslint-consistent-codestyle/blob/ab156cc8881bcc401236d999f4ce034b59039e81/LICENSE
+*/
+/*
+Why not regex here? Because it's actually really, really difficult to create a regex to handle
+all of the unicode cases, and we have many non-english users that use non-english characters.
+https://gist.github.com/mathiasbynens/6334847
+*/
+function isPascalCase(name) {
+ return (name.length === 0 ||
+ (name[0] === name[0].toUpperCase() && !name.includes('_')));
+}
+function isStrictPascalCase(name) {
+ return (name.length === 0 ||
+ (name[0] === name[0].toUpperCase() && hasStrictCamelHumps(name, true)));
+}
+function isCamelCase(name) {
+ return (name.length === 0 ||
+ (name[0] === name[0].toLowerCase() && !name.includes('_')));
+}
+function isStrictCamelCase(name) {
+ return (name.length === 0 ||
+ (name[0] === name[0].toLowerCase() && hasStrictCamelHumps(name, false)));
+}
+function hasStrictCamelHumps(name, isUpper) {
+ function isUppercaseChar(char) {
+ return char === char.toUpperCase() && char !== char.toLowerCase();
+ }
+ if (name.startsWith('_')) {
+ return false;
+ }
+ for (let i = 1; i < name.length; ++i) {
+ if (name[i] === '_') {
+ return false;
+ }
+ if (isUpper === isUppercaseChar(name[i])) {
+ if (isUpper) {
+ return false;
+ }
+ }
+ else {
+ isUpper = !isUpper;
+ }
+ }
+ return true;
+}
+function isSnakeCase(name) {
+ return (name.length === 0 ||
+ (name === name.toLowerCase() && validateUnderscores(name)));
+}
+function isUpperCase(name) {
+ return (name.length === 0 ||
+ (name === name.toUpperCase() && validateUnderscores(name)));
+}
+/** Check for leading trailing and adjacent underscores */
+function validateUnderscores(name) {
+ if (name.startsWith('_')) {
+ return false;
+ }
+ let wasUnderscore = false;
+ for (let i = 1; i < name.length; ++i) {
+ if (name[i] === '_') {
+ if (wasUnderscore) {
+ return false;
+ }
+ wasUnderscore = true;
+ }
+ else {
+ wasUnderscore = false;
+ }
+ }
+ return !wasUnderscore;
+}
+const PredefinedFormatToCheckFunction = {
+ [PredefinedFormats.PascalCase]: isPascalCase,
+ [PredefinedFormats.StrictPascalCase]: isStrictPascalCase,
+ [PredefinedFormats.camelCase]: isCamelCase,
+ [PredefinedFormats.strictCamelCase]: isStrictCamelCase,
+ [PredefinedFormats.UPPER_CASE]: isUpperCase,
+ [PredefinedFormats.snake_case]: isSnakeCase,
+};
+// #endregion Predefined Format Functions
+function selectorTypeToMessageString(selectorType) {
+ const notCamelCase = selectorType.replace(/([A-Z])/g, ' $1');
+ return notCamelCase.charAt(0).toUpperCase() + notCamelCase.slice(1);
+}
+exports.selectorTypeToMessageString = selectorTypeToMessageString;
+function isMetaSelector(selector) {
+ return selector in MetaSelectors;
+}
+function normalizeOption(option) {
+ var _a, _b, _c, _d, _e, _f;
+ let weight = 0;
+ (_a = option.modifiers) === null || _a === void 0 ? void 0 : _a.forEach(mod => {
+ weight |= Modifiers[mod];
+ });
+ (_b = option.types) === null || _b === void 0 ? void 0 : _b.forEach(mod => {
+ weight |= TypeModifiers[mod];
+ });
+ // give selectors with a filter the _highest_ priority
+ if (option.filter) {
+ weight |= 1 << 30;
+ }
+ const normalizedOption = {
+ // format options
+ format: option.format ? option.format.map(f => PredefinedFormats[f]) : null,
+ custom: option.custom
+ ? {
+ regex: new RegExp(option.custom.regex, 'u'),
+ match: option.custom.match,
+ }
+ : null,
+ leadingUnderscore: option.leadingUnderscore !== undefined
+ ? UnderscoreOptions[option.leadingUnderscore]
+ : null,
+ trailingUnderscore: option.trailingUnderscore !== undefined
+ ? UnderscoreOptions[option.trailingUnderscore]
+ : null,
+ prefix: option.prefix && option.prefix.length > 0 ? option.prefix : null,
+ suffix: option.suffix && option.suffix.length > 0 ? option.suffix : null,
+ modifiers: (_d = (_c = option.modifiers) === null || _c === void 0 ? void 0 : _c.map(m => Modifiers[m])) !== null && _d !== void 0 ? _d : null,
+ types: (_f = (_e = option.types) === null || _e === void 0 ? void 0 : _e.map(m => TypeModifiers[m])) !== null && _f !== void 0 ? _f : null,
+ filter: option.filter !== undefined
+ ? typeof option.filter === 'string'
+ ? { regex: new RegExp(option.filter, 'u'), match: true }
+ : {
+ regex: new RegExp(option.filter.regex, 'u'),
+ match: option.filter.match,
+ }
+ : null,
+ // calculated ordering weight based on modifiers
+ modifierWeight: weight,
+ };
+ const selectors = Array.isArray(option.selector)
+ ? option.selector
+ : [option.selector];
+ return Object.assign({ selector: selectors
+ .map(selector => isMetaSelector(selector)
+ ? MetaSelectors[selector]
+ : Selectors[selector])
+ .reduce((accumulator, selector) => accumulator | selector) }, normalizedOption);
+}
+function isCorrectType(node, config, context) {
+ if (config.types === null) {
+ return true;
+ }
+ const { esTreeNodeToTSNodeMap, program } = util.getParserServices(context);
+ const checker = program.getTypeChecker();
+ const tsNode = esTreeNodeToTSNodeMap.get(node);
+ const type = checker
+ .getTypeAtLocation(tsNode)
+ // remove null and undefined from the type, as we don't care about it here
+ .getNonNullableType();
+ for (const allowedType of config.types) {
+ switch (allowedType) {
+ case TypeModifiers.array:
+ if (isAllTypesMatch(type, t => checker.isArrayType(t) || checker.isTupleType(t))) {
+ return true;
+ }
+ break;
+ case TypeModifiers.function:
+ if (isAllTypesMatch(type, t => t.getCallSignatures().length > 0)) {
+ return true;
+ }
+ break;
+ case TypeModifiers.boolean:
+ case TypeModifiers.number:
+ case TypeModifiers.string: {
+ const typeString = checker.typeToString(
+ // this will resolve things like true => boolean, 'a' => string and 1 => number
+ checker.getWidenedType(checker.getBaseTypeOfLiteralType(type)));
+ const allowedTypeString = TypeModifiers[allowedType];
+ if (typeString === allowedTypeString) {
+ return true;
+ }
+ break;
+ }
+ }
+ }
+ return false;
+}
+/**
+ * @returns `true` if the type (or all union types) in the given type return true for the callback
+ */
+function isAllTypesMatch(type, cb) {
+ if (type.isUnion()) {
+ return type.types.every(t => cb(t));
+ }
+ return cb(type);
+}
+//# sourceMappingURL=naming-convention.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js.map
new file mode 100644
index 000000000..a146c3d33
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/naming-convention.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"naming-convention.js","sourceRoot":"","sources":["../../src/rules/naming-convention.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,8EAK+C;AAE/C,8CAAgC;AAUhC,8BAA8B;AAE9B,IAAK,iBAOJ;AAPD,WAAK,iBAAiB;IACpB,mEAAkB,CAAA;IAClB,+EAAwB,CAAA;IAC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,IAAI,eAAe,CAAC,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,iBAAiB,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE;oBAChE,OAAO,IAAI,CAAC;iBACb;gBACD,MAAM;YAER,KAAK,aAAa,CAAC,OAAO,CAAC;YAC3B,KAAK,aAAa,CAAC,MAAM,CAAC;YAC1B,KAAK,aAAa,CAAC,MAAM,CAAC,CAAC;gBACzB,MAAM,UAAU,GAAG,OAAO,CAAC,YAAY;gBACrC,+EAA+E;gBAC/E,OAAO,CAAC,cAAc,CAAC,OAAO,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC,CAC/D,CAAC;gBACF,MAAM,iBAAiB,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;gBACrD,IAAI,UAAU,KAAK,iBAAiB,EAAE;oBACpC,OAAO,IAAI,CAAC;iBACb;gBACD,MAAM;aACP;SACF;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CACtB,IAAa,EACb,EAA8B;IAE9B,IAAI,IAAI,CAAC,OAAO,EAAE,EAAE;QAClB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;KACrC;IAED,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC;AAClB,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js
new file mode 100644
index 000000000..806672e97
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js
@@ -0,0 +1,72 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-array-constructor',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow generic `Array` constructors',
+ category: 'Stylistic Issues',
+ recommended: 'error',
+ extendsBaseRule: true,
+ },
+ fixable: 'code',
+ messages: {
+ useLiteral: 'The array literal notation [] is preferable.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ /**
+ * Disallow construction of dense arrays using the Array constructor
+ * @param node node to evaluate
+ */
+ function check(node) {
+ if (node.arguments.length !== 1 &&
+ node.callee.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ node.callee.name === 'Array' &&
+ !node.typeParameters &&
+ !util.isOptionalCallExpression(node)) {
+ context.report({
+ node,
+ messageId: 'useLiteral',
+ fix(fixer) {
+ if (node.arguments.length === 0) {
+ return fixer.replaceText(node, '[]');
+ }
+ const fullText = context.getSourceCode().getText(node);
+ const preambleLength = node.callee.range[1] - node.range[0];
+ return fixer.replaceText(node, `[${fullText.slice(preambleLength + 1, -1)}]`);
+ },
+ });
+ }
+ }
+ return {
+ CallExpression: check,
+ NewExpression: check,
+ };
+ },
+});
+//# sourceMappingURL=no-array-constructor.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js.map
new file mode 100644
index 000000000..db44e4893
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-array-constructor.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-array-constructor.js","sourceRoot":"","sources":["../../src/rules/no-array-constructor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,OAAO;YACpB,eAAe,EAAE,IAAI;SACtB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,UAAU,EAAE,8CAA8C;SAC3D;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ;;;WAGG;QACH,SAAS,KAAK,CACZ,IAAsD;YAEtD,IACE,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;gBAC3B,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU;gBAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO;gBAC5B,CAAC,IAAI,CAAC,cAAc;gBACpB,CAAC,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EACpC;gBACA,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,SAAS,EAAE,YAAY;oBACvB,GAAG,CAAC,KAAK;wBACP,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE;4BAC/B,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;yBACtC;wBACD,MAAM,QAAQ,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;wBACvD,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;wBAE5D,OAAO,KAAK,CAAC,WAAW,CACtB,IAAI,EACJ,IAAI,QAAQ,CAAC,KAAK,CAAC,cAAc,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAC9C,CAAC;oBACJ,CAAC;iBACF,CAAC,CAAC;aACJ;QACH,CAAC;QAED,OAAO;YACL,cAAc,EAAE,KAAK;YACrB,aAAa,EAAE,KAAK;SACrB,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js
new file mode 100644
index 000000000..b3b994b16
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js
@@ -0,0 +1,161 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+var Usefulness;
+(function (Usefulness) {
+ Usefulness[Usefulness["Always"] = 0] = "Always";
+ Usefulness["Never"] = "will";
+ Usefulness["Sometimes"] = "may";
+})(Usefulness || (Usefulness = {}));
+exports.default = util.createRule({
+ name: 'no-base-to-string',
+ meta: {
+ docs: {
+ description: 'Requires that `.toString()` is only called on objects which provide useful information when stringified',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ messages: {
+ baseToString: "'{{name}} {{certainty}} evaluate to '[object Object]' when stringified.",
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ ignoredTypeNames: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ type: 'suggestion',
+ },
+ defaultOptions: [
+ {
+ ignoredTypeNames: ['RegExp'],
+ },
+ ],
+ create(context, [option]) {
+ var _a;
+ const parserServices = util.getParserServices(context);
+ const typeChecker = parserServices.program.getTypeChecker();
+ const ignoredTypeNames = (_a = option.ignoredTypeNames) !== null && _a !== void 0 ? _a : [];
+ function checkExpression(node, type) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.Literal) {
+ return;
+ }
+ const certainty = collectToStringCertainty(type !== null && type !== void 0 ? type : typeChecker.getTypeAtLocation(parserServices.esTreeNodeToTSNodeMap.get(node)));
+ if (certainty === Usefulness.Always) {
+ return;
+ }
+ context.report({
+ data: {
+ certainty,
+ name: context.getSourceCode().getText(node),
+ },
+ messageId: 'baseToString',
+ node,
+ });
+ }
+ function collectToStringCertainty(type) {
+ const toString = typeChecker.getPropertyOfType(type, 'toString');
+ const declarations = toString === null || toString === void 0 ? void 0 : toString.getDeclarations();
+ if (!toString || !declarations || declarations.length === 0) {
+ return Usefulness.Always;
+ }
+ // Patch for old version TypeScript, the Boolean type definition missing toString()
+ if (type.flags & ts.TypeFlags.Boolean ||
+ type.flags & ts.TypeFlags.BooleanLiteral) {
+ return Usefulness.Always;
+ }
+ if (ignoredTypeNames.includes(util.getTypeName(typeChecker, type))) {
+ return Usefulness.Always;
+ }
+ if (declarations.every(({ parent }) => !ts.isInterfaceDeclaration(parent) || parent.name.text !== 'Object')) {
+ return Usefulness.Always;
+ }
+ if (type.isIntersection()) {
+ for (const subType of type.types) {
+ const subtypeUsefulness = collectToStringCertainty(subType);
+ if (subtypeUsefulness === Usefulness.Always) {
+ return Usefulness.Always;
+ }
+ }
+ return Usefulness.Never;
+ }
+ if (!type.isUnion()) {
+ return Usefulness.Never;
+ }
+ let allSubtypesUseful = true;
+ let someSubtypeUseful = false;
+ for (const subType of type.types) {
+ const subtypeUsefulness = collectToStringCertainty(subType);
+ if (subtypeUsefulness !== Usefulness.Always && allSubtypesUseful) {
+ allSubtypesUseful = false;
+ }
+ if (subtypeUsefulness !== Usefulness.Never && !someSubtypeUseful) {
+ someSubtypeUseful = true;
+ }
+ }
+ if (allSubtypesUseful && someSubtypeUseful) {
+ return Usefulness.Always;
+ }
+ if (someSubtypeUseful) {
+ return Usefulness.Sometimes;
+ }
+ return Usefulness.Never;
+ }
+ return {
+ 'AssignmentExpression[operator = "+="], BinaryExpression[operator = "+"]'(node) {
+ const leftType = typeChecker.getTypeAtLocation(parserServices.esTreeNodeToTSNodeMap.get(node.left));
+ const rightType = typeChecker.getTypeAtLocation(parserServices.esTreeNodeToTSNodeMap.get(node.right));
+ if (util.getTypeName(typeChecker, leftType) === 'string') {
+ checkExpression(node.right, rightType);
+ }
+ else if (util.getTypeName(typeChecker, rightType) === 'string') {
+ checkExpression(node.left, leftType);
+ }
+ },
+ 'CallExpression > MemberExpression.callee > Identifier[name = "toString"].property'(node) {
+ const memberExpr = node.parent;
+ checkExpression(memberExpr.object);
+ },
+ TemplateLiteral(node) {
+ if (node.parent &&
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.TaggedTemplateExpression) {
+ return;
+ }
+ for (const expression of node.expressions) {
+ checkExpression(expression);
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-base-to-string.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js.map
new file mode 100644
index 000000000..378fe4c7b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-base-to-string.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-base-to-string.js","sourceRoot":"","sources":["../../src/rules/no-base-to-string.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,+CAAiC;AAEjC,8CAAgC;AAEhC,IAAK,UAIJ;AAJD,WAAK,UAAU;IACb,+CAAM,CAAA;IACN,4BAAc,CAAA;IACd,+BAAiB,CAAA;AACnB,CAAC,EAJI,UAAU,KAAV,UAAU,QAId;AASD,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EACT,yGAAyG;YAC3G,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,YAAY,EACV,yEAAyE;SAC5E;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,gBAAgB,EAAE;wBAChB,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;yBACf;qBACF;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;QACD,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE;QACd;YACE,gBAAgB,EAAE,CAAC,QAAQ,CAAC;SAC7B;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,MAAM,CAAC;;QACtB,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACvD,MAAM,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-assertion.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js
new file mode 100644
index 000000000..9369dc9f7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js
@@ -0,0 +1,97 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-confusing-non-null-assertion',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow non-null assertion in locations that may be confusing',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ fixable: 'code',
+ messages: {
+ confusingEqual: 'Confusing combinations of non-null assertion and equal test like "a! == b", which looks very similar to not equal "a !== b"',
+ confusingAssign: 'Confusing combinations of non-null assertion and equal test like "a! = b", which looks very similar to not equal "a != b"',
+ notNeedInEqualTest: 'Unnecessary non-null assertion (!) in equal test',
+ notNeedInAssign: 'Unnecessary non-null assertion (!) in assignment left hand',
+ wrapUpLeft: 'Wrap up left hand to avoid putting non-null assertion "!" and "=" together',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ return {
+ 'BinaryExpression, AssignmentExpression'(node) {
+ function isLeftHandPrimaryExpression(node) {
+ return node.type === experimental_utils_1.AST_NODE_TYPES.TSNonNullExpression;
+ }
+ if (node.operator === '==' ||
+ node.operator === '===' ||
+ node.operator === '=') {
+ const isAssign = node.operator === '=';
+ const leftHandFinalToken = sourceCode.getLastToken(node.left);
+ const tokenAfterLeft = sourceCode.getTokenAfter(node.left);
+ if ((leftHandFinalToken === null || leftHandFinalToken === void 0 ? void 0 : leftHandFinalToken.type) === experimental_utils_1.AST_TOKEN_TYPES.Punctuator &&
+ (leftHandFinalToken === null || leftHandFinalToken === void 0 ? void 0 : leftHandFinalToken.value) === '!' &&
+ (tokenAfterLeft === null || tokenAfterLeft === void 0 ? void 0 : tokenAfterLeft.value) !== ')') {
+ if (isLeftHandPrimaryExpression(node.left)) {
+ context.report({
+ node,
+ messageId: isAssign ? 'confusingAssign' : 'confusingEqual',
+ suggest: [
+ {
+ messageId: isAssign
+ ? 'notNeedInAssign'
+ : 'notNeedInEqualTest',
+ fix: (fixer) => [
+ fixer.remove(leftHandFinalToken),
+ ],
+ },
+ ],
+ });
+ }
+ else {
+ context.report({
+ node,
+ messageId: isAssign ? 'confusingAssign' : 'confusingEqual',
+ suggest: [
+ {
+ messageId: 'wrapUpLeft',
+ fix: (fixer) => [
+ fixer.insertTextBefore(node.left, '('),
+ fixer.insertTextAfter(node.left, ')'),
+ ],
+ },
+ ],
+ });
+ }
+ }
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-confusing-non-null-assertion.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js.map
new file mode 100644
index 000000000..d789e5442
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-confusing-non-null-assertion.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-confusing-non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Ae,CAAC,UAAU;wBACvD,CAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,MAAK,GAAG;wBACjC,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,KAAK,MAAK,GAAG,EAC7B;wBACA,IAAI,2BAA2B,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;4BAC1C,OAAO,CAAC,MAAM,CAAC;gCACb,IAAI;gCACJ,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB;gCAC1D,OAAO,EAAE;oCACP;wCACE,SAAS,EAAE,QAAQ;4CACjB,CAAC,CAAC,iBAAiB;4CACnB,CAAC,CAAC,oBAAoB;wCACxB,GAAG,EAAE,CAAC,KAAK,EAAsB,EAAE,CAAC;4CAClC,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC;yCACjC;qCACF;iCACF;6BACF,CAAC,CAAC;yBACJ;6BAAM;4BACL,OAAO,CAAC,MAAM,CAAC;gCACb,IAAI;gCACJ,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB;gCAC1D,OAAO,EAAE;oCACP;wCACE,SAAS,EAAE,YAAY;wCACvB,GAAG,EAAE,CAAC,KAAK,EAAsB,EAAE,CAAC;4CAClC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC;4CACtC,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,EAAE,GAAG,CAAC;yCACtC;qCACF;iCACF;6BACF,CAAC,CAAC;yBACJ;qBACF;iBACF;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js
new file mode 100644
index 000000000..a823830e6
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js
@@ -0,0 +1,55 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const no_dupe_class_members_1 = __importDefault(require("eslint/lib/rules/no-dupe-class-members"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-dupe-class-members',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow duplicate class members',
+ category: 'Possible Errors',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ schema: no_dupe_class_members_1.default.meta.schema,
+ messages: no_dupe_class_members_1.default.meta.messages,
+ },
+ defaultOptions: [],
+ create(context) {
+ const rules = no_dupe_class_members_1.default.create(context);
+ return Object.assign(Object.assign({}, rules), { MethodDefinition(node) {
+ if (node.computed) {
+ return;
+ }
+ if (node.value.type === experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression) {
+ return;
+ }
+ return rules.MethodDefinition(node);
+ } });
+ },
+});
+//# sourceMappingURL=no-dupe-class-members.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js.map
new file mode 100644
index 000000000..7e93badca
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dupe-class-members.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-dupe-class-members.js","sourceRoot":"","sources":["../../src/rules/no-dupe-class-members.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAAuE;AACvE,mGAA8D;AAC9D,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE,+BAAQ,CAAC,IAAI,CAAC,MAAM;QAC5B,QAAQ,EAAE,+BAAQ,CAAC,IAAI,CAAC,QAAQ;KACjC;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,KAAK,GAAG,+BAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEvC,uCACK,KAAK,KACR,gBAAgB,CAAC,IAAI;gBACnB,IAAI,IAAI,CAAC,QAAQ,EAAE;oBACjB,OAAO;iBACR;gBAED,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,mCAAc,CAAC,6BAA6B,EAAE;oBACpE,OAAO;iBACR;gBAED,OAAO,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;YACtC,CAAC,IACD;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js
new file mode 100644
index 000000000..911e40127
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js
@@ -0,0 +1,91 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const tsutils = __importStar(require("tsutils"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-dynamic-delete',
+ meta: {
+ docs: {
+ category: 'Best Practices',
+ description: 'Disallow the delete operator with computed key expressions',
+ recommended: false,
+ },
+ fixable: 'code',
+ messages: {
+ dynamicDelete: 'Do not delete dynamically computed property keys.',
+ },
+ schema: [],
+ type: 'suggestion',
+ },
+ defaultOptions: [],
+ create(context) {
+ function createFixer(member) {
+ if (member.property.type === experimental_utils_1.AST_NODE_TYPES.Literal &&
+ typeof member.property.value === 'string') {
+ return createPropertyReplacement(member.property, `.${member.property.value}`);
+ }
+ return undefined;
+ }
+ return {
+ 'UnaryExpression[operator=delete]'(node) {
+ if (node.argument.type !== experimental_utils_1.AST_NODE_TYPES.MemberExpression ||
+ !node.argument.computed ||
+ isNecessaryDynamicAccess(diveIntoWrapperExpressions(node.argument.property))) {
+ return;
+ }
+ context.report({
+ fix: createFixer(node.argument),
+ messageId: 'dynamicDelete',
+ node: node.argument.property,
+ });
+ },
+ };
+ function createPropertyReplacement(property, replacement) {
+ return (fixer) => fixer.replaceTextRange(getTokenRange(property), replacement);
+ }
+ function getTokenRange(property) {
+ const sourceCode = context.getSourceCode();
+ return [
+ sourceCode.getTokenBefore(property).range[0],
+ sourceCode.getTokenAfter(property).range[1],
+ ];
+ }
+ },
+});
+function diveIntoWrapperExpressions(node) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression) {
+ return diveIntoWrapperExpressions(node.argument);
+ }
+ return node;
+}
+function isNecessaryDynamicAccess(property) {
+ if (property.type !== experimental_utils_1.AST_NODE_TYPES.Literal) {
+ return false;
+ }
+ if (typeof property.value === 'number') {
+ return true;
+ }
+ return (typeof property.value === 'string' &&
+ !tsutils.isValidPropertyAccess(property.value));
+}
+//# sourceMappingURL=no-dynamic-delete.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js.map
new file mode 100644
index 000000000..bf3450bc2
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-dynamic-delete.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-dynamic-delete.js","sourceRoot":"","sources":["../../src/rules/no-dynamic-delete.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,iDAAmC;AACnC,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,4DAA4D;YACzE,WAAW,EAAE,KAAK;SACnB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,aAAa,EAAE,mDAAmD;SACnE;QACD,MAA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AU,CAAC,aAAa,CAAC,QAAQ,CAAE,CAAC,KAAK,CAAC,CAAC,CAAC;aAC7C,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC;AAEH,SAAS,0BAA0B,CACjC,IAAyB;IAEzB,IAAI,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,eAAe,EAAE;QAChD,OAAO,0BAA0B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;KAClD;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,wBAAwB,CAAC,QAA6B;IAC7D,IAAI,QAAQ,CAAC,IAAI,KAAK,mCAAc,CAAC,OAAO,EAAE;QAC5C,OAAO,KAAK,CAAC;KACd;IAED,IAAI,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ,EAAE;QACtC,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,OAAO,QAAQ,CAAC,KAAK,KAAK,QAAQ;QAClC,CAAC,OAAO,CAAC,qBAAqB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAC/C,CAAC;AACJ,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js
new file mode 100644
index 000000000..775e85ccf
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js
@@ -0,0 +1,146 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const no_empty_function_1 = __importDefault(require("eslint/lib/rules/no-empty-function"));
+const util = __importStar(require("../util"));
+const schema = util.deepMerge(Array.isArray(no_empty_function_1.default.meta.schema)
+ ? no_empty_function_1.default.meta.schema[0]
+ : no_empty_function_1.default.meta.schema, {
+ properties: {
+ allow: {
+ items: {
+ enum: [
+ 'functions',
+ 'arrowFunctions',
+ 'generatorFunctions',
+ 'methods',
+ 'generatorMethods',
+ 'getters',
+ 'setters',
+ 'constructors',
+ 'private-constructors',
+ 'protected-constructors',
+ 'asyncFunctions',
+ 'asyncMethods',
+ 'decoratedFunctions',
+ ],
+ },
+ },
+ },
+});
+exports.default = util.createRule({
+ name: 'no-empty-function',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow empty functions',
+ category: 'Best Practices',
+ recommended: 'error',
+ extendsBaseRule: true,
+ },
+ schema: [schema],
+ messages: no_empty_function_1.default.meta.messages,
+ },
+ defaultOptions: [
+ {
+ allow: [],
+ },
+ ],
+ create(context, [{ allow = [] }]) {
+ const rules = no_empty_function_1.default.create(context);
+ const isAllowedProtectedConstructors = allow.includes('protected-constructors');
+ const isAllowedPrivateConstructors = allow.includes('private-constructors');
+ const isAllowedDecoratedFunctions = allow.includes('decoratedFunctions');
+ /**
+ * Check if the method body is empty
+ * @param node the node to be validated
+ * @returns true if the body is empty
+ * @private
+ */
+ function isBodyEmpty(node) {
+ return !node.body || node.body.body.length === 0;
+ }
+ /**
+ * Check if method has parameter properties
+ * @param node the node to be validated
+ * @returns true if the body has parameter properties
+ * @private
+ */
+ function hasParameterProperties(node) {
+ var _a;
+ return (_a = node.params) === null || _a === void 0 ? void 0 : _a.some(param => param.type === experimental_utils_1.AST_NODE_TYPES.TSParameterProperty);
+ }
+ /**
+ * @param node the node to be validated
+ * @returns true if the constructor is allowed to be empty
+ * @private
+ */
+ function isAllowedEmptyConstructor(node) {
+ const parent = node.parent;
+ if (isBodyEmpty(node) &&
+ (parent === null || parent === void 0 ? void 0 : parent.type) === experimental_utils_1.AST_NODE_TYPES.MethodDefinition &&
+ parent.kind === 'constructor') {
+ const { accessibility } = parent;
+ return (
+ // allow protected constructors
+ (accessibility === 'protected' && isAllowedProtectedConstructors) ||
+ // allow private constructors
+ (accessibility === 'private' && isAllowedPrivateConstructors) ||
+ // allow constructors which have parameter properties
+ hasParameterProperties(node));
+ }
+ return false;
+ }
+ /**
+ * @param node the node to be validated
+ * @returns true if a function has decorators
+ * @private
+ */
+ function isAllowedEmptyDecoratedFunctions(node) {
+ var _a;
+ if (isAllowedDecoratedFunctions && isBodyEmpty(node)) {
+ const decorators = ((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.MethodDefinition
+ ? node.parent.decorators
+ : undefined;
+ return !!decorators && !!decorators.length;
+ }
+ return false;
+ }
+ return Object.assign(Object.assign({}, rules), { FunctionExpression(node) {
+ if (isAllowedEmptyConstructor(node) ||
+ isAllowedEmptyDecoratedFunctions(node)) {
+ return;
+ }
+ rules.FunctionExpression(node);
+ },
+ FunctionDeclaration(node) {
+ if (isAllowedEmptyDecoratedFunctions(node)) {
+ return;
+ }
+ rules.FunctionDeclaration(node);
+ } });
+ },
+});
+//# sourceMappingURL=no-empty-function.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js.map
new file mode 100644
index 000000000..e081d10c4
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-function.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-empty-function.js","sourceRoot":"","sources":["../../src/rules/no-empty-function.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,2FAA0D;AAC1D,8CAAgC;AAKhC,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,CAC3B,KAAK,CAAC,OAAO,CAAC,2BAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;IACjC,CAAC,CAAC,2BAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,2BAAQ,CAAC,IAAI,CAAC,MAAM,EACxB;IACE,UAAU,EAAE;QACV,KAAK,EAAE;YACL,KAAK,EAAE;gBACL,IAAI,EAAE;oBACJ,WAAW;oBACX,gBAAgB;oBAChB,oBAAoB;oBACpB,SAAS;oBACT,kBAAkB;oBAClB,SAAS;oBACT,SAAS;oBACT,cAAc;oBACd,sBAAsB;oBACtB,wBAAwB;oBACxB,gBAAgB;oBAChB,cAAc;oBACd,oBAAoB;iBACrB;aACF;SACF;KACF;CACF,CACF,CAAC;AAEF,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE,CAAC,MAAM,CAAC;QAChB,QAAQ,EAAE,2BAAQ,CAAC,IAAI,CAAC,QAAQ;KACjC;IACD,cAAc,EAAE;QACd;YACE,KAAK,EAAE,EAAE;SACV;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,CAAC;QAC9B,MAAM,KAAK,GAAG,2BAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEvC,MAAM,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,MAAM,UAAU,GACd,OAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,MAAK,mCAAc,CAAC,gBAAgB;oBACnD,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU;oBACxB,CAAC,CAAC,SAAS,CAAC;gBAChB,OAAO,CAAC,CAAC,UAAU,IAAI,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;aAC5C;YAED,OAAO,KAAK,CAAC;QACf,CAAC;QAED,uCACK,KAAK,KACR,kBAAkB,CAAC,IAAI;gBACrB,IACE,yBAAyB,CAAC,IAAI,CAAC;oBAC/B,gCAAgC,CAAC,IAAI,CAAC,EACtC;oBACA,OAAO;iBACR;gBAED,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;YACjC,CAAC;YACD,mBAAmB,CAAC,IAAI;gBACtB,IAAI,gCAAgC,CAAC,IAAI,CAAC,EAAE;oBAC1C,OAAO;iBACR;gBAED,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;YAClC,CAAC,IACD;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js
new file mode 100644
index 000000000..f4037c20b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js
@@ -0,0 +1,105 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-empty-interface',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow the declaration of empty interfaces',
+ category: 'Best Practices',
+ recommended: 'error',
+ suggestion: true,
+ },
+ fixable: 'code',
+ messages: {
+ noEmpty: 'An empty interface is equivalent to `{}`.',
+ noEmptyWithSuper: 'An interface declaring no members is equivalent to its supertype.',
+ },
+ schema: [
+ {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ allowSingleExtends: {
+ type: 'boolean',
+ },
+ },
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ allowSingleExtends: false,
+ },
+ ],
+ create(context, [{ allowSingleExtends }]) {
+ return {
+ TSInterfaceDeclaration(node) {
+ const sourceCode = context.getSourceCode();
+ const filename = context.getFilename();
+ if (node.body.body.length !== 0) {
+ // interface contains members --> Nothing to report
+ return;
+ }
+ const extend = node.extends;
+ if (!extend || extend.length === 0) {
+ context.report({
+ node: node.id,
+ messageId: 'noEmpty',
+ });
+ }
+ else if (extend.length === 1) {
+ // interface extends exactly 1 interface --> Report depending on rule setting
+ if (!allowSingleExtends) {
+ const fix = (fixer) => {
+ let typeParam = '';
+ if (node.typeParameters) {
+ typeParam = sourceCode.getText(node.typeParameters);
+ }
+ return fixer.replaceText(node, `type ${sourceCode.getText(node.id)}${typeParam} = ${sourceCode.getText(extend[0])}`);
+ };
+ // Check if interface is within ambient declaration
+ let useAutoFix = true;
+ if (util.isDefinitionFile(filename)) {
+ const scope = context.getScope();
+ if (scope.type === 'tsModule' && scope.block.declare) {
+ useAutoFix = false;
+ }
+ }
+ context.report(Object.assign({ node: node.id, messageId: 'noEmptyWithSuper' }, (useAutoFix
+ ? { fix }
+ : {
+ suggest: [
+ {
+ messageId: 'noEmptyWithSuper',
+ fix,
+ },
+ ],
+ })));
+ }
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-empty-interface.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map
new file mode 100644
index 000000000..ba663fe02
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-empty-interface.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-empty-interface.js","sourceRoot":"","sources":["../../src/rules/no-empty-interface.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgC;AAUhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,UAAU,EAAE,IAAI;SACjB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,OAAO,EAAE,2CAA2C;YACpD,gBAAgB,EACd,mEAAmE;SACtE;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACV,kBAAkB,EAAE;wBAClB,IAAI,EAAE,SAAS;qBAChB;iBACF;aACF;SACF;KACF;IACD,cAAc,EAAE;QACd;YACE,kBAAkB,EAAE,KAAK;SAC1B;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,kBAAkB,EAAE,CAAC;QACtC,OAAO;YACL,sBAAsB,CAAC,IAAI;gBACzB,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;gBAC3C,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,EAAE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,EACb,SAAS,EAAE,kBAAkB,IAC1B,CAAC,UAAU;4BACZ,CAAC,CAAC,EAAE,GAAG,EAAE;4BACT,CAAC,CAAC;gCACE,OAAO,EAAE;oCACP;wCACE,SAAS,EAAE,kBAAkB;wCAC7B,GAAG;qCACJ;iCACF;6BACF,CAAC,EACN,CAAC;qBACJ;iBACF;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js
new file mode 100644
index 000000000..f64ee1478
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js
@@ -0,0 +1,188 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-explicit-any',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow usage of the `any` type',
+ category: 'Best Practices',
+ recommended: 'warn',
+ suggestion: true,
+ },
+ fixable: 'code',
+ messages: {
+ unexpectedAny: 'Unexpected any. Specify a different type.',
+ suggestUnknown: 'Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.',
+ suggestNever: "Use `never` instead, this is useful when instantiating generic type parameters that you don't need to know the type of.",
+ },
+ schema: [
+ {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ fixToUnknown: {
+ type: 'boolean',
+ },
+ ignoreRestArgs: {
+ type: 'boolean',
+ },
+ },
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ fixToUnknown: false,
+ ignoreRestArgs: false,
+ },
+ ],
+ create(context, [{ ignoreRestArgs, fixToUnknown }]) {
+ /**
+ * Checks if the node is an arrow function, function/constructor declaration or function expression
+ * @param node the node to be validated.
+ * @returns true if the node is any kind of function declaration or expression
+ * @private
+ */
+ function isNodeValidFunction(node) {
+ return [
+ experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.FunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSFunctionType,
+ experimental_utils_1.AST_NODE_TYPES.TSConstructorType,
+ experimental_utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSMethodSignature,
+ experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction,
+ ].includes(node.type);
+ }
+ /**
+ * Checks if the node is a rest element child node of a function
+ * @param node the node to be validated.
+ * @returns true if the node is a rest element child node of a function
+ * @private
+ */
+ function isNodeRestElementInFunction(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.RestElement &&
+ typeof node.parent !== 'undefined' &&
+ isNodeValidFunction(node.parent));
+ }
+ /**
+ * Checks if the node is a TSTypeOperator node with a readonly operator
+ * @param node the node to be validated.
+ * @returns true if the node is a TSTypeOperator node with a readonly operator
+ * @private
+ */
+ function isNodeReadonlyTSTypeOperator(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.TSTypeOperator &&
+ node.operator === 'readonly');
+ }
+ /**
+ * Checks if the node is a TSTypeReference node with an Array identifier
+ * @param node the node to be validated.
+ * @returns true if the node is a TSTypeReference node with an Array identifier
+ * @private
+ */
+ function isNodeValidArrayTSTypeReference(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.TSTypeReference &&
+ typeof node.typeName !== 'undefined' &&
+ node.typeName.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ ['Array', 'ReadonlyArray'].includes(node.typeName.name));
+ }
+ /**
+ * Checks if the node is a valid TSTypeOperator or TSTypeReference node
+ * @param node the node to be validated.
+ * @returns true if the node is a valid TSTypeOperator or TSTypeReference node
+ * @private
+ */
+ function isNodeValidTSType(node) {
+ return (isNodeReadonlyTSTypeOperator(node) ||
+ isNodeValidArrayTSTypeReference(node));
+ }
+ /**
+ * Checks if the great grand-parent node is a RestElement node in a function
+ * @param node the node to be validated.
+ * @returns true if the great grand-parent node is a RestElement node in a function
+ * @private
+ */
+ function isGreatGrandparentRestElement(node) {
+ var _a, _b;
+ return (((_b = (_a = node === null || node === void 0 ? void 0 : node.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) != null &&
+ isNodeRestElementInFunction(node.parent.parent.parent));
+ }
+ /**
+ * Checks if the great great grand-parent node is a valid RestElement node in a function
+ * @param node the node to be validated.
+ * @returns true if the great great grand-parent node is a valid RestElement node in a function
+ * @private
+ */
+ function isGreatGreatGrandparentRestElement(node) {
+ var _a, _b, _c;
+ return (((_c = (_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.parent) === null || _c === void 0 ? void 0 : _c.parent) != null &&
+ isNodeValidTSType(node.parent.parent) &&
+ isNodeRestElementInFunction(node.parent.parent.parent.parent));
+ }
+ /**
+ * Checks if the great grand-parent or the great great grand-parent node is a RestElement node
+ * @param node the node to be validated.
+ * @returns true if the great grand-parent or the great great grand-parent node is a RestElement node
+ * @private
+ */
+ function isNodeDescendantOfRestElementInFunction(node) {
+ return (isGreatGrandparentRestElement(node) ||
+ isGreatGreatGrandparentRestElement(node));
+ }
+ return {
+ TSAnyKeyword(node) {
+ if (ignoreRestArgs && isNodeDescendantOfRestElementInFunction(node)) {
+ return;
+ }
+ const fixOrSuggest = {
+ fix: null,
+ suggest: [
+ {
+ messageId: 'suggestUnknown',
+ fix(fixer) {
+ return fixer.replaceText(node, 'unknown');
+ },
+ },
+ {
+ messageId: 'suggestNever',
+ fix(fixer) {
+ return fixer.replaceText(node, 'never');
+ },
+ },
+ ],
+ };
+ if (fixToUnknown) {
+ fixOrSuggest.fix = (fixer => fixer.replaceText(node, 'unknown'));
+ }
+ context.report(Object.assign({ node, messageId: 'unexpectedAny' }, fixOrSuggest));
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-explicit-any.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map
new file mode 100644
index 000000000..d9f8f5466
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-explicit-any.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-explicit-any.js","sourceRoot":"","sources":["../../src/rules/no-explicit-any.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAWhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,MAAM;YACnB,UAAU,EAAE,IAAI;SACjB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;Y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ED,OAAO;YACL,YAAY,CAAC,IAAI;gBACf,IAAI,cAAc,IAAI,uCAAuC,CAAC,IAAI,CAAC,EAAE;oBACnE,OAAO;iBACR;gBAED,MAAM,YAAY,GAGd;oBACF,GAAG,EAAE,IAAI;oBACT,OAAO,EAAE;wBACP;4BACE,SAAS,EAAE,gBAAgB;4BAC3B,GAAG,CAAC,KAAK;gCACP,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;4BAC5C,CAAC;yBACF;wBACD;4BACE,SAAS,EAAE,cAAc;4BACzB,GAAG,CAAC,KAAK;gCACP,OAAO,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;4BAC1C,CAAC;yBACF;qBACF;iBACF,CAAC;gBAEF,IAAI,YAAY,EAAE;oBAChB,YAAY,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,EAAE,CAC1B,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,SAAS,CAAC,CAA+B,CAAC;iBACrE;gBAED,OAAO,CAAC,MAAM,iBACZ,IAAI,EACJ,SAAS,EAAE,eAAe,IACvB,YAAY,EACf,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js
new file mode 100644
index 000000000..9c0ac371d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js
@@ -0,0 +1,56 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-extra-non-null-assertion',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow extra non-null assertion',
+ category: 'Stylistic Issues',
+ recommended: 'error',
+ },
+ fixable: 'code',
+ schema: [],
+ messages: {
+ noExtraNonNullAssertion: 'Forbidden extra non-null assertion.',
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ function checkExtraNonNullAssertion(node) {
+ context.report({
+ node,
+ messageId: 'noExtraNonNullAssertion',
+ fix(fixer) {
+ return fixer.removeRange([node.range[1] - 1, node.range[1]]);
+ },
+ });
+ }
+ return {
+ 'TSNonNullExpression > TSNonNullExpression': checkExtraNonNullAssertion,
+ 'MemberExpression[optional = true] > TSNonNullExpression': checkExtraNonNullAssertion,
+ 'CallExpression[optional = true] > TSNonNullExpression.callee': checkExtraNonNullAssertion,
+ };
+ },
+});
+//# sourceMappingURL=no-extra-non-null-assertion.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js.map
new file mode 100644
index 000000000..ad93d3fe9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-non-null-assertion.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-extra-non-null-assertion.js","sourceRoot":"","sources":["../../src/rules/no-extra-non-null-assertion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,mCAAmC;YAChD,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,OAAO;SACrB;QACD,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,uBAAuB,EAAE,qCAAqC;SAC/D;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,SAAS,0BAA0B,CACjC,IAAkC;YAElC,OAAO,CAAC,MAAM,CAAC;gBACb,IAAI;gBACJ,SAAS,EAAE,yBAAyB;gBACpC,GAAG,CAAC,KAAK;oBACP,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC/D,CAAC;aACF,CAAC,CAAC;QACL,CAAC;QAED,OAAO;YACL,2CAA2C,EAAE,0BAA0B;YACvE,yDAAyD,EAAE,0BAA0B;YACrF,8DAA8D,EAAE,0BAA0B;SAC3F,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js
new file mode 100644
index 000000000..713be4ddd
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js
@@ -0,0 +1,182 @@
+"use strict";
+// any is required to work around manipulating the AST in weird ways
+/* eslint-disable @typescript-eslint/no-explicit-any */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const no_extra_parens_1 = __importDefault(require("eslint/lib/rules/no-extra-parens"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-extra-parens',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Disallow unnecessary parentheses',
+ category: 'Possible Errors',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ fixable: 'code',
+ schema: no_extra_parens_1.default.meta.schema,
+ messages: no_extra_parens_1.default.meta.messages,
+ },
+ defaultOptions: ['all'],
+ create(context) {
+ const rules = no_extra_parens_1.default.create(context);
+ function binaryExp(node) {
+ const rule = rules.BinaryExpression;
+ // makes the rule think it should skip the left or right
+ const isLeftTypeAssertion = util.isTypeAssertion(node.left);
+ const isRightTypeAssertion = util.isTypeAssertion(node.right);
+ if (isLeftTypeAssertion && isRightTypeAssertion) {
+ return; // ignore
+ }
+ if (isLeftTypeAssertion) {
+ return rule(Object.assign(Object.assign({}, node), { left: Object.assign(Object.assign({}, node.left), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }) }));
+ }
+ if (isRightTypeAssertion) {
+ return rule(Object.assign(Object.assign({}, node), { right: Object.assign(Object.assign({}, node.right), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }) }));
+ }
+ return rule(node);
+ }
+ function callExp(node) {
+ var _a;
+ const rule = rules.CallExpression;
+ if (util.isTypeAssertion(node.callee)) {
+ // reduces the precedence of the node so the rule thinks it needs to be wrapped
+ return rule(Object.assign(Object.assign({}, node), { callee: Object.assign(Object.assign({}, node.callee), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }) }));
+ }
+ if (node.arguments.length === 1 && ((_a = node.typeParameters) === null || _a === void 0 ? void 0 : _a.params.some(param => param.type === experimental_utils_1.AST_NODE_TYPES.TSParenthesizedType ||
+ param.type === experimental_utils_1.AST_NODE_TYPES.TSImportType))) {
+ return rule(Object.assign(Object.assign({}, node), { arguments: [
+ Object.assign(Object.assign({}, node.arguments[0]), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }),
+ ] }));
+ }
+ return rule(node);
+ }
+ function unaryUpdateExpression(node) {
+ const rule = rules.UnaryExpression;
+ if (util.isTypeAssertion(node.argument)) {
+ // reduces the precedence of the node so the rule thinks it needs to be wrapped
+ return rule(Object.assign(Object.assign({}, node), { argument: Object.assign(Object.assign({}, node.argument), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }) }));
+ }
+ return rule(node);
+ }
+ const overrides = {
+ // ArrayExpression
+ ArrowFunctionExpression(node) {
+ if (!util.isTypeAssertion(node.body)) {
+ return rules.ArrowFunctionExpression(node);
+ }
+ },
+ // AssignmentExpression
+ // AwaitExpression
+ BinaryExpression: binaryExp,
+ CallExpression: callExp,
+ // ClassDeclaration
+ // ClassExpression
+ ConditionalExpression(node) {
+ // reduces the precedence of the node so the rule thinks it needs to be wrapped
+ if (util.isTypeAssertion(node.test)) {
+ return rules.ConditionalExpression(Object.assign(Object.assign({}, node), { test: Object.assign(Object.assign({}, node.test), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }) }));
+ }
+ if (util.isTypeAssertion(node.consequent)) {
+ return rules.ConditionalExpression(Object.assign(Object.assign({}, node), { consequent: Object.assign(Object.assign({}, node.consequent), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }) }));
+ }
+ if (util.isTypeAssertion(node.alternate)) {
+ // reduces the precedence of the node so the rule thinks it needs to be rapped
+ return rules.ConditionalExpression(Object.assign(Object.assign({}, node), { alternate: Object.assign(Object.assign({}, node.alternate), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }) }));
+ }
+ return rules.ConditionalExpression(node);
+ },
+ // DoWhileStatement
+ 'ForInStatement, ForOfStatement'(node) {
+ if (util.isTypeAssertion(node.right)) {
+ // makes the rule skip checking of the right
+ return rules['ForInStatement, ForOfStatement'](Object.assign(Object.assign({}, node), { type: experimental_utils_1.AST_NODE_TYPES.ForOfStatement, right: Object.assign(Object.assign({}, node.right), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }) }));
+ }
+ return rules['ForInStatement, ForOfStatement'](node);
+ },
+ ForStatement(node) {
+ // make the rule skip the piece by removing it entirely
+ if (node.init && util.isTypeAssertion(node.init)) {
+ return rules.ForStatement(Object.assign(Object.assign({}, node), { init: null }));
+ }
+ if (node.test && util.isTypeAssertion(node.test)) {
+ return rules.ForStatement(Object.assign(Object.assign({}, node), { test: null }));
+ }
+ if (node.update && util.isTypeAssertion(node.update)) {
+ return rules.ForStatement(Object.assign(Object.assign({}, node), { update: null }));
+ }
+ return rules.ForStatement(node);
+ },
+ 'ForStatement > *.init:exit'(node) {
+ if (!util.isTypeAssertion(node)) {
+ return rules['ForStatement > *.init:exit'](node);
+ }
+ },
+ // IfStatement
+ LogicalExpression: binaryExp,
+ MemberExpression(node) {
+ if (util.isTypeAssertion(node.object)) {
+ // reduces the precedence of the node so the rule thinks it needs to be wrapped
+ return rules.MemberExpression(Object.assign(Object.assign({}, node), { object: Object.assign(Object.assign({}, node.object), { type: experimental_utils_1.AST_NODE_TYPES.SequenceExpression }) }));
+ }
+ return rules.MemberExpression(node);
+ },
+ NewExpression: callExp,
+ // ObjectExpression
+ // ReturnStatement
+ // SequenceExpression
+ SpreadElement(node) {
+ if (!util.isTypeAssertion(node.argument)) {
+ return rules.SpreadElement(node);
+ }
+ },
+ SwitchCase(node) {
+ if (node.test && !util.isTypeAssertion(node.test)) {
+ return rules.SwitchCase(node);
+ }
+ },
+ // SwitchStatement
+ ThrowStatement(node) {
+ if (node.argument && !util.isTypeAssertion(node.argument)) {
+ return rules.ThrowStatement(node);
+ }
+ },
+ UnaryExpression: unaryUpdateExpression,
+ UpdateExpression: unaryUpdateExpression,
+ // VariableDeclarator
+ // WhileStatement
+ // WithStatement - i'm not going to even bother implementing this terrible and never used feature
+ YieldExpression(node) {
+ if (node.argument && !util.isTypeAssertion(node.argument)) {
+ return rules.YieldExpression(node);
+ }
+ },
+ };
+ return Object.assign({}, rules, overrides);
+ },
+});
+//# sourceMappingURL=no-extra-parens.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js.map
new file mode 100644
index 000000000..b3b7d7eac
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-parens.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-extra-parens.js","sourceRoot":"","sources":["../../src/rules/no-extra-parens.ts"],"names":[],"mappings":";AAAA,oEAAoE;AACpE,uDAAuD;;;;;;;;;;;;;;;;;;;;;;;;AAEvD,8EAI+C;AAC/C,uFAAwD;AACxD,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE;YACJ,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,yBAAQ,CAAC,IAAI,CAAC,MAAM;QAC5B,QA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AC,IAAI,CAAC,EAAE;oBACjD,OAAO,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;iBAC/B;YACH,CAAC;YACD,kBAAkB;YAClB,cAAc,CAAC,IAAI;gBACjB,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;oBACzD,OAAO,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;iBACnC;YACH,CAAC;YACD,eAAe,EAAE,qBAAqB;YACtC,gBAAgB,EAAE,qBAAqB;YACvC,qBAAqB;YACrB,iBAAiB;YACjB,iGAAiG;YACjG,eAAe,CAAC,IAAI;gBAClB,IAAI,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;oBACzD,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;iBACpC;YACH,CAAC;SACF,CAAC;QACF,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IAC7C,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-semi.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-semi.js
new file mode 100644
index 000000000..7c89f97d9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-semi.js
@@ -0,0 +1,49 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const no_extra_semi_1 = __importDefault(require("eslint/lib/rules/no-extra-semi"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-extra-semi',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow unnecessary semicolons',
+ category: 'Possible Errors',
+ recommended: 'error',
+ extendsBaseRule: true,
+ },
+ fixable: 'code',
+ schema: no_extra_semi_1.default.meta.schema,
+ messages: no_extra_semi_1.default.meta.messages,
+ },
+ defaultOptions: [],
+ create(context) {
+ const rules = no_extra_semi_1.default.create(context);
+ return Object.assign(Object.assign({}, rules), { ClassProperty(node) {
+ rules.MethodDefinition(node);
+ } });
+ },
+});
+//# sourceMappingURL=no-extra-semi.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-semi.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-semi.js.map
new file mode 100644
index 000000000..c7e87d7ab
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extra-semi.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-extra-semi.js","sourceRoot":"","sources":["../../src/rules/no-extra-semi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA,mFAAsD;AACtD,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,iCAAiC;YAC9C,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,OAAO;YACpB,eAAe,EAAE,IAAI;SACtB;QACD,OAAO,EAAE,MAAM;QACf,MAAM,EAAE,uBAAQ,CAAC,IAAI,CAAC,MAAM;QAC5B,QAAQ,EAAE,uBAAQ,CAAC,IAAI,CAAC,QAAQ;KACjC;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,KAAK,GAAG,uBAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAEvC,uCACK,KAAK,KACR,aAAa,CAAC,IAAI;gBAChB,KAAK,CAAC,gBAAgB,CAAC,IAAa,CAAC,CAAC;YACxC,CAAC,IACD;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js
new file mode 100644
index 000000000..3e8136974
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js
@@ -0,0 +1,129 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-extraneous-class',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Forbids the use of classes as namespaces',
+ category: 'Best Practices',
+ recommended: false,
+ },
+ schema: [
+ {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ allowConstructorOnly: {
+ type: 'boolean',
+ },
+ allowEmpty: {
+ type: 'boolean',
+ },
+ allowStaticOnly: {
+ type: 'boolean',
+ },
+ allowWithDecorator: {
+ type: 'boolean',
+ },
+ },
+ },
+ ],
+ messages: {
+ empty: 'Unexpected empty class.',
+ onlyStatic: 'Unexpected class with only static properties.',
+ onlyConstructor: 'Unexpected class with only a constructor.',
+ },
+ },
+ defaultOptions: [
+ {
+ allowConstructorOnly: false,
+ allowEmpty: false,
+ allowStaticOnly: false,
+ allowWithDecorator: false,
+ },
+ ],
+ create(context, [{ allowConstructorOnly, allowEmpty, allowStaticOnly, allowWithDecorator }]) {
+ const isAllowWithDecorator = (node) => {
+ return !!(allowWithDecorator &&
+ node &&
+ node.decorators &&
+ node.decorators.length);
+ };
+ return {
+ ClassBody(node) {
+ const parent = node.parent;
+ if (!parent || parent.superClass) {
+ return;
+ }
+ const reportNode = 'id' in parent && parent.id ? parent.id : parent;
+ if (node.body.length === 0) {
+ if (allowEmpty || isAllowWithDecorator(parent)) {
+ return;
+ }
+ context.report({
+ node: reportNode,
+ messageId: 'empty',
+ });
+ return;
+ }
+ let onlyStatic = true;
+ let onlyConstructor = true;
+ for (const prop of node.body) {
+ if ('kind' in prop && prop.kind === 'constructor') {
+ if (prop.value.params.some(param => param.type === experimental_utils_1.AST_NODE_TYPES.TSParameterProperty)) {
+ onlyConstructor = false;
+ onlyStatic = false;
+ }
+ }
+ else {
+ onlyConstructor = false;
+ if ('static' in prop && !prop.static) {
+ onlyStatic = false;
+ }
+ }
+ if (!(onlyStatic || onlyConstructor)) {
+ break;
+ }
+ }
+ if (onlyConstructor) {
+ if (!allowConstructorOnly) {
+ context.report({
+ node: reportNode,
+ messageId: 'onlyConstructor',
+ });
+ }
+ return;
+ }
+ if (onlyStatic && !allowStaticOnly) {
+ context.report({
+ node: reportNode,
+ messageId: 'onlyStatic',
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-extraneous-class.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js.map
new file mode 100644
index 000000000..6865a15f3
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-extraneous-class.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-extraneous-class.js","sourceRoot":"","sources":["../../src/rules/no-extraneous-class.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAYhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,0CAA0C;YACvD,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;SACnB;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACV,oBAAoB,EAAE;wBACpB,IAAI,EAAE,SAAS;qBAChB;oBACD,UAAU,EAAE;wBACV,IAAI,EAAE,SAAS;qBAChB;oBACD,eAAe,EAAE;wBACf,IAAI,EAAE,SAAS;qBAChB;oBACD,kBAAkB,EAAE;wBAClB,IAAI,EAAE,SAAS;qBAChB;iBACF;aACF;SACF;QACD,QAAQ,EAAE;YACR,KAAK,EAAE,yBAAyB;YAChC,UAAU,EAAE,+CAA+C;YAC3D,eAAe,EAAE,2CAA2C;SAC7D;KACF;IACD,cAAc,EAAE;QACd;YACE,oBAAoB,EAAE,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,CAAC,IAAI,KAAK,mCAAc,CAAC,mBAAmB,CAC3D,EACD;4BACA,eAAe,GAAG,KAAK,CAAC;4BACxB,UAAU,GAAG,KAAK,CAAC;yBACpB;qBACF;yBAAM;wBACL,eAAe,GAAG,KAAK,CAAC;wBACxB,IAAI,QAAQ,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE;4BACpC,UAAU,GAAG,KAAK,CAAC;yBACpB;qBACF;oBACD,IAAI,CAAC,CAAC,UAAU,IAAI,eAAe,CAAC,EAAE;wBACpC,MAAM;qBACP;iBACF;gBAED,IAAI,eAAe,EAAE;oBACnB,IAAI,CAAC,oBAAoB,EAAE;wBACzB,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI,EAAE,UAAU;4BAChB,SAAS,EAAE,iBAAiB;yBAC7B,CAAC,CAAC;qBACJ;oBACD,OAAO;iBACR;gBACD,IAAI,UAAU,IAAI,CAAC,eAAe,EAAE;oBAClC,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAE,UAAU;wBAChB,SAAS,EAAE,YAAY;qBACxB,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js
new file mode 100644
index 000000000..38191bcb6
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js
@@ -0,0 +1,204 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const tsutils = __importStar(require("tsutils"));
+const ts = __importStar(require("typescript"));
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-floating-promises',
+ meta: {
+ docs: {
+ description: 'Requires Promise-like values to be handled appropriately',
+ category: 'Best Practices',
+ recommended: 'error',
+ suggestion: true,
+ requiresTypeChecking: true,
+ },
+ messages: {
+ floating: 'Promises must be handled appropriately.',
+ floatingVoid: 'Promises must be handled appropriately' +
+ ' or explicitly marked as ignored with the `void` operator.',
+ floatingFixVoid: 'Add void operator to ignore.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ ignoreVoid: { type: 'boolean' },
+ ignoreIIFE: { type: 'boolean' },
+ },
+ additionalProperties: false,
+ },
+ ],
+ type: 'problem',
+ },
+ defaultOptions: [
+ {
+ ignoreVoid: true,
+ ignoreIIFE: false,
+ },
+ ],
+ create(context, [options]) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ const sourceCode = context.getSourceCode();
+ return {
+ ExpressionStatement(node) {
+ const { expression } = parserServices.esTreeNodeToTSNodeMap.get(node);
+ if (options.ignoreIIFE && isAsyncIife(node)) {
+ return;
+ }
+ if (isUnhandledPromise(checker, expression)) {
+ if (options.ignoreVoid) {
+ context.report({
+ node,
+ messageId: 'floatingVoid',
+ suggest: [
+ {
+ messageId: 'floatingFixVoid',
+ fix(fixer) {
+ let code = sourceCode.getText(node);
+ code = `void ${code}`;
+ return fixer.replaceText(node, code);
+ },
+ },
+ ],
+ });
+ }
+ else {
+ context.report({
+ node,
+ messageId: 'floating',
+ });
+ }
+ }
+ },
+ };
+ function isAsyncIife(node) {
+ if (node.expression.type !== experimental_utils_1.AST_NODE_TYPES.CallExpression) {
+ return false;
+ }
+ return (node.expression.type === experimental_utils_1.AST_NODE_TYPES.CallExpression &&
+ (node.expression.callee.type ===
+ experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression ||
+ node.expression.callee.type === experimental_utils_1.AST_NODE_TYPES.FunctionExpression));
+ }
+ function isUnhandledPromise(checker, node) {
+ // First, check expressions whose resulting types may not be promise-like
+ if (ts.isBinaryExpression(node) &&
+ node.operatorToken.kind === ts.SyntaxKind.CommaToken) {
+ // Any child in a comma expression could return a potentially unhandled
+ // promise, so we check them all regardless of whether the final returned
+ // value is promise-like.
+ return (isUnhandledPromise(checker, node.left) ||
+ isUnhandledPromise(checker, node.right));
+ }
+ if (ts.isVoidExpression(node) && !options.ignoreVoid) {
+ // Similarly, a `void` expression always returns undefined, so we need to
+ // see what's inside it without checking the type of the overall expression.
+ return isUnhandledPromise(checker, node.expression);
+ }
+ // Check the type. At this point it can't be unhandled if it isn't a promise
+ if (!isPromiseLike(checker, node)) {
+ return false;
+ }
+ if (ts.isCallExpression(node)) {
+ // If the outer expression is a call, it must be either a `.then()` or
+ // `.catch()` that handles the promise.
+ return (!isPromiseCatchCallWithHandler(node) &&
+ !isPromiseThenCallWithRejectionHandler(node) &&
+ !isPromiseFinallyCallWithHandler(node));
+ }
+ else if (ts.isConditionalExpression(node)) {
+ // We must be getting the promise-like value from one of the branches of the
+ // ternary. Check them directly.
+ return (isUnhandledPromise(checker, node.whenFalse) ||
+ isUnhandledPromise(checker, node.whenTrue));
+ }
+ else if (ts.isPropertyAccessExpression(node) ||
+ ts.isIdentifier(node) ||
+ ts.isNewExpression(node)) {
+ // If it is just a property access chain or a `new` call (e.g. `foo.bar` or
+ // `new Promise()`), the promise is not handled because it doesn't have the
+ // necessary then/catch call at the end of the chain.
+ return true;
+ }
+ // We conservatively return false for all other types of expressions because
+ // we don't want to accidentally fail if the promise is handled internally but
+ // we just can't tell.
+ return false;
+ }
+ },
+});
+// Modified from tsutils.isThenable() to only consider thenables which can be
+// rejected/caught via a second parameter. Original source (MIT licensed):
+//
+// https://github.com/ajafff/tsutils/blob/49d0d31050b44b81e918eae4fbaf1dfe7b7286af/util/type.ts#L95-L125
+function isPromiseLike(checker, node) {
+ const type = checker.getTypeAtLocation(node);
+ for (const ty of tsutils.unionTypeParts(checker.getApparentType(type))) {
+ const then = ty.getProperty('then');
+ if (then === undefined) {
+ continue;
+ }
+ const thenType = checker.getTypeOfSymbolAtLocation(then, node);
+ if (hasMatchingSignature(thenType, signature => signature.parameters.length >= 2 &&
+ isFunctionParam(checker, signature.parameters[0], node) &&
+ isFunctionParam(checker, signature.parameters[1], node))) {
+ return true;
+ }
+ }
+ return false;
+}
+function hasMatchingSignature(type, matcher) {
+ for (const t of tsutils.unionTypeParts(type)) {
+ if (t.getCallSignatures().some(matcher)) {
+ return true;
+ }
+ }
+ return false;
+}
+function isFunctionParam(checker, param, node) {
+ const type = checker.getApparentType(checker.getTypeOfSymbolAtLocation(param, node));
+ for (const t of tsutils.unionTypeParts(type)) {
+ if (t.getCallSignatures().length !== 0) {
+ return true;
+ }
+ }
+ return false;
+}
+function isPromiseCatchCallWithHandler(expression) {
+ return (tsutils.isPropertyAccessExpression(expression.expression) &&
+ expression.expression.name.text === 'catch' &&
+ expression.arguments.length >= 1);
+}
+function isPromiseThenCallWithRejectionHandler(expression) {
+ return (tsutils.isPropertyAccessExpression(expression.expression) &&
+ expression.expression.name.text === 'then' &&
+ expression.arguments.length >= 2);
+}
+function isPromiseFinallyCallWithHandler(expression) {
+ return (tsutils.isPropertyAccessExpression(expression.expression) &&
+ expression.expression.name.text === 'finally' &&
+ expression.arguments.length >= 1);
+}
+//# sourceMappingURL=no-floating-promises.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map
new file mode 100644
index 000000000..d02528781
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-floating-promises.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-floating-promises.js","sourceRoot":"","sources":["../../src/rules/no-floating-promises.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AACnC,+CAAiC;AACjC,8EAI+C;AAE/C,8CAAgC;AAWhC,kBAAe,IAAI,CAAC,UAAU,CAAqB;IACjD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,0DAA0D;YACvE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,UAAU,EAAE,IAAI;YAChB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,QAAQ,EAAE,yCAAyC;YACnD,YAAY,EACV,wCAAwC;gBACxC,4DAA4D;YAC9D,eAAe,EAAE,8BAA8B;SAChD;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBAC/B,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;iBAChC;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;QACD,IAAI,EAAE,SAAS;KAChB;IACD,cAAc,EAAE;QACd;YACE,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;SAClB;KACF;IAED,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC;QACvB,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACvD,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QACxD,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C,OAAO;YACL,mB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YACvC,OAAO,IAAI,CAAC;SACb;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,eAAe,CACtB,OAAuB,EACvB,KAAgB,EAChB,IAAa;IAEb,MAAM,IAAI,GAAwB,OAAO,CAAC,eAAe,CACvD,OAAO,CAAC,yBAAyB,CAAC,KAAK,EAAE,IAAI,CAAC,CAC/C,CAAC;IACF,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;QAC5C,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC,MAAM,KAAK,CAAC,EAAE;YACtC,OAAO,IAAI,CAAC;SACb;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAS,6BAA6B,CAAC,UAA6B;IAClE,OAAO,CACL,OAAO,CAAC,0BAA0B,CAAC,UAAU,CAAC,UAAU,CAAC;QACzD,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,OAAO;QAC3C,UAAU,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,CACjC,CAAC;AACJ,CAAC;AAED,SAAS,qCAAqC,CAC5C,UAA6B;IAE7B,OAAO,CACL,OAAO,CAAC,0BAA0B,CAAC,UAAU,CAAC,UAAU,CAAC;QACzD,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM;QAC1C,UAAU,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,CACjC,CAAC;AACJ,CAAC;AAED,SAAS,+BAA+B,CACtC,UAA6B;IAE7B,OAAO,CACL,OAAO,CAAC,0BAA0B,CAAC,UAAU,CAAC,UAAU,CAAC;QACzD,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS;QAC7C,UAAU,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,CACjC,CAAC;AACJ,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js
new file mode 100644
index 000000000..e1b7fc7dd
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js
@@ -0,0 +1,58 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-for-in-array',
+ meta: {
+ docs: {
+ description: 'Disallow iterating over an array with a for-in loop',
+ category: 'Best Practices',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ forInViolation: 'For-in loops over arrays are forbidden. Use for-of or array.forEach instead.',
+ },
+ schema: [],
+ type: 'problem',
+ },
+ defaultOptions: [],
+ create(context) {
+ return {
+ ForInStatement(node) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ const originalNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const type = util.getConstrainedTypeAtLocation(checker, originalNode.expression);
+ if (util.isTypeArrayTypeOrUnionOfArrayTypes(type, checker) ||
+ (type.flags & ts.TypeFlags.StringLike) !== 0) {
+ context.report({
+ node,
+ messageId: 'forInViolation',
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-for-in-array.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js.map
new file mode 100644
index 000000000..67767b3c9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-for-in-array.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-for-in-array.js","sourceRoot":"","sources":["../../src/rules/no-for-in-array.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,cAAc,EACZ,8EAA8E;SACjF;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,SAAS;KAChB;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,cAAc,CAAC,IAAI;gBACjB,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;gBACvD,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;gBACxD,MAAM,YAAY,GAAG,cAAc,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAEpE,MAAM,IAAI,GAAG,IAAI,CAAC,4BAA4B,CAC5C,OAAO,EACP,YAAY,CAAC,UAAU,CACxB,CAAC;gBAEF,IACE,IAAI,CAAC,kCAAkC,CAAC,IAAI,EAAE,OAAO,CAAC;oBACtD,CAAC,IAAI,CAAC,KAAK,GAAG,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,EAC5C;oBACA,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,gBAAgB;qBAC5B,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js
new file mode 100644
index 000000000..fb3d31ef7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js
@@ -0,0 +1,97 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+exports.default = util.createRule({
+ name: 'no-implicit-any-catch',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow usage of the implicit `any` type in catch clauses',
+ category: 'Best Practices',
+ recommended: false,
+ suggestion: true,
+ },
+ fixable: 'code',
+ messages: {
+ implicitAnyInCatch: 'Implicit any in catch clause',
+ explicitAnyInCatch: 'Explicit any in catch clause',
+ suggestExplicitUnknown: 'Use `unknown` instead, this will force you to explicitly, and safely assert the type is correct.',
+ },
+ schema: [
+ {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ allowExplicitAny: {
+ type: 'boolean',
+ },
+ },
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ allowExplicitAny: false,
+ },
+ ],
+ create(context, [{ allowExplicitAny }]) {
+ return {
+ CatchClause(node) {
+ if (!node.param) {
+ return; // ignore catch without variable
+ }
+ if (!node.param.typeAnnotation) {
+ context.report({
+ node,
+ messageId: 'implicitAnyInCatch',
+ suggest: [
+ {
+ messageId: 'suggestExplicitUnknown',
+ fix(fixer) {
+ return fixer.insertTextAfter(node.param, ': unknown');
+ },
+ },
+ ],
+ });
+ }
+ else if (!allowExplicitAny &&
+ node.param.typeAnnotation.typeAnnotation.type ===
+ experimental_utils_1.AST_NODE_TYPES.TSAnyKeyword) {
+ context.report({
+ node,
+ messageId: 'explicitAnyInCatch',
+ suggest: [
+ {
+ messageId: 'suggestExplicitUnknown',
+ fix(fixer) {
+ return fixer.replaceText(node.param.typeAnnotation, ': unknown');
+ },
+ },
+ ],
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-implicit-any-catch.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js.map
new file mode 100644
index 000000000..e5ed504fa
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implicit-any-catch.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-implicit-any-catch.js","sourceRoot":"","sources":["../../src/rules/no-implicit-any-catch.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8CAAgC;AAChC,8EAG+C;AAY/C,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,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AAK;oCACP,OAAO,KAAK,CAAC,WAAW,CACtB,IAAI,CAAC,KAAM,CAAC,cAAe,EAC3B,WAAW,CACZ,CAAC;gCACJ,CAAC;6BACF;yBACF;qBACF,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js
new file mode 100644
index 000000000..8fbc30cc7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js
@@ -0,0 +1,139 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const ts = __importStar(require("typescript"));
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const tsutils = __importStar(require("tsutils"));
+const util = __importStar(require("../util"));
+const FUNCTION_CONSTRUCTOR = 'Function';
+const GLOBAL_CANDIDATES = new Set(['global', 'window', 'globalThis']);
+const EVAL_LIKE_METHODS = new Set([
+ 'setImmediate',
+ 'setInterval',
+ 'setTimeout',
+ 'execScript',
+]);
+exports.default = util.createRule({
+ name: 'no-implied-eval',
+ meta: {
+ docs: {
+ description: 'Disallow the use of `eval()`-like methods',
+ category: 'Best Practices',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ noImpliedEvalError: 'Implied eval. Consider passing a function.',
+ noFunctionConstructor: 'Implied eval. Do not use the Function constructor to create functions.',
+ },
+ schema: [],
+ type: 'suggestion',
+ },
+ defaultOptions: [],
+ create(context) {
+ const parserServices = util.getParserServices(context);
+ const program = parserServices.program;
+ const checker = parserServices.program.getTypeChecker();
+ function getCalleeName(node) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ return node.name;
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression &&
+ node.object.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ GLOBAL_CANDIDATES.has(node.object.name)) {
+ if (node.property.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ return node.property.name;
+ }
+ if (node.property.type === experimental_utils_1.AST_NODE_TYPES.Literal &&
+ typeof node.property.value === 'string') {
+ return node.property.value;
+ }
+ }
+ return null;
+ }
+ function isFunctionType(node) {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const type = checker.getTypeAtLocation(tsNode);
+ const symbol = type.getSymbol();
+ if (symbol &&
+ tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Function | ts.SymbolFlags.Method)) {
+ return true;
+ }
+ const signatures = checker.getSignaturesOfType(type, ts.SignatureKind.Call);
+ return signatures.length > 0;
+ }
+ function isFunction(node) {
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
+ case experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.FunctionExpression:
+ return true;
+ case experimental_utils_1.AST_NODE_TYPES.MemberExpression:
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ return isFunctionType(node);
+ case experimental_utils_1.AST_NODE_TYPES.CallExpression:
+ return ((node.callee.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ node.callee.name === 'bind') ||
+ isFunctionType(node));
+ default:
+ return false;
+ }
+ }
+ function checkImpliedEval(node) {
+ var _a;
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node.callee);
+ const type = checker.getTypeAtLocation(tsNode);
+ const calleeName = getCalleeName(node.callee);
+ if (calleeName === null) {
+ return;
+ }
+ if (calleeName === FUNCTION_CONSTRUCTOR) {
+ const symbol = type.getSymbol();
+ if (symbol) {
+ const declarations = (_a = symbol.getDeclarations()) !== null && _a !== void 0 ? _a : [];
+ for (const declaration of declarations) {
+ const sourceFile = declaration.getSourceFile();
+ if (program.isSourceFileDefaultLibrary(sourceFile)) {
+ context.report({ node, messageId: 'noFunctionConstructor' });
+ return;
+ }
+ }
+ }
+ else {
+ context.report({ node, messageId: 'noFunctionConstructor' });
+ return;
+ }
+ }
+ if (node.arguments.length === 0) {
+ return;
+ }
+ const [handler] = node.arguments;
+ if (EVAL_LIKE_METHODS.has(calleeName) && !isFunction(handler)) {
+ context.report({ node: handler, messageId: 'noImpliedEvalError' });
+ }
+ }
+ return {
+ NewExpression: checkImpliedEval,
+ CallExpression: checkImpliedEval,
+ };
+ },
+});
+//# sourceMappingURL=no-implied-eval.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js.map
new file mode 100644
index 000000000..f58a0f96b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-implied-eval.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-implied-eval.js","sourceRoot":"","sources":["../../src/rules/no-implied-eval.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,+CAAiC;AACjC,8EAG+C;AAC/C,iDAAmC;AACnC,8CAAgC;AAEhC,MAAM,oBAAoB,GAAG,UAAU,CAAC;AACxC,MAAM,iBAAiB,GAAG,IAAI,GAAG,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,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;gBAC7D,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC,CAAC;aACpE;QACH,CAAC;QAED,OAAO;YACL,aAAa,EAAE,gBAAgB;YAC/B,cAAc,EAAE,gBAAgB;SACjC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js
new file mode 100644
index 000000000..60ff6fb11
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js
@@ -0,0 +1,199 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-inferrable-types',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ fixable: 'code',
+ messages: {
+ noInferrableType: 'Type {{type}} trivially inferred from a {{type}} literal, remove type annotation.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ ignoreParameters: {
+ type: 'boolean',
+ },
+ ignoreProperties: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ ignoreParameters: false,
+ ignoreProperties: false,
+ },
+ ],
+ create(context, [{ ignoreParameters, ignoreProperties }]) {
+ function isFunctionCall(init, callName) {
+ if (init.type === experimental_utils_1.AST_NODE_TYPES.ChainExpression) {
+ return isFunctionCall(init.expression, callName);
+ }
+ return (init.type === experimental_utils_1.AST_NODE_TYPES.CallExpression &&
+ init.callee.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ init.callee.name === callName);
+ }
+ function isLiteral(init, typeName) {
+ return (init.type === experimental_utils_1.AST_NODE_TYPES.Literal && typeof init.value === typeName);
+ }
+ function isIdentifier(init, ...names) {
+ return (init.type === experimental_utils_1.AST_NODE_TYPES.Identifier && names.includes(init.name));
+ }
+ function hasUnaryPrefix(init, ...operators) {
+ return (init.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ operators.includes(init.operator));
+ }
+ const keywordMap = {
+ [experimental_utils_1.AST_NODE_TYPES.TSBigIntKeyword]: 'bigint',
+ [experimental_utils_1.AST_NODE_TYPES.TSBooleanKeyword]: 'boolean',
+ [experimental_utils_1.AST_NODE_TYPES.TSNumberKeyword]: 'number',
+ [experimental_utils_1.AST_NODE_TYPES.TSNullKeyword]: 'null',
+ [experimental_utils_1.AST_NODE_TYPES.TSStringKeyword]: 'string',
+ [experimental_utils_1.AST_NODE_TYPES.TSSymbolKeyword]: 'symbol',
+ [experimental_utils_1.AST_NODE_TYPES.TSUndefinedKeyword]: 'undefined',
+ };
+ /**
+ * Returns whether a node has an inferrable value or not
+ */
+ function isInferrable(annotation, init) {
+ switch (annotation.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSBigIntKeyword: {
+ // note that bigint cannot have + prefixed to it
+ const unwrappedInit = hasUnaryPrefix(init, '-')
+ ? init.argument
+ : init;
+ return (isFunctionCall(unwrappedInit, 'BigInt') ||
+ (unwrappedInit.type === experimental_utils_1.AST_NODE_TYPES.Literal &&
+ 'bigint' in unwrappedInit));
+ }
+ case experimental_utils_1.AST_NODE_TYPES.TSBooleanKeyword:
+ return (hasUnaryPrefix(init, '!') ||
+ // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum
+ isFunctionCall(init, 'Boolean') ||
+ isLiteral(init, 'boolean'));
+ case experimental_utils_1.AST_NODE_TYPES.TSNumberKeyword: {
+ const unwrappedInit = hasUnaryPrefix(init, '+', '-')
+ ? init.argument
+ : init;
+ return (isIdentifier(unwrappedInit, 'Infinity', 'NaN') ||
+ isFunctionCall(unwrappedInit, 'Number') ||
+ isLiteral(unwrappedInit, 'number'));
+ }
+ case experimental_utils_1.AST_NODE_TYPES.TSNullKeyword:
+ return init.type === experimental_utils_1.AST_NODE_TYPES.Literal && init.value === null;
+ case experimental_utils_1.AST_NODE_TYPES.TSStringKeyword:
+ return (
+ // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum
+ isFunctionCall(init, 'String') ||
+ isLiteral(init, 'string') ||
+ init.type === experimental_utils_1.AST_NODE_TYPES.TemplateLiteral);
+ case experimental_utils_1.AST_NODE_TYPES.TSSymbolKeyword:
+ return isFunctionCall(init, 'Symbol');
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeReference: {
+ if (annotation.typeName.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ annotation.typeName.name === 'RegExp') {
+ const isRegExpLiteral = init.type === experimental_utils_1.AST_NODE_TYPES.Literal &&
+ init.value instanceof RegExp;
+ const isRegExpNewCall = init.type === experimental_utils_1.AST_NODE_TYPES.NewExpression &&
+ init.callee.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ init.callee.name === 'RegExp';
+ const isRegExpCall = isFunctionCall(init, 'RegExp');
+ return isRegExpLiteral || isRegExpCall || isRegExpNewCall;
+ }
+ return false;
+ }
+ case experimental_utils_1.AST_NODE_TYPES.TSUndefinedKeyword:
+ return (hasUnaryPrefix(init, 'void') || isIdentifier(init, 'undefined'));
+ }
+ return false;
+ }
+ /**
+ * Reports an inferrable type declaration, if any
+ */
+ function reportInferrableType(node, typeNode, initNode) {
+ if (!typeNode || !initNode || !typeNode.typeAnnotation) {
+ return;
+ }
+ if (!isInferrable(typeNode.typeAnnotation, initNode)) {
+ return;
+ }
+ const type = typeNode.typeAnnotation.type === experimental_utils_1.AST_NODE_TYPES.TSTypeReference
+ ? // TODO - if we add more references
+ 'RegExp'
+ : keywordMap[typeNode.typeAnnotation.type];
+ context.report({
+ node,
+ messageId: 'noInferrableType',
+ data: {
+ type,
+ },
+ fix: fixer => fixer.remove(typeNode),
+ });
+ }
+ function inferrableVariableVisitor(node) {
+ if (!node.id) {
+ return;
+ }
+ reportInferrableType(node, node.id.typeAnnotation, node.init);
+ }
+ function inferrableParameterVisitor(node) {
+ if (ignoreParameters || !node.params) {
+ return;
+ }
+ node.params.filter(param => param.type === experimental_utils_1.AST_NODE_TYPES.AssignmentPattern &&
+ param.left &&
+ param.right).forEach(param => {
+ reportInferrableType(param, param.left.typeAnnotation, param.right);
+ });
+ }
+ function inferrablePropertyVisitor(node) {
+ // We ignore `readonly` because of Microsoft/TypeScript#14416
+ // Essentially a readonly property without a type
+ // will result in its value being the type, leading to
+ // compile errors if the type is stripped.
+ if (ignoreProperties || node.readonly || node.optional) {
+ return;
+ }
+ reportInferrableType(node, node.typeAnnotation, node.value);
+ }
+ return {
+ VariableDeclarator: inferrableVariableVisitor,
+ FunctionExpression: inferrableParameterVisitor,
+ FunctionDeclaration: inferrableParameterVisitor,
+ ArrowFunctionExpression: inferrableParameterVisitor,
+ ClassProperty: inferrablePropertyVisitor,
+ };
+ },
+});
+//# sourceMappingURL=no-inferrable-types.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map
new file mode 100644
index 000000000..a31baf22c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-inferrable-types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-inferrable-types.js","sourceRoot":"","sources":["../../src/rules/no-inferrable-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAUhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,8GAA8G;YAChH,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;SACrB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,gBAAgB,EACd,mFAAmF;SACtF;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,gBAAgB,EAAE;wBAChB,IAAI,EAAE,SAAS;qBAChB;oBACD,gBAAgB,EAAE;wBAChB,IAAI,EAAE,SAAS;qBAChB;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;KACF;IACD,cAAc,EAAE;QACd;YACE,gBAAgB,EAAE,KAAK;YACvB,gBAAgB,EAAE,KAAK;SACxB;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC;QACtD,SAAS,cAAc,CACrB,IAAyB,EACzB,QAAgB;YAEhB,IAAI,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,eAAe,EAAE;gBAChD,OAAO,cAAc,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC;aAClD;YAED,OAAO,CACL,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,cAAc;gBAC3C,IAAI,CAAC,MA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AC,CAAC;QAC9D,CAAC;QAED,OAAO;YACL,kBAAkB,EAAE,yBAAyB;YAC7C,kBAAkB,EAAE,0BAA0B;YAC9C,mBAAmB,EAAE,0BAA0B;YAC/C,uBAAuB,EAAE,0BAA0B;YACnD,aAAa,EAAE,yBAAyB;SACzC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js
new file mode 100644
index 000000000..bfa7ae2c9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js
@@ -0,0 +1,59 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const no_invalid_this_1 = __importDefault(require("eslint/lib/rules/no-invalid-this"));
+const util_1 = require("../util");
+exports.default = util_1.createRule({
+ name: 'no-invalid-this',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'disallow `this` keywords outside of classes or class-like objects',
+ category: 'Best Practices',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ messages: (_a = no_invalid_this_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ unexpectedThis: "Unexpected 'this'.",
+ },
+ schema: no_invalid_this_1.default.meta.schema,
+ },
+ defaultOptions: [{ capIsConstructor: true }],
+ create(context) {
+ const rules = no_invalid_this_1.default.create(context);
+ const argList = [];
+ return Object.assign(Object.assign({}, rules), { FunctionDeclaration(node) {
+ argList.push(node.params.some(param => param.type === experimental_utils_1.AST_NODE_TYPES.Identifier && param.name === 'this'));
+ // baseRule's work
+ rules.FunctionDeclaration(node);
+ },
+ 'FunctionDeclaration:exit'(node) {
+ argList.pop();
+ // baseRule's work
+ rules['FunctionDeclaration:exit'](node);
+ },
+ FunctionExpression(node) {
+ argList.push(node.params.some(param => param.type === experimental_utils_1.AST_NODE_TYPES.Identifier && param.name === 'this'));
+ // baseRule's work
+ rules.FunctionExpression(node);
+ },
+ 'FunctionExpression:exit'(node) {
+ argList.pop();
+ // baseRule's work
+ rules['FunctionExpression:exit'](node);
+ },
+ ThisExpression(node) {
+ const lastFnArg = argList[argList.length - 1];
+ if (lastFnArg) {
+ return;
+ }
+ // baseRule's work
+ rules.ThisExpression(node);
+ } });
+ },
+});
+//# sourceMappingURL=no-invalid-this.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js.map
new file mode 100644
index 000000000..1d60a4ee4
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-this.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-invalid-this.js","sourceRoot":"","sources":["../../src/rules/no-invalid-this.ts"],"names":[],"mappings":";;;;;;AAAA,8EAG+C;AAC/C,uFAAwD;AACxD,kCAIiB;AAKjB,kBAAe,iBAAU,CAAsB;IAC7C,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,mEAAmE;YACrE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,QAAQ,QAAE,yBAAQ,CAAC,IAAI,CAAC,QAAQ,mCAAI;YAClC,cAAc,EAAE,oBAAoB;SACrC;QACD,MAAM,EAAE,yBAAQ,CAAC,IAAI,CAAC,MAAM;KAC7B;IACD,cAAc,EAAE,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC;IAC5C,MAAM,CAAC,OAAO;QACZ,MAAM,KAAK,GAAG,yBAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM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rules/no-invalid-void-type.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js
new file mode 100644
index 000000000..eff4c2bfe
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js
@@ -0,0 +1,163 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-invalid-void-type',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallows usage of `void` type outside of generic or return types',
+ category: 'Best Practices',
+ recommended: false,
+ },
+ messages: {
+ invalidVoidForGeneric: '{{ generic }} may not have void as a type variable',
+ invalidVoidNotReturnOrGeneric: 'void is only valid as a return type or generic type variable',
+ invalidVoidNotReturn: 'void is only valid as a return type',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowInGenericTypeArguments: {
+ oneOf: [
+ { type: 'boolean' },
+ {
+ type: 'array',
+ items: { type: 'string' },
+ minLength: 1,
+ },
+ ],
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [{ allowInGenericTypeArguments: true }],
+ create(context, [{ allowInGenericTypeArguments }]) {
+ const validParents = [
+ experimental_utils_1.AST_NODE_TYPES.TSTypeAnnotation,
+ ];
+ const invalidGrandParents = [
+ experimental_utils_1.AST_NODE_TYPES.TSPropertySignature,
+ experimental_utils_1.AST_NODE_TYPES.CallExpression,
+ experimental_utils_1.AST_NODE_TYPES.ClassProperty,
+ experimental_utils_1.AST_NODE_TYPES.Identifier,
+ ];
+ const validUnionMembers = [
+ experimental_utils_1.AST_NODE_TYPES.TSVoidKeyword,
+ experimental_utils_1.AST_NODE_TYPES.TSNeverKeyword,
+ ];
+ if (allowInGenericTypeArguments === true) {
+ validParents.push(experimental_utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation);
+ }
+ /**
+ * @brief check if the given void keyword is used as a valid generic type
+ *
+ * reports if the type parametrized by void is not in the whitelist, or
+ * allowInGenericTypeArguments is false.
+ * no-op if the given void keyword is not used as generic type
+ */
+ function checkGenericTypeArgument(node) {
+ var _a, _b;
+ // only matches T<..., void, ...>
+ // extra check for precaution
+ /* istanbul ignore next */
+ if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) !== experimental_utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation ||
+ ((_b = node.parent.parent) === null || _b === void 0 ? void 0 : _b.type) !== experimental_utils_1.AST_NODE_TYPES.TSTypeReference) {
+ return;
+ }
+ // check whitelist
+ if (Array.isArray(allowInGenericTypeArguments)) {
+ const sourceCode = context.getSourceCode();
+ const fullyQualifiedName = sourceCode
+ .getText(node.parent.parent.typeName)
+ .replace(/ /gu, '');
+ if (!allowInGenericTypeArguments
+ .map(s => s.replace(/ /gu, ''))
+ .includes(fullyQualifiedName)) {
+ context.report({
+ messageId: 'invalidVoidForGeneric',
+ data: { generic: fullyQualifiedName },
+ node,
+ });
+ }
+ return;
+ }
+ if (!allowInGenericTypeArguments) {
+ context.report({
+ messageId: 'invalidVoidNotReturn',
+ node,
+ });
+ }
+ }
+ /**
+ * @brief checks that a union containing void is valid
+ * @return true if every member of the union is specified as a valid type in
+ * validUnionMembers, or is a valid generic type parametrized by void
+ */
+ function isValidUnionType(node) {
+ return node.types.every(member => {
+ var _a, _b;
+ return validUnionMembers.includes(member.type) ||
+ // allows any T<..., void, ...> here, checked by checkGenericTypeArgument
+ (member.type === experimental_utils_1.AST_NODE_TYPES.TSTypeReference &&
+ ((_a = member.typeParameters) === null || _a === void 0 ? void 0 : _a.type) ===
+ experimental_utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation && ((_b = member.typeParameters) === null || _b === void 0 ? void 0 : _b.params.map(param => param.type).includes(experimental_utils_1.AST_NODE_TYPES.TSVoidKeyword)));
+ });
+ }
+ return {
+ TSVoidKeyword(node) {
+ var _a;
+ /* istanbul ignore next */
+ if (!((_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent)) {
+ return;
+ }
+ // checks T<..., void, ...> against specification of allowInGenericArguments option
+ if (node.parent.type === experimental_utils_1.AST_NODE_TYPES.TSTypeParameterInstantiation &&
+ node.parent.parent.type === experimental_utils_1.AST_NODE_TYPES.TSTypeReference) {
+ checkGenericTypeArgument(node);
+ return;
+ }
+ // union w/ void must contain types from validUnionMembers, or a valid generic void type
+ if (node.parent.type === experimental_utils_1.AST_NODE_TYPES.TSUnionType &&
+ isValidUnionType(node.parent)) {
+ return;
+ }
+ // default cases
+ if (validParents.includes(node.parent.type) &&
+ !invalidGrandParents.includes(node.parent.parent.type)) {
+ return;
+ }
+ context.report({
+ messageId: allowInGenericTypeArguments
+ ? 'invalidVoidNotReturnOrGeneric'
+ : 'invalidVoidNotReturn',
+ node,
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-invalid-void-type.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js.map
new file mode 100644
index 000000000..ec011fc43
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-invalid-void-type.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-invalid-void-type.js","sourceRoot":"","sources":["../../src/rules/no-invalid-void-type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAWhC,kBAAe,IAAI,CAAC,UAAU,CAAwB;IACpD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,mEAAmE;YACrE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,qBAAqB,EACnB,oDAAoD;YACtD,6BAA6B,EAC3B,8DAA8D;YAChE,oBAAoB,EAAE,qCAAqC;SAC5D;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,2BAA2B,EAAE;wBAC3B,KAAK,EAAE;4BACL,EAAE,IAAI,EAAE,SAAS,EAAE;4BACnB;gCACE,IAAI,EAAE,OAAO;gCACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;gCACzB,SAAS,EAAE,CAAC;6BACb;yBACF;qBACF;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;KACF;IACD,cAAc,EAAE,CAAC,EAAE,2BAA2B,EAAE,IAAI,EAAE,CAAC;IACvD,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,2BAA2B,EAAE,CAAC;QAC/C,MAAM,YAAY,GAAqB;YACrC,mCAAc,CAAC,gBAAgB;SAChC,CAAC;QACF,MAAM,mBAAmB,GAAqB;YAC5C,mCAAc,CAAC,mBAAmB;YAClC,mCAAc,CAAC,cAAc;YAC7B,mCAAc,CAAC,aAAa;YAC5B,mCAAc,CAAC,UAAU;SAC1B,CAAC;QACF,MAAM,iBAAiB,GAAqB;YAC1C,mCAAc,CAAC,aAAa;YAC5B,mCAAc,CAAC,cAAc;SAC9B,CAAC;QAEF,IAAI,2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AC1B,IAAI;iBACL,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js
new file mode 100644
index 000000000..50e42bb2b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js
@@ -0,0 +1,196 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const no_loop_func_1 = __importDefault(require("eslint/lib/rules/no-loop-func"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-loop-func',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow function declarations that contain unsafe references inside loop statements',
+ category: 'Best Practices',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ schema: [],
+ messages: (_a = no_loop_func_1.default === null || no_loop_func_1.default === void 0 ? void 0 : no_loop_func_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ unsafeRefs: 'Function declared in a loop contains unsafe references to variable(s) {{ varNames }}.',
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ /**
+ * Reports functions which match the following condition:
+ * - has a loop node in ancestors.
+ * - has any references which refers to an unsafe variable.
+ *
+ * @param node The AST node to check.
+ * @returns Whether or not the node is within a loop.
+ */
+ function checkForLoops(node) {
+ const loopNode = getContainingLoopNode(node);
+ if (!loopNode) {
+ return;
+ }
+ const references = context.getScope().through;
+ const unsafeRefs = references
+ .filter(r => !isSafe(loopNode, r))
+ .map(r => r.identifier.name);
+ if (unsafeRefs.length > 0) {
+ context.report({
+ node,
+ messageId: 'unsafeRefs',
+ data: { varNames: `'${unsafeRefs.join("', '")}'` },
+ });
+ }
+ }
+ return {
+ ArrowFunctionExpression: checkForLoops,
+ FunctionExpression: checkForLoops,
+ FunctionDeclaration: checkForLoops,
+ };
+ },
+});
+/**
+ * Gets the containing loop node of a specified node.
+ *
+ * We don't need to check nested functions, so this ignores those.
+ * `Scope.through` contains references of nested functions.
+ *
+ * @param node An AST node to get.
+ * @returns The containing loop node of the specified node, or `null`.
+ */
+function getContainingLoopNode(node) {
+ for (let currentNode = node; currentNode.parent; currentNode = currentNode.parent) {
+ const parent = currentNode.parent;
+ switch (parent.type) {
+ case experimental_utils_1.AST_NODE_TYPES.WhileStatement:
+ case experimental_utils_1.AST_NODE_TYPES.DoWhileStatement:
+ return parent;
+ case experimental_utils_1.AST_NODE_TYPES.ForStatement:
+ // `init` is outside of the loop.
+ if (parent.init !== currentNode) {
+ return parent;
+ }
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.ForInStatement:
+ case experimental_utils_1.AST_NODE_TYPES.ForOfStatement:
+ // `right` is outside of the loop.
+ if (parent.right !== currentNode) {
+ return parent;
+ }
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression:
+ case experimental_utils_1.AST_NODE_TYPES.FunctionExpression:
+ case experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration:
+ // We don't need to check nested functions.
+ return null;
+ default:
+ break;
+ }
+ }
+ return null;
+}
+/**
+ * Gets the containing loop node of a given node.
+ * If the loop was nested, this returns the most outer loop.
+ * @param node A node to get. This is a loop node.
+ * @param excludedNode A node that the result node should not include.
+ * @returns The most outer loop node.
+ */
+function getTopLoopNode(node, excludedNode) {
+ const border = excludedNode ? excludedNode.range[1] : 0;
+ let retv = node;
+ let containingLoopNode = node;
+ while (containingLoopNode && containingLoopNode.range[0] >= border) {
+ retv = containingLoopNode;
+ containingLoopNode = getContainingLoopNode(containingLoopNode);
+ }
+ return retv;
+}
+/**
+ * Checks whether a given reference which refers to an upper scope's variable is
+ * safe or not.
+ * @param loopNode A containing loop node.
+ * @param reference A reference to check.
+ * @returns `true` if the reference is safe or not.
+ */
+function isSafe(loopNode, reference) {
+ var _a;
+ const variable = reference.resolved;
+ const definition = variable === null || variable === void 0 ? void 0 : variable.defs[0];
+ const declaration = definition === null || definition === void 0 ? void 0 : definition.parent;
+ const kind = (declaration === null || declaration === void 0 ? void 0 : declaration.type) === experimental_utils_1.AST_NODE_TYPES.VariableDeclaration
+ ? declaration.kind
+ : '';
+ // type references are all safe
+ // this only really matters for global types that haven't been configured
+ if (reference.isTypeReference) {
+ return true;
+ }
+ // Variables which are declared by `const` is safe.
+ if (kind === 'const') {
+ return true;
+ }
+ /*
+ * Variables which are declared by `let` in the loop is safe.
+ * It's a different instance from the next loop step's.
+ */
+ if (kind === 'let' &&
+ declaration &&
+ declaration.range[0] > loopNode.range[0] &&
+ declaration.range[1] < loopNode.range[1]) {
+ return true;
+ }
+ /*
+ * WriteReferences which exist after this border are unsafe because those
+ * can modify the variable.
+ */
+ const border = getTopLoopNode(loopNode, kind === 'let' ? declaration : null)
+ .range[0];
+ /**
+ * Checks whether a given reference is safe or not.
+ * The reference is every reference of the upper scope's variable we are
+ * looking now.
+ *
+ * It's safe if the reference matches one of the following condition.
+ * - is readonly.
+ * - doesn't exist inside a local function and after the border.
+ *
+ * @param upperRef A reference to check.
+ * @returns `true` if the reference is safe.
+ */
+ function isSafeReference(upperRef) {
+ var _a;
+ const id = upperRef.identifier;
+ return (!upperRef.isWrite() ||
+ (((_a = variable === null || variable === void 0 ? void 0 : variable.scope) === null || _a === void 0 ? void 0 : _a.variableScope) === upperRef.from.variableScope &&
+ id.range[0] < border));
+ }
+ return (_a = variable === null || variable === void 0 ? void 0 : variable.references.every(isSafeReference)) !== null && _a !== void 0 ? _a : false;
+}
+//# sourceMappingURL=no-loop-func.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js.map
new file mode 100644
index 000000000..45c6496cd
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loop-func.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-loop-func.js","sourceRoot":"","sources":["../../src/rules/no-loop-func.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,iFAAqD;AACrD,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,sFAAsF;YACxF,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,QAAE,sBAAQ,aAAR,sBAAQ,uBAAR,sBAAQ,CAAE,IAAI,CAAC,QAAQ,mCAAI;YACnC,UAAU,EACR,uFAAuF;SAC1F;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ;;;;;;;WAOG;QACH,SAAS,aAAa,CACpB,IAGgC;YAEhC,MAAM,QAAQ,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;YAE7C,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EAAE,CAAC;IAET,+BAA+B;IAC/B,yEAAyE;IACzE,IAAI,SAAS,CAAC,eAAe,EAAE;QAC7B,OAAO,IAAI,CAAC;KACb;IAED,mDAAmD;IACnD,IAAI,IAAI,KAAK,OAAO,EAAE;QACpB,OAAO,IAAI,CAAC;KACb;IAED;;;OAGG;IACH,IACE,IAAI,KAAK,KAAK;QACd,WAAW;QACX,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC;QACxC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EACxC;QACA,OAAO,IAAI,CAAC;KACb;IAED;;;OAGG;IACH,MAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,EAAE,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;SACzE,KAAK,CAAC,CAAC,CAAC,CAAC;IAEZ;;;;;;;;;;;OAWG;IACH,SAAS,eAAe,CAAC,QAAkC;;QACzD,MAAM,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC;QAE/B,OAAO,CACL,CAAC,QAAQ,CAAC,OAAO,EAAE;YACnB,CAAC,OAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,0CAAE,aAAa,MAAK,QAAQ,CAAC,IAAI,CAAC,aAAa;gBAC7D,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CACxB,CAAC;IACJ,CAAC;IAED,aAAO,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,UAAU,CAAC,KAAK,CAAC,eAAe,oCAAK,KAAK,CAAC;AAC9D,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js
new file mode 100644
index 000000000..154caa182
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js
@@ -0,0 +1,63 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+const baseRule = (() => {
+ try {
+ return require('eslint/lib/rules/no-loss-of-precision');
+ }
+ catch (_a) {
+ /* istanbul ignore next */
+ return null;
+ }
+})();
+exports.default = util.createRule({
+ name: 'no-loss-of-precision',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow literal numbers that lose precision',
+ category: 'Possible Errors',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ schema: [],
+ messages: (_a = baseRule === null || baseRule === void 0 ? void 0 : baseRule.meta.messages) !== null && _a !== void 0 ? _a : { noLossOfPrecision: '' },
+ },
+ defaultOptions: [],
+ create(context) {
+ /* istanbul ignore if */ if (baseRule === null) {
+ throw new Error('@typescript-eslint/no-loss-of-precision requires at least ESLint v7.1.0');
+ }
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
+ const rules = baseRule.create(context);
+ function isSeperatedNumeric(node) {
+ return typeof node.value === 'number' && node.raw.includes('_');
+ }
+ return {
+ Literal(node) {
+ rules.Literal(Object.assign(Object.assign({}, node), { raw: isSeperatedNumeric(node) ? node.raw.replace(/_/g, '') : node.raw }));
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-loss-of-precision.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js.map
new file mode 100644
index 000000000..ad268ed9e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-loss-of-precision.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-loss-of-precision.js","sourceRoot":"","sources":["../../src/rules/no-loss-of-precision.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,8CAAgC;AAEhC,MAAM,QAAQ,GAAG,CAAC,GAA2B,EAAE;IAC7C,IAAI;QACF,OAAO,OAAO,CAAC,uCAAuC,CAAC,CAAC;KACzD;IAAC,WAAM;QACN,0BAA0B;QAC1B,OAAO,IAAI,CAAC;KACb;AACH,CAAC,CAAC,EAAE,CAAC;AAKL,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,QAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,CAAC,QAAQ,mCAAI,EAAE,iBAAiB,EAAE,EAAE,EAAE;KAC/D;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,wBAAwB,CAAC,IAAI,QAAQ,KAAK,IAAI,EAAE;YAC9C,MAAM,IAAI,KAAK,CACb,yEAAyE,CAC1E,CAAC;SACH;QAED,4EAA4E;QAC5E,MAAM,KAAK,GAAG,QAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAExC,SAAS,kBAAkB,CAAC,IAAsB;YAChD,OAAO,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;QAClE,CAAC;QACD,OAAO;YACL,OAAO,CAAC,IAAsB;gBAC5B,KAAK,CAAC,OAAO,iCACR,IAAI,KACP,GAAG,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,IACrE,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js
new file mode 100644
index 000000000..f413422e5
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js
@@ -0,0 +1,205 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const no_magic_numbers_1 = __importDefault(require("eslint/lib/rules/no-magic-numbers"));
+const util = __importStar(require("../util"));
+const baseRuleSchema = Array.isArray(no_magic_numbers_1.default.meta.schema)
+ ? no_magic_numbers_1.default.meta.schema[0]
+ : no_magic_numbers_1.default.meta.schema;
+exports.default = util.createRule({
+ name: 'no-magic-numbers',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow magic numbers',
+ category: 'Best Practices',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ // Extend base schema with additional property to ignore TS numeric literal types
+ schema: [
+ Object.assign(Object.assign({}, baseRuleSchema), { properties: Object.assign(Object.assign({}, baseRuleSchema.properties), { ignoreNumericLiteralTypes: {
+ type: 'boolean',
+ }, ignoreEnums: {
+ type: 'boolean',
+ }, ignoreReadonlyClassProperties: {
+ type: 'boolean',
+ } }) }),
+ ],
+ messages: (_a = no_magic_numbers_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ useConst: "Number constants declarations must use 'const'.",
+ noMagic: 'No magic number: {{raw}}.',
+ },
+ },
+ defaultOptions: [
+ {
+ ignore: [],
+ ignoreArrayIndexes: false,
+ enforceConst: false,
+ detectObjects: false,
+ ignoreNumericLiteralTypes: false,
+ ignoreEnums: false,
+ ignoreReadonlyClassProperties: false,
+ },
+ ],
+ create(context, [options]) {
+ const rules = no_magic_numbers_1.default.create(context);
+ return {
+ Literal(node) {
+ var _a;
+ // Check if the node is a TypeScript enum declaration
+ if (options.ignoreEnums && isParentTSEnumDeclaration(node)) {
+ return;
+ }
+ // Check TypeScript specific nodes for Numeric Literal
+ if (options.ignoreNumericLiteralTypes &&
+ typeof node.value === 'number' &&
+ isTSNumericLiteralType(node)) {
+ return;
+ }
+ // Check if the node is a readonly class property
+ if (typeof node.value === 'number' &&
+ isParentTSReadonlyClassProperty(node)) {
+ if (options.ignoreReadonlyClassProperties) {
+ return;
+ }
+ let fullNumberNode = node;
+ let raw = node.raw;
+ if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ // the base rule only shows the operator for negative numbers
+ // https://github.com/eslint/eslint/blob/9dfc8501fb1956c90dc11e6377b4cb38a6bea65d/lib/rules/no-magic-numbers.js#L126
+ node.parent.operator === '-') {
+ fullNumberNode = node.parent;
+ raw = `${node.parent.operator}${node.raw}`;
+ }
+ context.report({
+ messageId: 'noMagic',
+ node: fullNumberNode,
+ data: { raw },
+ });
+ return;
+ }
+ // Let the base rule deal with the rest
+ rules.Literal(node);
+ },
+ };
+ },
+});
+/**
+ * Gets the true parent of the literal, handling prefixed numbers (-1 / +1)
+ */
+function getLiteralParent(node) {
+ var _a;
+ if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ ['-', '+'].includes(node.parent.operator)) {
+ return node.parent.parent;
+ }
+ return node.parent;
+}
+/**
+ * Checks if the node grandparent is a Typescript type alias declaration
+ * @param node the node to be validated.
+ * @returns true if the node grandparent is a Typescript type alias declaration
+ * @private
+ */
+function isGrandparentTSTypeAliasDeclaration(node) {
+ var _a, _b;
+ return ((_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.type) === experimental_utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration;
+}
+/**
+ * Checks if the node grandparent is a Typescript union type and its parent is a type alias declaration
+ * @param node the node to be validated.
+ * @returns true if the node grandparent is a Typescript union type and its parent is a type alias declaration
+ * @private
+ */
+function isGrandparentTSUnionType(node) {
+ var _a, _b;
+ if (((_b = (_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent) === null || _b === void 0 ? void 0 : _b.type) === experimental_utils_1.AST_NODE_TYPES.TSUnionType) {
+ return isGrandparentTSTypeAliasDeclaration(node.parent);
+ }
+ return false;
+}
+/**
+ * Checks if the node parent is a Typescript enum member
+ * @param node the node to be validated.
+ * @returns true if the node parent is a Typescript enum member
+ * @private
+ */
+function isParentTSEnumDeclaration(node) {
+ const parent = getLiteralParent(node);
+ return (parent === null || parent === void 0 ? void 0 : parent.type) === experimental_utils_1.AST_NODE_TYPES.TSEnumMember;
+}
+/**
+ * Checks if the node parent is a Typescript literal type
+ * @param node the node to be validated.
+ * @returns true if the node parent is a Typescript literal type
+ * @private
+ */
+function isParentTSLiteralType(node) {
+ var _a;
+ return ((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.TSLiteralType;
+}
+/**
+ * Checks if the node is a valid TypeScript numeric literal type.
+ * @param node the node to be validated.
+ * @returns true if the node is a TypeScript numeric literal type.
+ * @private
+ */
+function isTSNumericLiteralType(node) {
+ var _a;
+ // For negative numbers, use the parent node
+ if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ node.parent.operator === '-') {
+ node = node.parent;
+ }
+ // If the parent node is not a TSLiteralType, early return
+ if (!isParentTSLiteralType(node)) {
+ return false;
+ }
+ // If the grandparent is a TSTypeAliasDeclaration, ignore
+ if (isGrandparentTSTypeAliasDeclaration(node)) {
+ return true;
+ }
+ // If the grandparent is a TSUnionType and it's parent is a TSTypeAliasDeclaration, ignore
+ if (isGrandparentTSUnionType(node)) {
+ return true;
+ }
+ return false;
+}
+/**
+ * Checks if the node parent is a readonly class property
+ * @param node the node to be validated.
+ * @returns true if the node parent is a readonly class property
+ * @private
+ */
+function isParentTSReadonlyClassProperty(node) {
+ const parent = getLiteralParent(node);
+ if ((parent === null || parent === void 0 ? void 0 : parent.type) === experimental_utils_1.AST_NODE_TYPES.ClassProperty && parent.readonly) {
+ return true;
+ }
+ return false;
+}
+//# sourceMappingURL=no-magic-numbers.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js.map
new file mode 100644
index 000000000..98542b9b7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-magic-numbers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-magic-numbers.js","sourceRoot":"","sources":["../../src/rules/no-magic-numbers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,yFAAyD;AACzD,8CAAgC;AAKhC,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,0BAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;IACxD,CAAC,CAAC,0BAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,0BAAQ,CAAC,IAAI,CAAC,MAAM,CAAC;AAEzB,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,wBAAwB;YACrC,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,iFAAiF;QACjF,MAAM,EAAE;4CAED,cAAc,KACjB,UAAU,kCACL,cAAc,CAAC,UAAU,KAC5B,yBAAyB,EAAE;wBACzB,IAAI,EAAE,SAAS;qBAChB,EACD,WAAW,EAAE;wBACX,IAAI,EAAE,SAAS;qBAChB,EACD,6BAA6B,EAAE;wBAC7B,IAAI,EAAE,SAAS;qBAChB;SAGN;QACD,QAAQ,QAAE,0BAAQ,CAAC,IAAI,CAAC,QAAQ,mCAAI;YAClC,QAAQ,EAAE,iDAAiD;YAC3D,OAAO,EAAE,2BAA2B;SACrC;KACF;IACD,cAAc,EAAE;QACd;YACE,MAAM,EAAE,EAAE;YACV,kBAAkB,EAAE,KAAK;YACzB,YAAY,EAAE,K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AAC,IAAmB;;IACjD,4CAA4C;IAC5C,IACE,OAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,MAAK,mCAAc,CAAC,eAAe;QACpD,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,GAAG,EAC5B;QACA,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;KACpB;IAED,0DAA0D;IAC1D,IAAI,CAAC,qBAAqB,CAAC,IAAI,CAAC,EAAE;QAChC,OAAO,KAAK,CAAC;KACd;IAED,yDAAyD;IACzD,IAAI,mCAAmC,CAAC,IAAI,CAAC,EAAE;QAC7C,OAAO,IAAI,CAAC;KACb;IAED,0FAA0F;IAC1F,IAAI,wBAAwB,CAAC,IAAI,CAAC,EAAE;QAClC,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;GAKG;AACH,SAAS,+BAA+B,CAAC,IAAsB;IAC7D,MAAM,MAAM,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAEtC,IAAI,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,MAAK,mCAAc,CAAC,aAAa,IAAI,MAAM,CAAC,QAAQ,EAAE;QACpE,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js
new file mode 100644
index 000000000..3a310defb
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js
@@ -0,0 +1,103 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-misused-new',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Enforce valid definition of `new` and `constructor`',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ schema: [],
+ messages: {
+ errorMessageInterface: 'Interfaces cannot be constructed, only classes.',
+ errorMessageClass: 'Class cannot have method named `new`.',
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ /**
+ * @param node type to be inspected.
+ * @returns name of simple type or null
+ */
+ function getTypeReferenceName(node) {
+ if (node) {
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeAnnotation:
+ return getTypeReferenceName(node.typeAnnotation);
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeReference:
+ return getTypeReferenceName(node.typeName);
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ return node.name;
+ default:
+ break;
+ }
+ }
+ return null;
+ }
+ /**
+ * @param parent parent node.
+ * @param returnType type to be compared
+ */
+ function isMatchingParentType(parent, returnType) {
+ if (parent &&
+ 'id' in parent &&
+ parent.id &&
+ parent.id.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ return getTypeReferenceName(returnType) === parent.id.name;
+ }
+ return false;
+ }
+ return {
+ 'TSInterfaceBody > TSConstructSignatureDeclaration'(node) {
+ if (isMatchingParentType(node.parent.parent, node.returnType)) {
+ // constructor
+ context.report({
+ node,
+ messageId: 'errorMessageInterface',
+ });
+ }
+ },
+ "TSMethodSignature[key.name='constructor']"(node) {
+ context.report({
+ node,
+ messageId: 'errorMessageInterface',
+ });
+ },
+ "ClassBody > MethodDefinition[key.name='new']"(node) {
+ if (node.value.type === experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression) {
+ if (node.parent &&
+ isMatchingParentType(node.parent.parent, node.value.returnType)) {
+ context.report({
+ node,
+ messageId: 'errorMessageClass',
+ });
+ }
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-misused-new.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js.map
new file mode 100644
index 000000000..36e0d3469
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-new.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-misused-new.js","sourceRoot":"","sources":["../../src/rules/no-misused-new.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;SACrB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,qBAAqB,EAAE,iDAAiD;YACxE,iBAAiB,EAAE,uCAAuC;SAC3D;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ;;;WAGG;QACH,SAAS,oBAAoB,CAC3B,IAIa;YAEb,IAAI,IAAI,EAAE;gBACR,QAAQ,IAAI,CAAC,IAAI,EAAE;oBACjB,KAAK,mCAAc,CAAC,gBAAgB;wBAClC,OAAO,oBAAoB,CAAC,IAAI,CAAC,cAAc,CAAC,CA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yBAC/B,CAAC,CAAC;qBACJ;iBACF;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js
new file mode 100644
index 000000000..5c5b72fc3
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js
@@ -0,0 +1,219 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const tsutils = __importStar(require("tsutils"));
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-misused-promises',
+ meta: {
+ docs: {
+ description: 'Avoid using promises in places not designed to handle them',
+ category: 'Best Practices',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ voidReturn: 'Promise returned in function argument where a void return was expected.',
+ conditional: 'Expected non-Promise value in a boolean conditional.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ checksConditionals: {
+ type: 'boolean',
+ },
+ checksVoidReturn: {
+ type: 'boolean',
+ },
+ },
+ },
+ ],
+ type: 'problem',
+ },
+ defaultOptions: [
+ {
+ checksConditionals: true,
+ checksVoidReturn: true,
+ },
+ ],
+ create(context, [{ checksConditionals, checksVoidReturn }]) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ const conditionalChecks = {
+ ConditionalExpression: checkTestConditional,
+ DoWhileStatement: checkTestConditional,
+ ForStatement: checkTestConditional,
+ IfStatement: checkTestConditional,
+ LogicalExpression(node) {
+ // We only check the lhs of a logical expression because the rhs might
+ // be the return value of a short circuit expression.
+ checkConditional(node.left);
+ },
+ UnaryExpression(node) {
+ if (node.operator === '!') {
+ checkConditional(node.argument);
+ }
+ },
+ WhileStatement: checkTestConditional,
+ };
+ const voidReturnChecks = {
+ CallExpression: checkArguments,
+ NewExpression: checkArguments,
+ };
+ function checkTestConditional(node) {
+ if (node.test) {
+ checkConditional(node.test);
+ }
+ }
+ function checkConditional(node) {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ if (isAlwaysThenable(checker, tsNode)) {
+ context.report({
+ messageId: 'conditional',
+ node,
+ });
+ }
+ }
+ function checkArguments(node) {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const voidParams = voidFunctionParams(checker, tsNode);
+ if (voidParams.size === 0) {
+ return;
+ }
+ for (const [index, argument] of node.arguments.entries()) {
+ if (!voidParams.has(index)) {
+ continue;
+ }
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(argument);
+ if (returnsThenable(checker, tsNode)) {
+ context.report({
+ messageId: 'voidReturn',
+ node: argument,
+ });
+ }
+ }
+ }
+ return Object.assign(Object.assign({}, (checksConditionals ? conditionalChecks : {})), (checksVoidReturn ? voidReturnChecks : {}));
+ },
+});
+// Variation on the thenable check which requires all forms of the type (read:
+// alternates in a union) to be thenable. Otherwise, you might be trying to
+// check if something is defined or undefined and get caught because one of the
+// branches is thenable.
+function isAlwaysThenable(checker, node) {
+ const type = checker.getTypeAtLocation(node);
+ for (const subType of tsutils.unionTypeParts(checker.getApparentType(type))) {
+ const thenProp = subType.getProperty('then');
+ // If one of the alternates has no then property, it is not thenable in all
+ // cases.
+ if (thenProp === undefined) {
+ return false;
+ }
+ // We walk through each variation of the then property. Since we know it
+ // exists at this point, we just need at least one of the alternates to
+ // be of the right form to consider it thenable.
+ const thenType = checker.getTypeOfSymbolAtLocation(thenProp, node);
+ let hasThenableSignature = false;
+ for (const subType of tsutils.unionTypeParts(thenType)) {
+ for (const signature of subType.getCallSignatures()) {
+ if (signature.parameters.length !== 0 &&
+ isFunctionParam(checker, signature.parameters[0], node)) {
+ hasThenableSignature = true;
+ break;
+ }
+ }
+ // We only need to find one variant of the then property that has a
+ // function signature for it to be thenable.
+ if (hasThenableSignature) {
+ break;
+ }
+ }
+ // If no flavors of the then property are thenable, we don't consider the
+ // overall type to be thenable
+ if (!hasThenableSignature) {
+ return false;
+ }
+ }
+ // If all variants are considered thenable (i.e. haven't returned false), we
+ // consider the overall type thenable
+ return true;
+}
+function isFunctionParam(checker, param, node) {
+ const type = checker.getApparentType(checker.getTypeOfSymbolAtLocation(param, node));
+ for (const subType of tsutils.unionTypeParts(type)) {
+ if (subType.getCallSignatures().length !== 0) {
+ return true;
+ }
+ }
+ return false;
+}
+// Get the positions of parameters which are void functions (and not also
+// thenable functions). These are the candidates for the void-return check at
+// the current call site.
+function voidFunctionParams(checker, node) {
+ const voidReturnIndices = new Set();
+ const thenableReturnIndices = new Set();
+ const type = checker.getTypeAtLocation(node.expression);
+ for (const subType of tsutils.unionTypeParts(type)) {
+ // Standard function calls and `new` have two different types of signatures
+ const signatures = ts.isCallExpression(node)
+ ? subType.getCallSignatures()
+ : subType.getConstructSignatures();
+ for (const signature of signatures) {
+ for (const [index, parameter] of signature.parameters.entries()) {
+ const type = checker.getTypeOfSymbolAtLocation(parameter, node.expression);
+ for (const subType of tsutils.unionTypeParts(type)) {
+ for (const signature of subType.getCallSignatures()) {
+ const returnType = signature.getReturnType();
+ if (tsutils.isTypeFlagSet(returnType, ts.TypeFlags.Void)) {
+ voidReturnIndices.add(index);
+ }
+ else if (tsutils.isThenableType(checker, node.expression, returnType)) {
+ thenableReturnIndices.add(index);
+ }
+ }
+ }
+ }
+ }
+ }
+ // If a certain positional argument accepts both thenable and void returns,
+ // a promise-returning function is valid
+ for (const thenable of thenableReturnIndices) {
+ voidReturnIndices.delete(thenable);
+ }
+ return voidReturnIndices;
+}
+// Returns true if the expression is a function that returns a thenable
+function returnsThenable(checker, node) {
+ const type = checker.getApparentType(checker.getTypeAtLocation(node));
+ for (const subType of tsutils.unionTypeParts(type)) {
+ for (const signature of subType.getCallSignatures()) {
+ const returnType = signature.getReturnType();
+ if (tsutils.isThenableType(checker, node, returnType)) {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+//# sourceMappingURL=no-misused-promises.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map
new file mode 100644
index 000000000..ae2463602
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-misused-promises.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-misused-promises.js","sourceRoot":"","sources":["../../src/rules/no-misused-promises.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,iDAAmC;AACnC,+CAAiC;AAEjC,8CAAgC;AAShC,kBAAe,IAAI,CAAC,UAAU,CAAwC;IACpE,IAAI,EAAE,qBAAqB;IAC3B,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,4DAA4D;YACzE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,UAAU,EACR,yEAAyE;YAC3E,WAAW,EAAE,sDAAsD;SACpE;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,kBAAkB,EAAE;wBAClB,IAA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,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,EAC5D;4BACA,qBAAqB,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;yBAClC;qBACF;iBACF;aACF;SACF;KACF;IAED,2EAA2E;IAC3E,wCAAwC;IACxC,KAAK,MAAM,QAAQ,IAAI,qBAAqB,EAAE;QAC5C,iBAAiB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;KACpC;IAED,OAAO,iBAAiB,CAAC;AAC3B,CAAC;AAED,uEAAuE;AACvE,SAAS,eAAe,CACtB,OAAuB,EACvB,IAAmB;IAEnB,MAAM,IAAI,GAAG,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,CAAC;IAEtE,KAAK,MAAM,OAAO,IAAI,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE;QAClD,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,iBAAiB,EAAE,EAAE;YACnD,MAAM,UAAU,GAAG,SAAS,CAAC,aAAa,EAAE,CAAC;YAC7C,IAAI,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE;gBACrD,OAAO,IAAI,CAAC;aACb;SACF;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js
new file mode 100644
index 000000000..cfd3d374b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js
@@ -0,0 +1,81 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-namespace',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow the use of custom TypeScript modules and namespaces',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ messages: {
+ moduleSyntaxIsPreferred: 'ES2015 module syntax is preferred over custom TypeScript modules and namespaces.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowDeclarations: {
+ type: 'boolean',
+ },
+ allowDefinitionFiles: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ allowDeclarations: false,
+ allowDefinitionFiles: true,
+ },
+ ],
+ create(context, [{ allowDeclarations, allowDefinitionFiles }]) {
+ const filename = context.getFilename();
+ function isDeclaration(node) {
+ var _a;
+ return (node.declare === true ||
+ (((_a = node.parent.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration &&
+ isDeclaration(node.parent.parent)));
+ }
+ return {
+ "TSModuleDeclaration[global!=true][id.type='Identifier']"(node) {
+ if ((node.parent &&
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration) ||
+ (allowDefinitionFiles && util.isDefinitionFile(filename)) ||
+ (allowDeclarations && isDeclaration(node))) {
+ return;
+ }
+ context.report({
+ node,
+ messageId: 'moduleSyntaxIsPreferred',
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-namespace.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js.map
new file mode 100644
index 000000000..db4bd761b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-namespace.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-namespace.js","sourceRoot":"","sources":["../../src/rules/no-namespace.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAUhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,8DAA8D;YAChE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;SACrB;QACD,QAAQ,EAAE;YACR,uBAAuB,EACrB,kFAAkF;SACrF;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,iBAAiB,EAAE;wBACjB,IAAI,EAAE,SAAS;qBAChB;oBACD,oBAAoB,EAAE;wBACpB,IAAI,EAAE,SAAS;qBAChB;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;KACF;IACD,cAAc,EAAE;QACd;YACE,iBAAiB,EAAE,KAAK;YACxB,oBAAoB,EAAE,IAAI;SAC3B;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,CAAC;QAC3D,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;QAEvC,SAAS,aAAa,CAAC,IAAkC;;YACvD,OAAO,CACL,IAAI,CAAC,OAAO,KAAK,IAAI;gBACrB,CAAC,OAAA,IAAI,CAAC,MAAO,CAAC,MAAM,0CAAE,IAAI,MAAK,mCAAc,CAAC,mBAAmB;oBAC/D,aAAa,CAAC,IAAI,CAAC,MAAO,CAAC,MAAM,CAAC,CAAC,CACtC,CAAC;QACJ,CAAC;QAED,OAAO;YACL,yDAAyD,CACvD,IAAkC;gBAElC,IACE,CAAC,IAAI,CAAC,MAAM;oBACV,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,mCAAc,CAAC,mBAAmB,CAAC;oBAC1D,CAAC,oBAAoB,IAAI,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;oBACzD,CAAC,iBAAiB,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,EAC1C;oBACA,OAAO;iBACR;gBAED,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,SAAS,EAAE,yBAAyB;iBACrC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js
new file mode 100644
index 000000000..e86f3ce76
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js
@@ -0,0 +1,146 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const ts = __importStar(require("typescript"));
+const semver = __importStar(require("semver"));
+const util = __importStar(require("../util"));
+const is3dot9 = semver.satisfies(ts.version, `>= 3.9.0 || >= 3.9.1-rc || >= 3.9.0-beta`, {
+ includePrerelease: true,
+});
+exports.default = util.createRule({
+ name: 'no-non-null-asserted-optional-chain',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallows using a non-null assertion after an optional chain expression',
+ category: 'Possible Errors',
+ recommended: 'error',
+ suggestion: true,
+ },
+ messages: {
+ noNonNullOptionalChain: 'Optional chain expressions can return undefined by design - using a non-null assertion is unsafe and wrong.',
+ suggestRemovingNonNull: 'You should remove the non-null assertion.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ // TS3.9 made a breaking change to how non-null works with optional chains.
+ // Pre-3.9, `x?.y!.z` means `(x?.y).z` - i.e. it essentially scrubbed the optionality from the chain
+ // Post-3.9, `x?.y!.z` means `x?.y!.z` - i.e. it just asserts that the property `y` is non-null, not the result of `x?.y`.
+ // This means that for > 3.9, x?.y!.z is valid!
+ //
+ // NOTE: these cases are still invalid for 3.9:
+ // - x?.y.z!
+ // - (x?.y)!.z
+ const baseSelectors = {
+ // non-nulling a wrapped chain will scrub all nulls introduced by the chain
+ // (x?.y)!
+ // (x?.())!
+ 'TSNonNullExpression > ChainExpression'(node) {
+ // selector guarantees this assertion
+ const parent = node.parent;
+ context.report({
+ node,
+ messageId: 'noNonNullOptionalChain',
+ // use a suggestion instead of a fixer, because this can obviously break type checks
+ suggest: [
+ {
+ messageId: 'suggestRemovingNonNull',
+ fix(fixer) {
+ return fixer.removeRange([
+ parent.range[1] - 1,
+ parent.range[1],
+ ]);
+ },
+ },
+ ],
+ });
+ },
+ // non-nulling at the end of a chain will scrub all nulls introduced by the chain
+ // x?.y!
+ // x?.()!
+ 'ChainExpression > TSNonNullExpression'(node) {
+ context.report({
+ node,
+ messageId: 'noNonNullOptionalChain',
+ // use a suggestion instead of a fixer, because this can obviously break type checks
+ suggest: [
+ {
+ messageId: 'suggestRemovingNonNull',
+ fix(fixer) {
+ return fixer.removeRange([node.range[1] - 1, node.range[1]]);
+ },
+ },
+ ],
+ });
+ },
+ };
+ if (is3dot9) {
+ return baseSelectors;
+ }
+ return Object.assign(Object.assign({}, baseSelectors), { [[
+ // > :not(ChainExpression) because that case is handled by a previous selector
+ 'MemberExpression > TSNonNullExpression.object > :not(ChainExpression)',
+ 'CallExpression > TSNonNullExpression.callee > :not(ChainExpression)',
+ ].join(', ')](child) {
+ // selector guarantees this assertion
+ const node = child.parent;
+ let current = child;
+ while (current) {
+ switch (current.type) {
+ case experimental_utils_1.AST_NODE_TYPES.MemberExpression:
+ if (current.optional) {
+ // found an optional chain! stop traversing
+ break;
+ }
+ current = current.object;
+ continue;
+ case experimental_utils_1.AST_NODE_TYPES.CallExpression:
+ if (current.optional) {
+ // found an optional chain! stop traversing
+ break;
+ }
+ current = current.callee;
+ continue;
+ default:
+ // something that's not a ChainElement, which means this is not an optional chain we want to check
+ return;
+ }
+ }
+ context.report({
+ node,
+ messageId: 'noNonNullOptionalChain',
+ // use a suggestion instead of a fixer, because this can obviously break type checks
+ suggest: [
+ {
+ messageId: 'suggestRemovingNonNull',
+ fix(fixer) {
+ return fixer.removeRange([node.range[1] - 1, node.range[1]]);
+ },
+ },
+ ],
+ });
+ } });
+ },
+});
+//# sourceMappingURL=no-non-null-asserted-optional-chain.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js.map
new file mode 100644
index 000000000..21f405604
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-asserted-optional-chain.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-non-null-asserted-optional-chain.js","sourceRoot":"","sources":["../../src/rules/no-non-null-asserted-optional-chain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,+CAAiC;AACjC,+CAAiC;AACjC,8CAAgC;AAEhC,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,CAC9B,EAAE,CAAC,OAAO,EACV,0CAA0C,EAC1C;IACE,iBAAiB,EAAE,IAAI;CACxB,CACF,CAAC;AAEF,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,qCAAqC;IAC3C,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,yEAAyE;YAC3E,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,OAAO;YACpB,UAAU,EAAE,IAAI;SACjB;QACD,QAAQ,EAAE;YACR,sBAAsB,EACpB,6GAA6G;YAC/G,sBAAsB,EAAE,2CAA2C;SACpE;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,2EAA2E;QAC3E,qGAAqG;QACrG,2HAA2H;QAC3H,+CAA+C;QAC/C,EAAE;QACF,+CAA+C;QAC/C,YAAY;QACZ,cAAc;QAEd,MAAM,aAAa,GAAG;YACpB,2EAA2E;YAC3E,UAAU;YACV,WAAW;YACX,uCAAuC,CACrC,IAA8B;gBAE9B,qCAAqC;gBACrC,MAAM,MAAM,GAAG,IAAI,CAAC,MAAsC,CAAC;gBAC3D,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,SAAS,EAAE,wBAAwB;oBACnC,oFAAoF;oBACpF,OAAO,EAAE;wBACP;4BACE,SAAS,EAAE,wBAAwB;4BACnC,GAAG,CAAC,KAAK;gCACP,OAAO,KAAK,CAAC,WAAW,CAAC;oCACvB,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;oCACnB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wBAEX;4BACE,kGAAkG;4BAClG,OAAO;qBACV;iBACF;gBAED,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,SAAS,EAAE,wBAAwB;oBACnC,oFAAoF;oBACpF,OAAO,EAAE;wBACP;4BACE,SAAS,EAAE,wBAAwB;4BACnC,GAAG,CAAC,KAAK;gCACP,OAAO,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;4BAC/D,CAAC;yBACF;qBACF;iBACF,CAAC,CAAC;YACL,CAAC,IACD;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js
new file mode 100644
index 000000000..82ab1fdb4
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js
@@ -0,0 +1,126 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-non-null-assertion',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallows non-null assertions using the `!` postfix operator',
+ category: 'Stylistic Issues',
+ recommended: 'warn',
+ suggestion: true,
+ },
+ messages: {
+ noNonNull: 'Forbidden non-null assertion.',
+ suggestOptionalChain: 'Consider using the optional chain operator `?.` instead. This operator includes runtime checks, so it is safer than the compile-only non-null assertion operator.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ return {
+ TSNonNullExpression(node) {
+ var _a, _b;
+ const suggest = [];
+ function convertTokenToOptional(replacement) {
+ return (fixer) => {
+ const operator = sourceCode.getTokenAfter(node.expression, util.isNonNullAssertionPunctuator);
+ if (operator) {
+ return fixer.replaceText(operator, replacement);
+ }
+ return null;
+ };
+ }
+ function removeToken() {
+ return (fixer) => {
+ const operator = sourceCode.getTokenAfter(node.expression, util.isNonNullAssertionPunctuator);
+ if (operator) {
+ return fixer.remove(operator);
+ }
+ return null;
+ };
+ }
+ if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.MemberExpression &&
+ node.parent.object === node) {
+ if (!node.parent.optional) {
+ if (node.parent.computed) {
+ // it is x![y]?.z
+ suggest.push({
+ messageId: 'suggestOptionalChain',
+ fix: convertTokenToOptional('?.'),
+ });
+ }
+ else {
+ // it is x!.y?.z
+ suggest.push({
+ messageId: 'suggestOptionalChain',
+ fix: convertTokenToOptional('?'),
+ });
+ }
+ }
+ else {
+ if (node.parent.computed) {
+ // it is x!?.[y].z
+ suggest.push({
+ messageId: 'suggestOptionalChain',
+ fix: removeToken(),
+ });
+ }
+ else {
+ // it is x!?.y.z
+ suggest.push({
+ messageId: 'suggestOptionalChain',
+ fix: removeToken(),
+ });
+ }
+ }
+ }
+ else if (((_b = node.parent) === null || _b === void 0 ? void 0 : _b.type) === experimental_utils_1.AST_NODE_TYPES.CallExpression &&
+ node.parent.callee === node) {
+ if (!node.parent.optional) {
+ // it is x.y?.z!()
+ suggest.push({
+ messageId: 'suggestOptionalChain',
+ fix: convertTokenToOptional('?.'),
+ });
+ }
+ else {
+ // it is x.y.z!?.()
+ suggest.push({
+ messageId: 'suggestOptionalChain',
+ fix: removeToken(),
+ });
+ }
+ }
+ context.report({
+ node,
+ messageId: 'noNonNull',
+ suggest,
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-non-null-assertion.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js.map
new file mode 100644
index 000000000..4f1d31ddb
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-non-null-assertion.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-non-null-assertion.js","sourceRoot":"","sources":["../../src/rules/no-non-null-assertion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAIhC,kBAAe,IAAI,CAAC,UAAU,CAAiB;IAC7C,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,8DAA8D;YAChE,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,MAAM;YACnB,UAAU,EAAE,IAAI;SACjB;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,+BAA+B;YAC1C,oBAAoB,EAClB,mKAAmK;SACtK;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3C,OAAO;YACL,mBAAmB,CAAC,IAAI;;gBACtB,MAAM,OAAO,GAA+C,EAAE,CAAC;gBAC/D,SAAS,sBAAsB,CAC7B,WAAuB;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ClB,OAAO,CAAC,IAAI,CAAC;gCACX,SAAS,EAAE,sBAAsB;gCACjC,GAAG,EAAE,WAAW,EAAE;6BACnB,CAAC,CAAC;yBACJ;6BAAM;4BACL,gBAAgB;4BAChB,OAAO,CAAC,IAAI,CAAC;gCACX,SAAS,EAAE,sBAAsB;gCACjC,GAAG,EAAE,WAAW,EAAE;6BACnB,CAAC,CAAC;yBACJ;qBACF;iBACF;qBAAM,IACL,OAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,MAAK,mCAAc,CAAC,cAAc;oBACnD,IAAI,CAAC,MAAM,CAAC,MAAM,KAAK,IAAI,EAC3B;oBACA,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;wBACzB,kBAAkB;wBAClB,OAAO,CAAC,IAAI,CAAC;4BACX,SAAS,EAAE,sBAAsB;4BACjC,GAAG,EAAE,sBAAsB,CAAC,IAAI,CAAC;yBAClC,CAAC,CAAC;qBACJ;yBAAM;wBACL,mBAAmB;wBACnB,OAAO,CAAC,IAAI,CAAC;4BACX,SAAS,EAAE,sBAAsB;4BACjC,GAAG,EAAE,WAAW,EAAE;yBACnB,CAAC,CAAC;qBACJ;iBACF;gBAED,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,SAAS,EAAE,WAAW;oBACtB,OAAO;iBACR,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-parameter-properties.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-parameter-properties.js
new file mode 100644
index 000000000..7e7a10b6d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-parameter-properties.js
@@ -0,0 +1,106 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-parameter-properties',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow the use of parameter properties in class constructors',
+ category: 'Stylistic Issues',
+ // too opinionated to be recommended
+ recommended: false,
+ },
+ messages: {
+ noParamProp: 'Property {{parameter}} cannot be declared in the constructor.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allows: {
+ type: 'array',
+ items: {
+ enum: [
+ 'readonly',
+ 'private',
+ 'protected',
+ 'public',
+ 'private readonly',
+ 'protected readonly',
+ 'public readonly',
+ ],
+ },
+ minItems: 1,
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ allows: [],
+ },
+ ],
+ create(context, [{ allows }]) {
+ /**
+ * Gets the modifiers of `node`.
+ * @param node the node to be inspected.
+ */
+ function getModifiers(node) {
+ const modifiers = [];
+ if (node.accessibility) {
+ modifiers.push(node.accessibility);
+ }
+ if (node.readonly) {
+ modifiers.push('readonly');
+ }
+ return modifiers.filter(Boolean).join(' ');
+ }
+ return {
+ TSParameterProperty(node) {
+ const modifiers = getModifiers(node);
+ if (!allows.includes(modifiers)) {
+ // HAS to be an identifier or assignment or TSC will throw
+ if (node.parameter.type !== experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ node.parameter.type !== experimental_utils_1.AST_NODE_TYPES.AssignmentPattern) {
+ return;
+ }
+ const name = node.parameter.type === experimental_utils_1.AST_NODE_TYPES.Identifier
+ ? node.parameter.name
+ : // has to be an Identifier or TSC will throw an error
+ node.parameter.left.name;
+ context.report({
+ node,
+ messageId: 'noParamProp',
+ data: {
+ parameter: name,
+ },
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-parameter-properties.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-parameter-properties.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-parameter-properties.js.map
new file mode 100644
index 000000000..3a15f4c95
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-parameter-properties.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-parameter-properties.js","sourceRoot":"","sources":["../../src/rules/no-parameter-properties.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAiBhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,gEAAgE;YAClE,QAAQ,EAAE,kBAAkB;YAC5B,oCAAoC;YACpC,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,WAAW,EACT,+DAA+D;SAClE;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,MAAM,EAAE;wBACN,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE;4BACL,IAAI,EAAE;gCACJ,UAAU;gCACV,SAAS;gCACT,WAAW;gCACX,QAAQ;gCACR,kBAAkB;gCAClB,oBAAoB;gCACpB,iBAAiB;6BAClB;yBACF;wBACD,QAAQ,EAAE,CAAC;qBACZ;iBACF;gBACD,oBAAoB,EAAE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CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js
new file mode 100644
index 000000000..ccea8a953
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js
@@ -0,0 +1,224 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+// https://github.com/lodash/lodash/blob/86a852fe763935bb64c12589df5391fd7d3bb14d/escapeRegExp.js
+const reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
+const reHasRegExpChar = RegExp(reRegExpChar.source);
+function escapeRegExp(str) {
+ return str && reHasRegExpChar.test(str)
+ ? str.replace(reRegExpChar, '\\$&')
+ : str || '';
+}
+function getNameLocationInGlobalDirectiveComment(sourceCode, comment, name) {
+ const namePattern = new RegExp(`[\\s,]${escapeRegExp(name)}(?:$|[\\s,:])`, 'gu');
+ // To ignore the first text "global".
+ namePattern.lastIndex = comment.value.indexOf('global') + 6;
+ // Search a given variable name.
+ const match = namePattern.exec(comment.value);
+ // Convert the index to loc.
+ const start = sourceCode.getLocFromIndex(comment.range[0] + '/*'.length + (match ? match.index + 1 : 0));
+ const end = {
+ line: start.line,
+ column: start.column + (match ? name.length : 1),
+ };
+ return { start, end };
+}
+exports.default = util.createRule({
+ name: 'no-redeclare',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow variable redeclaration',
+ category: 'Best Practices',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ builtinGlobals: {
+ type: 'boolean',
+ },
+ ignoreDeclarationMerge: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ messages: {
+ redeclared: "'{{id}}' is already defined.",
+ redeclaredAsBuiltin: "'{{id}}' is already defined as a built-in global variable.",
+ redeclaredBySyntax: "'{{id}}' is already defined by a variable declaration.",
+ },
+ },
+ defaultOptions: [
+ {
+ builtinGlobals: true,
+ ignoreDeclarationMerge: true,
+ },
+ ],
+ create(context, [options]) {
+ const sourceCode = context.getSourceCode();
+ const CLASS_DECLARATION_MERGE_NODES = new Set([
+ experimental_utils_1.AST_NODE_TYPES.TSInterfaceDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.ClassDeclaration,
+ ]);
+ const FUNCTION_DECLARATION_MERGE_NODES = new Set([
+ experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration,
+ ]);
+ function* iterateDeclarations(variable) {
+ if ((options === null || options === void 0 ? void 0 : options.builtinGlobals) &&
+ 'eslintImplicitGlobalSetting' in variable &&
+ (variable.eslintImplicitGlobalSetting === 'readonly' ||
+ variable.eslintImplicitGlobalSetting === 'writable')) {
+ yield { type: 'builtin' };
+ }
+ if ('eslintExplicitGlobalComments' in variable &&
+ variable.eslintExplicitGlobalComments) {
+ for (const comment of variable.eslintExplicitGlobalComments) {
+ yield {
+ type: 'comment',
+ node: comment,
+ loc: getNameLocationInGlobalDirectiveComment(sourceCode, comment, variable.name),
+ };
+ }
+ }
+ const identifiers = variable.identifiers
+ .map(id => ({
+ identifier: id,
+ parent: id.parent,
+ }))
+ // ignore function declarations because TS will treat them as an overload
+ .filter(({ parent }) => parent.type !== experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction);
+ if (options.ignoreDeclarationMerge && identifiers.length > 1) {
+ if (
+ // interfaces merging
+ identifiers.every(({ parent }) => parent.type === experimental_utils_1.AST_NODE_TYPES.TSInterfaceDeclaration)) {
+ return;
+ }
+ if (
+ // namespace/module merging
+ identifiers.every(({ parent }) => parent.type === experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration)) {
+ return;
+ }
+ if (
+ // class + interface/namespace merging
+ identifiers.every(({ parent }) => CLASS_DECLARATION_MERGE_NODES.has(parent.type))) {
+ const classDecls = identifiers.filter(({ parent }) => parent.type === experimental_utils_1.AST_NODE_TYPES.ClassDeclaration);
+ if (classDecls.length === 1) {
+ // safe declaration merging
+ return;
+ }
+ // there's more than one class declaration, which needs to be reported
+ for (const { identifier } of classDecls) {
+ yield { type: 'syntax', node: identifier, loc: identifier.loc };
+ }
+ return;
+ }
+ if (
+ // class + interface/namespace merging
+ identifiers.every(({ parent }) => FUNCTION_DECLARATION_MERGE_NODES.has(parent.type))) {
+ const functionDecls = identifiers.filter(({ parent }) => parent.type === experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration);
+ if (functionDecls.length === 1) {
+ // safe declaration merging
+ return;
+ }
+ // there's more than one class declaration, which needs to be reported
+ for (const { identifier } of functionDecls) {
+ yield { type: 'syntax', node: identifier, loc: identifier.loc };
+ }
+ return;
+ }
+ }
+ for (const { identifier } of identifiers) {
+ yield { type: 'syntax', node: identifier, loc: identifier.loc };
+ }
+ }
+ function findVariablesInScope(scope) {
+ for (const variable of scope.variables) {
+ const [declaration, ...extraDeclarations] = iterateDeclarations(variable);
+ if (extraDeclarations.length === 0) {
+ continue;
+ }
+ /*
+ * If the type of a declaration is different from the type of
+ * the first declaration, it shows the location of the first
+ * declaration.
+ */
+ const detailMessageId = declaration.type === 'builtin'
+ ? 'redeclaredAsBuiltin'
+ : 'redeclaredBySyntax';
+ const data = { id: variable.name };
+ // Report extra declarations.
+ for (const { type, node, loc } of extraDeclarations) {
+ const messageId = type === declaration.type ? 'redeclared' : detailMessageId;
+ if (node) {
+ context.report({ node, loc, messageId, data });
+ }
+ else if (loc) {
+ context.report({ loc, messageId, data });
+ }
+ }
+ }
+ }
+ /**
+ * Find variables in the current scope.
+ */
+ function checkForBlock(node) {
+ const scope = context.getScope();
+ /*
+ * In ES5, some node type such as `BlockStatement` doesn't have that scope.
+ * `scope.block` is a different node in such a case.
+ */
+ if (scope.block === node) {
+ findVariablesInScope(scope);
+ }
+ }
+ return {
+ Program() {
+ const scope = context.getScope();
+ findVariablesInScope(scope);
+ // Node.js or ES modules has a special scope.
+ if (scope.type === 'global' &&
+ scope.childScopes[0] &&
+ // The special scope's block is the Program node.
+ scope.block === scope.childScopes[0].block) {
+ findVariablesInScope(scope.childScopes[0]);
+ }
+ },
+ FunctionDeclaration: checkForBlock,
+ FunctionExpression: checkForBlock,
+ ArrowFunctionExpression: checkForBlock,
+ BlockStatement: checkForBlock,
+ ForStatement: checkForBlock,
+ ForInStatement: checkForBlock,
+ ForOfStatement: checkForBlock,
+ SwitchStatement: checkForBlock,
+ };
+ },
+});
+//# sourceMappingURL=no-redeclare.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js.map
new file mode 100644
index 000000000..38aac7aa9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-redeclare.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-redeclare.js","sourceRoot":"","sources":["../../src/rules/no-redeclare.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8C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AE5B,6CAA6C;gBAC7C,IACE,KAAK,CAAC,IAAI,KAAK,QAAQ;oBACvB,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;oBACpB,iDAAiD;oBACjD,KAAK,CAAC,KAAK,KAAK,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,EAC1C;oBACA,oBAAoB,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;iBAC5C;YACH,CAAC;YAED,mBAAmB,EAAE,aAAa;YAClC,kBAAkB,EAAE,aAAa;YACjC,uBAAuB,EAAE,aAAa;YAEtC,cAAc,EAAE,aAAa;YAC7B,YAAY,EAAE,aAAa;YAC3B,cAAc,EAAE,aAAa;YAC7B,cAAc,EAAE,aAAa;YAC7B,eAAe,EAAE,aAAa;SAC/B,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js
new file mode 100644
index 000000000..3bf5f6b1e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js
@@ -0,0 +1,55 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-require-imports',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallows invocation of `require()`',
+ category: 'Best Practices',
+ recommended: false,
+ },
+ schema: [],
+ messages: {
+ noRequireImports: 'A `require()` style import is forbidden.',
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ return {
+ 'CallExpression > Identifier[name="require"]'(node) {
+ context.report({
+ node: node.parent,
+ messageId: 'noRequireImports',
+ });
+ },
+ TSExternalModuleReference(node) {
+ context.report({
+ node,
+ messageId: 'noRequireImports',
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-require-imports.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js.map
new file mode 100644
index 000000000..48ae71e93
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-require-imports.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-require-imports.js","sourceRoot":"","sources":["../../src/rules/no-require-imports.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;SACnB;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,gBAAgB,EAAE,0CAA0C;SAC7D;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,6CAA6C,CAC3C,IAAyB;gBAEzB,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI,EAAE,IAAI,CAAC,MAAO;oBAClB,SAAS,EAAE,kBAAkB;iBAC9B,CAAC,CAAC;YACL,CAAC;YACD,yBAAyB,CAAC,IAAI;gBAC5B,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI;oBACJ,SAAS,EAAE,kBAAkB;iBAC9B,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js
new file mode 100644
index 000000000..e70d5c17e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js
@@ -0,0 +1,278 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-shadow',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow variable declarations from shadowing variables declared in the outer scope',
+ category: 'Variables',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ builtinGlobals: {
+ type: 'boolean',
+ },
+ hoist: {
+ enum: ['all', 'functions', 'never'],
+ },
+ allow: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ ignoreTypeValueShadow: {
+ type: 'boolean',
+ },
+ ignoreFunctionTypeParameterNameValueShadow: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ messages: {
+ noShadow: "'{{name}}' is already declared in the upper scope.",
+ },
+ },
+ defaultOptions: [
+ {
+ allow: [],
+ builtinGlobals: false,
+ hoist: 'functions',
+ ignoreTypeValueShadow: true,
+ ignoreFunctionTypeParameterNameValueShadow: true,
+ },
+ ],
+ create(context, [options]) {
+ /**
+ * Check if variable is a `this` parameter.
+ */
+ function isThisParam(variable) {
+ return variable.defs[0].type === 'Parameter' && variable.name === 'this';
+ }
+ function isTypeValueShadow(variable, shadowed) {
+ if (options.ignoreTypeValueShadow !== true) {
+ return false;
+ }
+ if (!('isValueVariable' in variable)) {
+ // this shouldn't happen...
+ return false;
+ }
+ const isShadowedValue = 'isValueVariable' in shadowed ? shadowed.isValueVariable : true;
+ return variable.isValueVariable !== isShadowedValue;
+ }
+ function isFunctionTypeParameterNameValueShadow(variable, shadowed) {
+ if (options.ignoreFunctionTypeParameterNameValueShadow !== true) {
+ return false;
+ }
+ if (!('isValueVariable' in variable)) {
+ // this shouldn't happen...
+ return false;
+ }
+ const isShadowedValue = 'isValueVariable' in shadowed ? shadowed.isValueVariable : true;
+ if (!isShadowedValue) {
+ return false;
+ }
+ const id = variable.identifiers[0];
+ return util.isFunctionType(id.parent);
+ }
+ /**
+ * Check if variable name is allowed.
+ * @param variable The variable to check.
+ * @returns Whether or not the variable name is allowed.
+ */
+ function isAllowed(variable) {
+ return options.allow.indexOf(variable.name) !== -1;
+ }
+ /**
+ * Checks if a variable of the class name in the class scope of ClassDeclaration.
+ *
+ * ClassDeclaration creates two variables of its name into its outer scope and its class scope.
+ * So we should ignore the variable in the class scope.
+ * @param variable The variable to check.
+ * @returns Whether or not the variable of the class name in the class scope of ClassDeclaration.
+ */
+ function isDuplicatedClassNameVariable(variable) {
+ const block = variable.scope.block;
+ return (block.type === experimental_utils_1.AST_NODE_TYPES.ClassDeclaration &&
+ block.id === variable.identifiers[0]);
+ }
+ /**
+ * Checks if a variable of the class name in the class scope of TSEnumDeclaration.
+ *
+ * TSEnumDeclaration creates two variables of its name into its outer scope and its class scope.
+ * So we should ignore the variable in the class scope.
+ * @param variable The variable to check.
+ * @returns Whether or not the variable of the class name in the class scope of TSEnumDeclaration.
+ */
+ function isDuplicatedEnumNameVariable(variable) {
+ const block = variable.scope.block;
+ return (block.type === experimental_utils_1.AST_NODE_TYPES.TSEnumDeclaration &&
+ block.id === variable.identifiers[0]);
+ }
+ /**
+ * Checks if a variable is inside the initializer of scopeVar.
+ *
+ * To avoid reporting at declarations such as `var a = function a() {};`.
+ * But it should report `var a = function(a) {};` or `var a = function() { function a() {} };`.
+ * @param variable The variable to check.
+ * @param scopeVar The scope variable to look for.
+ * @returns Whether or not the variable is inside initializer of scopeVar.
+ */
+ function isOnInitializer(variable, scopeVar) {
+ var _a;
+ const outerScope = scopeVar.scope;
+ const outerDef = scopeVar.defs[0];
+ const outer = (_a = outerDef === null || outerDef === void 0 ? void 0 : outerDef.parent) === null || _a === void 0 ? void 0 : _a.range;
+ const innerScope = variable.scope;
+ const innerDef = variable.defs[0];
+ const inner = innerDef === null || innerDef === void 0 ? void 0 : innerDef.name.range;
+ return !!(outer &&
+ inner &&
+ outer[0] < inner[0] &&
+ inner[1] < outer[1] &&
+ ((innerDef.type === 'FunctionName' &&
+ innerDef.node.type === experimental_utils_1.AST_NODE_TYPES.FunctionExpression) ||
+ innerDef.node.type === experimental_utils_1.AST_NODE_TYPES.ClassExpression) &&
+ outerScope === innerScope.upper);
+ }
+ /**
+ * Get a range of a variable's identifier node.
+ * @param variable The variable to get.
+ * @returns The range of the variable's identifier node.
+ */
+ function getNameRange(variable) {
+ const def = variable.defs[0];
+ return def === null || def === void 0 ? void 0 : def.name.range;
+ }
+ /**
+ * Checks if a variable is in TDZ of scopeVar.
+ * @param variable The variable to check.
+ * @param scopeVar The variable of TDZ.
+ * @returns Whether or not the variable is in TDZ of scopeVar.
+ */
+ function isInTdz(variable, scopeVar) {
+ const outerDef = scopeVar.defs[0];
+ const inner = getNameRange(variable);
+ const outer = getNameRange(scopeVar);
+ return !!(inner &&
+ outer &&
+ inner[1] < outer[0] &&
+ // Excepts FunctionDeclaration if is {"hoist":"function"}.
+ (options.hoist !== 'functions' ||
+ !outerDef ||
+ outerDef.node.type !== experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration));
+ }
+ /**
+ * Finds the variable by a given name in a given scope and its upper scopes.
+ * @param initScope A scope to start find.
+ * @param name A variable name to find.
+ * @returns A found variable or `null`.
+ */
+ function getVariableByName(initScope, name) {
+ let scope = initScope;
+ while (scope) {
+ const variable = scope.set.get(name);
+ if (variable) {
+ return variable;
+ }
+ scope = scope.upper;
+ }
+ return null;
+ }
+ /**
+ * Checks the current context for shadowed variables.
+ * @param {Scope} scope Fixme
+ */
+ function checkForShadows(scope) {
+ const variables = scope.variables;
+ for (const variable of variables) {
+ // ignore "arguments"
+ if (variable.identifiers.length === 0) {
+ continue;
+ }
+ // this params are pseudo-params that cannot be shadowed
+ if (isThisParam(variable)) {
+ continue;
+ }
+ // ignore variables of a class name in the class scope of ClassDeclaration
+ if (isDuplicatedClassNameVariable(variable)) {
+ continue;
+ }
+ // ignore variables of a class name in the class scope of ClassDeclaration
+ if (isDuplicatedEnumNameVariable(variable)) {
+ continue;
+ }
+ // ignore configured allowed names
+ if (isAllowed(variable)) {
+ continue;
+ }
+ // Gets shadowed variable.
+ const shadowed = getVariableByName(scope.upper, variable.name);
+ if (!shadowed) {
+ continue;
+ }
+ // ignore type value variable shadowing if configured
+ if (isTypeValueShadow(variable, shadowed)) {
+ continue;
+ }
+ // ignore function type parameter name shadowing if configured
+ if (isFunctionTypeParameterNameValueShadow(variable, shadowed)) {
+ continue;
+ }
+ const isESLintGlobal = 'writeable' in shadowed;
+ if ((shadowed.identifiers.length > 0 ||
+ (options.builtinGlobals && isESLintGlobal)) &&
+ !isOnInitializer(variable, shadowed) &&
+ !(options.hoist !== 'all' && isInTdz(variable, shadowed))) {
+ context.report({
+ node: variable.identifiers[0],
+ messageId: 'noShadow',
+ data: {
+ name: variable.name,
+ },
+ });
+ }
+ }
+ }
+ return {
+ 'Program:exit'() {
+ const globalScope = context.getScope();
+ const stack = globalScope.childScopes.slice();
+ while (stack.length) {
+ const scope = stack.pop();
+ stack.push(...scope.childScopes);
+ checkForShadows(scope);
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-shadow.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map
new file mode 100644
index 000000000..188c17273
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-shadow.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-shadow.js","sourceRoot":"","sources":["../../src/rules/no-shadow.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8CAAgC;AAahC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,qFAAqF;YACvF,QAAQ,EAAE,WAAW;YACrB,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,cAAc,EAAE;wBACd,IAAI,EAAE,SAAS;qBAChB;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,CAAC,KAAK,EAAE,WAAW,EAAE,OAAO,CAAC;qBACpC;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE;4BACL,IAAI,EAAE,QAA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slint/eslint-plugin/dist/rules/no-this-alias.js
new file mode 100644
index 000000000..cd0ae568e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js
@@ -0,0 +1,83 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-this-alias',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow aliasing `this`',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ schema: [
+ {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ allowDestructuring: {
+ type: 'boolean',
+ },
+ allowedNames: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ },
+ },
+ ],
+ messages: {
+ thisAssignment: "Unexpected aliasing of 'this' to local variable.",
+ thisDestructure: "Unexpected aliasing of members of 'this' to local variables.",
+ },
+ },
+ defaultOptions: [
+ {
+ allowDestructuring: true,
+ allowedNames: [],
+ },
+ ],
+ create(context, [{ allowDestructuring, allowedNames }]) {
+ return {
+ "VariableDeclarator[init.type='ThisExpression']"(node) {
+ const { id } = node;
+ if (allowDestructuring && id.type !== experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ return;
+ }
+ const hasAllowedName = id.type === experimental_utils_1.AST_NODE_TYPES.Identifier
+ ? allowedNames.includes(id.name)
+ : false;
+ if (!hasAllowedName) {
+ context.report({
+ node: id,
+ messageId: id.type === experimental_utils_1.AST_NODE_TYPES.Identifier
+ ? 'thisAssignment'
+ : 'thisDestructure',
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-this-alias.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js.map
new file mode 100644
index 000000000..99bf7d349
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-this-alias.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-this-alias.js","sourceRoot":"","sources":["../../src/rules/no-this-alias.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAUhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,0BAA0B;YACvC,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;SACrB;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACV,kBAAkB,EAAE;wBAClB,IAAI,EAAE,SAAS;qBAChB;oBACD,YAAY,EAAE;wBACZ,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;yBACf;qBACF;iBACF;aACF;SACF;QACD,QAAQ,EAAE;YACR,cAAc,EAAE,kDAAkD;YAClE,eAAe,EACb,8DAA8D;SACjE;KACF;IACD,cAAc,EAAE;QACd;YACE,kBAAkB,EAAE,IAAI;YACxB,YAAY,EAAE,EAAE;SACjB;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,kBAAkB,EAAE,YAAY,EAAE,CAAC;QACpD,OAAO;YACL,gDAAgD,CAC9C,IAAiC;gBAEjC,MAAM,EAAE,EAAE,EAAE,GAAG,IAAI,CAAC;gBAEpB,IAAI,kBAAkB,IAAI,EAAE,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU,EAAE;oBAC/D,OAAO;iBACR;gBAED,MAAM,cAAc,GAClB,EAAE,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU;oBACnC,CAAC,CAAC,YAAa,CAAC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;oBACjC,CAAC,CAAC,KAAK,CAAC;gBACZ,IAAI,CAAC,cAAc,EAAE;oBACnB,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAE,EAAE;wBACR,SAAS,EACP,EAAE,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU;4BACnC,CAAC,CAAC,gBAAgB;4BAClB,CAAC,CAAC,iBAAiB;qBACxB,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-throw-literal.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-throw-literal.js
new file mode 100644
index 000000000..b11fa4b4d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-throw-literal.js
@@ -0,0 +1,130 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+exports.default = util.createRule({
+ name: 'no-throw-literal',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow throwing literals as exceptions',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ schema: [],
+ messages: {
+ object: 'Expected an error object to be thrown.',
+ undef: 'Do not throw undefined.',
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ const parserServices = util.getParserServices(context);
+ const program = parserServices.program;
+ const checker = program.getTypeChecker();
+ function isErrorLike(type) {
+ var _a;
+ if (type.isIntersection()) {
+ return type.types.some(isErrorLike);
+ }
+ if (type.isUnion()) {
+ return type.types.every(isErrorLike);
+ }
+ const symbol = type.getSymbol();
+ if (!symbol) {
+ return false;
+ }
+ if (symbol.getName() === 'Error') {
+ const declarations = (_a = symbol.getDeclarations()) !== null && _a !== void 0 ? _a : [];
+ for (const declaration of declarations) {
+ const sourceFile = declaration.getSourceFile();
+ if (program.isSourceFileDefaultLibrary(sourceFile)) {
+ return true;
+ }
+ }
+ }
+ if (symbol.flags & (ts.SymbolFlags.Class | ts.SymbolFlags.Interface)) {
+ for (const baseType of checker.getBaseTypes(type)) {
+ if (isErrorLike(baseType)) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ function tryGetThrowArgumentType(node) {
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ case experimental_utils_1.AST_NODE_TYPES.CallExpression:
+ case experimental_utils_1.AST_NODE_TYPES.NewExpression:
+ case experimental_utils_1.AST_NODE_TYPES.MemberExpression:
+ case experimental_utils_1.AST_NODE_TYPES.TSAsExpression: {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ return checker.getTypeAtLocation(tsNode);
+ }
+ case experimental_utils_1.AST_NODE_TYPES.AssignmentExpression:
+ return tryGetThrowArgumentType(node.right);
+ case experimental_utils_1.AST_NODE_TYPES.SequenceExpression:
+ return tryGetThrowArgumentType(node.expressions[node.expressions.length - 1]);
+ case experimental_utils_1.AST_NODE_TYPES.LogicalExpression: {
+ const left = tryGetThrowArgumentType(node.left);
+ return left !== null && left !== void 0 ? left : tryGetThrowArgumentType(node.right);
+ }
+ case experimental_utils_1.AST_NODE_TYPES.ConditionalExpression: {
+ const consequent = tryGetThrowArgumentType(node.consequent);
+ return consequent !== null && consequent !== void 0 ? consequent : tryGetThrowArgumentType(node.alternate);
+ }
+ default:
+ return null;
+ }
+ }
+ function checkThrowArgument(node) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.AwaitExpression ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.YieldExpression) {
+ return;
+ }
+ const type = tryGetThrowArgumentType(node);
+ if (type) {
+ if (type.flags & ts.TypeFlags.Undefined) {
+ context.report({ node, messageId: 'undef' });
+ return;
+ }
+ if (util.isTypeAnyType(type) ||
+ util.isTypeUnknownType(type) ||
+ isErrorLike(type)) {
+ return;
+ }
+ }
+ context.report({ node, messageId: 'object' });
+ }
+ return {
+ ThrowStatement(node) {
+ if (node.argument) {
+ checkThrowArgument(node.argument);
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-throw-literal.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-throw-literal.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-throw-literal.js.map
new file mode 100644
index 000000000..86d94ff0a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-throw-literal.js.map
@@ -0,0 +1 @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,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js
new file mode 100644
index 000000000..62b9398b4
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js
@@ -0,0 +1,252 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+const enumValues = [
+ 'always',
+ 'never',
+ 'in-unions',
+ 'in-intersections',
+ 'in-unions-and-intersections',
+];
+exports.default = util.createRule({
+ name: 'no-type-alias',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow the use of type aliases',
+ category: 'Stylistic Issues',
+ // too opinionated to be recommended
+ recommended: false,
+ },
+ messages: {
+ noTypeAlias: 'Type {{alias}} are not allowed.',
+ noCompositionAlias: '{{typeName}} in {{compositionType}} types are not allowed.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowAliases: {
+ enum: enumValues,
+ },
+ allowCallbacks: {
+ enum: ['always', 'never'],
+ },
+ allowConditionalTypes: {
+ enum: ['always', 'never'],
+ },
+ allowConstructors: {
+ enum: ['always', 'never'],
+ },
+ allowLiterals: {
+ enum: enumValues,
+ },
+ allowMappedTypes: {
+ enum: enumValues,
+ },
+ allowTupleTypes: {
+ enum: enumValues,
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ allowAliases: 'never',
+ allowCallbacks: 'never',
+ allowConditionalTypes: 'never',
+ allowConstructors: 'never',
+ allowLiterals: 'never',
+ allowMappedTypes: 'never',
+ allowTupleTypes: 'never',
+ },
+ ],
+ create(context, [{ allowAliases, allowCallbacks, allowConditionalTypes, allowConstructors, allowLiterals, allowMappedTypes, allowTupleTypes, },]) {
+ const unions = ['always', 'in-unions', 'in-unions-and-intersections'];
+ const intersections = [
+ 'always',
+ 'in-intersections',
+ 'in-unions-and-intersections',
+ ];
+ const compositions = [
+ 'in-unions',
+ 'in-intersections',
+ 'in-unions-and-intersections',
+ ];
+ const aliasTypes = new Set([
+ experimental_utils_1.AST_NODE_TYPES.TSArrayType,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeReference,
+ experimental_utils_1.AST_NODE_TYPES.TSLiteralType,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeQuery,
+ experimental_utils_1.AST_NODE_TYPES.TSIndexedAccessType,
+ ]);
+ /**
+ * Determines if the composition type is supported by the allowed flags.
+ * @param isTopLevel a flag indicating this is the top level node.
+ * @param compositionType the composition type (either TSUnionType or TSIntersectionType)
+ * @param allowed the currently allowed flags.
+ */
+ function isSupportedComposition(isTopLevel, compositionType, allowed) {
+ return (!compositions.includes(allowed) ||
+ (!isTopLevel &&
+ ((compositionType === experimental_utils_1.AST_NODE_TYPES.TSUnionType &&
+ unions.includes(allowed)) ||
+ (compositionType === experimental_utils_1.AST_NODE_TYPES.TSIntersectionType &&
+ intersections.includes(allowed)))));
+ }
+ /**
+ * Gets the message to be displayed based on the node type and whether the node is a top level declaration.
+ * @param node the location
+ * @param compositionType the type of composition this alias is part of (undefined if not
+ * part of a composition)
+ * @param isRoot a flag indicating we are dealing with the top level declaration.
+ * @param type the kind of type alias being validated.
+ */
+ function reportError(node, compositionType, isRoot, type) {
+ if (isRoot) {
+ return context.report({
+ node,
+ messageId: 'noTypeAlias',
+ data: {
+ alias: type.toLowerCase(),
+ },
+ });
+ }
+ return context.report({
+ node,
+ messageId: 'noCompositionAlias',
+ data: {
+ compositionType: compositionType === experimental_utils_1.AST_NODE_TYPES.TSUnionType
+ ? 'union'
+ : 'intersection',
+ typeName: type,
+ },
+ });
+ }
+ const isValidTupleType = (type) => {
+ if (type.node.type === experimental_utils_1.AST_NODE_TYPES.TSTupleType) {
+ return true;
+ }
+ if (type.node.type === experimental_utils_1.AST_NODE_TYPES.TSTypeOperator) {
+ if (['keyof', 'readonly'].includes(type.node.operator) &&
+ type.node.typeAnnotation &&
+ type.node.typeAnnotation.type === experimental_utils_1.AST_NODE_TYPES.TSTupleType) {
+ return true;
+ }
+ }
+ return false;
+ };
+ const checkAndReport = (optionValue, isTopLevel, type, label) => {
+ if (optionValue === 'never' ||
+ !isSupportedComposition(isTopLevel, type.compositionType, optionValue)) {
+ reportError(type.node, type.compositionType, isTopLevel, label);
+ }
+ };
+ /**
+ * Validates the node looking for aliases, callbacks and literals.
+ * @param type the type of composition this alias is part of (null if not
+ * part of a composition)
+ * @param isTopLevel a flag indicating this is the top level node.
+ */
+ function validateTypeAliases(type, isTopLevel = false) {
+ if (type.node.type === experimental_utils_1.AST_NODE_TYPES.TSFunctionType) {
+ // callback
+ if (allowCallbacks === 'never') {
+ reportError(type.node, type.compositionType, isTopLevel, 'Callbacks');
+ }
+ }
+ else if (type.node.type === experimental_utils_1.AST_NODE_TYPES.TSConditionalType) {
+ // conditional type
+ if (allowConditionalTypes === 'never') {
+ reportError(type.node, type.compositionType, isTopLevel, 'Conditional types');
+ }
+ }
+ else if (type.node.type === experimental_utils_1.AST_NODE_TYPES.TSConstructorType) {
+ if (allowConstructors === 'never') {
+ reportError(type.node, type.compositionType, isTopLevel, 'Constructors');
+ }
+ }
+ else if (type.node.type === experimental_utils_1.AST_NODE_TYPES.TSTypeLiteral) {
+ // literal object type
+ checkAndReport(allowLiterals, isTopLevel, type, 'Literals');
+ }
+ else if (type.node.type === experimental_utils_1.AST_NODE_TYPES.TSMappedType) {
+ // mapped type
+ checkAndReport(allowMappedTypes, isTopLevel, type, 'Mapped types');
+ }
+ else if (isValidTupleType(type)) {
+ // tuple types
+ checkAndReport(allowTupleTypes, isTopLevel, type, 'Tuple Types');
+ }
+ else if (
+ // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum
+ type.node.type.endsWith('Keyword') ||
+ aliasTypes.has(type.node.type) ||
+ (type.node.type === experimental_utils_1.AST_NODE_TYPES.TSTypeOperator &&
+ type.node.operator === 'readonly' &&
+ type.node.typeAnnotation &&
+ aliasTypes.has(type.node.typeAnnotation.type))) {
+ // alias / keyword
+ checkAndReport(allowAliases, isTopLevel, type, 'Aliases');
+ }
+ else {
+ // unhandled type - shouldn't happen
+ reportError(type.node, type.compositionType, isTopLevel, 'Unhandled');
+ }
+ }
+ /**
+ * Flatten the given type into an array of its dependencies
+ */
+ function getTypes(node, compositionType = null) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.TSUnionType ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.TSIntersectionType) {
+ return node.types.reduce((acc, type) => {
+ acc.push(...getTypes(type, node.type));
+ return acc;
+ }, []);
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.TSParenthesizedType) {
+ return getTypes(node.typeAnnotation, compositionType);
+ }
+ return [{ node, compositionType }];
+ }
+ return {
+ TSTypeAliasDeclaration(node) {
+ const types = getTypes(node.typeAnnotation);
+ if (types.length === 1) {
+ // is a top level type annotation
+ validateTypeAliases(types[0], true);
+ }
+ else {
+ // is a composition type
+ types.forEach(type => {
+ validateTypeAliases(type);
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-type-alias.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js.map
new file mode 100644
index 000000000..ad5550808
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-type-alias.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-type-alias.js","sourceRoot":"","sources":["../../src/rules/no-type-alias.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAQhC,MAAM,UAAU,GAAa;IAC3B,QAAQ;IACR,OAAO;IACP,WAAW;IACX,kBAAkB;IAClB,6BAA6B;CAC9B,CAAC;AAuBF,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,kCAAkC;YAC/C,QAAQ,EAAE,kBAAkB;YAC5B,oCAAoC;YACpC,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,iCAAiC;YAC9C,kBAAkB,EAChB,4DAA4D;SAC/D;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,YAAY,EAAE;wBACZ,IAAI,EAAE,UAAU;qBACjB;oBACD,cAAc,EAAE;wBACd,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;qBAC1B;oBACD,qBAAqB,EAAE;wBACrB,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;qBAC1B;oBACD,iBAAiB,EAAE;wBACjB,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;qBAC1B;oBACD,aAAa,EAAE;wBACb,IAAI,EAAE,UAAU;qBACjB;oBACD,gBAAgB,EAAE;wBAChB,IAAI,EAAE,UAAU;qBACjB;oBACD,eAAe,EAAE;wBACf,IAAI,EAAE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,IAAI,KAAK,mCAAc,CAAC,mBAAmB,EAAE;gBACpD,OAAO,QAAQ,CAAC,IAAI,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC;aACvD;YACD,OAAO,CAAC,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC,CAAC;QACrC,CAAC;QAED,OAAO;YACL,sBAAsB,CAAC,IAAI;gBACzB,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;gBAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;oBACtB,iCAAiC;oBACjC,mBAAmB,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;iBACrC;qBAAM;oBACL,wBAAwB;oBACxB,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;wBACnB,mBAAmB,CAAC,IAAI,CAAC,CAAC;oBAC5B,CAAC,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js
new file mode 100644
index 000000000..7da37adde
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js
@@ -0,0 +1,207 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const tsutils = __importStar(require("tsutils"));
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-unnecessary-boolean-literal-compare',
+ meta: {
+ docs: {
+ description: 'Flags unnecessary equality comparisons against boolean literals',
+ category: 'Stylistic Issues',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ fixable: 'code',
+ messages: {
+ direct: 'This expression unnecessarily compares a boolean value to a boolean instead of using it directly.',
+ negated: 'This expression unnecessarily compares a boolean value to a boolean instead of negating it.',
+ comparingNullableToTrueDirect: 'This expression unnecessarily compares a nullable boolean value to true instead of using it directly.',
+ comparingNullableToTrueNegated: 'This expression unnecessarily compares a nullable boolean value to true instead of negating it.',
+ comparingNullableToFalse: 'This expression unnecessarily compares a nullable boolean value to false instead of using the ?? operator to provide a default.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowComparingNullableBooleansToTrue: {
+ type: 'boolean',
+ },
+ allowComparingNullableBooleansToFalse: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ type: 'suggestion',
+ },
+ defaultOptions: [
+ {
+ allowComparingNullableBooleansToTrue: true,
+ allowComparingNullableBooleansToFalse: true,
+ },
+ ],
+ create(context, [options]) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ function getBooleanComparison(node) {
+ const comparison = deconstructComparison(node);
+ if (!comparison) {
+ return undefined;
+ }
+ const expressionType = checker.getTypeAtLocation(parserServices.esTreeNodeToTSNodeMap.get(comparison.expression));
+ if (isBooleanType(expressionType)) {
+ return Object.assign(Object.assign({}, comparison), { expressionIsNullableBoolean: false });
+ }
+ if (isNullableBoolean(expressionType)) {
+ return Object.assign(Object.assign({}, comparison), { expressionIsNullableBoolean: true });
+ }
+ return undefined;
+ }
+ function isBooleanType(expressionType) {
+ return tsutils.isTypeFlagSet(expressionType, ts.TypeFlags.Boolean | ts.TypeFlags.BooleanLiteral);
+ }
+ /**
+ * checks if the expressionType is a union that
+ * 1) contains at least one nullish type (null or undefined)
+ * 2) contains at least once boolean type (true or false or boolean)
+ * 3) does not contain any types besides nullish and boolean types
+ */
+ function isNullableBoolean(expressionType) {
+ if (!expressionType.isUnion()) {
+ return false;
+ }
+ const { types } = expressionType;
+ const nonNullishTypes = types.filter(type => !tsutils.isTypeFlagSet(type, ts.TypeFlags.Undefined | ts.TypeFlags.Null));
+ const hasNonNullishType = nonNullishTypes.length > 0;
+ if (!hasNonNullishType) {
+ return false;
+ }
+ const hasNullableType = nonNullishTypes.length < types.length;
+ if (!hasNullableType) {
+ return false;
+ }
+ const allNonNullishTypesAreBoolean = nonNullishTypes.every(isBooleanType);
+ if (!allNonNullishTypesAreBoolean) {
+ return false;
+ }
+ return true;
+ }
+ function deconstructComparison(node) {
+ const comparisonType = util.getEqualsKind(node.operator);
+ if (!comparisonType) {
+ return undefined;
+ }
+ for (const [against, expression] of [
+ [node.right, node.left],
+ [node.left, node.right],
+ ]) {
+ if (against.type !== experimental_utils_1.AST_NODE_TYPES.Literal ||
+ typeof against.value !== 'boolean') {
+ continue;
+ }
+ const { value: literalBooleanInComparison } = against;
+ const negated = !comparisonType.isPositive;
+ return {
+ literalBooleanInComparison,
+ forTruthy: literalBooleanInComparison ? !negated : negated,
+ expression,
+ negated,
+ range: expression.range[0] < against.range[0]
+ ? [expression.range[1], against.range[1]]
+ : [against.range[1], expression.range[1]],
+ };
+ }
+ return undefined;
+ }
+ function nodeIsUnaryNegation(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ node.prefix &&
+ node.operator === '!');
+ }
+ return {
+ BinaryExpression(node) {
+ const comparison = getBooleanComparison(node);
+ if (comparison === undefined) {
+ return;
+ }
+ if (comparison.expressionIsNullableBoolean) {
+ if (comparison.literalBooleanInComparison &&
+ options.allowComparingNullableBooleansToTrue) {
+ return;
+ }
+ if (!comparison.literalBooleanInComparison &&
+ options.allowComparingNullableBooleansToFalse) {
+ return;
+ }
+ }
+ context.report({
+ fix: function* (fixer) {
+ yield fixer.removeRange(comparison.range);
+ // if the expression `exp` isn't nullable, or we're comparing to `true`,
+ // we can just replace the entire comparison with `exp` or `!exp`
+ if (!comparison.expressionIsNullableBoolean ||
+ comparison.literalBooleanInComparison) {
+ if (!comparison.forTruthy) {
+ yield fixer.insertTextBefore(node, '!');
+ }
+ return;
+ }
+ // if we're here, then the expression is a nullable boolean and we're
+ // comparing to a literal `false`
+ // if we're doing `== false` or `=== false`, then we need to negate the expression
+ if (!comparison.negated) {
+ const { parent } = node;
+ // if the parent is a negation, we can instead just get rid of the parent's negation.
+ // i.e. instead of resulting in `!(!(exp))`, we can just result in `exp`
+ if (parent != null && nodeIsUnaryNegation(parent)) {
+ // remove from the beginning of the parent to the beginning of this node
+ yield fixer.removeRange([parent.range[0], node.range[0]]);
+ // remove from the end of the node to the end of the parent
+ yield fixer.removeRange([node.range[1], parent.range[1]]);
+ }
+ else {
+ yield fixer.insertTextBefore(node, '!');
+ }
+ }
+ // provide the default `true`
+ yield fixer.insertTextBefore(node, '(');
+ yield fixer.insertTextAfter(node, ' ?? true)');
+ },
+ messageId: comparison.expressionIsNullableBoolean
+ ? comparison.literalBooleanInComparison
+ ? comparison.negated
+ ? 'comparingNullableToTrueNegated'
+ : 'comparingNullableToTrueDirect'
+ : 'comparingNullableToFalse'
+ : comparison.negated
+ ? 'negated'
+ : 'direct',
+ node,
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-unnecessary-boolean-literal-compare.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map
new file mode 100644
index 000000000..be36dbf92
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-boolean-literal-compare.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unnecessary-boolean-literal-compare.js","sourceRoot":"","sources":["../../src/rules/no-unnecessary-boolean-literal-compare.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,iDAAmC;AACnC,+CAAiC;AACjC,8CAAgC;AA4BhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,wCAAwC;IAC9C,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EACT,iEAAiE;YACnE,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,MAAM,EACJ,mGAAmG;YACrG,OAAO,EACL,6FAA6F;YAC/F,6BAA6B,EAC3B,uGAAuG;YACzG,8BAA8B,EAC5B,iGAAiG;YACnG,wBAAwB,EACtB,iIAAiI;SACpI;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,oCAAoC,EAAE;wBACpC,IAAI,EAAE,SAAS;qBAChB;oBACD,qCAAqC,EAAE;wBACrC,IAAI,EAAE,SAAS;qBAChB;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;QACD,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE;QACd;YACE,oCAAoC,EAAE,IAAI;YAC1C,qCAAqC,EAAE,IAAI;SAC5C;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC;QACvB,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACvD,MAAM,OAAO,GAAG,cAAc,CAAC,O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xB,qFAAqF;4BACrF,wEAAwE;4BACxE,IAAI,MAAM,IAAI,IAAI,IAAI,mBAAmB,CAAC,MAAM,CAAC,EAAE;gCACjD,wEAAwE;gCACxE,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gCAC1D,2DAA2D;gCAC3D,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;6BAC3D;iCAAM;gCACL,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;6BACzC;yBACF;wBAED,6BAA6B;wBAC7B,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;wBACxC,MAAM,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;oBACjD,CAAC;oBACD,SAAS,EAAE,UAAU,CAAC,2BAA2B;wBAC/C,CAAC,CAAC,UAAU,CAAC,0BAA0B;4BACrC,CAAC,CAAC,UAAU,CAAC,OAAO;gCAClB,CAAC,CAAC,gCAAgC;gCAClC,CAAC,CAAC,+BAA+B;4BACnC,CAAC,CAAC,0BAA0B;wBAC9B,CAAC,CAAC,UAAU,CAAC,OAAO;4BACpB,CAAC,CAAC,SAAS;4BACX,CAAC,CAAC,QAAQ;oBACZ,IAAI;iBACL,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js
new file mode 100644
index 000000000..1ed42ea8c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js
@@ -0,0 +1,469 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const ts = __importStar(require("typescript"));
+const tsutils_1 = require("tsutils");
+const util_1 = require("../util");
+// Truthiness utilities
+// #region
+const isTruthyLiteral = (type) => tsutils_1.isBooleanLiteralType(type, true) || (tsutils_1.isLiteralType(type) && !!type.value);
+const isPossiblyFalsy = (type) => tsutils_1.unionTypeParts(type)
+ // PossiblyFalsy flag includes literal values, so exclude ones that
+ // are definitely truthy
+ .filter(t => !isTruthyLiteral(t))
+ .some(type => util_1.isTypeFlagSet(type, ts.TypeFlags.PossiblyFalsy));
+const isPossiblyTruthy = (type) => tsutils_1.unionTypeParts(type).some(type => !tsutils_1.isFalsyType(type));
+// Nullish utilities
+const nullishFlag = ts.TypeFlags.Undefined | ts.TypeFlags.Null;
+const isNullishType = (type) => util_1.isTypeFlagSet(type, nullishFlag);
+const isPossiblyNullish = (type) => tsutils_1.unionTypeParts(type).some(isNullishType);
+const isAlwaysNullish = (type) => tsutils_1.unionTypeParts(type).every(isNullishType);
+// isLiteralType only covers numbers and strings, this is a more exhaustive check.
+const isLiteral = (type) => tsutils_1.isBooleanLiteralType(type, true) ||
+ tsutils_1.isBooleanLiteralType(type, false) ||
+ type.flags === ts.TypeFlags.Undefined ||
+ type.flags === ts.TypeFlags.Null ||
+ type.flags === ts.TypeFlags.Void ||
+ tsutils_1.isLiteralType(type);
+exports.default = util_1.createRule({
+ name: 'no-unnecessary-condition',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Prevents conditionals where the type is always truthy or always falsy',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowConstantLoopConditions: {
+ type: 'boolean',
+ },
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ fixable: 'code',
+ messages: {
+ alwaysTruthy: 'Unnecessary conditional, value is always truthy.',
+ alwaysFalsy: 'Unnecessary conditional, value is always falsy.',
+ alwaysTruthyFunc: 'This callback should return a conditional, but return is always truthy.',
+ alwaysFalsyFunc: 'This callback should return a conditional, but return is always falsy.',
+ neverNullish: 'Unnecessary conditional, expected left-hand side of `??` operator to be possibly null or undefined.',
+ alwaysNullish: 'Unnecessary conditional, left-hand side of `??` operator is always `null` or `undefined`.',
+ literalBooleanExpression: 'Unnecessary conditional, both sides of the expression are literal values',
+ noOverlapBooleanExpression: 'Unnecessary conditional, the types have no overlap',
+ never: 'Unnecessary conditional, value is `never`',
+ neverOptionalChain: 'Unnecessary optional chain on a non-nullish value',
+ noStrictNullCheck: 'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.',
+ },
+ },
+ defaultOptions: [
+ {
+ allowConstantLoopConditions: false,
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
+ },
+ ],
+ create(context, [{ allowConstantLoopConditions, allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing, },]) {
+ const service = util_1.getParserServices(context);
+ const checker = service.program.getTypeChecker();
+ const sourceCode = context.getSourceCode();
+ const compilerOptions = service.program.getCompilerOptions();
+ const isStrictNullChecks = tsutils_1.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks');
+ if (!isStrictNullChecks &&
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing !== true) {
+ context.report({
+ loc: {
+ start: { line: 0, column: 0 },
+ end: { line: 0, column: 0 },
+ },
+ messageId: 'noStrictNullCheck',
+ });
+ }
+ function getNodeType(node) {
+ const tsNode = service.esTreeNodeToTSNodeMap.get(node);
+ return util_1.getConstrainedTypeAtLocation(checker, tsNode);
+ }
+ function nodeIsArrayType(node) {
+ const nodeType = getNodeType(node);
+ return checker.isArrayType(nodeType);
+ }
+ function nodeIsTupleType(node) {
+ const nodeType = getNodeType(node);
+ return checker.isTupleType(nodeType);
+ }
+ function isArrayIndexExpression(node) {
+ return (
+ // Is an index signature
+ node.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression &&
+ node.computed &&
+ // ...into an array type
+ (nodeIsArrayType(node.object) ||
+ // ... or a tuple type
+ (nodeIsTupleType(node.object) &&
+ // Exception: literal index into a tuple - will have a sound type
+ node.property.type !== experimental_utils_1.AST_NODE_TYPES.Literal)));
+ }
+ /**
+ * Checks if a conditional node is necessary:
+ * if the type of the node is always true or always false, it's not necessary.
+ */
+ function checkNode(node, isUnaryNotArgument = false) {
+ // Check if the node is Unary Negation expression and handle it
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ node.operator === '!') {
+ return checkNode(node.argument, true);
+ }
+ // Since typescript array index signature types don't represent the
+ // possibility of out-of-bounds access, if we're indexing into an array
+ // just skip the check, to avoid false positives
+ if (isArrayIndexExpression(node)) {
+ return;
+ }
+ // When checking logical expressions, only check the right side
+ // as the left side has been checked by checkLogicalExpressionForUnnecessaryConditionals
+ //
+ // Unless the node is nullish coalescing, as it's common to use patterns like `nullBool ?? true` to to strict
+ // boolean checks if we inspect the right here, it'll usually be a constant condition on purpose.
+ // In this case it's better to inspect the type of the expression as a whole.
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.LogicalExpression &&
+ node.operator !== '??') {
+ return checkNode(node.right);
+ }
+ const type = getNodeType(node);
+ // Conditional is always necessary if it involves:
+ // `any` or `unknown` or a naked type parameter
+ if (tsutils_1.unionTypeParts(type).some(part => util_1.isTypeAnyType(part) ||
+ util_1.isTypeUnknownType(part) ||
+ util_1.isTypeFlagSet(part, ts.TypeFlags.TypeParameter))) {
+ return;
+ }
+ let messageId = null;
+ if (util_1.isTypeFlagSet(type, ts.TypeFlags.Never)) {
+ messageId = 'never';
+ }
+ else if (!isPossiblyTruthy(type)) {
+ messageId = !isUnaryNotArgument ? 'alwaysFalsy' : 'alwaysTruthy';
+ }
+ else if (!isPossiblyFalsy(type)) {
+ messageId = !isUnaryNotArgument ? 'alwaysTruthy' : 'alwaysFalsy';
+ }
+ if (messageId) {
+ context.report({ node, messageId });
+ }
+ }
+ function checkNodeForNullish(node) {
+ // Since typescript array index signature types don't represent the
+ // possibility of out-of-bounds access, if we're indexing into an array
+ // just skip the check, to avoid false positives
+ if (isArrayIndexExpression(node)) {
+ return;
+ }
+ const type = getNodeType(node);
+ // Conditional is always necessary if it involves `any` or `unknown`
+ if (util_1.isTypeAnyType(type) || util_1.isTypeUnknownType(type)) {
+ return;
+ }
+ let messageId = null;
+ if (util_1.isTypeFlagSet(type, ts.TypeFlags.Never)) {
+ messageId = 'never';
+ }
+ else if (!isPossiblyNullish(type)) {
+ messageId = 'neverNullish';
+ }
+ else if (isAlwaysNullish(type)) {
+ messageId = 'alwaysNullish';
+ }
+ if (messageId) {
+ context.report({ node, messageId });
+ }
+ }
+ /**
+ * Checks that a binary expression is necessarily conditional, reports otherwise.
+ * If both sides of the binary expression are literal values, it's not a necessary condition.
+ *
+ * NOTE: It's also unnecessary if the types that don't overlap at all
+ * but that case is handled by the Typescript compiler itself.
+ * Known exceptions:
+ * * https://github.com/microsoft/TypeScript/issues/32627
+ * * https://github.com/microsoft/TypeScript/issues/37160 (handled)
+ */
+ const BOOL_OPERATORS = new Set([
+ '<',
+ '>',
+ '<=',
+ '>=',
+ '==',
+ '===',
+ '!=',
+ '!==',
+ ]);
+ function checkIfBinaryExpressionIsNecessaryConditional(node) {
+ if (!BOOL_OPERATORS.has(node.operator)) {
+ return;
+ }
+ const leftType = getNodeType(node.left);
+ const rightType = getNodeType(node.right);
+ if (isLiteral(leftType) && isLiteral(rightType)) {
+ context.report({ node, messageId: 'literalBooleanExpression' });
+ return;
+ }
+ // Workaround for https://github.com/microsoft/TypeScript/issues/37160
+ if (isStrictNullChecks) {
+ const UNDEFINED = ts.TypeFlags.Undefined;
+ const NULL = ts.TypeFlags.Null;
+ const isComparable = (type, flag) => {
+ // Allow comparison to `any`, `unknown` or a naked type parameter.
+ flag |=
+ ts.TypeFlags.Any |
+ ts.TypeFlags.Unknown |
+ ts.TypeFlags.TypeParameter;
+ // Allow loose comparison to nullish values.
+ if (node.operator === '==' || node.operator === '!=') {
+ flag |= NULL | UNDEFINED;
+ }
+ return util_1.isTypeFlagSet(type, flag);
+ };
+ if ((leftType.flags === UNDEFINED &&
+ !isComparable(rightType, UNDEFINED)) ||
+ (rightType.flags === UNDEFINED &&
+ !isComparable(leftType, UNDEFINED)) ||
+ (leftType.flags === NULL && !isComparable(rightType, NULL)) ||
+ (rightType.flags === NULL && !isComparable(leftType, NULL))) {
+ context.report({ node, messageId: 'noOverlapBooleanExpression' });
+ return;
+ }
+ }
+ }
+ /**
+ * Checks that a logical expression contains a boolean, reports otherwise.
+ */
+ function checkLogicalExpressionForUnnecessaryConditionals(node) {
+ if (node.operator === '??') {
+ checkNodeForNullish(node.left);
+ return;
+ }
+ // Only checks the left side, since the right side might not be "conditional" at all.
+ // The right side will be checked if the LogicalExpression is used in a conditional context
+ checkNode(node.left);
+ }
+ /**
+ * Checks that a testable expression of a loop is necessarily conditional, reports otherwise.
+ */
+ function checkIfLoopIsNecessaryConditional(node) {
+ if (node.test === null) {
+ // e.g. `for(;;)`
+ return;
+ }
+ /**
+ * Allow:
+ * while (true) {}
+ * for (;true;) {}
+ * do {} while (true)
+ */
+ if (allowConstantLoopConditions &&
+ tsutils_1.isBooleanLiteralType(getNodeType(node.test), true)) {
+ return;
+ }
+ checkNode(node.test);
+ }
+ const ARRAY_PREDICATE_FUNCTIONS = new Set([
+ 'filter',
+ 'find',
+ 'some',
+ 'every',
+ ]);
+ function isArrayPredicateFunction(node) {
+ const { callee } = node;
+ return (
+ // looks like `something.filter` or `something.find`
+ callee.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression &&
+ callee.property.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ ARRAY_PREDICATE_FUNCTIONS.has(callee.property.name) &&
+ // and the left-hand side is an array, according to the types
+ (nodeIsArrayType(callee.object) || nodeIsTupleType(callee.object)));
+ }
+ function checkCallExpression(node) {
+ // If this is something like arr.filter(x => /*condition*/), check `condition`
+ if (isArrayPredicateFunction(node) && node.arguments.length) {
+ const callback = node.arguments[0];
+ // Inline defined functions
+ if ((callback.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression ||
+ callback.type === experimental_utils_1.AST_NODE_TYPES.FunctionExpression) &&
+ callback.body) {
+ // Two special cases, where we can directly check the node that's returned:
+ // () => something
+ if (callback.body.type !== experimental_utils_1.AST_NODE_TYPES.BlockStatement) {
+ return checkNode(callback.body);
+ }
+ // () => { return something; }
+ const callbackBody = callback.body.body;
+ if (callbackBody.length === 1 &&
+ callbackBody[0].type === experimental_utils_1.AST_NODE_TYPES.ReturnStatement &&
+ callbackBody[0].argument) {
+ return checkNode(callbackBody[0].argument);
+ }
+ // Potential enhancement: could use code-path analysis to check
+ // any function with a single return statement
+ // (Value to complexity ratio is dubious however)
+ }
+ // Otherwise just do type analysis on the function as a whole.
+ const returnTypes = tsutils_1.getCallSignaturesOfType(getNodeType(callback)).map(sig => sig.getReturnType());
+ /* istanbul ignore if */ if (returnTypes.length === 0) {
+ // Not a callable function
+ return;
+ }
+ if (!returnTypes.some(isPossiblyFalsy)) {
+ return context.report({
+ node: callback,
+ messageId: 'alwaysTruthyFunc',
+ });
+ }
+ if (!returnTypes.some(isPossiblyTruthy)) {
+ return context.report({
+ node: callback,
+ messageId: 'alwaysFalsyFunc',
+ });
+ }
+ }
+ }
+ // Recursively searches an optional chain for an array index expression
+ // Has to search the entire chain, because an array index will "infect" the rest of the types
+ // Example:
+ // ```
+ // [{x: {y: "z"} }][n] // type is {x: {y: "z"}}
+ // ?.x // type is {y: "z"}
+ // ?.y // This access is considered "unnecessary" according to the types
+ // ```
+ function optionChainContainsArrayIndex(node) {
+ const lhsNode = node.type === experimental_utils_1.AST_NODE_TYPES.CallExpression ? node.callee : node.object;
+ if (isArrayIndexExpression(lhsNode)) {
+ return true;
+ }
+ if (lhsNode.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression ||
+ lhsNode.type === experimental_utils_1.AST_NODE_TYPES.CallExpression) {
+ return optionChainContainsArrayIndex(lhsNode);
+ }
+ return false;
+ }
+ function isNullablePropertyType(objType, propertyType) {
+ if (propertyType.isUnion()) {
+ return propertyType.types.some(type => isNullablePropertyType(objType, type));
+ }
+ if (propertyType.isNumberLiteral() || propertyType.isStringLiteral()) {
+ const propType = checker.getTypeOfPropertyOfType(objType, propertyType.value.toString());
+ if (propType) {
+ return util_1.isNullableType(propType, { allowUndefined: true });
+ }
+ }
+ const typeName = util_1.getTypeName(checker, propertyType);
+ return !!((typeName === 'string' &&
+ checker.getIndexInfoOfType(objType, ts.IndexKind.String)) ||
+ (typeName === 'number' &&
+ checker.getIndexInfoOfType(objType, ts.IndexKind.Number)));
+ }
+ // Checks whether a member expression is nullable or not regardless of it's previous node.
+ // Example:
+ // ```
+ // // 'bar' is nullable if 'foo' is null.
+ // // but this function checks regardless of 'foo' type, so returns 'true'.
+ // declare const foo: { bar : { baz: string } } | null
+ // foo?.bar;
+ // ```
+ function isNullableOriginFromPrev(node) {
+ const prevType = getNodeType(node.object);
+ const property = node.property;
+ if (prevType.isUnion() && util_1.isIdentifier(property)) {
+ const isOwnNullable = prevType.types.some(type => {
+ if (node.computed) {
+ const propertyType = getNodeType(node.property);
+ return isNullablePropertyType(type, propertyType);
+ }
+ const propType = checker.getTypeOfPropertyOfType(type, property.name);
+ return propType && util_1.isNullableType(propType, { allowUndefined: true });
+ });
+ return (!isOwnNullable && util_1.isNullableType(prevType, { allowUndefined: true }));
+ }
+ return false;
+ }
+ function isOptionableExpression(node) {
+ const type = getNodeType(node);
+ const isOwnNullable = node.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression
+ ? !isNullableOriginFromPrev(node)
+ : true;
+ return (util_1.isTypeAnyType(type) ||
+ util_1.isTypeUnknownType(type) ||
+ (util_1.isNullableType(type, { allowUndefined: true }) && isOwnNullable));
+ }
+ function checkOptionalChain(node, beforeOperator, fix) {
+ // We only care if this step in the chain is optional. If just descend
+ // from an optional chain, then that's fine.
+ if (!node.optional) {
+ return;
+ }
+ // Since typescript array index signature types don't represent the
+ // possibility of out-of-bounds access, if we're indexing into an array
+ // just skip the check, to avoid false positives
+ if (optionChainContainsArrayIndex(node)) {
+ return;
+ }
+ const nodeToCheck = node.type === experimental_utils_1.AST_NODE_TYPES.CallExpression ? node.callee : node.object;
+ if (isOptionableExpression(nodeToCheck)) {
+ return;
+ }
+ const questionDotOperator = util_1.nullThrows(sourceCode.getTokenAfter(beforeOperator, token => token.type === experimental_utils_1.AST_TOKEN_TYPES.Punctuator && token.value === '?.'), util_1.NullThrowsReasons.MissingToken('operator', node.type));
+ context.report({
+ node,
+ loc: questionDotOperator.loc,
+ messageId: 'neverOptionalChain',
+ fix(fixer) {
+ return fixer.replaceText(questionDotOperator, fix);
+ },
+ });
+ }
+ function checkOptionalMemberExpression(node) {
+ checkOptionalChain(node, node.object, node.computed ? '' : '.');
+ }
+ function checkOptionalCallExpression(node) {
+ checkOptionalChain(node, node.callee, '');
+ }
+ return {
+ BinaryExpression: checkIfBinaryExpressionIsNecessaryConditional,
+ CallExpression: checkCallExpression,
+ ConditionalExpression: (node) => checkNode(node.test),
+ DoWhileStatement: checkIfLoopIsNecessaryConditional,
+ ForStatement: checkIfLoopIsNecessaryConditional,
+ IfStatement: (node) => checkNode(node.test),
+ LogicalExpression: checkLogicalExpressionForUnnecessaryConditionals,
+ WhileStatement: checkIfLoopIsNecessaryConditional,
+ 'MemberExpression[optional = true]': checkOptionalMemberExpression,
+ 'CallExpression[optional = true]': checkOptionalCallExpression,
+ };
+ },
+});
+//# sourceMappingURL=no-unnecessary-condition.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map
new file mode 100644
index 000000000..0178403e3
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-condition.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unnecessary-condition.js","sourceRoot":"","sources":["../../src/rules/no-unnecessary-condition.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,+CAAiC;AACjC,qCAOiB;AACjB,kCAYiB;AAEjB,uBAAuB;AACvB,UAAU;AACV,MAAM,eAAe,GAAG,CAAC,IAAa,EAAW,EAAE,CACjD,8BAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,uBAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAE5E,MAAM,eAAe,GAAG,CAAC,IAAa,EAAW,EAAE,CACjD,wBAAc,CAAC,IAAI,CAAC;IAClB,mEAAmE;IACnE,wBAAwB;KACvB,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;KAChC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,oBAAa,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC,CAAC;AAEn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IAAI,CACpE,EACD,wBAAiB,CAAC,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,CACtD,CAAC;YAEF,OAAO,CAAC,MAAM,CAAC;gBACb,IAAI;gBACJ,GAAG,EAAE,mBAAmB,CAAC,GAAG;gBAC5B,SAAS,EAAE,oBAAoB;gBAC/B,GAAG,CAAC,KAAK;oBACP,OAAO,KAAK,CAAC,WAAW,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;gBACrD,CAAC;aACF,CAAC,CAAC;QACL,CAAC;QAED,SAAS,6BAA6B,CACpC,IAA+B;YAE/B,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;QAClE,CAAC;QAED,SAAS,2BAA2B,CAAC,IAA6B;YAChE,kBAAkB,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC5C,CAAC;QAED,OAAO;YACL,gBAAgB,EAAE,6CAA6C;YAC/D,cAAc,EAAE,mBAAmB;YACnC,qBAAqB,EAAE,CAAC,IAAI,EAAQ,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YAC3D,gBAAgB,EAAE,iCAAiC;YACnD,YAAY,EAAE,iCAAiC;YAC/C,WAAW,EAAE,CAAC,IAAI,EAAQ,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;YACjD,iBAAiB,EAAE,gDAAgD;YACnE,cAAc,EAAE,iCAAiC;YACjD,mCAAmC,EAAE,6BAA6B;YAClE,iCAAiC,EAAE,2BAA2B;SAC/D,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js
new file mode 100644
index 000000000..52202a047
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js
@@ -0,0 +1,149 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const ts = __importStar(require("typescript"));
+const tsutils = __importStar(require("tsutils"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-unnecessary-qualifier',
+ meta: {
+ docs: {
+ category: 'Best Practices',
+ description: 'Warns when a namespace qualifier is unnecessary',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ fixable: 'code',
+ messages: {
+ unnecessaryQualifier: "Qualifier is unnecessary since '{{ name }}' is in scope.",
+ },
+ schema: [],
+ type: 'suggestion',
+ },
+ defaultOptions: [],
+ create(context) {
+ const namespacesInScope = [];
+ let currentFailedNamespaceExpression = null;
+ const parserServices = util.getParserServices(context);
+ const esTreeNodeToTSNodeMap = parserServices.esTreeNodeToTSNodeMap;
+ const program = parserServices.program;
+ const checker = program.getTypeChecker();
+ const sourceCode = context.getSourceCode();
+ function tryGetAliasedSymbol(symbol, checker) {
+ return tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)
+ ? checker.getAliasedSymbol(symbol)
+ : null;
+ }
+ function symbolIsNamespaceInScope(symbol) {
+ var _a;
+ const symbolDeclarations = (_a = symbol.getDeclarations()) !== null && _a !== void 0 ? _a : [];
+ if (symbolDeclarations.some(decl => namespacesInScope.some(ns => ns === decl))) {
+ return true;
+ }
+ const alias = tryGetAliasedSymbol(symbol, checker);
+ return alias !== null && symbolIsNamespaceInScope(alias);
+ }
+ function getSymbolInScope(node, flags, name) {
+ // TODO:PERF `getSymbolsInScope` gets a long list. Is there a better way?
+ const scope = checker.getSymbolsInScope(node, flags);
+ return scope.find(scopeSymbol => scopeSymbol.name === name);
+ }
+ function symbolsAreEqual(accessed, inScope) {
+ return accessed === checker.getExportSymbolOfSymbol(inScope);
+ }
+ function qualifierIsUnnecessary(qualifier, name) {
+ const tsQualifier = esTreeNodeToTSNodeMap.get(qualifier);
+ const tsName = esTreeNodeToTSNodeMap.get(name);
+ const namespaceSymbol = checker.getSymbolAtLocation(tsQualifier);
+ if (typeof namespaceSymbol === 'undefined' ||
+ !symbolIsNamespaceInScope(namespaceSymbol)) {
+ return false;
+ }
+ const accessedSymbol = checker.getSymbolAtLocation(tsName);
+ if (typeof accessedSymbol === 'undefined') {
+ return false;
+ }
+ // If the symbol in scope is different, the qualifier is necessary.
+ const fromScope = getSymbolInScope(tsQualifier, accessedSymbol.flags, sourceCode.getText(name));
+ return (typeof fromScope === 'undefined' ||
+ symbolsAreEqual(accessedSymbol, fromScope));
+ }
+ function visitNamespaceAccess(node, qualifier, name) {
+ // Only look for nested qualifier errors if we didn't already fail on the outer qualifier.
+ if (!currentFailedNamespaceExpression &&
+ qualifierIsUnnecessary(qualifier, name)) {
+ currentFailedNamespaceExpression = node;
+ context.report({
+ node: qualifier,
+ messageId: 'unnecessaryQualifier',
+ data: {
+ name: sourceCode.getText(name),
+ },
+ fix(fixer) {
+ return fixer.removeRange([qualifier.range[0], name.range[0]]);
+ },
+ });
+ }
+ }
+ function enterDeclaration(node) {
+ namespacesInScope.push(esTreeNodeToTSNodeMap.get(node));
+ }
+ function exitDeclaration() {
+ namespacesInScope.pop();
+ }
+ function resetCurrentNamespaceExpression(node) {
+ if (node === currentFailedNamespaceExpression) {
+ currentFailedNamespaceExpression = null;
+ }
+ }
+ function isPropertyAccessExpression(node) {
+ return node.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression && !node.computed;
+ }
+ function isEntityNameExpression(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.Identifier ||
+ (isPropertyAccessExpression(node) &&
+ isEntityNameExpression(node.object)));
+ }
+ return {
+ TSModuleDeclaration: enterDeclaration,
+ TSEnumDeclaration: enterDeclaration,
+ 'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]': enterDeclaration,
+ 'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]': enterDeclaration,
+ 'TSModuleDeclaration:exit': exitDeclaration,
+ 'TSEnumDeclaration:exit': exitDeclaration,
+ 'ExportNamedDeclaration[declaration.type="TSModuleDeclaration"]:exit': exitDeclaration,
+ 'ExportNamedDeclaration[declaration.type="TSEnumDeclaration"]:exit': exitDeclaration,
+ TSQualifiedName(node) {
+ visitNamespaceAccess(node, node.left, node.right);
+ },
+ 'MemberExpression[computed=false]': function (node) {
+ const property = node.property;
+ if (isEntityNameExpression(node.object)) {
+ visitNamespaceAccess(node, node.object, property);
+ }
+ },
+ 'TSQualifiedName:exit': resetCurrentNamespaceExpression,
+ 'MemberExpression:exit': resetCurrentNamespaceExpression,
+ };
+ },
+});
+//# sourceMappingURL=no-unnecessary-qualifier.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js.map
new file mode 100644
index 000000000..c516a4522
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-qualifier.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unnecessary-qualifier.js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AAI,CAAC,QAAQ,CAAC;QACzE,CAAC;QAED,SAAS,sBAAsB,CAC7B,IAAmB;YAEnB,OAAO,CACL,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU;gBACvC,CAAC,0BAA0B,CAAC,IAAI,CAAC;oBAC/B,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CACvC,CAAC;QACJ,CAAC;QAED,OAAO;YACL,mBAAmB,EAAE,gBAAgB;YACrC,iBAAiB,EAAE,gBAAgB;YACnC,gEAAgE,EAAE,gBAAgB;YAClF,8DAA8D,EAAE,gBAAgB;YAChF,0BAA0B,EAAE,eAAe;YAC3C,wBAAwB,EAAE,eAAe;YACzC,qEAAqE,EAAE,eAAe;YACtF,mEAAmE,EAAE,eAAe;YACpF,eAAe,CAAC,IAA8B;gBAC5C,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;YACpD,CAAC;YACD,kCAAkC,EAAE,UAClC,IAA+B;gBAE/B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAA+B,CAAC;gBACtD,IAAI,sBAAsB,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;oBACvC,oBAAoB,CAAC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;iBACnD;YACH,CAAC;YACD,sBAAsB,EAAE,+BAA+B;YACvD,uBAAuB,EAAE,+BAA+B;SACzD,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js
new file mode 100644
index 000000000..d8fab6113
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js
@@ -0,0 +1,119 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const tsutils = __importStar(require("tsutils"));
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+const util_1 = require("../util");
+exports.default = util.createRule({
+ name: 'no-unnecessary-type-arguments',
+ meta: {
+ docs: {
+ description: 'Enforces that type arguments will not be used if not required',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ fixable: 'code',
+ messages: {
+ unnecessaryTypeParameter: 'This is the default value for this type parameter, so it can be omitted.',
+ },
+ schema: [],
+ type: 'suggestion',
+ },
+ defaultOptions: [],
+ create(context) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ const sourceCode = context.getSourceCode();
+ function checkTSArgsAndParameters(esParameters, typeParameters) {
+ // Just check the last one. Must specify previous type parameters if the last one is specified.
+ const i = esParameters.params.length - 1;
+ const arg = esParameters.params[i];
+ const param = typeParameters[i];
+ // TODO: would like checker.areTypesEquivalent. https://github.com/Microsoft/TypeScript/issues/13502
+ if (!(param === null || param === void 0 ? void 0 : param.default) ||
+ param.default.getText() !== sourceCode.getText(arg)) {
+ return;
+ }
+ context.report({
+ node: arg,
+ messageId: 'unnecessaryTypeParameter',
+ fix: fixer => fixer.removeRange(i === 0
+ ? esParameters.range
+ : [esParameters.params[i - 1].range[1], arg.range[1]]),
+ });
+ }
+ return {
+ TSTypeParameterInstantiation(node) {
+ const expression = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const typeParameters = getTypeParametersFromNode(expression, checker);
+ if (typeParameters) {
+ checkTSArgsAndParameters(node, typeParameters);
+ }
+ },
+ };
+ },
+});
+function getTypeParametersFromNode(node, checker) {
+ if (ts.isExpressionWithTypeArguments(node)) {
+ return getTypeParametersFromType(node.expression, checker);
+ }
+ if (ts.isTypeReferenceNode(node)) {
+ return getTypeParametersFromType(node.typeName, checker);
+ }
+ if (ts.isCallExpression(node) || ts.isNewExpression(node)) {
+ return getTypeParametersFromCall(node, checker);
+ }
+ return undefined;
+}
+function getTypeParametersFromType(type, checker) {
+ const symAtLocation = checker.getSymbolAtLocation(type);
+ if (!symAtLocation) {
+ return undefined;
+ }
+ const sym = getAliasedSymbol(symAtLocation, checker);
+ const declarations = sym.getDeclarations();
+ if (!declarations) {
+ return undefined;
+ }
+ return util_1.findFirstResult(declarations, decl => tsutils.isClassLikeDeclaration(decl) ||
+ ts.isTypeAliasDeclaration(decl) ||
+ ts.isInterfaceDeclaration(decl)
+ ? decl.typeParameters
+ : undefined);
+}
+function getTypeParametersFromCall(node, checker) {
+ const sig = checker.getResolvedSignature(node);
+ const sigDecl = sig === null || sig === void 0 ? void 0 : sig.getDeclaration();
+ if (!sigDecl) {
+ return ts.isNewExpression(node)
+ ? getTypeParametersFromType(node.expression, checker)
+ : undefined;
+ }
+ return sigDecl.typeParameters;
+}
+function getAliasedSymbol(symbol, checker) {
+ return tsutils.isSymbolFlagSet(symbol, ts.SymbolFlags.Alias)
+ ? checker.getAliasedSymbol(symbol)
+ : symbol;
+}
+//# sourceMappingURL=no-unnecessary-type-arguments.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js.map
new file mode 100644
index 000000000..c669509ac
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-arguments.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unnecessary-type-arguments.js","sourceRoot":"","sources":["../../src/rules/no-unnecessary-type-arguments.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,iDAAmC;AACnC,+CAAiC;AACjC,8CAAgC;AAChC,kCAA0C;AAc1C,kBAAe,IAAI,CAAC,UAAU,CAAiB;IAC7C,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EACT,+DAA+D;YACjE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,wBAAwB,EACtB,0EAA0E;SAC7E;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,cAAc,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QACvD,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QACxD,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C,SAAS,wBAAwB,CAC/B,YAAmD,EACnD,cAAsD;YAEtD,+FAA+F;YAC/F,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;YACzC,MAAM,GAAG,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;YACnC,MAAM,KAAK,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;YAEhC,oGAAoG;YACpG,IACE,EAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAA;gBACf,KAAK,CAAC,OAAO,CAAC,OAAO,EA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C,KAAK,CAAC;QAC1D,CAAC,CAAC,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC;QAClC,CAAC,CAAC,MAAM,CAAC;AACb,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js
new file mode 100644
index 000000000..249849fec
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js
@@ -0,0 +1,218 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const tsutils_1 = require("tsutils");
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-unnecessary-type-assertion',
+ meta: {
+ docs: {
+ description: 'Warns if a type assertion does not change the type of an expression',
+ category: 'Best Practices',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ fixable: 'code',
+ messages: {
+ unnecessaryAssertion: 'This assertion is unnecessary since it does not change the type of the expression.',
+ contextuallyUnnecessary: 'This assertion is unnecessary since the receiver accepts the original type of the expression.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ typesToIgnore: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ },
+ },
+ ],
+ type: 'suggestion',
+ },
+ defaultOptions: [{}],
+ create(context, [options]) {
+ const sourceCode = context.getSourceCode();
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ const compilerOptions = parserServices.program.getCompilerOptions();
+ /**
+ * Sometimes tuple types don't have ObjectFlags.Tuple set, like when they're being matched against an inferred type.
+ * So, in addition, check if there are integer properties 0..n and no other numeric keys
+ */
+ function couldBeTupleType(type) {
+ const properties = type.getProperties();
+ if (properties.length === 0) {
+ return false;
+ }
+ let i = 0;
+ for (; i < properties.length; ++i) {
+ const name = properties[i].name;
+ if (String(i) !== name) {
+ if (i === 0) {
+ // if there are no integer properties, this is not a tuple
+ return false;
+ }
+ break;
+ }
+ }
+ for (; i < properties.length; ++i) {
+ if (String(+properties[i].name) === properties[i].name) {
+ return false; // if there are any other numeric properties, this is not a tuple
+ }
+ }
+ return true;
+ }
+ /**
+ * Returns true if there's a chance the variable has been used before a value has been assigned to it
+ */
+ function isPossiblyUsedBeforeAssigned(node) {
+ const declaration = util.getDeclaration(checker, node);
+ if (!declaration) {
+ // don't know what the declaration is for some reason, so just assume the worst
+ return true;
+ }
+ if (
+ // non-strict mode doesn't care about used before assigned errors
+ tsutils_1.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks') &&
+ // ignore class properties as they are compile time guarded
+ // also ignore function arguments as they can't be used before defined
+ tsutils_1.isVariableDeclaration(declaration) &&
+ // is it `const x!: number`
+ declaration.initializer === undefined &&
+ declaration.exclamationToken === undefined &&
+ declaration.type !== undefined) {
+ // check if the defined variable type has changed since assignment
+ const declarationType = checker.getTypeFromTypeNode(declaration.type);
+ const type = util.getConstrainedTypeAtLocation(checker, node);
+ if (declarationType === type) {
+ // possibly used before assigned, so just skip it
+ // better to false negative and skip it, than false positive and fix to compile erroring code
+ //
+ // no better way to figure this out right now
+ // https://github.com/Microsoft/TypeScript/issues/31124
+ return true;
+ }
+ }
+ return false;
+ }
+ function isConstAssertion(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.TSTypeReference &&
+ node.typeName.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ node.typeName.name === 'const');
+ }
+ return {
+ TSNonNullExpression(node) {
+ const originalNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const type = util.getConstrainedTypeAtLocation(checker, originalNode.expression);
+ if (!util.isNullableType(type)) {
+ if (isPossiblyUsedBeforeAssigned(originalNode.expression)) {
+ return;
+ }
+ context.report({
+ node,
+ messageId: 'unnecessaryAssertion',
+ fix(fixer) {
+ return fixer.removeRange([
+ originalNode.expression.end,
+ originalNode.end,
+ ]);
+ },
+ });
+ }
+ else {
+ // we know it's a nullable type
+ // so figure out if the variable is used in a place that accepts nullable types
+ const contextualType = util.getContextualType(checker, originalNode);
+ if (contextualType) {
+ // in strict mode you can't assign null to undefined, so we have to make sure that
+ // the two types share a nullable type
+ const typeIncludesUndefined = util.isTypeFlagSet(type, ts.TypeFlags.Undefined);
+ const typeIncludesNull = util.isTypeFlagSet(type, ts.TypeFlags.Null);
+ const contextualTypeIncludesUndefined = util.isTypeFlagSet(contextualType, ts.TypeFlags.Undefined);
+ const contextualTypeIncludesNull = util.isTypeFlagSet(contextualType, ts.TypeFlags.Null);
+ // make sure that the parent accepts the same types
+ // i.e. assigning `string | null | undefined` to `string | undefined` is invalid
+ const isValidUndefined = typeIncludesUndefined
+ ? contextualTypeIncludesUndefined
+ : true;
+ const isValidNull = typeIncludesNull
+ ? contextualTypeIncludesNull
+ : true;
+ if (isValidUndefined && isValidNull) {
+ context.report({
+ node,
+ messageId: 'contextuallyUnnecessary',
+ fix(fixer) {
+ return fixer.removeRange([
+ originalNode.expression.end,
+ originalNode.end,
+ ]);
+ },
+ });
+ }
+ }
+ }
+ },
+ 'TSAsExpression, TSTypeAssertion'(node) {
+ var _a;
+ if (((_a = options.typesToIgnore) === null || _a === void 0 ? void 0 : _a.includes(sourceCode.getText(node.typeAnnotation))) ||
+ isConstAssertion(node.typeAnnotation)) {
+ return;
+ }
+ const originalNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const castType = checker.getTypeAtLocation(originalNode);
+ if (tsutils_1.isTypeFlagSet(castType, ts.TypeFlags.Literal) ||
+ (tsutils_1.isObjectType(castType) &&
+ (tsutils_1.isObjectFlagSet(castType, ts.ObjectFlags.Tuple) ||
+ couldBeTupleType(castType)))) {
+ // It's not always safe to remove a cast to a literal type or tuple
+ // type, as those types are sometimes widened without the cast.
+ return;
+ }
+ const uncastType = checker.getTypeAtLocation(originalNode.expression);
+ if (uncastType === castType) {
+ context.report({
+ node,
+ messageId: 'unnecessaryAssertion',
+ fix(fixer) {
+ return originalNode.kind === ts.SyntaxKind.TypeAssertionExpression
+ ? fixer.removeRange([
+ originalNode.getStart(),
+ originalNode.expression.getStart(),
+ ])
+ : fixer.removeRange([
+ originalNode.expression.end,
+ originalNode.end,
+ ]);
+ },
+ });
+ }
+ // TODO - add contextually unnecessary check for this
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-unnecessary-type-assertion.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js.map
new file mode 100644
index 000000000..31dfa14d7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unnecessary-type-assertion.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unnecessary-type-assertion.js","sourceRoot":"","sources":["../../src/rules/no-unnecessary-type-assertion.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,qCAMiB;AACjB,+CAAiC;AACjC,8CAAgC;AAShC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,+BAA+B;IACrC,IAAI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C;4BAC9C,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC,EAChC;oBACA,mEAAmE;oBACnE,+DAA+D;oBAC/D,OAAO;iBACR;gBAED,MAAM,UAAU,GAAG,OAAO,CAAC,iBAAiB,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC;gBAEtE,IAAI,UAAU,KAAK,QAAQ,EAAE;oBAC3B,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,sBAAsB;wBACjC,GAAG,CAAC,KAAK;4BACP,OAAO,YAAY,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,uBAAuB;gCAChE,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC;oCAChB,YAAY,CAAC,QAAQ,EAAE;oCACvB,YAAY,CAAC,UAAU,CAAC,QAAQ,EAAE;iCACnC,CAAC;gCACJ,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC;oCAChB,YAAY,CAAC,UAAU,CAAC,GAAG;oCAC3B,YAAY,CAAC,GAAG;iCACjB,CAAC,CAAC;wBACT,CAAC;qBACF,CAAC,CAAC;iBACJ;gBAED,qDAAqD;YACvD,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js
new file mode 100644
index 000000000..42b1f9c55
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js
@@ -0,0 +1,265 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-unsafe-assignment',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallows assigning any to variables and properties',
+ category: 'Possible Errors',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ anyAssignment: 'Unsafe assignment of an any value.',
+ unsafeArrayPattern: 'Unsafe array destructuring of an any array value.',
+ unsafeArrayPatternFromTuple: 'Unsafe array destructuring of a tuple element with an any value.',
+ unsafeAssignment: 'Unsafe assignment of type {{sender}} to a variable of type {{receiver}}.',
+ unsafeArraySpread: 'Unsafe spread of an any value in an array.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const { program, esTreeNodeToTSNodeMap } = util.getParserServices(context);
+ const checker = program.getTypeChecker();
+ // returns true if the assignment reported
+ function checkArrayDestructureHelper(receiverNode, senderNode) {
+ if (receiverNode.type !== experimental_utils_1.AST_NODE_TYPES.ArrayPattern) {
+ return false;
+ }
+ const senderTsNode = esTreeNodeToTSNodeMap.get(senderNode);
+ const senderType = checker.getTypeAtLocation(senderTsNode);
+ return checkArrayDestructure(receiverNode, senderType, senderTsNode);
+ }
+ // returns true if the assignment reported
+ function checkArrayDestructure(receiverNode, senderType, senderNode) {
+ // any array
+ // const [x] = ([] as any[]);
+ if (util.isTypeAnyArrayType(senderType, checker)) {
+ context.report({
+ node: receiverNode,
+ messageId: 'unsafeArrayPattern',
+ });
+ return false;
+ }
+ if (!checker.isTupleType(senderType)) {
+ return true;
+ }
+ const tupleElements = util.getTypeArguments(senderType, checker);
+ // tuple with any
+ // const [x] = [1 as any];
+ let didReport = false;
+ for (let receiverIndex = 0; receiverIndex < receiverNode.elements.length; receiverIndex += 1) {
+ const receiverElement = receiverNode.elements[receiverIndex];
+ if (!receiverElement) {
+ continue;
+ }
+ if (receiverElement.type === experimental_utils_1.AST_NODE_TYPES.RestElement) {
+ // don't handle rests as they're not a 1:1 assignment
+ continue;
+ }
+ const senderType = tupleElements[receiverIndex];
+ if (!senderType) {
+ continue;
+ }
+ // check for the any type first so we can handle [[[x]]] = [any]
+ if (util.isTypeAnyType(senderType)) {
+ context.report({
+ node: receiverElement,
+ messageId: 'unsafeArrayPatternFromTuple',
+ });
+ // we want to report on every invalid element in the tuple
+ didReport = true;
+ }
+ else if (receiverElement.type === experimental_utils_1.AST_NODE_TYPES.ArrayPattern) {
+ didReport = checkArrayDestructure(receiverElement, senderType, senderNode);
+ }
+ else if (receiverElement.type === experimental_utils_1.AST_NODE_TYPES.ObjectPattern) {
+ didReport = checkObjectDestructure(receiverElement, senderType, senderNode);
+ }
+ }
+ return didReport;
+ }
+ // returns true if the assignment reported
+ function checkObjectDestructureHelper(receiverNode, senderNode) {
+ if (receiverNode.type !== experimental_utils_1.AST_NODE_TYPES.ObjectPattern) {
+ return false;
+ }
+ const senderTsNode = esTreeNodeToTSNodeMap.get(senderNode);
+ const senderType = checker.getTypeAtLocation(senderTsNode);
+ return checkObjectDestructure(receiverNode, senderType, senderTsNode);
+ }
+ // returns true if the assignment reported
+ function checkObjectDestructure(receiverNode, senderType, senderNode) {
+ const properties = new Map(senderType
+ .getProperties()
+ .map(property => [
+ property.getName(),
+ checker.getTypeOfSymbolAtLocation(property, senderNode),
+ ]));
+ let didReport = false;
+ for (let receiverIndex = 0; receiverIndex < receiverNode.properties.length; receiverIndex += 1) {
+ const receiverProperty = receiverNode.properties[receiverIndex];
+ if (receiverProperty.type === experimental_utils_1.AST_NODE_TYPES.RestElement) {
+ // don't bother checking rest
+ continue;
+ }
+ let key;
+ if (receiverProperty.computed === false) {
+ key =
+ receiverProperty.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier
+ ? receiverProperty.key.name
+ : String(receiverProperty.key.value);
+ }
+ else if (receiverProperty.key.type === experimental_utils_1.AST_NODE_TYPES.Literal) {
+ key = String(receiverProperty.key.value);
+ }
+ else if (receiverProperty.key.type === experimental_utils_1.AST_NODE_TYPES.TemplateLiteral &&
+ receiverProperty.key.quasis.length === 1) {
+ key = String(receiverProperty.key.quasis[0].value.cooked);
+ }
+ else {
+ // can't figure out the name, so skip it
+ continue;
+ }
+ const senderType = properties.get(key);
+ if (!senderType) {
+ continue;
+ }
+ // check for the any type first so we can handle {x: {y: z}} = {x: any}
+ if (util.isTypeAnyType(senderType)) {
+ context.report({
+ node: receiverProperty.value,
+ messageId: 'unsafeArrayPatternFromTuple',
+ });
+ didReport = true;
+ }
+ else if (receiverProperty.value.type === experimental_utils_1.AST_NODE_TYPES.ArrayPattern) {
+ didReport = checkArrayDestructure(receiverProperty.value, senderType, senderNode);
+ }
+ else if (receiverProperty.value.type === experimental_utils_1.AST_NODE_TYPES.ObjectPattern) {
+ didReport = checkObjectDestructure(receiverProperty.value, senderType, senderNode);
+ }
+ }
+ return didReport;
+ }
+ // returns true if the assignment reported
+ function checkAssignment(receiverNode, senderNode, reportingNode, comparisonType) {
+ var _a;
+ const receiverTsNode = esTreeNodeToTSNodeMap.get(receiverNode);
+ const receiverType = comparisonType === 2 /* Contextual */
+ ? (_a = util.getContextualType(checker, receiverTsNode)) !== null && _a !== void 0 ? _a : checker.getTypeAtLocation(receiverTsNode) : checker.getTypeAtLocation(receiverTsNode);
+ const senderType = checker.getTypeAtLocation(esTreeNodeToTSNodeMap.get(senderNode));
+ if (util.isTypeAnyType(senderType)) {
+ // handle cases when we assign any ==> unknown.
+ if (util.isTypeUnknownType(receiverType)) {
+ return false;
+ }
+ context.report({
+ node: reportingNode,
+ messageId: 'anyAssignment',
+ });
+ return true;
+ }
+ if (comparisonType === 0 /* None */) {
+ return false;
+ }
+ const result = util.isUnsafeAssignment(senderType, receiverType, checker);
+ if (!result) {
+ return false;
+ }
+ const { sender, receiver } = result;
+ context.report({
+ node: reportingNode,
+ messageId: 'unsafeAssignment',
+ data: {
+ sender: checker.typeToString(sender),
+ receiver: checker.typeToString(receiver),
+ },
+ });
+ return true;
+ }
+ function getComparisonType(typeAnnotation) {
+ return typeAnnotation
+ ? // if there's a type annotation, we can do a comparison
+ 1 /* Basic */
+ : // no type annotation means the variable's type will just be inferred, thus equal
+ 0 /* None */;
+ }
+ return {
+ 'VariableDeclarator[init != null]'(node) {
+ const init = util.nullThrows(node.init, util.NullThrowsReasons.MissingToken(node.type, 'init'));
+ let didReport = checkAssignment(node.id, init, node, getComparisonType(node.id.typeAnnotation));
+ if (!didReport) {
+ didReport = checkArrayDestructureHelper(node.id, init);
+ }
+ if (!didReport) {
+ checkObjectDestructureHelper(node.id, init);
+ }
+ },
+ 'ClassProperty[value != null]'(node) {
+ checkAssignment(node.key, node.value, node, getComparisonType(node.typeAnnotation));
+ },
+ 'AssignmentExpression[operator = "="], AssignmentPattern'(node) {
+ let didReport = checkAssignment(node.left, node.right, node, 1 /* Basic */);
+ if (!didReport) {
+ didReport = checkArrayDestructureHelper(node.left, node.right);
+ }
+ if (!didReport) {
+ checkObjectDestructureHelper(node.left, node.right);
+ }
+ },
+ // object pattern props are checked via assignments
+ ':not(ObjectPattern) > Property'(node) {
+ if (node.value.type === experimental_utils_1.AST_NODE_TYPES.AssignmentPattern ||
+ node.value.type === experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression) {
+ // handled by other selector
+ return;
+ }
+ checkAssignment(node.key, node.value, node, 2 /* Contextual */);
+ },
+ 'ArrayExpression > SpreadElement'(node) {
+ const resetNode = esTreeNodeToTSNodeMap.get(node.argument);
+ const restType = checker.getTypeAtLocation(resetNode);
+ if (util.isTypeAnyType(restType) ||
+ util.isTypeAnyArrayType(restType, checker)) {
+ context.report({
+ node: node,
+ messageId: 'unsafeArraySpread',
+ });
+ }
+ },
+ 'JSXAttribute[value != null]'(node) {
+ const value = util.nullThrows(node.value, util.NullThrowsReasons.MissingToken(node.type, 'value'));
+ if (value.type !== experimental_utils_1.AST_NODE_TYPES.JSXExpressionContainer ||
+ value.expression.type === experimental_utils_1.AST_NODE_TYPES.JSXEmptyExpression) {
+ return;
+ }
+ checkAssignment(node.name, value.expression, value.expression, 2 /* Contextual */);
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-unsafe-assignment.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js.map
new file mode 100644
index 000000000..272d4ac33
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-assignment.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unsafe-assignment.js","sourceRoot":"","sources":["../../src/rules/no-unsafe-assignment.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAE/C,8CAAgC;AAWhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,qDAAqD;YAClE,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,aAAa,EAAE,oCAAoC;YACnD,kBAAkB,EAAE,mDAAmD;YACvE,2BAA2B,EACzB,kEAAkE;YACpE,gBAAgB,EACd,0EAA0E;YAC5E,iBAAiB,EAAE,4CAA4C;SAChE;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,EAAE,OAAO,EAAE,qB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C,CAAC,IAA4B;gBAC5D,MAAM,SAAS,GAAG,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;gBAC3D,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC;gBACtD,IACE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;oBAC5B,IAAI,CAAC,kBAAkB,CAAC,QAAQ,EAAE,OAAO,CAAC,EAC1C;oBACA,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAE,IAAI;wBACV,SAAS,EAAE,mBAAmB;qBAC/B,CAAC,CAAC;iBACJ;YACH,CAAC;YACD,6BAA6B,CAAC,IAA2B;gBACvD,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAC3B,IAAI,CAAC,KAAK,EACV,IAAI,CAAC,iBAAiB,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CACxD,CAAC;gBACF,IACE,KAAK,CAAC,IAAI,KAAK,mCAAc,CAAC,sBAAsB;oBACpD,KAAK,CAAC,UAAU,CAAC,IAAI,KAAK,mCAAc,CAAC,kBAAkB,EAC3D;oBACA,OAAO;iBACR;gBAED,eAAe,CACb,IAAI,CAAC,IAAI,EACT,KAAK,CAAC,UAAU,EAChB,KAAK,CAAC,UAAU,qBAEjB,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js
new file mode 100644
index 000000000..b3d4b5d6c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js
@@ -0,0 +1,67 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-unsafe-call',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallows calling an any type value',
+ category: 'Possible Errors',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ unsafeCall: 'Unsafe call of an any typed value.',
+ unsafeNew: 'Unsafe construction of an any type value.',
+ unsafeTemplateTag: 'Unsafe any typed template tag.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const { program, esTreeNodeToTSNodeMap } = util.getParserServices(context);
+ const checker = program.getTypeChecker();
+ function checkCall(node, reportingNode, messageId) {
+ const tsNode = esTreeNodeToTSNodeMap.get(node);
+ const type = util.getConstrainedTypeAtLocation(checker, tsNode);
+ if (util.isTypeAnyType(type)) {
+ context.report({
+ node: reportingNode,
+ messageId: messageId,
+ });
+ }
+ }
+ return {
+ 'CallExpression > *.callee'(node) {
+ checkCall(node, node, 'unsafeCall');
+ },
+ NewExpression(node) {
+ checkCall(node.callee, node, 'unsafeNew');
+ },
+ 'TaggedTemplateExpression > *.tag'(node) {
+ checkCall(node, node, 'unsafeTemplateTag');
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-unsafe-call.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js.map
new file mode 100644
index 000000000..2f8e7e8b3
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-call.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unsafe-call.js","sourceRoot":"","sources":["../../src/rules/no-unsafe-call.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,8CAAgC;AAIhC,kBAAe,IAAI,CAAC,UAAU,CAAiB;IAC7C,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,qCAAqC;YAClD,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,UAAU,EAAE,oCAAoC;YAChD,SAAS,EAAE,2CAA2C;YACtD,iBAAiB,EAAE,gCAAgC;SACpD;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,EAAE,OAAO,EAAE,qBAAqB,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;QAEzC,SAAS,SAAS,CAChB,IAAmB,EACnB,aAA4B,EAC5B,SAAqB;YAErB,MAAM,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC/C,MAAM,IAAI,GAAG,IAAI,CAAC,4BAA4B,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;YAEhE,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE;gBAC5B,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI,EAAE,aAAa;oBACnB,SAAS,EAAE,SAAS;iBACrB,CAAC,CAAC;aACJ;QACH,CAAC;QAED,OAAO;YACL,2BAA2B,CACzB,IAAuC;gBAEvC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC,CAAC;YACtC,CAAC;YACD,aAAa,CAAC,IAAI;gBAChB,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC;YAC5C,CAAC;YACD,kCAAkC,CAAC,IAAmB;gBACpD,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,mBAAmB,CAAC,CAAC;YAC7C,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js
new file mode 100644
index 000000000..21c6c3151
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js
@@ -0,0 +1,105 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-unsafe-member-access',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallows member access on any typed variables',
+ category: 'Possible Errors',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ unsafeMemberExpression: 'Unsafe member access {{property}} on an any value.',
+ unsafeComputedMemberAccess: 'Computed name {{property}} resolves to an any value.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const { program, esTreeNodeToTSNodeMap } = util.getParserServices(context);
+ const checker = program.getTypeChecker();
+ const sourceCode = context.getSourceCode();
+ const stateCache = new Map();
+ function checkMemberExpression(node) {
+ const cachedState = stateCache.get(node);
+ if (cachedState) {
+ return cachedState;
+ }
+ if (node.object.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression) {
+ const objectState = checkMemberExpression(node.object);
+ if (objectState === 1 /* Unsafe */) {
+ // if the object is unsafe, we know this will be unsafe as well
+ // we don't need to report, as we have already reported on the inner member expr
+ stateCache.set(node, objectState);
+ return objectState;
+ }
+ }
+ const tsNode = esTreeNodeToTSNodeMap.get(node.object);
+ const type = checker.getTypeAtLocation(tsNode);
+ const state = util.isTypeAnyType(type) ? 1 /* Unsafe */ : 2 /* Safe */;
+ stateCache.set(node, state);
+ if (state === 1 /* Unsafe */) {
+ const propertyName = sourceCode.getText(node.property);
+ context.report({
+ node,
+ messageId: 'unsafeMemberExpression',
+ data: {
+ property: node.computed ? `[${propertyName}]` : `.${propertyName}`,
+ },
+ });
+ }
+ return state;
+ }
+ return {
+ MemberExpression: checkMemberExpression,
+ 'MemberExpression[computed = true] > *.property'(node) {
+ if (
+ // x[1]
+ node.type === experimental_utils_1.AST_NODE_TYPES.Literal ||
+ // x[1++] x[++x] etc
+ // FUN FACT - **all** update expressions return type number, regardless of the argument's type,
+ // because JS engines return NaN if there the argument is not a number.
+ node.type === experimental_utils_1.AST_NODE_TYPES.UpdateExpression) {
+ // perf optimizations - literals can obviously never be `any`
+ return;
+ }
+ const tsNode = esTreeNodeToTSNodeMap.get(node);
+ const type = checker.getTypeAtLocation(tsNode);
+ if (util.isTypeAnyType(type)) {
+ const propertyName = sourceCode.getText(node);
+ context.report({
+ node,
+ messageId: 'unsafeComputedMemberAccess',
+ data: {
+ property: `[${propertyName}]`,
+ },
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-unsafe-member-access.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js.map
new file mode 100644
index 000000000..4a2df7a7e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-member-access.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unsafe-member-access.js","sourceRoot":"","sources":["../../src/rules/no-unsafe-member-access.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAOhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,gDAAgD;YAC7D,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,sBAAsB,EACpB,oDAAoD;YACtD,0BAA0B,EACxB,sDAAsD;SACzD;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,EAAE,OAAO,EAAE,qBAAqB,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;QACzC,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAwB,CAAC;QAEnD,SAAS,qBAAqB,CAAC,IAA+B;YAC5D,MAAM,W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AAC,OAAO;oBACpC,oBAAoB;oBACpB,+FAA+F;oBAC/F,uEAAuE;oBACvE,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,gBAAgB,EAC7C;oBACA,6DAA6D;oBAC7D,OAAO;iBACR;gBAED,MAAM,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;gBAE/C,IAAI,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE;oBAC5B,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBAC9C,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,4BAA4B;wBACvC,IAAI,EAAE;4BACJ,QAAQ,EAAE,IAAI,YAAY,GAAG;yBAC9B;qBACF,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js
new file mode 100644
index 000000000..50b809c8c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js
@@ -0,0 +1,137 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const tsutils_1 = require("tsutils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-unsafe-return',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallows returning any from a function',
+ category: 'Possible Errors',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ unsafeReturn: 'Unsafe return of an {{type}} typed value',
+ unsafeReturnAssignment: 'Unsafe return of type {{sender}} from function with return type {{receiver}}.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const { program, esTreeNodeToTSNodeMap } = util.getParserServices(context);
+ const checker = program.getTypeChecker();
+ function getParentFunctionNode(node) {
+ let current = node.parent;
+ while (current) {
+ if (current.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression ||
+ current.type === experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration ||
+ current.type === experimental_utils_1.AST_NODE_TYPES.FunctionExpression) {
+ return current;
+ }
+ current = current.parent;
+ }
+ // this shouldn't happen in correct code, but someone may attempt to parse bad code
+ // the parser won't error, so we shouldn't throw here
+ /* istanbul ignore next */ return null;
+ }
+ function checkReturn(returnNode, reportingNode = returnNode) {
+ const tsNode = esTreeNodeToTSNodeMap.get(returnNode);
+ const anyType = util.isAnyOrAnyArrayTypeDiscriminated(tsNode, checker);
+ const functionNode = getParentFunctionNode(returnNode);
+ /* istanbul ignore if */ if (!functionNode) {
+ return;
+ }
+ // function has an explicit return type, so ensure it's a safe return
+ const returnNodeType = util.getConstrainedTypeAtLocation(checker, esTreeNodeToTSNodeMap.get(returnNode));
+ const functionTSNode = esTreeNodeToTSNodeMap.get(functionNode);
+ // function expressions will not have their return type modified based on receiver typing
+ // so we have to use the contextual typing in these cases, i.e.
+ // const foo1: () => Set = () => new Set();
+ // the return type of the arrow function is Set even though the variable is typed as Set
+ let functionType = tsutils_1.isExpression(functionTSNode)
+ ? util.getContextualType(checker, functionTSNode)
+ : checker.getTypeAtLocation(functionTSNode);
+ if (!functionType) {
+ functionType = checker.getTypeAtLocation(functionTSNode);
+ }
+ if (anyType !== 2 /* Safe */) {
+ // Allow cases when the declared return type of the function is either unknown or unknown[]
+ // and the function is returning any or any[].
+ for (const signature of functionType.getCallSignatures()) {
+ const functionReturnType = signature.getReturnType();
+ if (anyType === 0 /* Any */ &&
+ util.isTypeUnknownType(functionReturnType)) {
+ return;
+ }
+ if (anyType === 1 /* AnyArray */ &&
+ util.isTypeUnknownArrayType(functionReturnType, checker)) {
+ return;
+ }
+ }
+ // If the function return type was not unknown/unknown[], mark usage as unsafeReturn.
+ return context.report({
+ node: reportingNode,
+ messageId: 'unsafeReturn',
+ data: {
+ type: anyType === 0 /* Any */ ? 'any' : 'any[]',
+ },
+ });
+ }
+ for (const signature of functionType.getCallSignatures()) {
+ const functionReturnType = signature.getReturnType();
+ if (returnNodeType === functionReturnType) {
+ // don't bother checking if they're the same
+ // either the function is explicitly declared to return the same type
+ // or there was no declaration, so the return type is implicit
+ return;
+ }
+ const result = util.isUnsafeAssignment(returnNodeType, functionReturnType, checker);
+ if (!result) {
+ return;
+ }
+ const { sender, receiver } = result;
+ return context.report({
+ node: reportingNode,
+ messageId: 'unsafeReturnAssignment',
+ data: {
+ sender: checker.typeToString(sender),
+ receiver: checker.typeToString(receiver),
+ },
+ });
+ }
+ }
+ return {
+ ReturnStatement(node) {
+ const argument = node.argument;
+ if (!argument) {
+ return;
+ }
+ checkReturn(argument, node);
+ },
+ 'ArrowFunctionExpression > :not(BlockStatement).body': checkReturn,
+ };
+ },
+});
+//# sourceMappingURL=no-unsafe-return.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js.map
new file mode 100644
index 000000000..e2f30ca0b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unsafe-return.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unsafe-return.js","sourceRoot":"","sources":["../../src/rules/no-unsafe-return.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,qCAAuC;AACvC,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,kBAAkB;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,yCAAyC;YACtD,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,YAAY,EAAE,0CAA0C;YACxD,sBAAsB,EACpB,+EAA+E;SAClF;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,EAAE,OAAO,EAAE,qBAAqB,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;QAEzC,SAAS,qBAAqB,CAC5B,IAAmB;YAMnB,IAAI,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC;YAC1B,OAAO,OAAO,EAAE;gBACd,IACE,OAAO,CAAC,IAAI,KAAK,mCAAc,CAAC,uBAAuB;oBACvD,OAAO,CAAC,IAAI,KAAK,mCAAc,CAAC,mBAAmB;oBACnD,OAAO,CAAC,IAAI,KAAK,mCAAc,CAAC,kBAAkB,EAClD;oBACA,OAAO,OAAO,CAAC;iBAChB;gBAED,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;aAC1B;YAED,mFAAmF;YACnF,qDAAqD;YACrD,0BAA0B,CAAC,OAA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AC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js
new file mode 100644
index 000000000..1b3a2d4a1
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js
@@ -0,0 +1,76 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const no_unused_expressions_1 = __importDefault(require("eslint/lib/rules/no-unused-expressions"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-unused-expressions',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow unused expressions',
+ category: 'Best Practices',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ schema: no_unused_expressions_1.default.meta.schema,
+ messages: (_a = no_unused_expressions_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ unusedExpression: 'Expected an assignment or function call and instead saw an expression.',
+ },
+ },
+ defaultOptions: [
+ {
+ allowShortCircuit: false,
+ allowTernary: false,
+ allowTaggedTemplates: false,
+ },
+ ],
+ create(context, options) {
+ const rules = no_unused_expressions_1.default.create(context);
+ const { allowShortCircuit = false, allowTernary = false } = options[0];
+ function isValidExpression(node) {
+ if (allowShortCircuit && node.type === experimental_utils_1.AST_NODE_TYPES.LogicalExpression) {
+ return isValidExpression(node.right);
+ }
+ if (allowTernary && node.type === experimental_utils_1.AST_NODE_TYPES.ConditionalExpression) {
+ return (isValidExpression(node.alternate) &&
+ isValidExpression(node.consequent));
+ }
+ return ((node.type === experimental_utils_1.AST_NODE_TYPES.ChainExpression &&
+ node.expression.type === experimental_utils_1.AST_NODE_TYPES.CallExpression) ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.ImportExpression);
+ }
+ return {
+ ExpressionStatement(node) {
+ if (node.directive || isValidExpression(node.expression)) {
+ return;
+ }
+ rules.ExpressionStatement(node);
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-unused-expressions.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js.map
new file mode 100644
index 000000000..d9fc64616
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-expressions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unused-expressions.js","sourceRoot":"","sources":["../../src/rules/no-unused-expressions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,mGAA8D;AAC9D,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,6BAA6B;YAC1C,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,eAAe,EAAE,IAAI;SACtB;QACD,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AC;YAClC,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars-experimental.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars-experimental.js
new file mode 100644
index 000000000..fd0572215
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars-experimental.js
@@ -0,0 +1,318 @@
+"use strict";
+/* eslint-disable no-fallthrough */
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.DEFAULT_IGNORED_REGEX_STRING = void 0;
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+exports.DEFAULT_IGNORED_REGEX_STRING = '^_';
+exports.default = util.createRule({
+ name: 'no-unused-vars-experimental',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow unused variables and arguments',
+ category: 'Best Practices',
+ recommended: false,
+ },
+ deprecated: true,
+ replacedBy: ['no-unused-vars'],
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ ignoredNamesRegex: {
+ oneOf: [
+ {
+ type: 'string',
+ },
+ {
+ type: 'boolean',
+ enum: [false],
+ },
+ ],
+ },
+ ignoreArgsIfArgsAfterAreUsed: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ messages: {
+ unused: "{{type}} '{{name}}' is declared but its value is never read.",
+ unusedWithIgnorePattern: "{{type}} '{{name}}' is declared but its value is never read. Allowed unused names must match {{pattern}}.",
+ unusedImport: 'All imports in import declaration are unused.',
+ unusedTypeParameters: 'All type parameters are unused.',
+ },
+ },
+ defaultOptions: [
+ {
+ ignoredNamesRegex: exports.DEFAULT_IGNORED_REGEX_STRING,
+ ignoreArgsIfArgsAfterAreUsed: false,
+ },
+ ],
+ create(context, [userOptions]) {
+ var _a;
+ const parserServices = util.getParserServices(context, true);
+ const tsProgram = parserServices.program;
+ const afterAllDiagnosticsCallbacks = [];
+ const options = {
+ ignoredNames: userOptions && typeof userOptions.ignoredNamesRegex === 'string'
+ ? new RegExp(userOptions.ignoredNamesRegex)
+ : null,
+ ignoreArgsIfArgsAfterAreUsed: (_a = userOptions.ignoreArgsIfArgsAfterAreUsed) !== null && _a !== void 0 ? _a : false,
+ };
+ function handleIdentifier(identifier) {
+ function report(type) {
+ const node = parserServices.tsNodeToESTreeNodeMap.get(identifier);
+ const regex = options.ignoredNames;
+ const name = identifier.getText();
+ if (regex) {
+ if (!regex.test(name)) {
+ context.report({
+ node,
+ messageId: 'unusedWithIgnorePattern',
+ data: {
+ name,
+ type,
+ pattern: regex.toString(),
+ },
+ });
+ }
+ }
+ else {
+ context.report({
+ node,
+ messageId: 'unused',
+ data: {
+ name,
+ type,
+ },
+ });
+ }
+ }
+ const parent = identifier.parent;
+ // is a single variable diagnostic
+ switch (parent.kind) {
+ case ts.SyntaxKind.BindingElement:
+ case ts.SyntaxKind.ObjectBindingPattern:
+ report('Destructured Variable');
+ break;
+ case ts.SyntaxKind.ClassDeclaration:
+ report('Class');
+ break;
+ case ts.SyntaxKind.EnumDeclaration:
+ report('Enum');
+ break;
+ case ts.SyntaxKind.FunctionDeclaration:
+ report('Function');
+ break;
+ // this won't happen because there are specific nodes that wrap up named/default import identifiers
+ // case ts.SyntaxKind.ImportDeclaration:
+ // import equals is always treated as a variable
+ case ts.SyntaxKind.ImportEqualsDeclaration:
+ // the default import is NOT used, but a named import is used
+ case ts.SyntaxKind.ImportClause:
+ // a named import is NOT used, but either another named import, or the default import is used
+ case ts.SyntaxKind.ImportSpecifier:
+ // a namespace import is NOT used, but the default import is used
+ case ts.SyntaxKind.NamespaceImport:
+ report('Import');
+ break;
+ case ts.SyntaxKind.InterfaceDeclaration:
+ report('Interface');
+ break;
+ case ts.SyntaxKind.MethodDeclaration:
+ report('Method');
+ break;
+ case ts.SyntaxKind.Parameter:
+ handleParameterDeclaration(identifier, parent);
+ break;
+ case ts.SyntaxKind.PropertyDeclaration:
+ // eslint-disable-next-line @typescript-eslint/internal/prefer-ast-types-enum
+ report('Property');
+ break;
+ case ts.SyntaxKind.TypeAliasDeclaration:
+ report('Type');
+ break;
+ case ts.SyntaxKind.TypeParameter:
+ handleTypeParam(identifier);
+ break;
+ case ts.SyntaxKind.VariableDeclaration:
+ report('Variable');
+ break;
+ default:
+ throw new Error(`Unknown node with kind ${parent.kind}.`);
+ // TODO - should we just handle this gracefully?
+ // report('Unknown Node');
+ // break;
+ }
+ }
+ const unusedParameters = new Set();
+ function handleParameterDeclaration(identifier, parent) {
+ const name = identifier.getText();
+ // regardless of if the parameter is ignored, track that it had a diagnostic fired on it
+ unusedParameters.add(identifier);
+ /*
+ NOTE - Typescript will automatically ignore parameters that have a
+ leading underscore in their name. We cannot do anything about this.
+ */
+ function report() {
+ const node = parserServices.tsNodeToESTreeNodeMap.get(identifier);
+ context.report({
+ node,
+ messageId: 'unused',
+ data: {
+ name,
+ type: 'Parameter',
+ },
+ });
+ }
+ const isLastParameter = parent.parent.parameters.indexOf(parent) ===
+ parent.parent.parameters.length - 1;
+ if (!isLastParameter && options.ignoreArgsIfArgsAfterAreUsed) {
+ // once all diagnostics are processed, we can check if the following args are unused
+ afterAllDiagnosticsCallbacks.push(() => {
+ for (const param of parent.parent.parameters) {
+ if (!unusedParameters.has(param.name)) {
+ return;
+ }
+ }
+ // none of the following params were unused, so report
+ report();
+ });
+ }
+ else {
+ report();
+ }
+ }
+ function handleImportDeclaration(parent) {
+ // the entire import statement is unused
+ /*
+ NOTE - Typescript will automatically ignore imports that have a
+ leading underscore in their name. We cannot do anything about this.
+ */
+ context.report({
+ messageId: 'unusedImport',
+ node: parserServices.tsNodeToESTreeNodeMap.get(parent),
+ });
+ }
+ function handleDestructure(parent) {
+ // the entire destructure is unused
+ // note that this case only ever triggers for simple, single-level destructured objects
+ // i.e. these will not trigger it:
+ // - const {a:_a, b, c: {d}} = z;
+ // - const [a, b] = c;
+ parent.elements.forEach(element => {
+ if (element.kind === ts.SyntaxKind.BindingElement) {
+ const name = element.name;
+ if (name.kind === ts.SyntaxKind.Identifier) {
+ handleIdentifier(name);
+ }
+ }
+ });
+ }
+ function handleTypeParamList(node) {
+ // the entire generic decl list is unused
+ /*
+ NOTE - Typescript will automatically ignore generics that have a
+ leading underscore in their name. We cannot do anything about this.
+ */
+ const parent = parserServices.tsNodeToESTreeNodeMap.get(node);
+ context.report({
+ messageId: 'unusedTypeParameters',
+ node: parent.typeParameters,
+ });
+ }
+ function handleTypeParam(identifier) {
+ context.report({
+ node: parserServices.tsNodeToESTreeNodeMap.get(identifier),
+ messageId: 'unused',
+ data: {
+ name: identifier.getText(),
+ type: 'Type Parameter',
+ },
+ });
+ }
+ return {
+ 'Program:exit'(program) {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(program);
+ const sourceFile = util.getSourceFileOfNode(tsNode);
+ const diagnostics = tsProgram.getSemanticDiagnostics(sourceFile);
+ diagnostics.forEach(diag => {
+ if (isUnusedDiagnostic(diag.code)) {
+ if (diag.start !== undefined) {
+ const node = util.getTokenAtPosition(sourceFile, diag.start);
+ const parent = node.parent;
+ if (isIdentifier(node)) {
+ handleIdentifier(node);
+ }
+ else if (isImport(parent)) {
+ handleImportDeclaration(parent);
+ }
+ else if (isDestructure(parent)) {
+ handleDestructure(parent);
+ }
+ else if (isGeneric(node, parent)) {
+ handleTypeParamList(parent);
+ }
+ }
+ }
+ });
+ // trigger all the checks to be done after all the diagnostics have been evaluated
+ afterAllDiagnosticsCallbacks.forEach(cb => cb());
+ },
+ };
+ },
+});
+/**
+ * Checks if the diagnostic code is one of the expected "unused var" codes
+ */
+function isUnusedDiagnostic(code) {
+ return [
+ 6133,
+ 6138,
+ 6192,
+ 6196,
+ 6198,
+ 6199,
+ 6205,
+ ].includes(code);
+}
+/**
+ * Checks if the given node is a destructuring pattern
+ */
+function isDestructure(node) {
+ return (node.kind === ts.SyntaxKind.ObjectBindingPattern ||
+ node.kind === ts.SyntaxKind.ArrayBindingPattern);
+}
+function isImport(node) {
+ return node.kind === ts.SyntaxKind.ImportDeclaration;
+}
+function isIdentifier(node) {
+ return node.kind === ts.SyntaxKind.Identifier;
+}
+function isGeneric(node, parent) {
+ return (node.kind === ts.SyntaxKind.LessThanToken &&
+ parent.typeParameters !== undefined);
+}
+//# sourceMappingURL=no-unused-vars-experimental.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars-experimental.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars-experimental.js.map
new file mode 100644
index 000000000..d5e15835d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars-experimental.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-unused-vars-experimental.js","sourceRoot":"","sources":["../../src/rules/no-unused-vars-experimental.ts"],"names":[],"mappings":";AAAA,mCAAmC;;;;;;;;;;;;;;;;;;;;;;AAGnC,+CAAiC;AACjC,8CAAgC;AAkBnB,QAAA,4BAA4B,GAAG,IAAI,CAAC;AACjD,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,E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AAO,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,iBAAiB,CAAC;AACvD,CAAC;AAED,SAAS,YAAY,CAAC,IAAa;IACjC,OAAO,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;AAChD,CAAC;AAED,SAAS,SAAS,CAChB,IAAa,EACb,MAA6C;IAE7C,OAAO,CACL,IAAI,CAAC,IAAI,KAAK,EAAE,CAAC,UAAU,CAAC,aAAa;QACzC,MAAM,CAAC,cAAc,KAAK,SAAS,CACpC,CAAC;AACJ,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js
new file mode 100644
index 000000000..6d4d3bc00
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js
@@ -0,0 +1,348 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const scope_manager_1 = require("@typescript-eslint/scope-manager");
+const no_unused_vars_1 = __importDefault(require("eslint/lib/rules/no-unused-vars"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-unused-vars',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow unused variables',
+ category: 'Variables',
+ recommended: 'warn',
+ extendsBaseRule: true,
+ },
+ schema: no_unused_vars_1.default.meta.schema,
+ messages: (_a = no_unused_vars_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ unusedVar: "'{{varName}}' is {{action}} but never used{{additional}}.",
+ },
+ },
+ defaultOptions: [{}],
+ create(context) {
+ const rules = no_unused_vars_1.default.create(context);
+ const filename = context.getFilename();
+ const MODULE_DECL_CACHE = new Map();
+ /**
+ * Gets a list of TS module definitions for a specified variable.
+ * @param variable eslint-scope variable object.
+ */
+ function getModuleNameDeclarations(variable) {
+ const moduleDeclarations = [];
+ variable.defs.forEach(def => {
+ if (def.type === 'TSModuleName') {
+ moduleDeclarations.push(def.node);
+ }
+ });
+ return moduleDeclarations;
+ }
+ /**
+ * Determine if an identifier is referencing an enclosing name.
+ * This only applies to declarations that create their own scope (modules, functions, classes)
+ * @param ref The reference to check.
+ * @param nodes The candidate function nodes.
+ * @returns True if it's a self-reference, false if not.
+ */
+ function isBlockSelfReference(ref, nodes) {
+ let scope = ref.from;
+ while (scope) {
+ if (nodes.indexOf(scope.block) >= 0) {
+ return true;
+ }
+ scope = scope.upper;
+ }
+ return false;
+ }
+ function isExported(variable, target) {
+ // TS will require that all merged namespaces/interfaces are exported, so we only need to find one
+ return variable.defs.some(def => {
+ var _a, _b;
+ return def.node.type === target &&
+ (((_a = def.node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.ExportNamedDeclaration ||
+ ((_b = def.node.parent) === null || _b === void 0 ? void 0 : _b.type) === experimental_utils_1.AST_NODE_TYPES.ExportDefaultDeclaration);
+ });
+ }
+ return Object.assign(Object.assign({}, rules), { 'TSCallSignatureDeclaration, TSConstructorType, TSConstructSignatureDeclaration, TSDeclareFunction, TSEmptyBodyFunctionExpression, TSFunctionType, TSMethodSignature'(node) {
+ // function type signature params create variables because they can be referenced within the signature,
+ // but they obviously aren't unused variables for the purposes of this rule.
+ for (const param of node.params) {
+ visitPattern(param, name => {
+ context.markVariableAsUsed(name.name);
+ });
+ }
+ },
+ TSEnumDeclaration() {
+ // enum members create variables because they can be referenced within the enum,
+ // but they obviously aren't unused variables for the purposes of this rule.
+ const scope = context.getScope();
+ for (const variable of scope.variables) {
+ context.markVariableAsUsed(variable.name);
+ }
+ },
+ TSMappedType(node) {
+ // mapped types create a variable for their type name, but it's not necessary to reference it,
+ // so we shouldn't consider it as unused for the purpose of this rule.
+ context.markVariableAsUsed(node.typeParameter.name.name);
+ },
+ TSModuleDeclaration() {
+ const childScope = context.getScope();
+ const scope = util.nullThrows(context.getScope().upper, util.NullThrowsReasons.MissingToken(childScope.type, 'upper scope'));
+ for (const variable of scope.variables) {
+ const moduleNodes = getModuleNameDeclarations(variable);
+ if (moduleNodes.length === 0 ||
+ // ignore unreferenced module definitions, as the base rule will report on them
+ variable.references.length === 0 ||
+ // ignore exported nodes
+ isExported(variable, experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration)) {
+ continue;
+ }
+ // check if the only reference to a module's name is a self-reference in its body
+ // this won't be caught by the base rule because it doesn't understand TS modules
+ const isOnlySelfReferenced = variable.references.every(ref => {
+ return isBlockSelfReference(ref, moduleNodes);
+ });
+ if (isOnlySelfReferenced) {
+ context.report({
+ node: variable.identifiers[0],
+ messageId: 'unusedVar',
+ data: {
+ varName: variable.name,
+ action: 'defined',
+ additional: '',
+ },
+ });
+ }
+ }
+ },
+ [[
+ 'TSParameterProperty > AssignmentPattern > Identifier.left',
+ 'TSParameterProperty > Identifier.parameter',
+ ].join(', ')](node) {
+ // just assume parameter properties are used as property usage tracking is beyond the scope of this rule
+ context.markVariableAsUsed(node.name);
+ },
+ ':matches(FunctionDeclaration, FunctionExpression, ArrowFunctionExpression) > Identifier[name="this"].params'(node) {
+ // this parameters should always be considered used as they're pseudo-parameters
+ context.markVariableAsUsed(node.name);
+ },
+ 'TSInterfaceDeclaration, TSTypeAliasDeclaration'(node) {
+ const variable = context.getScope().set.get(node.id.name);
+ if (!variable) {
+ return;
+ }
+ if (variable.references.length === 0 ||
+ // ignore exported nodes
+ isExported(variable, node.type)) {
+ return;
+ }
+ // check if the type is only self-referenced
+ // this won't be caught by the base rule because it doesn't understand self-referencing types
+ const isOnlySelfReferenced = variable.references.every(ref => {
+ if (ref.identifier.range[0] >= node.range[0] &&
+ ref.identifier.range[1] <= node.range[1]) {
+ return true;
+ }
+ return false;
+ });
+ if (isOnlySelfReferenced) {
+ context.report({
+ node: variable.identifiers[0],
+ messageId: 'unusedVar',
+ data: {
+ varName: variable.name,
+ action: 'defined',
+ additional: '',
+ },
+ });
+ }
+ },
+ // declaration file handling
+ [ambientDeclarationSelector(experimental_utils_1.AST_NODE_TYPES.Program, true)](node) {
+ if (!util.isDefinitionFile(filename)) {
+ return;
+ }
+ markDeclarationChildAsUsed(node);
+ },
+ // declared namespace handling
+ [ambientDeclarationSelector('TSModuleDeclaration[declare = true] > TSModuleBlock', false)](node) {
+ var _a;
+ const moduleDecl = util.nullThrows((_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent, util.NullThrowsReasons.MissingParent);
+ // declared modules with an `export =` statement will only export that one thing
+ // all other statements are not automatically exported in this case
+ if (checkModuleDeclForExportEquals(moduleDecl)) {
+ return;
+ }
+ markDeclarationChildAsUsed(node);
+ } });
+ function checkModuleDeclForExportEquals(node) {
+ var _a, _b;
+ const cached = MODULE_DECL_CACHE.get(node);
+ if (cached != null) {
+ return cached;
+ }
+ for (const statement of (_b = (_a = node.body) === null || _a === void 0 ? void 0 : _a.body) !== null && _b !== void 0 ? _b : []) {
+ if (statement.type === experimental_utils_1.AST_NODE_TYPES.TSExportAssignment) {
+ MODULE_DECL_CACHE.set(node, true);
+ return true;
+ }
+ }
+ MODULE_DECL_CACHE.set(node, false);
+ return false;
+ }
+ function ambientDeclarationSelector(parent, childDeclare) {
+ return [
+ // Types are ambiently exported
+ `${parent} > :matches(${[
+ experimental_utils_1.AST_NODE_TYPES.TSInterfaceDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration,
+ ].join(', ')})`,
+ // Value things are ambiently exported if they are "declare"d
+ `${parent} > :matches(${[
+ experimental_utils_1.AST_NODE_TYPES.ClassDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction,
+ experimental_utils_1.AST_NODE_TYPES.TSEnumDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.VariableDeclaration,
+ ].join(', ')})${childDeclare ? '[declare=true]' : ''}`,
+ ].join(', ');
+ }
+ function markDeclarationChildAsUsed(node) {
+ var _a;
+ const identifiers = [];
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSInterfaceDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.ClassDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction:
+ case experimental_utils_1.AST_NODE_TYPES.TSEnumDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration:
+ if (((_a = node.id) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ identifiers.push(node.id);
+ }
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.VariableDeclaration:
+ for (const declaration of node.declarations) {
+ visitPattern(declaration, pattern => {
+ identifiers.push(pattern);
+ });
+ }
+ break;
+ }
+ const scope = context.getScope();
+ const { variableScope } = scope;
+ if (variableScope !== scope) {
+ for (const id of identifiers) {
+ const superVar = variableScope.set.get(id.name);
+ if (superVar) {
+ superVar.eslintUsed = true;
+ }
+ }
+ }
+ else {
+ for (const id of identifiers) {
+ context.markVariableAsUsed(id.name);
+ }
+ }
+ }
+ function visitPattern(node, cb) {
+ const visitor = new scope_manager_1.PatternVisitor({}, node, cb);
+ visitor.visit(node);
+ }
+ },
+});
+/*
+
+###### TODO ######
+
+Edge cases that aren't currently handled due to laziness and them being super edgy edge cases
+
+
+--- function params referenced in typeof type refs in the function declaration ---
+--- NOTE - TS gets these cases wrong
+
+function _foo(
+ arg: number // arg should be unused
+): typeof arg {
+ return 1 as any;
+}
+
+function _bar(
+ arg: number, // arg should be unused
+ _arg2: typeof arg,
+) {}
+
+
+--- function names referenced in typeof type refs in the function declaration ---
+--- NOTE - TS gets these cases right
+
+function foo( // foo should be unused
+): typeof foo {
+ return 1 as any;
+}
+
+function bar( // bar should be unused
+ _arg: typeof bar
+) {}
+
+*/
+/*
+
+###### TODO ######
+
+We currently extend base `no-unused-vars` implementation because it's easier and lighter-weight.
+
+Because of this, there are a few false-negatives which won't get caught.
+We could fix these if we fork the base rule; but that's a lot of code (~650 lines) to add in.
+I didn't want to do that just yet without some real-world issues, considering these are pretty rare edge-cases.
+
+These cases are mishandled because the base rule assumes that each variable has one def, but type-value shadowing
+creates a variable with two defs
+
+--- type-only or value-only references to type/value shadowed variables ---
+--- NOTE - TS gets these cases wrong
+
+type T = 1;
+const T = 2; // this T should be unused
+
+type U = T; // this U should be unused
+const U = 3;
+
+const _V = U;
+
+
+--- partially exported type/value shadowed variables ---
+--- NOTE - TS gets these cases wrong
+
+export interface Foo {}
+const Foo = 1; // this Foo should be unused
+
+interface Bar {} // this Bar should be unused
+export const Bar = 1;
+
+*/
+//# sourceMappingURL=no-unused-vars.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-unused-vars.js.map
new file mode 100644
index 000000000..95f381532
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules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AC,CAAC;wBAC5B,CAAC,CAAC,CAAC;qBACJ;oBACD,MAAM;aACT;YAED,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;YACjC,MAAM,EAAE,aAAa,EAAE,GAAG,KAAK,CAAC;YAChC,IAAI,aAAa,KAAK,KAAK,EAAE;gBAC3B,KAAK,MAAM,EAAE,IAAI,WAAW,EAAE;oBAC5B,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;oBAChD,IAAI,QAAQ,EAAE;wBACZ,QAAQ,CAAC,UAAU,GAAG,IAAI,CAAC;qBAC5B;iBACF;aACF;iBAAM;gBACL,KAAK,MAAM,EAAE,IAAI,WAAW,EAAE;oBAC5B,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC;iBACrC;aACF;QACH,CAAC;QAED,SAAS,YAAY,CACnB,IAAmB,EACnB,EAAuC;YAEvC,MAAM,OAAO,GAAG,IAAI,8BAAc,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;YACjD,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;IACH,CAAC;CACF,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCE;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAkCE"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js
new file mode 100644
index 000000000..64a01d1c2
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js
@@ -0,0 +1,247 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+const SENTINEL_TYPE = /^(?:(?:Function|Class)(?:Declaration|Expression)|ArrowFunctionExpression|CatchClause|ImportDeclaration|ExportNamedDeclaration)$/;
+/**
+ * Parses a given value as options.
+ */
+function parseOptions(options) {
+ let functions = true;
+ let classes = true;
+ let enums = true;
+ let variables = true;
+ let typedefs = true;
+ let ignoreTypeReferences = true;
+ if (typeof options === 'string') {
+ functions = options !== 'nofunc';
+ }
+ else if (typeof options === 'object' && options !== null) {
+ functions = options.functions !== false;
+ classes = options.classes !== false;
+ enums = options.enums !== false;
+ variables = options.variables !== false;
+ typedefs = options.typedefs !== false;
+ ignoreTypeReferences = options.ignoreTypeReferences !== false;
+ }
+ return {
+ functions,
+ classes,
+ enums,
+ variables,
+ typedefs,
+ ignoreTypeReferences,
+ };
+}
+/**
+ * Checks whether or not a given variable is a function declaration.
+ */
+function isFunction(variable) {
+ return variable.defs[0].type === 'FunctionName';
+}
+/**
+ * Checks whether or not a given variable is a type declaration.
+ */
+function isTypedef(variable) {
+ return variable.defs[0].type === 'Type';
+}
+/**
+ * Checks whether or not a given variable is a enum declaration.
+ */
+function isOuterEnum(variable, reference) {
+ return (variable.defs[0].type == 'TSEnumName' &&
+ variable.scope.variableScope !== reference.from.variableScope);
+}
+/**
+ * Checks whether or not a given variable is a class declaration in an upper function scope.
+ */
+function isOuterClass(variable, reference) {
+ return (variable.defs[0].type === 'ClassName' &&
+ variable.scope.variableScope !== reference.from.variableScope);
+}
+/**
+ * Checks whether or not a given variable is a variable declaration in an upper function scope.
+ */
+function isOuterVariable(variable, reference) {
+ return (variable.defs[0].type === 'Variable' &&
+ variable.scope.variableScope !== reference.from.variableScope);
+}
+/**
+ * Checks whether or not a given location is inside of the range of a given node.
+ */
+function isInRange(node, location) {
+ return !!node && node.range[0] <= location && location <= node.range[1];
+}
+/**
+ * Checks whether or not a given reference is inside of the initializers of a given variable.
+ *
+ * @returns `true` in the following cases:
+ * - var a = a
+ * - var [a = a] = list
+ * - var {a = a} = obj
+ * - for (var a in a) {}
+ * - for (var a of a) {}
+ */
+function isInInitializer(variable, reference) {
+ var _a;
+ if (variable.scope !== reference.from) {
+ return false;
+ }
+ let node = variable.identifiers[0].parent;
+ const location = reference.identifier.range[1];
+ while (node) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.VariableDeclarator) {
+ if (isInRange(node.init, location)) {
+ return true;
+ }
+ if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.parent) &&
+ (node.parent.parent.type === experimental_utils_1.AST_NODE_TYPES.ForInStatement ||
+ node.parent.parent.type === experimental_utils_1.AST_NODE_TYPES.ForOfStatement) &&
+ isInRange(node.parent.parent.right, location)) {
+ return true;
+ }
+ break;
+ }
+ else if (node.type === experimental_utils_1.AST_NODE_TYPES.AssignmentPattern) {
+ if (isInRange(node.right, location)) {
+ return true;
+ }
+ }
+ else if (SENTINEL_TYPE.test(node.type)) {
+ break;
+ }
+ node = node.parent;
+ }
+ return false;
+}
+exports.default = util.createRule({
+ name: 'no-use-before-define',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow the use of variables before they are defined',
+ category: 'Variables',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ messages: {
+ noUseBeforeDefine: "'{{name}}' was used before it was defined.",
+ },
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ['nofunc'],
+ },
+ {
+ type: 'object',
+ properties: {
+ functions: { type: 'boolean' },
+ classes: { type: 'boolean' },
+ enums: { type: 'boolean' },
+ variables: { type: 'boolean' },
+ typedefs: { type: 'boolean' },
+ ignoreTypeReferences: { type: 'boolean' },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ functions: true,
+ classes: true,
+ enums: true,
+ variables: true,
+ typedefs: true,
+ ignoreTypeReferences: true,
+ },
+ ],
+ create(context, optionsWithDefault) {
+ const options = parseOptions(optionsWithDefault[0]);
+ /**
+ * Determines whether a given use-before-define case should be reported according to the options.
+ * @param variable The variable that gets used before being defined
+ * @param reference The reference to the variable
+ */
+ function isForbidden(variable, reference) {
+ if (reference.isTypeReference && options.ignoreTypeReferences) {
+ return false;
+ }
+ if (isFunction(variable)) {
+ return options.functions;
+ }
+ if (isOuterClass(variable, reference)) {
+ return options.classes;
+ }
+ if (isOuterVariable(variable, reference)) {
+ return options.variables;
+ }
+ if (isOuterEnum(variable, reference)) {
+ return options.enums;
+ }
+ if (isTypedef(variable)) {
+ return options.typedefs;
+ }
+ return true;
+ }
+ /**
+ * Finds and validates all variables in a given scope.
+ */
+ function findVariablesInScope(scope) {
+ scope.references.forEach(reference => {
+ const variable = reference.resolved;
+ // Skips when the reference is:
+ // - initializations.
+ // - referring to an undefined variable.
+ // - referring to a global environment variable (there're no identifiers).
+ // - located preceded by the variable (except in initializers).
+ // - allowed by options.
+ if (reference.init ||
+ !variable ||
+ variable.identifiers.length === 0 ||
+ (variable.identifiers[0].range[1] <= reference.identifier.range[1] &&
+ !isInInitializer(variable, reference)) ||
+ !isForbidden(variable, reference)) {
+ return;
+ }
+ // Reports.
+ context.report({
+ node: reference.identifier,
+ messageId: 'noUseBeforeDefine',
+ data: {
+ name: reference.identifier.name,
+ },
+ });
+ });
+ scope.childScopes.forEach(findVariablesInScope);
+ }
+ return {
+ Program() {
+ findVariablesInScope(context.getScope());
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-use-before-define.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map
new file mode 100644
index 000000000..4cfeb2fe6
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-use-before-define.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-use-before-define.js","sourceRoot":"","sources":["../../src/rules/no-use-before-define.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8CAAgC;AAEhC,MAAM,aAAa,GAAG,iIAAiI,CAAC;AAExJ;;GAEG;AACH,SAAS,YAAY,CAAC,OAA+B;IACnD,IAAI,SAAS,GAAG,IAAI,CAAC;IACrB,IAAI,OAAO,GAAG,IAAI,CAAC;IACnB,IAAI,KAAK,GAAG,IAAI,CAAC;IACjB,IAAI,SAAS,GAAG,IAAI,CAAC;IACrB,IAAI,QAAQ,GAAG,IAAI,CAAC;IACpB,IAAI,oBAAoB,GAAG,IAAI,CAAC;IAEhC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;QAC/B,SAAS,GAAG,OAAO,KAAK,QAAQ,CAAC;KAClC;SAAM,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE;QAC1D,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,KAAK,CAAC;QACxC,OAAO,GAAG,OAAO,CAAC,OAAO,KAAK,KAAK,CAAC;QACpC,KAAK,GAAG,OAAO,CAAC,KAAK,KAAK,KAAK,CAAC;QAChC,SAAS,GAAG,OAAO,CAAC,SAAS,KAAK,KAAK,CAAC;QACxC,QAAQ,GAAG,OAAO,CAAC,QAAQ,KAAK,KAAK,CAAC;QACtC,oBAAoB,GAAG,OAAO,CAAC,oBAAoB,KAAK,KAAK,CAAC;KAC/D;IAED,OAAO;QAC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BACJ,IAAI,EAAE,SAAS,CAAC,UAAU,CAAC,IAAI;qBAChC;iBACF,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAClD,CAAC;QAED,OAAO;YACL,OAAO;gBACL,oBAAoB,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC3C,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js
new file mode 100644
index 000000000..936e0839c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js
@@ -0,0 +1,87 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const no_useless_constructor_1 = __importDefault(require("eslint/lib/rules/no-useless-constructor"));
+const util = __importStar(require("../util"));
+/**
+ * Check if method with accessibility is not useless
+ */
+function checkAccessibility(node) {
+ switch (node.accessibility) {
+ case 'protected':
+ case 'private':
+ return false;
+ case 'public':
+ if (node.parent &&
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.ClassBody &&
+ node.parent.parent &&
+ 'superClass' in node.parent.parent &&
+ node.parent.parent.superClass) {
+ return false;
+ }
+ break;
+ }
+ return true;
+}
+/**
+ * Check if method is not unless due to typescript parameter properties
+ */
+function checkParams(node) {
+ return (!node.value.params ||
+ !node.value.params.some(param => param.type === experimental_utils_1.AST_NODE_TYPES.TSParameterProperty));
+}
+exports.default = util.createRule({
+ name: 'no-useless-constructor',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallow unnecessary constructors',
+ category: 'Best Practices',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ schema: no_useless_constructor_1.default.meta.schema,
+ messages: (_a = no_useless_constructor_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ noUselessConstructor: 'Useless constructor.',
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ const rules = no_useless_constructor_1.default.create(context);
+ return {
+ MethodDefinition(node) {
+ if (node.value &&
+ node.value.type === experimental_utils_1.AST_NODE_TYPES.FunctionExpression &&
+ node.value.body &&
+ checkAccessibility(node) &&
+ checkParams(node)) {
+ rules.MethodDefinition(node);
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-useless-constructor.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js.map
new file mode 100644
index 000000000..865009c38
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-useless-constructor.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-useless-constructor.js","sourceRoot":"","sources":["../../src/rules/no-useless-constructor.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,qG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M,CAAC,OAAO,CAAC,CAAC;QACvC,OAAO;YACL,gBAAgB,CAAC,IAAI;gBACnB,IACE,IAAI,CAAC,KAAK;oBACV,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,mCAAc,CAAC,kBAAkB;oBACrD,IAAI,CAAC,KAAK,CAAC,IAAI;oBACf,kBAAkB,CAAC,IAAI,CAAC;oBACxB,WAAW,CAAC,IAAI,CAAC,EACjB;oBACA,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;iBAC9B;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js
new file mode 100644
index 000000000..c042fe09a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js
@@ -0,0 +1,62 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'no-var-requires',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Disallows the use of require statements except in import statements',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ messages: {
+ noVarReqs: 'Require statement not part of import statement.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ return {
+ CallExpression(node) {
+ var _a;
+ const parent = ((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.ChainExpression
+ ? node.parent.parent
+ : node.parent;
+ if (node.callee.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ node.callee.name === 'require' &&
+ parent &&
+ (parent.type === experimental_utils_1.AST_NODE_TYPES.VariableDeclarator ||
+ parent.type === experimental_utils_1.AST_NODE_TYPES.CallExpression ||
+ parent.type === experimental_utils_1.AST_NODE_TYPES.TSAsExpression ||
+ parent.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression)) {
+ context.report({
+ node,
+ messageId: 'noVarReqs',
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=no-var-requires.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js.map
new file mode 100644
index 000000000..3d9eefcbf
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/no-var-requires.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"no-var-requires.js","sourceRoot":"","sources":["../../src/rules/no-var-requires.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,qEAAqE;YACvE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;SACrB;QACD,QAAQ,EAAE;YACR,SAAS,EAAE,iDAAiD;SAC7D;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,cAAc,CAAC,IAA6B;;gBAC1C,MAAM,MAAM,GACV,OAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,MAAK,mCAAc,CAAC,eAAe;oBAClD,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM;oBACpB,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;gBAClB,IACE,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU;oBAC9C,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,SAAS;oBAC9B,MAAM;oBACN,CAAC,MAAM,CAAC,IAAI,KAAK,mCAAc,CAAC,kBAAkB;wBAChD,MAAM,CAAC,IAAI,KAAK,mCAAc,CAAC,cAAc;wBAC7C,MAAM,CAAC,IAAI,KAAK,mCAAc,CAAC,cAAc;wBAC7C,MAAM,CAAC,IAAI,KAAK,mCAAc,CAAC,gBAAgB,CAAC,EAClD;oBACA,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,WAAW;qBACvB,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js
new file mode 100644
index 000000000..caf2a55de
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js
@@ -0,0 +1,88 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'prefer-as-const',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Prefer usage of `as const` over literal type',
+ category: 'Best Practices',
+ recommended: 'error',
+ suggestion: true,
+ },
+ fixable: 'code',
+ messages: {
+ preferConstAssertion: 'Expected a `const` instead of a literal type assertion.',
+ variableConstAssertion: 'Expected a `const` assertion instead of a literal type annotation.',
+ variableSuggest: 'You should use `as const` instead of type annotation.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ function compareTypes(valueNode, typeNode, canFix) {
+ if (valueNode.type === experimental_utils_1.AST_NODE_TYPES.Literal &&
+ typeNode.type === experimental_utils_1.AST_NODE_TYPES.TSLiteralType &&
+ 'raw' in typeNode.literal &&
+ valueNode.raw === typeNode.literal.raw) {
+ if (canFix) {
+ context.report({
+ node: typeNode,
+ messageId: 'preferConstAssertion',
+ fix: fixer => fixer.replaceText(typeNode, 'const'),
+ });
+ }
+ else {
+ context.report({
+ node: typeNode,
+ messageId: 'variableConstAssertion',
+ suggest: [
+ {
+ messageId: 'variableSuggest',
+ fix: (fixer) => [
+ fixer.remove(typeNode.parent),
+ fixer.insertTextAfter(valueNode, ' as const'),
+ ],
+ },
+ ],
+ });
+ }
+ }
+ }
+ return {
+ TSAsExpression(node) {
+ compareTypes(node.expression, node.typeAnnotation, true);
+ },
+ TSTypeAssertion(node) {
+ compareTypes(node.expression, node.typeAnnotation, true);
+ },
+ VariableDeclarator(node) {
+ if (node.init && node.id.typeAnnotation) {
+ compareTypes(node.init, node.id.typeAnnotation.typeAnnotation, false);
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-as-const.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js.map
new file mode 100644
index 000000000..93e89b80a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-as-const.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-as-const.js","sourceRoot":"","sources":["../../src/rules/prefer-as-const.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,8CAA8C;YAC3D,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,UAAU,EAAE,IAAI;SACjB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,oBAAoB,EAClB,yDAAyD;YAC3D,sBAAsB,EACpB,oEAAoE;YACtE,eAAe,EAAE,uDAAuD;SACzE;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,SAAS,YAAY,CACnB,SAA8B,EAC9B,QAA2B,EAC3B,MAAe;YAEf,IACE,SAAS,CAAC,IAAI,KAAK,mCAAc,CAAC,OAAO;gBACzC,QAAQ,CAAC,IAAI,KAAK,mCAAc,CAAC,aAAa;gBAC9C,KAAK,IAAI,QAAQ,CAAC,OAAO;gBACzB,SAAS,CAAC,GAAG,KAAK,QAAQ,CAAC,OAAO,CAAC,GAAG,EACtC;gBACA,IAAI,MAAM,EAAE;oBACV,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,sBAAsB;wBACjC,GAAG,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,EAAE,OAAO,CAAC;qBACnD,CAAC,CAAC;iBACJ;qBAAM;oBACL,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,wBAAwB;wBACnC,OAAO,EAAE;4BACP;gCACE,SAAS,EAAE,iBAAiB;gCAC5B,GAAG,EAAE,CAAC,KAAK,EAAsB,EAAE,CAAC;oCAClC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAO,CAAC;oCAC9B,KAAK,CAAC,eAAe,CAAC,SAAS,EAAE,WAAW,CAAC;iCAC9C;6BACF;yBACF;qBACF,CAAC,CAAC;iBACJ;aACF;QACH,CAAC;QAED,OAAO;YACL,cAAc,CAAC,IAAI;gBACjB,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YAC3D,CAAC;YACD,eAAe,CAAC,IAAI;gBAClB,YAAY,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;YAC3D,CAAC;YACD,kBAAkB,CAAC,IAAI;gBACrB,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,CAAC,cAAc,EAAE;oBACvC,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,cAAc,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;iBACvE;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js
new file mode 100644
index 000000000..f81e3dc4b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js
@@ -0,0 +1,85 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'prefer-enum-initializers',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Prefer initializing each enums member value',
+ category: 'Best Practices',
+ recommended: false,
+ suggestion: true,
+ },
+ messages: {
+ defineInitializer: "The value of the member '{{ name }}' should be explicitly defined",
+ defineInitializerSuggestion: 'Can be fixed to {{ name }} = {{ suggested }}',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ function TSEnumDeclaration(node) {
+ const { members } = node;
+ members.forEach((member, index) => {
+ if (member.initializer == null) {
+ const name = sourceCode.getText(member);
+ context.report({
+ node: member,
+ messageId: 'defineInitializer',
+ data: {
+ name,
+ },
+ suggest: [
+ {
+ messageId: 'defineInitializerSuggestion',
+ data: { name, suggested: index },
+ fix: (fixer) => {
+ return fixer.replaceText(member, `${name} = ${index}`);
+ },
+ },
+ {
+ messageId: 'defineInitializerSuggestion',
+ data: { name, suggested: index + 1 },
+ fix: (fixer) => {
+ return fixer.replaceText(member, `${name} = ${index + 1}`);
+ },
+ },
+ {
+ messageId: 'defineInitializerSuggestion',
+ data: { name, suggested: `'${name}'` },
+ fix: (fixer) => {
+ return fixer.replaceText(member, `${name} = '${name}'`);
+ },
+ },
+ ],
+ });
+ }
+ });
+ }
+ return {
+ TSEnumDeclaration,
+ };
+ },
+});
+//# sourceMappingURL=prefer-enum-initializers.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js.map
new file mode 100644
index 000000000..5a2c3bf26
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-enum-initializers.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-enum-initializers.js","sourceRoot":"","sources":["../../src/rules/prefer-enum-initializers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAiB;IAC7C,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,IAAI;SACjB;QACD,QAAQ,EAAE;YACR,iBAAiB,EACf,mEAAmE;YACrE,2BAA2B,EACzB,8CAA8C;SACjD;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C,SAAS,iBAAiB,CAAC,IAAgC;YACzD,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC;YAEzB,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;gBAChC,IAAI,MAAM,C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@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js
new file mode 100644
index 000000000..acd31ea22
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js
@@ -0,0 +1,178 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'prefer-for-of',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Prefer a ‘for-of’ loop over a standard ‘for’ loop if the index is only used to access the array being iterated',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ messages: {
+ preferForOf: 'Expected a `for-of` loop instead of a `for` loop with this simple iteration.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ function isSingleVariableDeclaration(node) {
+ return (node !== null &&
+ node.type === experimental_utils_1.AST_NODE_TYPES.VariableDeclaration &&
+ node.kind !== 'const' &&
+ node.declarations.length === 1);
+ }
+ function isLiteral(node, value) {
+ return node.type === experimental_utils_1.AST_NODE_TYPES.Literal && node.value === value;
+ }
+ function isZeroInitialized(node) {
+ return node.init !== null && isLiteral(node.init, 0);
+ }
+ function isMatchingIdentifier(node, name) {
+ return node.type === experimental_utils_1.AST_NODE_TYPES.Identifier && node.name === name;
+ }
+ function isLessThanLengthExpression(node, name) {
+ if (node !== null &&
+ node.type === experimental_utils_1.AST_NODE_TYPES.BinaryExpression &&
+ node.operator === '<' &&
+ isMatchingIdentifier(node.left, name) &&
+ node.right.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression &&
+ isMatchingIdentifier(node.right.property, 'length')) {
+ return node.right.object;
+ }
+ return null;
+ }
+ function isIncrement(node, name) {
+ if (!node) {
+ return false;
+ }
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.UpdateExpression:
+ // x++ or ++x
+ return (node.operator === '++' && isMatchingIdentifier(node.argument, name));
+ case experimental_utils_1.AST_NODE_TYPES.AssignmentExpression:
+ if (isMatchingIdentifier(node.left, name)) {
+ if (node.operator === '+=') {
+ // x += 1
+ return isLiteral(node.right, 1);
+ }
+ else if (node.operator === '=') {
+ // x = x + 1 or x = 1 + x
+ const expr = node.right;
+ return (expr.type === experimental_utils_1.AST_NODE_TYPES.BinaryExpression &&
+ expr.operator === '+' &&
+ ((isMatchingIdentifier(expr.left, name) &&
+ isLiteral(expr.right, 1)) ||
+ (isLiteral(expr.left, 1) &&
+ isMatchingIdentifier(expr.right, name))));
+ }
+ }
+ }
+ return false;
+ }
+ function contains(outer, inner) {
+ return (outer.range[0] <= inner.range[0] && outer.range[1] >= inner.range[1]);
+ }
+ function isAssignee(node) {
+ var _a;
+ const parent = node.parent;
+ if (!parent) {
+ return false;
+ }
+ // a[i] = 1, a[i] += 1, etc.
+ if (parent.type === experimental_utils_1.AST_NODE_TYPES.AssignmentExpression &&
+ parent.left === node) {
+ return true;
+ }
+ // delete a[i]
+ if (parent.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ parent.operator === 'delete' &&
+ parent.argument === node) {
+ return true;
+ }
+ // a[i]++, --a[i], etc.
+ if (parent.type === experimental_utils_1.AST_NODE_TYPES.UpdateExpression &&
+ parent.argument === node) {
+ return true;
+ }
+ // [a[i]] = [0]
+ if (parent.type === experimental_utils_1.AST_NODE_TYPES.ArrayPattern) {
+ return true;
+ }
+ // [...a[i]] = [0]
+ if (parent.type === experimental_utils_1.AST_NODE_TYPES.RestElement) {
+ return true;
+ }
+ // ({ foo: a[i] }) = { foo: 0 }
+ if (parent.type === experimental_utils_1.AST_NODE_TYPES.Property &&
+ parent.value === node &&
+ ((_a = parent.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.ObjectExpression &&
+ isAssignee(parent.parent)) {
+ return true;
+ }
+ return false;
+ }
+ function isIndexOnlyUsedWithArray(body, indexVar, arrayExpression) {
+ const sourceCode = context.getSourceCode();
+ const arrayText = sourceCode.getText(arrayExpression);
+ return indexVar.references.every(reference => {
+ const id = reference.identifier;
+ const node = id.parent;
+ return (!contains(body, id) ||
+ (node !== undefined &&
+ node.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression &&
+ node.property === id &&
+ sourceCode.getText(node.object) === arrayText &&
+ !isAssignee(node)));
+ });
+ }
+ return {
+ 'ForStatement:exit'(node) {
+ if (!isSingleVariableDeclaration(node.init)) {
+ return;
+ }
+ const declarator = node.init.declarations[0];
+ if (!declarator ||
+ !isZeroInitialized(declarator) ||
+ declarator.id.type !== experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ return;
+ }
+ const indexName = declarator.id.name;
+ const arrayExpression = isLessThanLengthExpression(node.test, indexName);
+ if (!arrayExpression) {
+ return;
+ }
+ const [indexVar] = context.getDeclaredVariables(node.init);
+ if (isIncrement(node.update, indexName) &&
+ isIndexOnlyUsedWithArray(node.body, indexVar, arrayExpression)) {
+ context.report({
+ node,
+ messageId: 'preferForOf',
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-for-of.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js.map
new file mode 100644
index 000000000..b7cc1d994
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-for-of.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-for-of.js","sourceRoot":"","sources":["../../src/rules/prefer-for-of.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,gHAAgH;YAClH,QAAQ,EAAE,kBAAkB;YAC5B,WAAW,EAAE,KAAK;SACnB;QACD,QAAQ,EAAE;YACR,WAAW,EACT,8EAA8E;SACjF;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,SAAS,2BAA2B,CAClC,IAA0B;YAE1B,OAAO,CACL,IAAI,KAAK,IAAI;gBACb,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,mBAAmB;gBAChD,IAAI,CAAC,IAAI,KAAK,OAAO;gBACrB,IAAI,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,CAC/B,CAAC;QACJ,CAAC;QAED,SAAS,SAAS,CAAC,IAAyB,EAAE,KAAa;YACzD,OAAO,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,OAAO,IAAI,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC;QACtE,CAAC;QAED,SAAS,iBAAiB,CAAC,IAAiC;YAC1D,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QACvD,CAAC;QAED,SAAS,oBAAoB,CAC3B,IAAyB,EACzB,IAAY;YAEZ,OAAO,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU,IAAI,IAAI,CAAC,IAA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B,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;oBAC3C,OAAO;iBACR;gBAED,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAE9B,CAAC;gBACd,IACE,CAAC,UAAU;oBACX,CAAC,iBAAiB,CAAC,UAAU,CAAC;oBAC9B,UAAU,CAAC,EAAE,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU,EAChD;oBACA,OAAO;iBACR;gBAED,MAAM,SAAS,GAAG,UAAU,CAAC,EAAE,CAAC,IAAI,CAAC;gBACrC,MAAM,eAAe,GAAG,0BAA0B,CAChD,IAAI,CAAC,IAAI,EACT,SAAS,CACV,CAAC;gBACF,IAAI,CAAC,eAAe,EAAE;oBACpB,OAAO;iBACR;gBAED,MAAM,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAC3D,IACE,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC;oBACnC,wBAAwB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,eAAe,CAAC,EAC9D;oBACA,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,aAAa;qBACzB,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js
new file mode 100644
index 000000000..0232f5109
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js
@@ -0,0 +1,137 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'prefer-function-type',
+ meta: {
+ docs: {
+ description: 'Use function types instead of interfaces with call signatures',
+ category: 'Best Practices',
+ recommended: false,
+ },
+ fixable: 'code',
+ messages: {
+ functionTypeOverCallableType: "{{ type }} has only a call signature - use '{{ sigSuggestion }}' instead.",
+ },
+ schema: [],
+ type: 'suggestion',
+ },
+ defaultOptions: [],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ /**
+ * Checks if there the interface has exactly one supertype that isn't named 'Function'
+ * @param node The node being checked
+ */
+ function hasOneSupertype(node) {
+ if (!node.extends || node.extends.length === 0) {
+ return false;
+ }
+ if (node.extends.length !== 1) {
+ return true;
+ }
+ const expr = node.extends[0].expression;
+ return (expr.type !== experimental_utils_1.AST_NODE_TYPES.Identifier || expr.name !== 'Function');
+ }
+ /**
+ * @param parent The parent of the call signature causing the diagnostic
+ */
+ function shouldWrapSuggestion(parent) {
+ if (!parent) {
+ return false;
+ }
+ switch (parent.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSUnionType:
+ case experimental_utils_1.AST_NODE_TYPES.TSIntersectionType:
+ case experimental_utils_1.AST_NODE_TYPES.TSArrayType:
+ return true;
+ default:
+ return false;
+ }
+ }
+ /**
+ * @param call The call signature causing the diagnostic
+ * @param parent The parent of the call
+ * @returns The suggestion to report
+ */
+ function renderSuggestion(call, parent) {
+ const start = call.range[0];
+ const colonPos = call.returnType.range[0] - start;
+ const text = sourceCode.getText().slice(start, call.range[1]);
+ let suggestion = `${text.slice(0, colonPos)} =>${text.slice(colonPos + 1)}`;
+ if (shouldWrapSuggestion(parent.parent)) {
+ suggestion = `(${suggestion})`;
+ }
+ if (parent.type === experimental_utils_1.AST_NODE_TYPES.TSInterfaceDeclaration) {
+ if (typeof parent.typeParameters !== 'undefined') {
+ return `type ${sourceCode
+ .getText()
+ .slice(parent.id.range[0], parent.typeParameters.range[1])} = ${suggestion}`;
+ }
+ return `type ${parent.id.name} = ${suggestion}`;
+ }
+ return suggestion.endsWith(';') ? suggestion.slice(0, -1) : suggestion;
+ }
+ /**
+ * @param member The TypeElement being checked
+ * @param node The parent of member being checked
+ */
+ function checkMember(member, node) {
+ if ((member.type === experimental_utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration ||
+ member.type === experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration) &&
+ typeof member.returnType !== 'undefined') {
+ const suggestion = renderSuggestion(member, node);
+ const fixStart = node.type === experimental_utils_1.AST_NODE_TYPES.TSTypeLiteral
+ ? node.range[0]
+ : sourceCode
+ .getTokens(node)
+ .filter(token => token.type === experimental_utils_1.AST_TOKEN_TYPES.Keyword &&
+ token.value === 'interface')[0].range[0];
+ context.report({
+ node: member,
+ messageId: 'functionTypeOverCallableType',
+ data: {
+ type: node.type === experimental_utils_1.AST_NODE_TYPES.TSTypeLiteral
+ ? 'Type literal'
+ : 'Interface',
+ sigSuggestion: suggestion,
+ },
+ fix(fixer) {
+ return fixer.replaceTextRange([fixStart, node.range[1]], suggestion);
+ },
+ });
+ }
+ }
+ return {
+ TSInterfaceDeclaration(node) {
+ if (!hasOneSupertype(node) && node.body.body.length === 1) {
+ checkMember(node.body.body[0], node);
+ }
+ },
+ 'TSTypeLiteral[members.length = 1]'(node) {
+ checkMember(node.members[0], node);
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-function-type.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js.map
new file mode 100644
index 000000000..177925f21
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-function-type.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-function-type.js","sourceRoot":"","sources":["../../src/rules/prefer-function-type.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EACT,+DAA+D;YACjE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;SACnB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,4BAA4B,EAC1B,2EAA2E;SAC9E;QACD,MAAM,EAAE,EAAE;QACV,IAAI,EAAE,YAAY;KACnB;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C;;;WAGG;QACH,SAAS,eAAe,CAAC,IAAqC;YAC5D,IAAI,CAAC,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC9C,OAAO,KAAK,CAAC;aACd;YACD,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE;gBAC7B,OAAO,IAAI,CAAC;aACb;YACD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;YAExC,OAAO,CACL,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CACpE,CAAC;QACJ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CAC3B,CAAC,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACzB,UAAU,CACX,CAAC;oBACJ,CAAC;iBACF,CAAC,CAAC;aACJ;QACH,CAAC;QAED,OAAO;YACL,sBAAsB,CAAC,IAAI;gBACzB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;oBACzD,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;iBACtC;YACH,CAAC;YACD,mCAAmC,CAAC,IAA4B;gBAC9D,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;YACrC,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js
new file mode 100644
index 000000000..e352e9645
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js
@@ -0,0 +1,208 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const regexpp_1 = require("regexpp");
+const ts = __importStar(require("typescript"));
+const util_1 = require("../util");
+exports.default = util_1.createRule({
+ name: 'prefer-includes',
+ defaultOptions: [],
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Enforce `includes` method over `indexOf` method',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ fixable: 'code',
+ messages: {
+ preferIncludes: "Use 'includes()' method instead.",
+ preferStringIncludes: 'Use `String#includes()` method with a string instead.',
+ },
+ schema: [],
+ },
+ create(context) {
+ const globalScope = context.getScope();
+ const services = util_1.getParserServices(context);
+ const types = services.program.getTypeChecker();
+ function isNumber(node, value) {
+ const evaluated = util_1.getStaticValue(node, globalScope);
+ return evaluated !== null && evaluated.value === value;
+ }
+ function isPositiveCheck(node) {
+ switch (node.operator) {
+ case '!==':
+ case '!=':
+ case '>':
+ return isNumber(node.right, -1);
+ case '>=':
+ return isNumber(node.right, 0);
+ default:
+ return false;
+ }
+ }
+ function isNegativeCheck(node) {
+ switch (node.operator) {
+ case '===':
+ case '==':
+ case '<=':
+ return isNumber(node.right, -1);
+ case '<':
+ return isNumber(node.right, 0);
+ default:
+ return false;
+ }
+ }
+ function hasSameParameters(nodeA, nodeB) {
+ if (!ts.isFunctionLike(nodeA) || !ts.isFunctionLike(nodeB)) {
+ return false;
+ }
+ const paramsA = nodeA.parameters;
+ const paramsB = nodeB.parameters;
+ if (paramsA.length !== paramsB.length) {
+ return false;
+ }
+ for (let i = 0; i < paramsA.length; ++i) {
+ const paramA = paramsA[i];
+ const paramB = paramsB[i];
+ // Check name, type, and question token once.
+ if (paramA.getText() !== paramB.getText()) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * Parse a given node if it's a `RegExp` instance.
+ * @param node The node to parse.
+ */
+ function parseRegExp(node) {
+ const evaluated = util_1.getStaticValue(node, globalScope);
+ if (evaluated == null || !(evaluated.value instanceof RegExp)) {
+ return null;
+ }
+ const { pattern, flags } = regexpp_1.parseRegExpLiteral(evaluated.value);
+ if (pattern.alternatives.length !== 1 ||
+ flags.ignoreCase ||
+ flags.global) {
+ return null;
+ }
+ // Check if it can determine a unique string.
+ const chars = pattern.alternatives[0].elements;
+ if (!chars.every(c => c.type === 'Character')) {
+ return null;
+ }
+ // To string.
+ return String.fromCodePoint(...chars.map(c => c.value));
+ }
+ return {
+ [[
+ // a.indexOf(b) !== 1
+ "BinaryExpression > CallExpression.left > MemberExpression.callee[property.name='indexOf'][computed=false]",
+ // a?.indexOf(b) !== 1
+ "BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name='indexOf'][computed=false]",
+ ].join(', ')](node) {
+ var _a, _b, _c;
+ // Check if the comparison is equivalent to `includes()`.
+ const callNode = node.parent;
+ const compareNode = (((_a = callNode.parent) === null || _a === void 0 ? void 0 : _a.type) ===
+ experimental_utils_1.AST_NODE_TYPES.ChainExpression
+ ? callNode.parent.parent
+ : callNode.parent);
+ const negative = isNegativeCheck(compareNode);
+ if (!negative && !isPositiveCheck(compareNode)) {
+ return;
+ }
+ // Get the symbol of `indexOf` method.
+ const tsNode = services.esTreeNodeToTSNodeMap.get(node.property);
+ const indexofMethodDeclarations = (_b = types
+ .getSymbolAtLocation(tsNode)) === null || _b === void 0 ? void 0 : _b.getDeclarations();
+ if (indexofMethodDeclarations == null ||
+ indexofMethodDeclarations.length === 0) {
+ return;
+ }
+ // Check if every declaration of `indexOf` method has `includes` method
+ // and the two methods have the same parameters.
+ for (const instanceofMethodDecl of indexofMethodDeclarations) {
+ const typeDecl = instanceofMethodDecl.parent;
+ const type = types.getTypeAtLocation(typeDecl);
+ const includesMethodDecl = (_c = type
+ .getProperty('includes')) === null || _c === void 0 ? void 0 : _c.getDeclarations();
+ if (includesMethodDecl == null ||
+ !includesMethodDecl.some(includesMethodDecl => hasSameParameters(includesMethodDecl, instanceofMethodDecl))) {
+ return;
+ }
+ }
+ // Report it.
+ context.report({
+ node: compareNode,
+ messageId: 'preferIncludes',
+ *fix(fixer) {
+ if (negative) {
+ yield fixer.insertTextBefore(callNode, '!');
+ }
+ yield fixer.replaceText(node.property, 'includes');
+ yield fixer.removeRange([callNode.range[1], compareNode.range[1]]);
+ },
+ });
+ },
+ // /bar/.test(foo)
+ 'CallExpression > MemberExpression.callee[property.name="test"][computed=false]'(node) {
+ var _a;
+ const callNode = node.parent;
+ const text = callNode.arguments.length === 1 ? parseRegExp(node.object) : null;
+ if (text == null) {
+ return;
+ }
+ //check the argument type of test methods
+ const argument = callNode.arguments[0];
+ const tsNode = services.esTreeNodeToTSNodeMap.get(argument);
+ const type = util_1.getConstrainedTypeAtLocation(types, tsNode);
+ const includesMethodDecl = (_a = type
+ .getProperty('includes')) === null || _a === void 0 ? void 0 : _a.getDeclarations();
+ if (includesMethodDecl == null) {
+ return;
+ }
+ context.report({
+ node: callNode,
+ messageId: 'preferStringIncludes',
+ *fix(fixer) {
+ const argNode = callNode.arguments[0];
+ const needsParen = argNode.type !== experimental_utils_1.AST_NODE_TYPES.Literal &&
+ argNode.type !== experimental_utils_1.AST_NODE_TYPES.TemplateLiteral &&
+ argNode.type !== experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ argNode.type !== experimental_utils_1.AST_NODE_TYPES.MemberExpression &&
+ argNode.type !== experimental_utils_1.AST_NODE_TYPES.CallExpression;
+ yield fixer.removeRange([callNode.range[0], argNode.range[0]]);
+ if (needsParen) {
+ yield fixer.insertTextBefore(argNode, '(');
+ yield fixer.insertTextAfter(argNode, ')');
+ }
+ yield fixer.insertTextAfter(argNode, `${node.optional ? '?.' : '.'}includes(${JSON.stringify(text)}`);
+ },
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-includes.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js.map
new file mode 100644
index 000000000..b0f5b8056
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-includes.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-includes.js","sourceRoot":"","sources":["../../src/rules/prefer-includes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,qCAA+D;AAC/D,+CAAiC;AACjC,kCAKiB;AAEjB,kBAAe,iBAAU,CAAC;IACxB,IAAI,EAAE,iBAAiB;IACvB,cAAc,EAAE,EAAE;IAElB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,cAAc,EAAE,kCAAkC;YAClD,oBAAoB,EAClB,uDAAuD;SAC1D;QACD,MAAM,EAAE,EAAE;KACX;IAED,MAAM,CAAC,OAAO;QACZ,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,MAAM,QAAQ,GAAG,wBAAiB,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAEhD,SAAS,QAAQ,CAAC,IAAmB,EAAE,KAAa;YAClD,MAAM,SAAS,GAAG,qBAAc,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;YACpD,OAAO,SAAS,KAAK,IAAI,IAAI,SAAS,CAAC,KAAK,KAAK,KAAK,CAAC;QACzD,CAAC;QAED,SAAS,eAAe,CAAC,IAA+B;YACtD,QAAQ,IAAI,CAAC,QAAQ,EAAE;gBACrB,KAAK,KAAK,CAAC;gBACX,KAAK,IAAI,CAAC;gBACV,KAAK,GAAG;oBACN,OAAO,QAAQ,CAAC,IAAI,CAAC,K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C/C,OAAO,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU;4BAC1C,OAAO,CAAC,IAAI,KAAK,mCAAc,CAAC,gBAAgB;4BAChD,OAAO,CAAC,IAAI,KAAK,mCAAc,CAAC,cAAc,CAAC;wBAEjD,MAAM,KAAK,CAAC,WAAW,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;wBAC/D,IAAI,UAAU,EAAE;4BACd,MAAM,KAAK,CAAC,gBAAgB,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;4BAC3C,MAAM,KAAK,CAAC,eAAe,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;yBAC3C;wBACD,MAAM,KAAK,CAAC,eAAe,CACzB,OAAO,EACP,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,YAAY,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAChE,CAAC;oBACJ,CAAC;iBACF,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js
new file mode 100644
index 000000000..475f4e7a4
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js
@@ -0,0 +1,46 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util_1 = require("../util");
+exports.default = util_1.createRule({
+ name: 'prefer-literal-enum-member',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Require that all enum members be literal values to prevent unintended enum member name shadow issues',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: false,
+ },
+ messages: {
+ notLiteral: `Explicit enum value must only be a literal value (string, number, boolean, etc).`,
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ return {
+ TSEnumMember(node) {
+ // If there is no initializer, then this node is just the name of the member, so ignore.
+ if (node.initializer == null) {
+ return;
+ }
+ // any old literal
+ if (node.initializer.type === experimental_utils_1.AST_NODE_TYPES.Literal) {
+ return;
+ }
+ // -1 and +1
+ if (node.initializer.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ ['+', '-'].includes(node.initializer.operator) &&
+ node.initializer.argument.type === experimental_utils_1.AST_NODE_TYPES.Literal) {
+ return;
+ }
+ context.report({
+ node: node.id,
+ messageId: 'notLiteral',
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-literal-enum-member.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js.map
new file mode 100644
index 000000000..9d5f03811
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-literal-enum-member.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-literal-enum-member.js","sourceRoot":"","sources":["../../src/rules/prefer-literal-enum-member.ts"],"names":[],"mappings":";;AAAA,8EAAuE;AACvE,kCAAqC;AAErC,kBAAe,iBAAU,CAAC;IACxB,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,sGAAsG;YACxG,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,KAAK;SAC5B;QACD,QAAQ,EAAE;YACR,UAAU,EAAE,kFAAkF;SAC/F;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,YAAY,CAAC,IAAI;gBACf,wFAAwF;gBACxF,IAAI,IAAI,CAAC,WAAW,IAAI,IAAI,EAAE;oBAC5B,OAAO;iBACR;gBACD,kBAAkB;gBAClB,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,mCAAc,CAAC,OAAO,EAAE;oBACpD,OAAO;iBACR;gBACD,YAAY;gBACZ,IACE,IAAI,CAAC,WAAW,CAAC,IAAI,KAAK,mCAAc,CAAC,eAAe;oBACxD,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;oBAC9C,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,IAAI,KAAK,mCAAc,CAAC,OAAO,EACzD;oBACA,OAAO;iBACR;gBAED,OAAO,CAAC,MAAM,CAAC;oBACb,IAAI,EAAE,IAAI,CAAC,EAAE;oBACb,SAAS,EAAE,YAAY;iBACxB,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js
new file mode 100644
index 000000000..26303e792
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js
@@ -0,0 +1,65 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'prefer-namespace-keyword',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Require the use of the `namespace` keyword instead of the `module` keyword to declare custom TypeScript modules',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ fixable: 'code',
+ messages: {
+ useNamespace: "Use 'namespace' instead of 'module' to declare custom TypeScript modules.",
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ return {
+ TSModuleDeclaration(node) {
+ // Do nothing if the name is a string.
+ if (!node.id || node.id.type === experimental_utils_1.AST_NODE_TYPES.Literal) {
+ return;
+ }
+ // Get tokens of the declaration header.
+ const moduleType = sourceCode.getTokenBefore(node.id);
+ if (moduleType &&
+ moduleType.type === experimental_utils_1.AST_TOKEN_TYPES.Identifier &&
+ moduleType.value === 'module') {
+ context.report({
+ node,
+ messageId: 'useNamespace',
+ fix(fixer) {
+ return fixer.replaceText(moduleType, 'namespace');
+ },
+ });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-namespace-keyword.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js.map
new file mode 100644
index 000000000..c4765a056
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-namespace-keyword.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-namespace-keyword.js","sourceRoot":"","sources":["../../src/rules/prefer-namespace-keyword.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAEhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,0BAA0B;IAChC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,iHAAiH;YACnH,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;SACrB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,YAAY,EACV,2EAA2E;SAC9E;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C,OAAO;YACL,mBAAmB,CAAC,IAAI;gBACtB,sCAAsC;gBACtC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC,IAAI,KAAK,mCAAc,CAAC,OAAO,EAAE;oBACvD,OAAO;iBACR;gBACD,wCAAwC;gBACxC,MAAM,UAAU,GAAG,UAAU,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gBAEtD,IACE,UAAU;oBACV,UAAU,CAAC,IAAI,KAAK,oCAAe,CAAC,UAAU;oBAC9C,UAAU,CAAC,KAAK,KAAK,QAAQ,EAC7B;oBACA,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,cAAc;wBACzB,GAAG,CAAC,KAAK;4BACP,OAAO,KAAK,CAAC,WAAW,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;wBACpD,CAAC;qBACF,CAAC,CAAC;iBACJ;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js
new file mode 100644
index 000000000..840e5c3e2
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js
@@ -0,0 +1,160 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'prefer-nullish-coalescing',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Enforce the usage of the nullish coalescing operator instead of logical chaining',
+ category: 'Best Practices',
+ recommended: false,
+ suggestion: true,
+ requiresTypeChecking: true,
+ },
+ messages: {
+ preferNullish: 'Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.',
+ suggestNullish: 'Fix to nullish coalescing operator (`??`).',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ ignoreConditionalTests: {
+ type: 'boolean',
+ },
+ ignoreMixedLogicalExpressions: {
+ type: 'boolean',
+ },
+ forceSuggestionFixer: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ ignoreConditionalTests: true,
+ ignoreMixedLogicalExpressions: true,
+ },
+ ],
+ create(context, [{ ignoreConditionalTests, ignoreMixedLogicalExpressions }]) {
+ const parserServices = util.getParserServices(context);
+ const sourceCode = context.getSourceCode();
+ const checker = parserServices.program.getTypeChecker();
+ return {
+ 'LogicalExpression[operator = "||"]'(node) {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const type = checker.getTypeAtLocation(tsNode.left);
+ const isNullish = util.isNullableType(type, { allowUndefined: true });
+ if (!isNullish) {
+ return;
+ }
+ if (ignoreConditionalTests === true && isConditionalTest(node)) {
+ return;
+ }
+ const isMixedLogical = isMixedLogicalExpression(node);
+ if (ignoreMixedLogicalExpressions === true && isMixedLogical) {
+ return;
+ }
+ const barBarOperator = util.nullThrows(sourceCode.getTokenAfter(node.left, token => token.type === experimental_utils_1.AST_TOKEN_TYPES.Punctuator &&
+ token.value === node.operator), util.NullThrowsReasons.MissingToken('operator', node.type));
+ function* fix(fixer) {
+ if (node.parent && util.isLogicalOrOperator(node.parent)) {
+ // '&&' and '??' operations cannot be mixed without parentheses (e.g. a && b ?? c)
+ if (node.left.type === experimental_utils_1.AST_NODE_TYPES.LogicalExpression &&
+ !util.isLogicalOrOperator(node.left.left)) {
+ yield fixer.insertTextBefore(node.left.right, '(');
+ }
+ else {
+ yield fixer.insertTextBefore(node.left, '(');
+ }
+ yield fixer.insertTextAfter(node.right, ')');
+ }
+ yield fixer.replaceText(barBarOperator, '??');
+ }
+ context.report({
+ node: barBarOperator,
+ messageId: 'preferNullish',
+ suggest: [
+ {
+ messageId: 'suggestNullish',
+ fix,
+ },
+ ],
+ });
+ },
+ };
+ },
+});
+function isConditionalTest(node) {
+ const parents = new Set([node]);
+ let current = node.parent;
+ while (current) {
+ parents.add(current);
+ if ((current.type === experimental_utils_1.AST_NODE_TYPES.ConditionalExpression ||
+ current.type === experimental_utils_1.AST_NODE_TYPES.DoWhileStatement ||
+ current.type === experimental_utils_1.AST_NODE_TYPES.IfStatement ||
+ current.type === experimental_utils_1.AST_NODE_TYPES.ForStatement ||
+ current.type === experimental_utils_1.AST_NODE_TYPES.WhileStatement) &&
+ parents.has(current.test)) {
+ return true;
+ }
+ if ([
+ experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.FunctionExpression,
+ ].includes(current.type)) {
+ /**
+ * This is a weird situation like:
+ * `if (() => a || b) {}`
+ * `if (function () { return a || b }) {}`
+ */
+ return false;
+ }
+ current = current.parent;
+ }
+ return false;
+}
+function isMixedLogicalExpression(node) {
+ const seen = new Set();
+ const queue = [node.parent, node.left, node.right];
+ for (const current of queue) {
+ if (seen.has(current)) {
+ continue;
+ }
+ seen.add(current);
+ if (current && current.type === experimental_utils_1.AST_NODE_TYPES.LogicalExpression) {
+ if (current.operator === '&&') {
+ return true;
+ }
+ else if (current.operator === '||') {
+ // check the pieces of the node to catch cases like `a || b || c && d`
+ queue.push(current.parent, current.left, current.right);
+ }
+ }
+ }
+ return false;
+}
+//# sourceMappingURL=prefer-nullish-coalescing.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map
new file mode 100644
index 000000000..b46f8d4af
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-nullish-coalescing.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-nullish-coalescing.js","sourceRoot":"","sources":["../../src/rules/prefer-nullish-coalescing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAK+C;AAC/C,8CAAgC;AAUhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,kFAAkF;YACpF,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,IAAI;YAChB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,aAAa,EAC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AC,iBAAiB,EAAE;YAChE,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,EAAE;gBAC7B,OAAO,IAAI,CAAC;aACb;iBAAM,IAAI,OAAO,CAAC,QAAQ,KAAK,IAAI,EAAE;gBACpC,sEAAsE;gBACtE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;aACzD;SACF;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js
new file mode 100644
index 000000000..c8eb961b9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js
@@ -0,0 +1,318 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+/*
+The AST is always constructed such the first element is always the deepest element.
+
+I.e. for this code: `foo && foo.bar && foo.bar.baz && foo.bar.baz.buzz`
+The AST will look like this:
+{
+ left: {
+ left: {
+ left: foo
+ right: foo.bar
+ }
+ right: foo.bar.baz
+ }
+ right: foo.bar.baz.buzz
+}
+*/
+exports.default = util.createRule({
+ name: 'prefer-optional-chain',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Prefer using concise optional chain expressions instead of chained logical ands',
+ category: 'Best Practices',
+ recommended: false,
+ suggestion: true,
+ },
+ messages: {
+ preferOptionalChain: "Prefer using an optional chain expression instead, as it's more concise and easier to read.",
+ optionalChainSuggest: 'Change to an optional chain.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ return {
+ [[
+ 'LogicalExpression[operator="&&"] > Identifier',
+ 'LogicalExpression[operator="&&"] > MemberExpression',
+ 'LogicalExpression[operator="&&"] > ChainExpression > MemberExpression',
+ 'LogicalExpression[operator="&&"] > BinaryExpression[operator="!=="]',
+ 'LogicalExpression[operator="&&"] > BinaryExpression[operator="!="]',
+ ].join(',')](initialIdentifierOrNotEqualsExpr) {
+ var _a;
+ // selector guarantees this cast
+ const initialExpression = (((_a = initialIdentifierOrNotEqualsExpr.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.ChainExpression
+ ? initialIdentifierOrNotEqualsExpr.parent.parent
+ : initialIdentifierOrNotEqualsExpr.parent);
+ if (initialExpression.left !== initialIdentifierOrNotEqualsExpr) {
+ // the node(identifier or member expression) is not the deepest left node
+ return;
+ }
+ if (!isValidChainTarget(initialIdentifierOrNotEqualsExpr, true)) {
+ return;
+ }
+ // walk up the tree to figure out how many logical expressions we can include
+ let previous = initialExpression;
+ let current = initialExpression;
+ let previousLeftText = getText(initialIdentifierOrNotEqualsExpr);
+ let optionallyChainedCode = previousLeftText;
+ let expressionCount = 1;
+ while (current.type === experimental_utils_1.AST_NODE_TYPES.LogicalExpression) {
+ if (!isValidChainTarget(current.right,
+ // only allow identifiers for the first chain - foo && foo()
+ expressionCount === 1)) {
+ break;
+ }
+ const leftText = previousLeftText;
+ const rightText = getText(current.right);
+ // can't just use startsWith because of cases like foo && fooBar.baz;
+ const matchRegex = new RegExp(`^${
+ // escape regex characters
+ leftText.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}[^a-zA-Z0-9_$]`);
+ if (!matchRegex.test(rightText) &&
+ // handle redundant cases like foo.bar && foo.bar
+ leftText !== rightText) {
+ break;
+ }
+ // omit weird doubled up expression that make no sense like foo.bar && foo.bar
+ if (rightText !== leftText) {
+ expressionCount += 1;
+ previousLeftText = rightText;
+ /*
+ Diff the left and right text to construct the fix string
+ There are the following cases:
+
+ 1)
+ rightText === 'foo.bar.baz.buzz'
+ leftText === 'foo.bar.baz'
+ diff === '.buzz'
+
+ 2)
+ rightText === 'foo.bar.baz.buzz()'
+ leftText === 'foo.bar.baz'
+ diff === '.buzz()'
+
+ 3)
+ rightText === 'foo.bar.baz.buzz()'
+ leftText === 'foo.bar.baz.buzz'
+ diff === '()'
+
+ 4)
+ rightText === 'foo.bar.baz[buzz]'
+ leftText === 'foo.bar.baz'
+ diff === '[buzz]'
+
+ 5)
+ rightText === 'foo.bar.baz?.buzz'
+ leftText === 'foo.bar.baz'
+ diff === '?.buzz'
+ */
+ const diff = rightText.replace(leftText, '');
+ if (diff.startsWith('?')) {
+ // item was "pre optional chained"
+ optionallyChainedCode += diff;
+ }
+ else {
+ const needsDot = diff.startsWith('(') || diff.startsWith('[');
+ optionallyChainedCode += `?${needsDot ? '.' : ''}${diff}`;
+ }
+ }
+ previous = current;
+ current = util.nullThrows(current.parent, util.NullThrowsReasons.MissingParent);
+ }
+ if (expressionCount > 1) {
+ if (previous.right.type === experimental_utils_1.AST_NODE_TYPES.BinaryExpression) {
+ // case like foo && foo.bar !== someValue
+ optionallyChainedCode += ` ${previous.right.operator} ${sourceCode.getText(previous.right.right)}`;
+ }
+ context.report({
+ node: previous,
+ messageId: 'preferOptionalChain',
+ suggest: [
+ {
+ messageId: 'optionalChainSuggest',
+ fix: (fixer) => [
+ fixer.replaceText(previous, optionallyChainedCode),
+ ],
+ },
+ ],
+ });
+ }
+ },
+ };
+ function getText(node) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.BinaryExpression) {
+ return getText(
+ // isValidChainTarget ensures this is type safe
+ node.left);
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.CallExpression) {
+ const calleeText = getText(
+ // isValidChainTarget ensures this is type safe
+ node.callee);
+ // ensure that the call arguments are left untouched, or else we can break cases that _need_ whitespace:
+ // - JSX:
+ // - Unary Operators: typeof foo, await bar, delete baz
+ const closingParenToken = util.nullThrows(sourceCode.getLastToken(node), util.NullThrowsReasons.MissingToken('closing parenthesis', node.type));
+ const openingParenToken = util.nullThrows(sourceCode.getFirstTokenBetween(node.callee, closingParenToken, util.isOpeningParenToken), util.NullThrowsReasons.MissingToken('opening parenthesis', node.type));
+ const argumentsText = sourceCode.text.substring(openingParenToken.range[0], closingParenToken.range[1]);
+ return `${calleeText}${argumentsText}`;
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ return node.name;
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.ThisExpression) {
+ return 'this';
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.ChainExpression) {
+ /* istanbul ignore if */ if (node.expression.type === experimental_utils_1.AST_NODE_TYPES.TSNonNullExpression) {
+ // this shouldn't happen
+ return '';
+ }
+ return getText(node.expression);
+ }
+ return getMemberExpressionText(node);
+ }
+ /**
+ * Gets a normalized representation of the given MemberExpression
+ */
+ function getMemberExpressionText(node) {
+ let objectText;
+ // cases should match the list in ALLOWED_MEMBER_OBJECT_TYPES
+ switch (node.object.type) {
+ case experimental_utils_1.AST_NODE_TYPES.CallExpression:
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ objectText = getText(node.object);
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.MemberExpression:
+ objectText = getMemberExpressionText(node.object);
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.ThisExpression:
+ objectText = getText(node.object);
+ break;
+ /* istanbul ignore next */
+ default:
+ throw new Error(`Unexpected member object type: ${node.object.type}`);
+ }
+ let propertyText;
+ if (node.computed) {
+ // cases should match the list in ALLOWED_COMPUTED_PROP_TYPES
+ switch (node.property.type) {
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ propertyText = getText(node.property);
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.Literal:
+ case experimental_utils_1.AST_NODE_TYPES.TemplateLiteral:
+ propertyText = sourceCode.getText(node.property);
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.MemberExpression:
+ propertyText = getMemberExpressionText(node.property);
+ break;
+ /* istanbul ignore next */
+ default:
+ throw new Error(`Unexpected member property type: ${node.object.type}`);
+ }
+ return `${objectText}${node.optional ? '?.' : ''}[${propertyText}]`;
+ }
+ else {
+ // cases should match the list in ALLOWED_NON_COMPUTED_PROP_TYPES
+ switch (node.property.type) {
+ case experimental_utils_1.AST_NODE_TYPES.Identifier:
+ propertyText = getText(node.property);
+ break;
+ /* istanbul ignore next */
+ default:
+ throw new Error(`Unexpected member property type: ${node.object.type}`);
+ }
+ return `${objectText}${node.optional ? '?.' : '.'}${propertyText}`;
+ }
+ }
+ },
+});
+const ALLOWED_MEMBER_OBJECT_TYPES = new Set([
+ experimental_utils_1.AST_NODE_TYPES.CallExpression,
+ experimental_utils_1.AST_NODE_TYPES.Identifier,
+ experimental_utils_1.AST_NODE_TYPES.MemberExpression,
+ experimental_utils_1.AST_NODE_TYPES.ThisExpression,
+]);
+const ALLOWED_COMPUTED_PROP_TYPES = new Set([
+ experimental_utils_1.AST_NODE_TYPES.Identifier,
+ experimental_utils_1.AST_NODE_TYPES.Literal,
+ experimental_utils_1.AST_NODE_TYPES.MemberExpression,
+ experimental_utils_1.AST_NODE_TYPES.TemplateLiteral,
+]);
+const ALLOWED_NON_COMPUTED_PROP_TYPES = new Set([
+ experimental_utils_1.AST_NODE_TYPES.Identifier,
+]);
+function isValidChainTarget(node, allowIdentifier) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.ChainExpression) {
+ return isValidChainTarget(node.expression, allowIdentifier);
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression) {
+ const isObjectValid = ALLOWED_MEMBER_OBJECT_TYPES.has(node.object.type) &&
+ // make sure to validate the expression is of our expected structure
+ isValidChainTarget(node.object, true);
+ const isPropertyValid = node.computed
+ ? ALLOWED_COMPUTED_PROP_TYPES.has(node.property.type) &&
+ // make sure to validate the member expression is of our expected structure
+ (node.property.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression
+ ? isValidChainTarget(node.property, allowIdentifier)
+ : true)
+ : ALLOWED_NON_COMPUTED_PROP_TYPES.has(node.property.type);
+ return isObjectValid && isPropertyValid;
+ }
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.CallExpression) {
+ return isValidChainTarget(node.callee, allowIdentifier);
+ }
+ if (allowIdentifier &&
+ (node.type === experimental_utils_1.AST_NODE_TYPES.Identifier ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.ThisExpression)) {
+ return true;
+ }
+ /*
+ special case for the following, where we only want the left
+ - foo !== null
+ - foo != null
+ - foo !== undefined
+ - foo != undefined
+ */
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.BinaryExpression &&
+ ['!==', '!='].includes(node.operator) &&
+ isValidChainTarget(node.left, allowIdentifier)) {
+ if (node.right.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ node.right.name === 'undefined') {
+ return true;
+ }
+ if (node.right.type === experimental_utils_1.AST_NODE_TYPES.Literal &&
+ node.right.value === null) {
+ return true;
+ }
+ }
+ return false;
+}
+//# sourceMappingURL=prefer-optional-chain.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map
new file mode 100644
index 000000000..1ce75dd7a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-optional-chain.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-optional-chain.js","sourceRoot":"","sources":["../../src/rules/prefer-optional-chain.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,8CAAgC;AAUhC;;;;;;;;;;;;;;;EAeE;AAEF,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,uBAAuB;IAC7B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,iFAAiF;YACnF,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,IAAI;SACjB;QACD,QAAQ,EAAE;YACR,mBAAmB,EACjB,6FAA6F;YAC/F,oBAAoB,EAAE,8BAA8B;SACrD;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3C,OAAO;YACL,CAAC;gBACC,+CAA+C;gBAC/C,qDAAqD;gBACrD,uEAAuE;gBACvE,qEAAqE;gBACrE,oEAAoE;aACrE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CACV,gCAG6B;;gBAE7B,gCAAgC;gBAChC,MAAM,iBAAiB,GAAG,CAAC,OAAA,gCAAgC,CAAC,MAAM,0CAC9D,IAAI,MAAK,mCAAc,CAAC,eAAe;oBACzC,CAAC,CAAC,gCAAgC,CAAC,MAAM,CAAC,MAAM;oBAChD,CAAC,CAAC,gCAAgC,CAAC,MAAM,CAA+B,CAAC;gBAE3E,IAAI,iBAAiB,CAAC,IAAI,KAAK,gCAAgC,EAAE;oBAC/D,yEAAyE;oBACzE,OAAO;iBACR;gBACD,IAAI,CAAC,kBAAkB,CAAC,gCAAgC,EAAE,IAAI,CAAC,EAAE;oBAC/D,OAAO;iBACR;gBAED,6EAA6E;g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K,WAAW,EAC/B;YACA,OAAO,IAAI,CAAC;SACb;QACD,IACE,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,mCAAc,CAAC,OAAO;YAC1C,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,EACzB;YACA,OAAO,IAAI,CAAC;SACb;KACF;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js
new file mode 100644
index 000000000..1c7904954
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js
@@ -0,0 +1,91 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'prefer-readonly-parameter-types',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Requires that function parameters are typed as readonly to prevent accidental mutation of inputs',
+ category: 'Possible Errors',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ schema: [
+ {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ checkParameterProperties: {
+ type: 'boolean',
+ },
+ },
+ },
+ ],
+ messages: {
+ shouldBeReadonly: 'Parameter should be a read only type.',
+ },
+ },
+ defaultOptions: [
+ {
+ checkParameterProperties: true,
+ },
+ ],
+ create(context, [{ checkParameterProperties }]) {
+ const { esTreeNodeToTSNodeMap, program } = util.getParserServices(context);
+ const checker = program.getTypeChecker();
+ return {
+ [[
+ experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.FunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction,
+ experimental_utils_1.AST_NODE_TYPES.TSEmptyBodyFunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.TSFunctionType,
+ experimental_utils_1.AST_NODE_TYPES.TSMethodSignature,
+ ].join(', ')](node) {
+ for (const param of node.params) {
+ if (!checkParameterProperties &&
+ param.type === experimental_utils_1.AST_NODE_TYPES.TSParameterProperty) {
+ continue;
+ }
+ const actualParam = param.type === experimental_utils_1.AST_NODE_TYPES.TSParameterProperty
+ ? param.parameter
+ : param;
+ const tsNode = esTreeNodeToTSNodeMap.get(actualParam);
+ const type = checker.getTypeAtLocation(tsNode);
+ const isReadOnly = util.isTypeReadonly(checker, type);
+ if (!isReadOnly) {
+ context.report({
+ node: actualParam,
+ messageId: 'shouldBeReadonly',
+ });
+ }
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-readonly-parameter-types.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js.map
new file mode 100644
index 000000000..be616c825
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly-parameter-types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-readonly-parameter-types.js","sourceRoot":"","sources":["../../src/rules/prefer-readonly-parameter-types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAShC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,iCAAiC;IACvC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,kGAAkG;YACpG,QAAQ,EAAE,iBAAiB;YAC3B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,IAAI;SAC3B;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACV,wBAAwB,EAAE;wBACxB,IAAI,EAAE,SAAS;qBAChB;iBACF;aACF;SACF;QACD,QAAQ,EAAE;YACR,gBAAgB,EAAE,uCAAuC;SAC1D;KACF;IACD,cAAc,EAAE;QACd;YACE,wBAAwB,EAAE,IAAI;SAC/B;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAwB,EAAE,CAAC;QAC5C,MAAM,EAAE,qBAAqB,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3E,MAAM,OAAO,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC;QAEzC,OAAO;YACL,CAAC;gBACC,mCAAc,CAAC,uBAAuB;gBACtC,mCAAc,CAAC,mBAAmB;gBAClC,mCAAc,CAAC,kBAAkB;gBACjC,mCAAc,CAAC,0BAA0B;gBACzC,mCAAc,CAAC,+BAA+B;gBAC9C,mCAAc,CAAC,iBAAiB;gBAChC,mCAAc,CAAC,6BAA6B;gBAC5C,mCAAc,CAAC,cAAc;gBAC7B,mCAAc,CAAC,iBAAiB;aACjC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CACX,IAS8B;gBAE9B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE;oBAC/B,IACE,CAAC,wBAAwB;wBACzB,KAAK,CAAC,IAAI,KAAK,mCAAc,CAAC,mBAAmB,EACjD;wBACA,SAAS;qBACV;oBAED,MAAM,WAAW,GACf,KAAK,CAAC,IAAI,KAAK,mCAAc,CAAC,mBAAmB;wBAC/C,CAAC,CAAC,KAAK,CAAC,SAAS;wBACjB,CAAC,CAAC,KAAK,CAAC;oBACZ,MAAM,MAAM,GAAG,qBAAqB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBACtD,MAAM,IAAI,GAAG,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;oBAC/C,MAAM,UAAU,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;oBAEtD,IAAI,CAAC,UAAU,EAAE;wBACf,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI,EAAE,WAAW;4BACjB,SAAS,EAAE,kBAAkB;yBAC9B,CAAC,CAAC;qBACJ;iBACF;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js
new file mode 100644
index 000000000..ede07d7ec
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js
@@ -0,0 +1,265 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const tsutils = __importStar(require("tsutils"));
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+const util_1 = require("../util");
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const functionScopeBoundaries = [
+ experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.FunctionDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.FunctionExpression,
+ experimental_utils_1.AST_NODE_TYPES.MethodDefinition,
+].join(', ');
+exports.default = util.createRule({
+ name: 'prefer-readonly',
+ meta: {
+ docs: {
+ description: "Requires that private members are marked as `readonly` if they're never modified outside of the constructor",
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ fixable: 'code',
+ messages: {
+ preferReadonly: "Member '{{name}}' is never reassigned; mark it as `readonly`.",
+ },
+ schema: [
+ {
+ allowAdditionalProperties: false,
+ properties: {
+ onlyInlineLambdas: {
+ type: 'boolean',
+ },
+ },
+ type: 'object',
+ },
+ ],
+ type: 'suggestion',
+ },
+ defaultOptions: [{ onlyInlineLambdas: false }],
+ create(context, [{ onlyInlineLambdas }]) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ const classScopeStack = [];
+ function handlePropertyAccessExpression(node, parent, classScope) {
+ if (ts.isBinaryExpression(parent)) {
+ handleParentBinaryExpression(node, parent, classScope);
+ return;
+ }
+ if (ts.isDeleteExpression(parent) || isDestructuringAssignment(node)) {
+ classScope.addVariableModification(node);
+ return;
+ }
+ if (ts.isPostfixUnaryExpression(parent) ||
+ ts.isPrefixUnaryExpression(parent)) {
+ handleParentPostfixOrPrefixUnaryExpression(parent, classScope);
+ }
+ }
+ function handleParentBinaryExpression(node, parent, classScope) {
+ if (parent.left === node &&
+ tsutils.isAssignmentKind(parent.operatorToken.kind)) {
+ classScope.addVariableModification(node);
+ }
+ }
+ function handleParentPostfixOrPrefixUnaryExpression(node, classScope) {
+ if (node.operator === ts.SyntaxKind.PlusPlusToken ||
+ node.operator === ts.SyntaxKind.MinusMinusToken) {
+ classScope.addVariableModification(node.operand);
+ }
+ }
+ function isDestructuringAssignment(node) {
+ let current = node.parent;
+ while (current) {
+ const parent = current.parent;
+ if (ts.isObjectLiteralExpression(parent) ||
+ ts.isArrayLiteralExpression(parent) ||
+ ts.isSpreadAssignment(parent) ||
+ (ts.isSpreadElement(parent) &&
+ ts.isArrayLiteralExpression(parent.parent))) {
+ current = parent;
+ }
+ else if (ts.isBinaryExpression(parent)) {
+ return (parent.left === current &&
+ parent.operatorToken.kind === ts.SyntaxKind.EqualsToken);
+ }
+ else {
+ break;
+ }
+ }
+ return false;
+ }
+ function isConstructor(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.MethodDefinition &&
+ node.kind === 'constructor');
+ }
+ function isFunctionScopeBoundaryInStack(node) {
+ if (classScopeStack.length === 0) {
+ return false;
+ }
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ if (ts.isConstructorDeclaration(tsNode)) {
+ return false;
+ }
+ return tsutils.isFunctionScopeBoundary(tsNode);
+ }
+ function getEsNodesFromViolatingNode(violatingNode) {
+ if (ts.isParameterPropertyDeclaration(violatingNode, violatingNode.parent)) {
+ return {
+ esNode: parserServices.tsNodeToESTreeNodeMap.get(violatingNode.name),
+ nameNode: parserServices.tsNodeToESTreeNodeMap.get(violatingNode.name),
+ };
+ }
+ return {
+ esNode: parserServices.tsNodeToESTreeNodeMap.get(violatingNode),
+ nameNode: parserServices.tsNodeToESTreeNodeMap.get(violatingNode.name),
+ };
+ }
+ return {
+ 'ClassDeclaration, ClassExpression'(node) {
+ classScopeStack.push(new ClassScope(checker, parserServices.esTreeNodeToTSNodeMap.get(node), onlyInlineLambdas));
+ },
+ 'ClassDeclaration, ClassExpression:exit'() {
+ const finalizedClassScope = classScopeStack.pop();
+ const sourceCode = context.getSourceCode();
+ for (const violatingNode of finalizedClassScope.finalizeUnmodifiedPrivateNonReadonlys()) {
+ const { esNode, nameNode } = getEsNodesFromViolatingNode(violatingNode);
+ context.report({
+ data: {
+ name: sourceCode.getText(nameNode),
+ },
+ fix: fixer => fixer.insertTextBefore(nameNode, 'readonly '),
+ messageId: 'preferReadonly',
+ node: esNode,
+ });
+ }
+ },
+ MemberExpression(node) {
+ if (classScopeStack.length !== 0 && !node.computed) {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ handlePropertyAccessExpression(tsNode, tsNode.parent, classScopeStack[classScopeStack.length - 1]);
+ }
+ },
+ [functionScopeBoundaries](node) {
+ if (isConstructor(node)) {
+ classScopeStack[classScopeStack.length - 1].enterConstructor(parserServices.esTreeNodeToTSNodeMap.get(node));
+ }
+ else if (isFunctionScopeBoundaryInStack(node)) {
+ classScopeStack[classScopeStack.length - 1].enterNonConstructor();
+ }
+ },
+ [`${functionScopeBoundaries}:exit`](node) {
+ if (isConstructor(node)) {
+ classScopeStack[classScopeStack.length - 1].exitConstructor();
+ }
+ else if (isFunctionScopeBoundaryInStack(node)) {
+ classScopeStack[classScopeStack.length - 1].exitNonConstructor();
+ }
+ },
+ };
+ },
+});
+const OUTSIDE_CONSTRUCTOR = -1;
+const DIRECTLY_INSIDE_CONSTRUCTOR = 0;
+class ClassScope {
+ constructor(checker, classNode, onlyInlineLambdas) {
+ this.checker = checker;
+ this.onlyInlineLambdas = onlyInlineLambdas;
+ this.privateModifiableMembers = new Map();
+ this.privateModifiableStatics = new Map();
+ this.memberVariableModifications = new Set();
+ this.staticVariableModifications = new Set();
+ this.constructorScopeDepth = OUTSIDE_CONSTRUCTOR;
+ this.checker = checker;
+ this.classType = checker.getTypeAtLocation(classNode);
+ for (const member of classNode.members) {
+ if (ts.isPropertyDeclaration(member)) {
+ this.addDeclaredVariable(member);
+ }
+ }
+ }
+ addDeclaredVariable(node) {
+ if (!tsutils.isModifierFlagSet(node, ts.ModifierFlags.Private) ||
+ tsutils.isModifierFlagSet(node, ts.ModifierFlags.Readonly) ||
+ ts.isComputedPropertyName(node.name)) {
+ return;
+ }
+ if (this.onlyInlineLambdas &&
+ node.initializer !== undefined &&
+ !ts.isArrowFunction(node.initializer)) {
+ return;
+ }
+ (tsutils.isModifierFlagSet(node, ts.ModifierFlags.Static)
+ ? this.privateModifiableStatics
+ : this.privateModifiableMembers).set(node.name.getText(), node);
+ }
+ addVariableModification(node) {
+ const modifierType = this.checker.getTypeAtLocation(node.expression);
+ if (!modifierType.getSymbol() ||
+ !util_1.typeIsOrHasBaseType(modifierType, this.classType)) {
+ return;
+ }
+ const modifyingStatic = tsutils.isObjectType(modifierType) &&
+ tsutils.isObjectFlagSet(modifierType, ts.ObjectFlags.Anonymous);
+ if (!modifyingStatic &&
+ this.constructorScopeDepth === DIRECTLY_INSIDE_CONSTRUCTOR) {
+ return;
+ }
+ (modifyingStatic
+ ? this.staticVariableModifications
+ : this.memberVariableModifications).add(node.name.text);
+ }
+ enterConstructor(node) {
+ this.constructorScopeDepth = DIRECTLY_INSIDE_CONSTRUCTOR;
+ for (const parameter of node.parameters) {
+ if (tsutils.isModifierFlagSet(parameter, ts.ModifierFlags.Private)) {
+ this.addDeclaredVariable(parameter);
+ }
+ }
+ }
+ exitConstructor() {
+ this.constructorScopeDepth = OUTSIDE_CONSTRUCTOR;
+ }
+ enterNonConstructor() {
+ if (this.constructorScopeDepth !== OUTSIDE_CONSTRUCTOR) {
+ this.constructorScopeDepth += 1;
+ }
+ }
+ exitNonConstructor() {
+ if (this.constructorScopeDepth !== OUTSIDE_CONSTRUCTOR) {
+ this.constructorScopeDepth -= 1;
+ }
+ }
+ finalizeUnmodifiedPrivateNonReadonlys() {
+ this.memberVariableModifications.forEach(variableName => {
+ this.privateModifiableMembers.delete(variableName);
+ });
+ this.staticVariableModifications.forEach(variableName => {
+ this.privateModifiableStatics.delete(variableName);
+ });
+ return [
+ ...Array.from(this.privateModifiableMembers.values()),
+ ...Array.from(this.privateModifiableStatics.values()),
+ ];
+ }
+}
+//# sourceMappingURL=prefer-readonly.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js.map
new file mode 100644
index 000000000..1aae677d9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-readonly.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-readonly.js","sourceRoot":"","sources":["../../src/rules/prefer-readonly.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,iDAAmC;AACnC,+CAAiC;AACjC,8CAAgC;AAChC,kCAA8C;AAC9C,8EAG+C;AAU/C,MAAM,uBAAuB,GAAG;IAC9B,mCAAc,CAAC,uBAAuB;IACtC,mCAAc,CAAC,mBAAmB;IAClC,mCAAc,CAAC,kBAAkB;IACjC,mCAAc,CAAC,gBAAgB;CAChC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEb,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EACT,6GAA6G;YAC/G,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,IAAI;SAC3B;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,cAAc,EACZ,+DAA+D;SAClE;QACD,MAAM,EAAE;YACN;gBACE,yBAAyB,EAAE,KAAK;gBAChC,UAAU,EAAE;oBACV,iBAAiB,EAAE;wBACjB,IAAI,EAAE,SAAS;qBAChB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IACnD,CAAC;IAEM,mBAAmB;QACxB,IAAI,IAAI,CAAC,qBAAqB,KAAK,mBAAmB,EAAE;YACtD,IAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC;SACjC;IACH,CAAC;IAEM,kBAAkB;QACvB,IAAI,IAAI,CAAC,qBAAqB,KAAK,mBAAmB,EAAE;YACtD,IAAI,CAAC,qBAAqB,IAAI,CAAC,CAAC;SACjC;IACH,CAAC;IAEM,qCAAqC;QAC1C,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YACtD,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;QAEH,IAAI,CAAC,2BAA2B,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;YACtD,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;QACrD,CAAC,CAAC,CAAC;QAEH,OAAO;YACL,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,EAAE,CAAC;YACrD,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,wBAAwB,CAAC,MAAM,EAAE,CAAC;SACtD,CAAC;IACJ,CAAC;CACF"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js
new file mode 100644
index 000000000..d10847962
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js
@@ -0,0 +1,92 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+const getMemberExpressionName = (member) => {
+ if (!member.computed) {
+ return member.property.name;
+ }
+ if (member.property.type === experimental_utils_1.AST_NODE_TYPES.Literal &&
+ typeof member.property.value === 'string') {
+ return member.property.value;
+ }
+ return null;
+};
+exports.default = util.createRule({
+ name: 'prefer-reduce-type-parameter',
+ meta: {
+ type: 'problem',
+ docs: {
+ category: 'Best Practices',
+ recommended: false,
+ description: 'Prefer using type parameter when calling `Array#reduce` instead of casting',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ preferTypeParameter: 'Unnecessary cast: Array#reduce accepts a type parameter for the default value.',
+ },
+ fixable: 'code',
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const service = util.getParserServices(context);
+ const checker = service.program.getTypeChecker();
+ return {
+ 'CallExpression > MemberExpression.callee'(callee) {
+ if (getMemberExpressionName(callee) !== 'reduce') {
+ return;
+ }
+ const [, secondArg] = callee.parent.arguments;
+ if (callee.parent.arguments.length < 2 ||
+ !util.isTypeAssertion(secondArg)) {
+ return;
+ }
+ // Get the symbol of the `reduce` method.
+ const tsNode = service.esTreeNodeToTSNodeMap.get(callee.object);
+ const calleeObjType = util.getConstrainedTypeAtLocation(checker, tsNode);
+ // Check the owner type of the `reduce` method.
+ if (checker.isArrayType(calleeObjType)) {
+ context.report({
+ messageId: 'preferTypeParameter',
+ node: secondArg,
+ fix: fixer => [
+ fixer.removeRange([
+ secondArg.range[0],
+ secondArg.expression.range[0],
+ ]),
+ fixer.removeRange([
+ secondArg.expression.range[1],
+ secondArg.range[1],
+ ]),
+ fixer.insertTextAfter(callee, `<${context
+ .getSourceCode()
+ .getText(secondArg.typeAnnotation)}>`),
+ ],
+ });
+ return;
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-reduce-type-parameter.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js.map
new file mode 100644
index 000000000..647e71661
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-reduce-type-parameter.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-reduce-type-parameter.js","sourceRoot":"","sources":["../../src/rules/prefer-reduce-type-parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAMhC,MAAM,uBAAuB,GAAG,CAC9B,MAAiC,EAClB,EAAE;IACjB,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE;QACpB,OAAO,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC;KAC7B;IAED,IACE,MAAM,CAAC,QAAQ,CAAC,IAAI,KAAK,mCAAc,CAAC,OAAO;QAC/C,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,KAAK,QAAQ,EACzC;QACA,OAAO,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC;KAC9B;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,WAAW,EACT,4EAA4E;YAC9E,oBAAoB,EAAE,IAAI;SAC3B;QAC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C;gCAC7B,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;6BACnB,CAAC;4BACF,KAAK,CAAC,eAAe,CACnB,MAAM,EACN,IAAI,OAAO;iCACR,aAAa,EAAE;iCACf,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,CACxC;yBACF;qBACF,CAAC,CAAC;oBAEH,OAAO;iBACR;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js
new file mode 100644
index 000000000..a09b65595
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js
@@ -0,0 +1,54 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const util_1 = require("../util");
+exports.default = util_1.createRule({
+ name: 'prefer-regexp-exec',
+ defaultOptions: [],
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided',
+ category: 'Best Practices',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ regExpExecOverStringMatch: 'Use the `RegExp#exec()` method instead.',
+ },
+ schema: [],
+ },
+ create(context) {
+ const globalScope = context.getScope();
+ const service = util_1.getParserServices(context);
+ const typeChecker = service.program.getTypeChecker();
+ /**
+ * Check if a given node is a string.
+ * @param node The node to check.
+ */
+ function isStringType(node) {
+ const objectType = typeChecker.getTypeAtLocation(service.esTreeNodeToTSNodeMap.get(node));
+ return util_1.getTypeName(typeChecker, objectType) === 'string';
+ }
+ return {
+ "CallExpression[arguments.length=1] > MemberExpression.callee[property.name='match'][computed=false]"(node) {
+ const callNode = node.parent;
+ const arg = callNode.arguments[0];
+ const evaluated = util_1.getStaticValue(arg, globalScope);
+ // Don't report regular expressions with global flag.
+ if (evaluated &&
+ evaluated.value instanceof RegExp &&
+ evaluated.value.flags.includes('g')) {
+ return;
+ }
+ if (isStringType(node.object)) {
+ context.report({
+ node: callNode,
+ messageId: 'regExpExecOverStringMatch',
+ });
+ return;
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-regexp-exec.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js.map
new file mode 100644
index 000000000..3aa5e7362
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-regexp-exec.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-regexp-exec.js","sourceRoot":"","sources":["../../src/rules/prefer-regexp-exec.ts"],"names":[],"mappings":";;AACA,kCAKiB;AAEjB,kBAAe,iBAAU,CAAC;IACxB,IAAI,EAAE,oBAAoB;IAC1B,cAAc,EAAE,EAAE;IAElB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,4FAA4F;YAC9F,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,yBAAyB,EAAE,yCAAyC;SACrE;QACD,MAAM,EAAE,EAAE;KACX;IAED,MAAM,CAAC,OAAO;QACZ,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,MAAM,OAAO,GAAG,wBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAErD;;;WAGG;QACH,SAAS,YAAY,CAAC,IAAqC;YACzD,MAAM,UAAU,GAAG,WAAW,CAAC,iBAAiB,CAC9C,OAAO,CAAC,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CACxC,CAAC;YACF,OAAO,kBAAW,CAAC,WAAW,EAAE,UAAU,CAAC,KAAK,QAAQ,CAAC;QAC3D,CAAC;QAED,OAAO;YACL,qGAAqG,CACnG,IAA+B;gBAE/B,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAiC,CAAC;gBACxD,MAAM,GAAG,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBAClC,MAAM,SAAS,GAAG,qBAAc,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;gBAEnD,qDAAqD;gBACrD,IACE,SAAS;oBACT,SAAS,CAAC,KAAK,YAAY,MAAM;oBACjC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EACnC;oBACA,OAAO;iBACR;gBAED,IAAI,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;oBAC7B,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI,EAAE,QAAQ;wBACd,SAAS,EAAE,2BAA2B;qBACvC,CAAC,CAAC;oBACH,OAAO;iBACR;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js
new file mode 100644
index 000000000..5b3e02830
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js
@@ -0,0 +1,489 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const regexpp_1 = require("regexpp");
+const util_1 = require("../util");
+const EQ_OPERATORS = /^[=!]=/;
+const regexpp = new regexpp_1.RegExpParser();
+exports.default = util_1.createRule({
+ name: 'prefer-string-starts-ends-with',
+ defaultOptions: [],
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Enforce the use of `String#startsWith` and `String#endsWith` instead of other equivalent methods of checking substrings',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ messages: {
+ preferStartsWith: "Use 'String#startsWith' method instead.",
+ preferEndsWith: "Use the 'String#endsWith' method instead.",
+ },
+ schema: [],
+ fixable: 'code',
+ },
+ create(context) {
+ const globalScope = context.getScope();
+ const sourceCode = context.getSourceCode();
+ const service = util_1.getParserServices(context);
+ const typeChecker = service.program.getTypeChecker();
+ /**
+ * Check if a given node is a string.
+ * @param node The node to check.
+ */
+ function isStringType(node) {
+ const objectType = typeChecker.getTypeAtLocation(service.esTreeNodeToTSNodeMap.get(node));
+ return util_1.getTypeName(typeChecker, objectType) === 'string';
+ }
+ /**
+ * Check if a given node is a `Literal` node that is null.
+ * @param node The node to check.
+ */
+ function isNull(node) {
+ const evaluated = util_1.getStaticValue(node, globalScope);
+ return evaluated != null && evaluated.value === null;
+ }
+ /**
+ * Check if a given node is a `Literal` node that is a given value.
+ * @param node The node to check.
+ * @param value The expected value of the `Literal` node.
+ */
+ function isNumber(node, value) {
+ const evaluated = util_1.getStaticValue(node, globalScope);
+ return evaluated != null && evaluated.value === value;
+ }
+ /**
+ * Check if a given node is a `Literal` node that is a character.
+ * @param node The node to check.
+ * @param kind The method name to get a character.
+ */
+ function isCharacter(node) {
+ const evaluated = util_1.getStaticValue(node, globalScope);
+ return (evaluated != null &&
+ typeof evaluated.value === 'string' &&
+ // checks if the string is a character long
+ evaluated.value[0] === evaluated.value);
+ }
+ /**
+ * Check if a given node is `==`, `===`, `!=`, or `!==`.
+ * @param node The node to check.
+ */
+ function isEqualityComparison(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.BinaryExpression &&
+ EQ_OPERATORS.test(node.operator));
+ }
+ /**
+ * Check if two given nodes are the same meaning.
+ * @param node1 A node to compare.
+ * @param node2 Another node to compare.
+ */
+ function isSameTokens(node1, node2) {
+ const tokens1 = sourceCode.getTokens(node1);
+ const tokens2 = sourceCode.getTokens(node2);
+ if (tokens1.length !== tokens2.length) {
+ return false;
+ }
+ for (let i = 0; i < tokens1.length; ++i) {
+ const token1 = tokens1[i];
+ const token2 = tokens2[i];
+ if (token1.type !== token2.type || token1.value !== token2.value) {
+ return false;
+ }
+ }
+ return true;
+ }
+ /**
+ * Check if a given node is the expression of the length of a string.
+ *
+ * - If `length` property access of `expectedObjectNode`, it's `true`.
+ * E.g., `foo` → `foo.length` / `"foo"` → `"foo".length`
+ * - If `expectedObjectNode` is a string literal, `node` can be a number.
+ * E.g., `"foo"` → `3`
+ *
+ * @param node The node to check.
+ * @param expectedObjectNode The node which is expected as the receiver of `length` property.
+ */
+ function isLengthExpression(node, expectedObjectNode) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.MemberExpression) {
+ return (util_1.getPropertyName(node, globalScope) === 'length' &&
+ isSameTokens(node.object, expectedObjectNode));
+ }
+ const evaluatedLength = util_1.getStaticValue(node, globalScope);
+ const evaluatedString = util_1.getStaticValue(expectedObjectNode, globalScope);
+ return (evaluatedLength != null &&
+ evaluatedString != null &&
+ typeof evaluatedLength.value === 'number' &&
+ typeof evaluatedString.value === 'string' &&
+ evaluatedLength.value === evaluatedString.value.length);
+ }
+ /**
+ * Check if a given node is a negative index expression
+ *
+ * E.g. `s.slice(- )`, `s.substring(s.length - )`
+ *
+ * @param node The node to check.
+ * @param expectedIndexedNode The node which is expected as the receiver of index expression.
+ */
+ function isNegativeIndexExpression(node, expectedIndexedNode) {
+ return ((node.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ node.operator === '-') ||
+ (node.type === experimental_utils_1.AST_NODE_TYPES.BinaryExpression &&
+ node.operator === '-' &&
+ isLengthExpression(node.left, expectedIndexedNode)));
+ }
+ /**
+ * Check if a given node is the expression of the last index.
+ *
+ * E.g. `foo.length - 1`
+ *
+ * @param node The node to check.
+ * @param expectedObjectNode The node which is expected as the receiver of `length` property.
+ */
+ function isLastIndexExpression(node, expectedObjectNode) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.BinaryExpression &&
+ node.operator === '-' &&
+ isLengthExpression(node.left, expectedObjectNode) &&
+ isNumber(node.right, 1));
+ }
+ /**
+ * Get the range of the property of a given `MemberExpression` node.
+ *
+ * - `obj[foo]` → the range of `[foo]`
+ * - `obf.foo` → the range of `.foo`
+ * - `(obj).foo` → the range of `.foo`
+ *
+ * @param node The member expression node to get.
+ */
+ function getPropertyRange(node) {
+ const dotOrOpenBracket = sourceCode.getTokenAfter(node.object, util_1.isNotClosingParenToken);
+ return [dotOrOpenBracket.range[0], node.range[1]];
+ }
+ /**
+ * Parse a given `RegExp` pattern to that string if it's a static string.
+ * @param pattern The RegExp pattern text to parse.
+ * @param uFlag The Unicode flag of the RegExp.
+ */
+ function parseRegExpText(pattern, uFlag) {
+ // Parse it.
+ const ast = regexpp.parsePattern(pattern, undefined, undefined, uFlag);
+ if (ast.alternatives.length !== 1) {
+ return null;
+ }
+ // Drop `^`/`$` assertion.
+ const chars = ast.alternatives[0].elements;
+ const first = chars[0];
+ if (first.type === 'Assertion' && first.kind === 'start') {
+ chars.shift();
+ }
+ else {
+ chars.pop();
+ }
+ // Check if it can determine a unique string.
+ if (!chars.every(c => c.type === 'Character')) {
+ return null;
+ }
+ // To string.
+ return String.fromCodePoint(...chars.map(c => c.value));
+ }
+ /**
+ * Parse a given node if it's a `RegExp` instance.
+ * @param node The node to parse.
+ */
+ function parseRegExp(node) {
+ const evaluated = util_1.getStaticValue(node, globalScope);
+ if (evaluated == null || !(evaluated.value instanceof RegExp)) {
+ return null;
+ }
+ const { source, flags } = evaluated.value;
+ const isStartsWith = source.startsWith('^');
+ const isEndsWith = source.endsWith('$');
+ if (isStartsWith === isEndsWith ||
+ flags.includes('i') ||
+ flags.includes('m')) {
+ return null;
+ }
+ const text = parseRegExpText(source, flags.includes('u'));
+ if (text == null) {
+ return null;
+ }
+ return { isEndsWith, isStartsWith, text };
+ }
+ function getLeftNode(node) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.ChainExpression) {
+ return getLeftNode(node.expression);
+ }
+ let leftNode;
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.CallExpression) {
+ leftNode = node.callee;
+ }
+ else {
+ leftNode = node;
+ }
+ if (leftNode.type !== experimental_utils_1.AST_NODE_TYPES.MemberExpression) {
+ throw new Error(`Expected a MemberExpression, got ${leftNode.type}`);
+ }
+ return leftNode;
+ }
+ /**
+ * Fix code with using the right operand as the search string.
+ * For example: `foo.slice(0, 3) === 'bar'` → `foo.startsWith('bar')`
+ * @param fixer The rule fixer.
+ * @param node The node which was reported.
+ * @param kind The kind of the report.
+ * @param isNegative The flag to fix to negative condition.
+ */
+ function* fixWithRightOperand(fixer, node, kind, isNegative, isOptional) {
+ // left is CallExpression or MemberExpression.
+ const leftNode = getLeftNode(node.left);
+ const propertyRange = getPropertyRange(leftNode);
+ if (isNegative) {
+ yield fixer.insertTextBefore(node, '!');
+ }
+ yield fixer.replaceTextRange([propertyRange[0], node.right.range[0]], `${isOptional ? '?.' : '.'}${kind}sWith(`);
+ yield fixer.replaceTextRange([node.right.range[1], node.range[1]], ')');
+ }
+ /**
+ * Fix code with using the first argument as the search string.
+ * For example: `foo.indexOf('bar') === 0` → `foo.startsWith('bar')`
+ * @param fixer The rule fixer.
+ * @param node The node which was reported.
+ * @param kind The kind of the report.
+ * @param negative The flag to fix to negative condition.
+ */
+ function* fixWithArgument(fixer, node, callNode, calleeNode, kind, negative, isOptional) {
+ if (negative) {
+ yield fixer.insertTextBefore(node, '!');
+ }
+ yield fixer.replaceTextRange(getPropertyRange(calleeNode), `${isOptional ? '?.' : '.'}${kind}sWith`);
+ yield fixer.removeRange([callNode.range[1], node.range[1]]);
+ }
+ function getParent(node) {
+ var _a;
+ return util_1.nullThrows(((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.ChainExpression
+ ? node.parent.parent
+ : node.parent, util_1.NullThrowsReasons.MissingParent);
+ }
+ return {
+ // foo[0] === "a"
+ // foo.charAt(0) === "a"
+ // foo[foo.length - 1] === "a"
+ // foo.charAt(foo.length - 1) === "a"
+ [[
+ 'BinaryExpression > MemberExpression.left[computed=true]',
+ 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="charAt"][computed=false]',
+ 'BinaryExpression > ChainExpression.left > MemberExpression[computed=true]',
+ 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="charAt"][computed=false]',
+ ].join(', ')](node) {
+ let parentNode = getParent(node);
+ let indexNode = null;
+ if ((parentNode === null || parentNode === void 0 ? void 0 : parentNode.type) === experimental_utils_1.AST_NODE_TYPES.CallExpression) {
+ if (parentNode.arguments.length === 1) {
+ indexNode = parentNode.arguments[0];
+ }
+ parentNode = getParent(parentNode);
+ }
+ else {
+ indexNode = node.property;
+ }
+ if (indexNode == null ||
+ !isEqualityComparison(parentNode) ||
+ !isStringType(node.object)) {
+ return;
+ }
+ const isEndsWith = isLastIndexExpression(indexNode, node.object);
+ const isStartsWith = !isEndsWith && isNumber(indexNode, 0);
+ if (!isStartsWith && !isEndsWith) {
+ return;
+ }
+ const eqNode = parentNode;
+ context.report({
+ node: parentNode,
+ messageId: isStartsWith ? 'preferStartsWith' : 'preferEndsWith',
+ fix(fixer) {
+ // Don't fix if it can change the behavior.
+ if (!isCharacter(eqNode.right)) {
+ return null;
+ }
+ return fixWithRightOperand(fixer, eqNode, isStartsWith ? 'start' : 'end', eqNode.operator.startsWith('!'), node.optional);
+ },
+ });
+ },
+ // foo.indexOf('bar') === 0
+ [[
+ 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="indexOf"][computed=false]',
+ 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="indexOf"][computed=false]',
+ ].join(', ')](node) {
+ const callNode = getParent(node);
+ const parentNode = getParent(callNode);
+ if (callNode.arguments.length !== 1 ||
+ !isEqualityComparison(parentNode) ||
+ !isNumber(parentNode.right, 0) ||
+ !isStringType(node.object)) {
+ return;
+ }
+ context.report({
+ node: parentNode,
+ messageId: 'preferStartsWith',
+ fix(fixer) {
+ return fixWithArgument(fixer, parentNode, callNode, node, 'start', parentNode.operator.startsWith('!'), node.optional);
+ },
+ });
+ },
+ // foo.lastIndexOf('bar') === foo.length - 3
+ // foo.lastIndexOf(bar) === foo.length - bar.length
+ [[
+ 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="lastIndexOf"][computed=false]',
+ 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="lastIndexOf"][computed=false]',
+ ].join(', ')](node) {
+ const callNode = getParent(node);
+ const parentNode = getParent(callNode);
+ if (callNode.arguments.length !== 1 ||
+ !isEqualityComparison(parentNode) ||
+ parentNode.right.type !== experimental_utils_1.AST_NODE_TYPES.BinaryExpression ||
+ parentNode.right.operator !== '-' ||
+ !isLengthExpression(parentNode.right.left, node.object) ||
+ !isLengthExpression(parentNode.right.right, callNode.arguments[0]) ||
+ !isStringType(node.object)) {
+ return;
+ }
+ context.report({
+ node: parentNode,
+ messageId: 'preferEndsWith',
+ fix(fixer) {
+ return fixWithArgument(fixer, parentNode, callNode, node, 'end', parentNode.operator.startsWith('!'), node.optional);
+ },
+ });
+ },
+ // foo.match(/^bar/) === null
+ // foo.match(/bar$/) === null
+ [[
+ 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="match"][computed=false]',
+ 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="match"][computed=false]',
+ ].join(', ')](node) {
+ const callNode = getParent(node);
+ const parentNode = getParent(callNode);
+ if (!isEqualityComparison(parentNode) ||
+ !isNull(parentNode.right) ||
+ !isStringType(node.object)) {
+ return;
+ }
+ const parsed = callNode.arguments.length === 1
+ ? parseRegExp(callNode.arguments[0])
+ : null;
+ if (parsed == null) {
+ return;
+ }
+ const { isStartsWith, text } = parsed;
+ context.report({
+ node: callNode,
+ messageId: isStartsWith ? 'preferStartsWith' : 'preferEndsWith',
+ *fix(fixer) {
+ if (!parentNode.operator.startsWith('!')) {
+ yield fixer.insertTextBefore(parentNode, '!');
+ }
+ yield fixer.replaceTextRange(getPropertyRange(node), `${node.optional ? '?.' : '.'}${isStartsWith ? 'start' : 'end'}sWith`);
+ yield fixer.replaceText(callNode.arguments[0], JSON.stringify(text));
+ yield fixer.removeRange([callNode.range[1], parentNode.range[1]]);
+ },
+ });
+ },
+ // foo.slice(0, 3) === 'bar'
+ // foo.slice(-3) === 'bar'
+ // foo.slice(-3, foo.length) === 'bar'
+ // foo.substring(0, 3) === 'bar'
+ // foo.substring(foo.length - 3) === 'bar'
+ // foo.substring(foo.length - 3, foo.length) === 'bar'
+ [[
+ 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="slice"][computed=false]',
+ 'BinaryExpression > CallExpression.left > MemberExpression.callee[property.name="substring"][computed=false]',
+ 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="slice"][computed=false]',
+ 'BinaryExpression > ChainExpression.left > CallExpression > MemberExpression.callee[property.name="substring"][computed=false]',
+ ].join(', ')](node) {
+ const callNode = getParent(node);
+ const parentNode = getParent(callNode);
+ if (!isEqualityComparison(parentNode) || !isStringType(node.object)) {
+ return;
+ }
+ const isEndsWith = (callNode.arguments.length === 1 ||
+ (callNode.arguments.length === 2 &&
+ isLengthExpression(callNode.arguments[1], node.object))) &&
+ isNegativeIndexExpression(callNode.arguments[0], node.object);
+ const isStartsWith = !isEndsWith &&
+ callNode.arguments.length === 2 &&
+ isNumber(callNode.arguments[0], 0);
+ if (!isStartsWith && !isEndsWith) {
+ return;
+ }
+ const eqNode = parentNode;
+ const negativeIndexSupported = node.property.name === 'slice';
+ context.report({
+ node: parentNode,
+ messageId: isStartsWith ? 'preferStartsWith' : 'preferEndsWith',
+ fix(fixer) {
+ // Don't fix if it can change the behavior.
+ if (eqNode.operator.length === 2 &&
+ (eqNode.right.type !== experimental_utils_1.AST_NODE_TYPES.Literal ||
+ typeof eqNode.right.value !== 'string')) {
+ return null;
+ }
+ // code being checked is likely mistake:
+ // unequal length of strings being checked for equality
+ // or reliant on behavior of substring (negative indices interpreted as 0)
+ if (isStartsWith) {
+ if (!isLengthExpression(callNode.arguments[1], eqNode.right)) {
+ return null;
+ }
+ }
+ else {
+ const posNode = callNode.arguments[0];
+ const posNodeIsAbsolutelyValid = (posNode.type === experimental_utils_1.AST_NODE_TYPES.BinaryExpression &&
+ posNode.operator === '-' &&
+ isLengthExpression(posNode.left, node.object) &&
+ isLengthExpression(posNode.right, eqNode.right)) ||
+ (negativeIndexSupported &&
+ posNode.type === experimental_utils_1.AST_NODE_TYPES.UnaryExpression &&
+ posNode.operator === '-' &&
+ isLengthExpression(posNode.argument, eqNode.right));
+ if (!posNodeIsAbsolutelyValid) {
+ return null;
+ }
+ }
+ return fixWithRightOperand(fixer, parentNode, isStartsWith ? 'start' : 'end', parentNode.operator.startsWith('!'), node.optional);
+ },
+ });
+ },
+ // /^bar/.test(foo)
+ // /bar$/.test(foo)
+ 'CallExpression > MemberExpression.callee[property.name="test"][computed=false]'(node) {
+ const callNode = getParent(node);
+ const parsed = callNode.arguments.length === 1 ? parseRegExp(node.object) : null;
+ if (parsed == null) {
+ return;
+ }
+ const { isStartsWith, text } = parsed;
+ const messageId = isStartsWith ? 'preferStartsWith' : 'preferEndsWith';
+ const methodName = isStartsWith ? 'startsWith' : 'endsWith';
+ context.report({
+ node: callNode,
+ messageId,
+ *fix(fixer) {
+ const argNode = callNode.arguments[0];
+ const needsParen = argNode.type !== experimental_utils_1.AST_NODE_TYPES.Literal &&
+ argNode.type !== experimental_utils_1.AST_NODE_TYPES.TemplateLiteral &&
+ argNode.type !== experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ argNode.type !== experimental_utils_1.AST_NODE_TYPES.MemberExpression &&
+ argNode.type !== experimental_utils_1.AST_NODE_TYPES.CallExpression;
+ yield fixer.removeRange([callNode.range[0], argNode.range[0]]);
+ if (needsParen) {
+ yield fixer.insertTextBefore(argNode, '(');
+ yield fixer.insertTextAfter(argNode, ')');
+ }
+ yield fixer.insertTextAfter(argNode, `${node.optional ? '?.' : '.'}${methodName}(${JSON.stringify(text)}`);
+ },
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-string-starts-ends-with.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js.map
new file mode 100644
index 000000000..55dc08b9e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-string-starts-ends-with.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-string-starts-ends-with.js","sourceRoot":"","sources":["../../src/rules/prefer-string-starts-ends-with.ts"],"names":[],"mappings":";;AAAA,8EAI+C;AAC/C,qCAAyD;AACzD,kCASiB;AAEjB,MAAM,YAAY,GAAG,QAAQ,CAAC;AAC9B,MAAM,OAAO,GAAG,IAAI,sBAAY,EAAE,CAAC;AAEnC,kBAAe,iBAAU,CAAC;IACxB,IAAI,EAAE,gCAAgC;IACtC,cAAc,EAAE,EAAE;IAElB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,yHAAyH;YAC3H,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,gBAAgB,EAAE,yCAAyC;YAC3D,cAAc,EAAE,2CAA2C;SAC5D;QACD,MAAM,EAAE,EAAE;QACV,OAAO,EAAE,MAAM;KAChB;IAED,MAAM,CAAC,OAAO;QACZ,MAAM,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvC,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3C,MAAM,OAAO,GAAG,wBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAErD;;;WAGG;QACH,SAAS,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AAC,OAAO,EAAE,GAAG,CAAC,CAAC;yBAC3C;wBACD,MAAM,KAAK,CAAC,eAAe,CACzB,OAAO,EACP,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,UAAU,IAAI,IAAI,CAAC,SAAS,CAC1D,IAAI,CACL,EAAE,CACJ,CAAC;oBACJ,CAAC;iBACF,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js
new file mode 100644
index 000000000..c0179f850
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js
@@ -0,0 +1,62 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'prefer-ts-expect-error',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Recommends using `// @ts-expect-error` over `// @ts-ignore`',
+ category: 'Best Practices',
+ recommended: false,
+ },
+ fixable: 'code',
+ messages: {
+ preferExpectErrorComment: 'Use "// @ts-expect-error" to ensure an error is actually being suppressed.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const tsIgnoreRegExp = /^\/*\s*@ts-ignore/;
+ const sourceCode = context.getSourceCode();
+ return {
+ Program() {
+ const comments = sourceCode.getAllComments();
+ comments.forEach(comment => {
+ if (comment.type !== experimental_utils_1.AST_TOKEN_TYPES.Line) {
+ return;
+ }
+ if (tsIgnoreRegExp.test(comment.value)) {
+ context.report({
+ node: comment,
+ messageId: 'preferExpectErrorComment',
+ fix: fixer => fixer.replaceText(comment, `//${comment.value.replace('@ts-ignore', '@ts-expect-error')}`),
+ });
+ }
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=prefer-ts-expect-error.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js.map
new file mode 100644
index 000000000..3b812041e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/prefer-ts-expect-error.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"prefer-ts-expect-error.js","sourceRoot":"","sources":["../../src/rules/prefer-ts-expect-error.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAAwE;AACxE,8CAAgC;AAIhC,kBAAe,IAAI,CAAC,UAAU,CAAiB;IAC7C,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,6DAA6D;YAC/D,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;SACnB;QACD,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE;YACR,wBAAwB,EACtB,4EAA4E;SAC/E;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,cAAc,GAAG,mBAAmB,CAAC;QAC3C,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C,OAAO;YACL,OAAO;gBACL,MAAM,QAAQ,GAAG,UAAU,CAAC,cAAc,EAAE,CAAC;gBAE7C,QAAQ,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;oBACzB,IAAI,OAAO,CAAC,IAAI,KAAK,oCAAe,CAAC,IAAI,EAAE;wBACzC,OAAO;qBACR;oBAED,IAAI,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;wBACtC,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI,EAAE,OAAO;4BACb,SAAS,EAAE,0BAA0B;4BACrC,GAAG,EAAE,KAAK,CAAC,EAAE,CACX,KAAK,CAAC,WAAW,CACf,OAAO,EACP,KAAK,OAAO,CAAC,KAAK,CAAC,OAAO,CACxB,YAAY,EACZ,kBAAkB,CACnB,EAAE,CACJ;yBACJ,CAAC,CAAC;qBACJ;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js
new file mode 100644
index 000000000..b216a9c5e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js
@@ -0,0 +1,133 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'promise-function-async',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Requires any function or method that returns a Promise to be marked async',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ messages: {
+ missingAsync: 'Functions that return promises must be async.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowAny: {
+ type: 'boolean',
+ },
+ allowedPromiseNames: {
+ type: 'array',
+ items: {
+ type: 'string',
+ },
+ },
+ checkArrowFunctions: {
+ type: 'boolean',
+ },
+ checkFunctionDeclarations: {
+ type: 'boolean',
+ },
+ checkFunctionExpressions: {
+ type: 'boolean',
+ },
+ checkMethodDeclarations: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ allowAny: true,
+ allowedPromiseNames: [],
+ checkArrowFunctions: true,
+ checkFunctionDeclarations: true,
+ checkFunctionExpressions: true,
+ checkMethodDeclarations: true,
+ },
+ ],
+ create(context, [{ allowAny, allowedPromiseNames, checkArrowFunctions, checkFunctionDeclarations, checkFunctionExpressions, checkMethodDeclarations, },]) {
+ const allAllowedPromiseNames = new Set([
+ 'Promise',
+ ...allowedPromiseNames,
+ ]);
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ function validateNode(node) {
+ const originalNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const signatures = checker
+ .getTypeAtLocation(originalNode)
+ .getCallSignatures();
+ if (!signatures.length) {
+ return;
+ }
+ const returnType = checker.getReturnTypeOfSignature(signatures[0]);
+ if (!util.containsAllTypesByName(returnType, allowAny, allAllowedPromiseNames)) {
+ return;
+ }
+ if (node.parent &&
+ (node.parent.type === experimental_utils_1.AST_NODE_TYPES.Property ||
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.MethodDefinition) &&
+ (node.parent.kind === 'get' || node.parent.kind === 'set')) {
+ return;
+ }
+ context.report({
+ messageId: 'missingAsync',
+ node,
+ });
+ }
+ return {
+ 'ArrowFunctionExpression[async = false]'(node) {
+ if (checkArrowFunctions) {
+ validateNode(node);
+ }
+ },
+ 'FunctionDeclaration[async = false]'(node) {
+ if (checkFunctionDeclarations) {
+ validateNode(node);
+ }
+ },
+ 'FunctionExpression[async = false]'(node) {
+ if (node.parent &&
+ 'kind' in node.parent &&
+ node.parent.kind === 'method') {
+ if (checkMethodDeclarations) {
+ validateNode(node.parent);
+ }
+ }
+ else if (checkFunctionExpressions) {
+ validateNode(node);
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=promise-function-async.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map
new file mode 100644
index 000000000..bfd56d5d9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/promise-function-async.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"promise-function-async.js","sourceRoot":"","sources":["../../src/rules/promise-function-async.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAchC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,2EAA2E;YAC7E,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,oBAAoB,E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AAI,CAAC,CAAC;iBACpB;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/quotes.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/quotes.js
new file mode 100644
index 000000000..17e820c1a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/quotes.js
@@ -0,0 +1,86 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const quotes_1 = __importDefault(require("eslint/lib/rules/quotes"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'quotes',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Enforce the consistent use of either backticks, double, or single quotes',
+ category: 'Stylistic Issues',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ fixable: 'code',
+ messages: (_a = quotes_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ wrongQuotes: 'Strings must use {{description}}.',
+ },
+ schema: quotes_1.default.meta.schema,
+ },
+ defaultOptions: [
+ 'double',
+ {
+ allowTemplateLiterals: false,
+ avoidEscape: false,
+ },
+ ],
+ create(context, [option]) {
+ const rules = quotes_1.default.create(context);
+ function isAllowedAsNonBacktick(node) {
+ const parent = node.parent;
+ switch (parent === null || parent === void 0 ? void 0 : parent.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition:
+ case experimental_utils_1.AST_NODE_TYPES.TSMethodSignature:
+ case experimental_utils_1.AST_NODE_TYPES.TSPropertySignature:
+ case experimental_utils_1.AST_NODE_TYPES.TSModuleDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.TSLiteralType:
+ case experimental_utils_1.AST_NODE_TYPES.TSExternalModuleReference:
+ return true;
+ case experimental_utils_1.AST_NODE_TYPES.TSEnumMember:
+ return node === parent.id;
+ case experimental_utils_1.AST_NODE_TYPES.TSAbstractClassProperty:
+ case experimental_utils_1.AST_NODE_TYPES.ClassProperty:
+ return node === parent.key;
+ default:
+ return false;
+ }
+ }
+ return {
+ Literal(node) {
+ if (option === 'backtick' && isAllowedAsNonBacktick(node)) {
+ return;
+ }
+ rules.Literal(node);
+ },
+ TemplateLiteral(node) {
+ rules.TemplateLiteral(node);
+ },
+ };
+ },
+});
+//# sourceMappingURL=quotes.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/quotes.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/quotes.js.map
new file mode 100644
index 000000000..de3a0e5dc
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/quotes.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"quotes.js","sourceRoot":"","sources":["../../src/rules/quotes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,qEAA+C;AAC/C,8CAAgC;AAKhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE;QACJ,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BACV,IAAI,MAAM,KAAK,UAAU,IAAI,sBAAsB,CAAC,IAAI,CAAC,EAAE;oBACzD,OAAO;iBACR;gBAED,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC;YAED,eAAe,CAAC,IAAI;gBAClB,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;YAC9B,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js
new file mode 100644
index 000000000..e71e0d511
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js
@@ -0,0 +1,81 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'require-array-sort-compare',
+ defaultOptions: [
+ {
+ ignoreStringArrays: false,
+ },
+ ],
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Requires `Array#sort` calls to always provide a `compareFunction`',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ messages: {
+ requireCompare: "Require 'compare' argument.",
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ ignoreStringArrays: {
+ type: 'boolean',
+ },
+ },
+ },
+ ],
+ },
+ create(context, [options]) {
+ const service = util.getParserServices(context);
+ const checker = service.program.getTypeChecker();
+ /**
+ * Check if a given node is an array which all elements are string.
+ * @param node
+ */
+ function isStringArrayNode(node) {
+ const type = checker.getTypeAtLocation(service.esTreeNodeToTSNodeMap.get(node));
+ if (checker.isArrayType(type) || checker.isTupleType(type)) {
+ const typeArgs = checker.getTypeArguments(type);
+ return typeArgs.every(arg => util.getTypeName(checker, arg) === 'string');
+ }
+ return false;
+ }
+ return {
+ "CallExpression[arguments.length=0] > MemberExpression[property.name='sort'][computed=false]"(callee) {
+ const tsNode = service.esTreeNodeToTSNodeMap.get(callee.object);
+ const calleeObjType = util.getConstrainedTypeAtLocation(checker, tsNode);
+ if (options.ignoreStringArrays && isStringArrayNode(callee.object)) {
+ return;
+ }
+ if (util.isTypeArrayTypeOrUnionOfArrayTypes(calleeObjType, checker)) {
+ context.report({ node: callee.parent, messageId: 'requireCompare' });
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=require-array-sort-compare.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map
new file mode 100644
index 000000000..1a04cc46e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-array-sort-compare.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"require-array-sort-compare.js","sourceRoot":"","sources":["../../src/rules/require-array-sort-compare.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,8CAAgC;AAShC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,4BAA4B;IAClC,cAAc,EAAE;QACd;YACE,kBAAkB,EAAE,KAAK;SAC1B;KACF;IAED,IAA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MAAM,CACP,CAAC;gBAEF,IAAI,OAAO,CAAC,kBAAkB,IAAI,iBAAiB,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE;oBAClE,OAAO;iBACR;gBAED,IAAI,IAAI,CAAC,kCAAkC,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE;oBACnE,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC;iBACvE;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js
new file mode 100644
index 000000000..3bdbc095a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js
@@ -0,0 +1,193 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const tsutils = __importStar(require("tsutils"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'require-await',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Disallow async functions which have no `await` expression',
+ category: 'Best Practices',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ extendsBaseRule: true,
+ },
+ schema: [],
+ messages: {
+ missingAwait: "{{name}} has no 'await' expression.",
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ const sourceCode = context.getSourceCode();
+ let scopeInfo = null;
+ /**
+ * Push the scope info object to the stack.
+ */
+ function enterFunction(node) {
+ scopeInfo = {
+ upper: scopeInfo,
+ hasAwait: false,
+ hasAsync: node.async,
+ isGen: node.generator || false,
+ isAsyncYield: false,
+ };
+ }
+ /**
+ * Pop the top scope info object from the stack.
+ * Also, it reports the function if needed.
+ */
+ function exitFunction(node) {
+ /* istanbul ignore if */ if (!scopeInfo) {
+ // this shouldn't ever happen, as we have to exit a function after we enter it
+ return;
+ }
+ if (node.async &&
+ !scopeInfo.hasAwait &&
+ !isEmptyFunction(node) &&
+ !(scopeInfo.isGen && scopeInfo.isAsyncYield)) {
+ context.report({
+ node,
+ loc: getFunctionHeadLoc(node, sourceCode),
+ messageId: 'missingAwait',
+ data: {
+ name: util.upperCaseFirst(util.getFunctionNameWithKind(node)),
+ },
+ });
+ }
+ scopeInfo = scopeInfo.upper;
+ }
+ /**
+ * Checks if the node returns a thenable type
+ */
+ function isThenableType(node) {
+ const type = checker.getTypeAtLocation(node);
+ return tsutils.isThenableType(checker, node, type);
+ }
+ /**
+ * Marks the current scope as having an await
+ */
+ function markAsHasAwait() {
+ if (!scopeInfo) {
+ return;
+ }
+ scopeInfo.hasAwait = true;
+ }
+ /**
+ * mark `scopeInfo.isAsyncYield` to `true` if its a generator
+ * function and the delegate is `true`
+ */
+ function markAsHasDelegateGen(node) {
+ var _a;
+ if (!scopeInfo || !scopeInfo.isGen || !node.argument) {
+ return;
+ }
+ if (((_a = node === null || node === void 0 ? void 0 : node.argument) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.Literal) {
+ // making this `false` as for literals we don't need to check the definition
+ // eg : async function* run() { yield* 1 }
+ scopeInfo.isAsyncYield = false;
+ }
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node === null || node === void 0 ? void 0 : node.argument);
+ const type = checker.getTypeAtLocation(tsNode);
+ const symbol = type.getSymbol();
+ // async function* test1() {yield* asyncGenerator() }
+ if ((symbol === null || symbol === void 0 ? void 0 : symbol.getName()) === 'AsyncGenerator') {
+ scopeInfo.isAsyncYield = true;
+ }
+ }
+ return {
+ FunctionDeclaration: enterFunction,
+ FunctionExpression: enterFunction,
+ ArrowFunctionExpression: enterFunction,
+ 'FunctionDeclaration:exit': exitFunction,
+ 'FunctionExpression:exit': exitFunction,
+ 'ArrowFunctionExpression:exit': exitFunction,
+ AwaitExpression: markAsHasAwait,
+ 'ForOfStatement[await = true]': markAsHasAwait,
+ 'YieldExpression[delegate = true]': markAsHasDelegateGen,
+ // check body-less async arrow function.
+ // ignore `async () => await foo` because it's obviously correct
+ 'ArrowFunctionExpression[async = true] > :not(BlockStatement, AwaitExpression)'(node) {
+ const expression = parserServices.esTreeNodeToTSNodeMap.get(node);
+ if (expression && isThenableType(expression)) {
+ markAsHasAwait();
+ }
+ },
+ ReturnStatement(node) {
+ // short circuit early to avoid unnecessary type checks
+ if (!scopeInfo || scopeInfo.hasAwait || !scopeInfo.hasAsync) {
+ return;
+ }
+ const { expression } = parserServices.esTreeNodeToTSNodeMap.get(node);
+ if (expression && isThenableType(expression)) {
+ markAsHasAwait();
+ }
+ },
+ };
+ },
+});
+function isEmptyFunction(node) {
+ var _a;
+ return (((_a = node.body) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.BlockStatement &&
+ node.body.body.length === 0);
+}
+// https://github.com/eslint/eslint/blob/03a69dbe86d5b5768a310105416ae726822e3c1c/lib/rules/utils/ast-utils.js#L382-L392
+/**
+ * Gets the `(` token of the given function node.
+ */
+function getOpeningParenOfParams(node, sourceCode) {
+ return util.nullThrows(node.id
+ ? sourceCode.getTokenAfter(node.id, util.isOpeningParenToken)
+ : sourceCode.getFirstToken(node, util.isOpeningParenToken), util.NullThrowsReasons.MissingToken('(', node.type));
+}
+// https://github.com/eslint/eslint/blob/03a69dbe86d5b5768a310105416ae726822e3c1c/lib/rules/utils/ast-utils.js#L1220-L1242
+/**
+ * Gets the location of the given function node for reporting.
+ */
+function getFunctionHeadLoc(node, sourceCode) {
+ const parent = util.nullThrows(node.parent, util.NullThrowsReasons.MissingParent);
+ let start = null;
+ let end = null;
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression) {
+ const arrowToken = util.nullThrows(sourceCode.getTokenBefore(node.body, util.isArrowToken), util.NullThrowsReasons.MissingToken('=>', node.type));
+ start = arrowToken.loc.start;
+ end = arrowToken.loc.end;
+ }
+ else if (parent.type === experimental_utils_1.AST_NODE_TYPES.Property ||
+ parent.type === experimental_utils_1.AST_NODE_TYPES.MethodDefinition) {
+ start = parent.loc.start;
+ end = getOpeningParenOfParams(node, sourceCode).loc.start;
+ }
+ else {
+ start = node.loc.start;
+ end = getOpeningParenOfParams(node, sourceCode).loc.start;
+ }
+ return {
+ start,
+ end,
+ };
+}
+//# sourceMappingURL=require-await.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js.map
new file mode 100644
index 000000000..bab6931d7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/require-await.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"require-await.js","sourceRoot":"","sources":["../../src/rules/require-await.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,iDAAmC;AAEnC,8CAAgC;AAchC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,eAAe;IACrB,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EA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AAE,UAAU,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC;KAC3D;IAED,OAAO;QACL,KAAK;QACL,GAAG;KACJ,CAAC;AACJ,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js
new file mode 100644
index 000000000..aa2ba0742
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js
@@ -0,0 +1,130 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'restrict-plus-operands',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'When adding two variables, operands must both be of type number or of type string',
+ category: 'Best Practices',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ notNumbers: "Operands of '+' operation must either be both strings or both numbers.",
+ notStrings: "Operands of '+' operation must either be both strings or both numbers. Consider using a template literal.",
+ notBigInts: "Operands of '+' operation must be both bigints.",
+ },
+ schema: [
+ {
+ type: 'object',
+ additionalProperties: false,
+ properties: {
+ checkCompoundAssignments: {
+ type: 'boolean',
+ },
+ },
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ checkCompoundAssignments: false,
+ },
+ ],
+ create(context, [{ checkCompoundAssignments }]) {
+ const service = util.getParserServices(context);
+ const typeChecker = service.program.getTypeChecker();
+ /**
+ * Helper function to get base type of node
+ */
+ function getBaseTypeOfLiteralType(type) {
+ if (type.isNumberLiteral()) {
+ return 'number';
+ }
+ if (type.isStringLiteral()) {
+ return 'string';
+ }
+ // is BigIntLiteral
+ if (type.flags & ts.TypeFlags.BigIntLiteral) {
+ return 'bigint';
+ }
+ if (type.isUnion()) {
+ const types = type.types.map(getBaseTypeOfLiteralType);
+ return types.every(value => value === types[0]) ? types[0] : 'invalid';
+ }
+ const stringType = typeChecker.typeToString(type);
+ if (stringType === 'number' ||
+ stringType === 'string' ||
+ stringType === 'bigint') {
+ return stringType;
+ }
+ return 'invalid';
+ }
+ /**
+ * Helper function to get base type of node
+ * @param node the node to be evaluated.
+ */
+ function getNodeType(node) {
+ const tsNode = service.esTreeNodeToTSNodeMap.get(node);
+ const type = util.getConstrainedTypeAtLocation(typeChecker, tsNode);
+ return getBaseTypeOfLiteralType(type);
+ }
+ function checkPlusOperands(node) {
+ const leftType = getNodeType(node.left);
+ const rightType = getNodeType(node.right);
+ if (leftType === 'invalid' ||
+ rightType === 'invalid' ||
+ leftType !== rightType) {
+ if (leftType === 'string' || rightType === 'string') {
+ context.report({
+ node,
+ messageId: 'notStrings',
+ });
+ }
+ else if (leftType === 'bigint' || rightType === 'bigint') {
+ context.report({
+ node,
+ messageId: 'notBigInts',
+ });
+ }
+ else {
+ context.report({
+ node,
+ messageId: 'notNumbers',
+ });
+ }
+ }
+ }
+ return {
+ "BinaryExpression[operator='+']": checkPlusOperands,
+ "AssignmentExpression[operator='+=']"(node) {
+ if (checkCompoundAssignments) {
+ checkPlusOperands(node);
+ }
+ },
+ };
+ },
+});
+//# sourceMappingURL=restrict-plus-operands.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js.map
new file mode 100644
index 000000000..df5c3ce75
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-plus-operands.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"restrict-plus-operands.js","sourceRoot":"","sources":["../../src/rules/restrict-plus-operands.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,+CAAiC;AACjC,8CAAgC;AAShC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EACT,mFAAmF;YACrF,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,UAAU,EACR,wEAAwE;YAC1E,UAAU,EACR,2GAA2G;YAC7G,UAAU,EAAE,iDAAiD;SAC9D;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,oBAAoB,EAAE,KAAK;gBAC3B,UAAU,EAAE;oBACV,wBAAwB,EAAE;wBACxB,IAAI,EAAE,SAAS;qBAChB;iBACF;aACF;SACF;KACF;IACD,cAAc,EAAE;QACd;YACE,wBAAwB,EAAE,KAAK;SAChC;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,wBAAwB,EAAE,CAAC;QAC5C,MAAM,OAAO,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAChD,MAAM,WAAW,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QAIrD;;WAEG;QACH,SAAS,wBAAwB,CAAC,IAAa;YAC7C,IAAI,IAAI,CAAC,eAAe,EAAE,EAAE;gBAC1B,OAAO,QAAQ,CAAC;aACjB;YACD,IAA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ACA,IAAI,QAAQ,KAAK,QAAQ,IAAI,SAAS,KAAK,QAAQ,EAAE;oBACnD,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,YAAY;qBACxB,CAAC,CAAC;iBACJ;qBAAM,IAAI,QAAQ,KAAK,QAAQ,IAAI,SAAS,KAAK,QAAQ,EAAE;oBAC1D,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,YAAY;qBACxB,CAAC,CAAC;iBACJ;qBAAM;oBACL,OAAO,CAAC,MAAM,CAAC;wBACb,IAAI;wBACJ,SAAS,EAAE,YAAY;qBACxB,CAAC,CAAC;iBACJ;aACF;QACH,CAAC;QAED,OAAO;YACL,gCAAgC,EAAE,iBAAiB;YACnD,qCAAqC,CAAC,IAAI;gBACxC,IAAI,wBAAwB,EAAE;oBAC5B,iBAAiB,CAAC,IAAI,CAAC,CAAC;iBACzB;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js
new file mode 100644
index 000000000..e72f79197
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js
@@ -0,0 +1,111 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'restrict-template-expressions',
+ meta: {
+ type: 'problem',
+ docs: {
+ description: 'Enforce template literal expressions to be of string type',
+ category: 'Best Practices',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ invalidType: 'Invalid type "{{type}}" of template literal expression.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowNumber: { type: 'boolean' },
+ allowBoolean: { type: 'boolean' },
+ allowAny: { type: 'boolean' },
+ allowNullish: { type: 'boolean' },
+ },
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ allowNumber: true,
+ },
+ ],
+ create(context, [options]) {
+ const service = util.getParserServices(context);
+ const typeChecker = service.program.getTypeChecker();
+ function isUnderlyingTypePrimitive(type) {
+ if (util.isTypeFlagSet(type, ts.TypeFlags.StringLike)) {
+ return true;
+ }
+ if (options.allowNumber &&
+ util.isTypeFlagSet(type, ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike)) {
+ return true;
+ }
+ if (options.allowBoolean &&
+ util.isTypeFlagSet(type, ts.TypeFlags.BooleanLike)) {
+ return true;
+ }
+ if (options.allowAny && util.isTypeAnyType(type)) {
+ return true;
+ }
+ if (options.allowNullish &&
+ util.isTypeFlagSet(type, ts.TypeFlags.Null | ts.TypeFlags.Undefined)) {
+ return true;
+ }
+ return false;
+ }
+ return {
+ TemplateLiteral(node) {
+ // don't check tagged template literals
+ if (node.parent.type === experimental_utils_1.AST_NODE_TYPES.TaggedTemplateExpression) {
+ return;
+ }
+ for (const expression of node.expressions) {
+ const expressionType = util.getConstrainedTypeAtLocation(typeChecker, service.esTreeNodeToTSNodeMap.get(expression));
+ if (!isInnerUnionOrIntersectionConformingTo(expressionType, isUnderlyingTypePrimitive)) {
+ context.report({
+ node: expression,
+ messageId: 'invalidType',
+ data: { type: typeChecker.typeToString(expressionType) },
+ });
+ }
+ }
+ },
+ };
+ function isInnerUnionOrIntersectionConformingTo(type, predicate) {
+ return rec(type);
+ function rec(innerType) {
+ if (innerType.isUnion()) {
+ return innerType.types.every(rec);
+ }
+ if (innerType.isIntersection()) {
+ return innerType.types.some(rec);
+ }
+ return predicate(innerType);
+ }
+ }
+ },
+});
+//# sourceMappingURL=restrict-template-expressions.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map
new file mode 100644
index 000000000..2e5170559
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/restrict-template-expressions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"restrict-template-expressions.js","sourceRoot":"","sources":["../../src/rules/restrict-template-expressions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,+CAAiC;AACjC,8CAAgC;AAahC,kBAAe,IAAI,CAAC,UAAU,CAAqB;IACjD,IAAI,EAAE,+BAA+B;IACrC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,2DAA2D;YACxE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;YACpB,oBAAoB,EAAE,IAAI;SAC3B;QACD,QAAQ,EAAE;YACR,WAAW,EAAE,yDAAyD;SACvE;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBAChC,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBACjC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE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oBACjE,OAAO;iBACR;gBAED,KAAK,MAAM,UAAU,IAAI,IAAI,CAAC,WAAW,EAAE;oBACzC,MAAM,cAAc,GAAG,IAAI,CAAC,4BAA4B,CACtD,WAAW,EACX,OAAO,CAAC,qBAAqB,CAAC,GAAG,CAAC,UAAU,CAAC,CAC9C,CAAC;oBAEF,IACE,CAAC,sCAAsC,CACrC,cAAc,EACd,yBAAyB,CAC1B,EACD;wBACA,OAAO,CAAC,MAAM,CAAC;4BACb,IAAI,EAAE,UAAU;4BAChB,SAAS,EAAE,aAAa;4BACxB,IAAI,EAAE,EAAE,IAAI,EAAE,WAAW,CAAC,YAAY,CAAC,cAAc,CAAC,EAAE;yBACzD,CAAC,CAAC;qBACJ;iBACF;YACH,CAAC;SACF,CAAC;QAEF,SAAS,sCAAsC,CAC7C,IAAa,EACb,SAA+C;YAE/C,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;YAEjB,SAAS,GAAG,CAAC,SAAkB;gBAC7B,IAAI,SAAS,CAAC,OAAO,EAAE,EAAE;oBACvB,OAAO,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;iBACnC;gBAED,IAAI,SAAS,CAAC,cAAc,EAAE,EAAE;oBAC9B,OAAO,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;iBAClC;gBAED,OAAO,SAAS,CAAC,SAAS,CAAC,CAAC;YAC9B,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js
new file mode 100644
index 000000000..578f2f2ae
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js
@@ -0,0 +1,190 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const tsutils = __importStar(require("tsutils"));
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'return-await',
+ meta: {
+ docs: {
+ description: 'Enforces consistent returning of awaited values',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ extendsBaseRule: 'no-return-await',
+ },
+ fixable: 'code',
+ type: 'problem',
+ messages: {
+ nonPromiseAwait: 'Returning an awaited value that is not a promise is not allowed.',
+ disallowedPromiseAwait: 'Returning an awaited promise is not allowed in this context.',
+ requiredPromiseAwait: 'Returning an awaited promise is required in this context.',
+ },
+ schema: [
+ {
+ enum: ['in-try-catch', 'always', 'never'],
+ },
+ ],
+ },
+ defaultOptions: ['in-try-catch'],
+ create(context, [option]) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ const sourceCode = context.getSourceCode();
+ let scopeInfo = null;
+ function enterFunction(node) {
+ scopeInfo = {
+ hasAsync: node.async,
+ };
+ }
+ function inTryCatch(node) {
+ let ancestor = node.parent;
+ while (ancestor && !ts.isFunctionLike(ancestor)) {
+ if (tsutils.isTryStatement(ancestor) ||
+ tsutils.isCatchClause(ancestor)) {
+ return true;
+ }
+ ancestor = ancestor.parent;
+ }
+ return false;
+ }
+ // function findTokensToRemove()
+ function removeAwait(fixer, node) {
+ // Should always be an await node; but let's be safe.
+ /* istanbul ignore if */ if (!util.isAwaitExpression(node)) {
+ return null;
+ }
+ const awaitToken = sourceCode.getFirstToken(node, util.isAwaitKeyword);
+ // Should always be the case; but let's be safe.
+ /* istanbul ignore if */ if (!awaitToken) {
+ return null;
+ }
+ const startAt = awaitToken.range[0];
+ let endAt = awaitToken.range[1];
+ // Also remove any extraneous whitespace after `await`, if there is any.
+ const nextToken = sourceCode.getTokenAfter(awaitToken, {
+ includeComments: true,
+ });
+ if (nextToken) {
+ endAt = nextToken.range[0];
+ }
+ return fixer.removeRange([startAt, endAt]);
+ }
+ function insertAwait(fixer, node) {
+ return fixer.insertTextBefore(node, 'await ');
+ }
+ function test(node, expression) {
+ let child;
+ const isAwait = tsutils.isAwaitExpression(expression);
+ if (isAwait) {
+ child = expression.getChildAt(1);
+ }
+ else {
+ child = expression;
+ }
+ const type = checker.getTypeAtLocation(child);
+ const isThenable = tsutils.isThenableType(checker, expression, type);
+ if (!isAwait && !isThenable) {
+ return;
+ }
+ if (isAwait && !isThenable) {
+ context.report({
+ messageId: 'nonPromiseAwait',
+ node,
+ fix: fixer => removeAwait(fixer, node),
+ });
+ return;
+ }
+ if (option === 'always') {
+ if (!isAwait && isThenable) {
+ context.report({
+ messageId: 'requiredPromiseAwait',
+ node,
+ fix: fixer => insertAwait(fixer, node),
+ });
+ }
+ return;
+ }
+ if (option === 'never') {
+ if (isAwait) {
+ context.report({
+ messageId: 'disallowedPromiseAwait',
+ node,
+ fix: fixer => removeAwait(fixer, node),
+ });
+ }
+ return;
+ }
+ if (option === 'in-try-catch') {
+ const isInTryCatch = inTryCatch(expression);
+ if (isAwait && !isInTryCatch) {
+ context.report({
+ messageId: 'disallowedPromiseAwait',
+ node,
+ fix: fixer => removeAwait(fixer, node),
+ });
+ }
+ else if (!isAwait && isInTryCatch) {
+ context.report({
+ messageId: 'requiredPromiseAwait',
+ node,
+ fix: fixer => insertAwait(fixer, node),
+ });
+ }
+ return;
+ }
+ }
+ function findPossiblyReturnedNodes(node) {
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.ConditionalExpression) {
+ return [
+ ...findPossiblyReturnedNodes(node.alternate),
+ ...findPossiblyReturnedNodes(node.consequent),
+ ];
+ }
+ return [node];
+ }
+ return {
+ FunctionDeclaration: enterFunction,
+ FunctionExpression: enterFunction,
+ ArrowFunctionExpression: enterFunction,
+ 'ArrowFunctionExpression[async = true]:exit'(node) {
+ if (node.body.type !== experimental_utils_1.AST_NODE_TYPES.BlockStatement) {
+ findPossiblyReturnedNodes(node.body).forEach(node => {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ test(node, tsNode);
+ });
+ }
+ },
+ ReturnStatement(node) {
+ if (!scopeInfo || !scopeInfo.hasAsync || !node.argument) {
+ return;
+ }
+ findPossiblyReturnedNodes(node.argument).forEach(node => {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ test(node, tsNode);
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=return-await.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js.map
new file mode 100644
index 000000000..311a5366a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/return-await.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"return-await.js","sourceRoot":"","sources":["../../src/rules/return-await.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,iDAAmC;AACnC,+CAAiC;AACjC,8CAAgC;AAWhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,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AC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js
new file mode 100644
index 000000000..7e2ccde16
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js
@@ -0,0 +1,84 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+var _a;
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const semi_1 = __importDefault(require("eslint/lib/rules/semi"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'semi',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Require or disallow semicolons instead of ASI',
+ category: 'Stylistic Issues',
+ // too opinionated to be recommended
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ fixable: 'code',
+ schema: semi_1.default.meta.schema,
+ messages: (_a = semi_1.default.meta.messages) !== null && _a !== void 0 ? _a : {
+ missingSemi: 'Missing semicolon.',
+ extraSemi: 'Extra semicolon.',
+ },
+ },
+ defaultOptions: [
+ 'always',
+ {
+ omitLastInOneLineBlock: false,
+ beforeStatementContinuationChars: 'any',
+ },
+ ],
+ create(context) {
+ const rules = semi_1.default.create(context);
+ const checkForSemicolon = rules.ExpressionStatement;
+ /*
+ The following nodes are handled by the member-delimiter-style rule
+ AST_NODE_TYPES.TSCallSignatureDeclaration,
+ AST_NODE_TYPES.TSConstructSignatureDeclaration,
+ AST_NODE_TYPES.TSIndexSignature,
+ AST_NODE_TYPES.TSMethodSignature,
+ AST_NODE_TYPES.TSPropertySignature,
+ */
+ const nodesToCheck = [
+ experimental_utils_1.AST_NODE_TYPES.ClassProperty,
+ experimental_utils_1.AST_NODE_TYPES.TSAbstractClassProperty,
+ experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition,
+ experimental_utils_1.AST_NODE_TYPES.TSDeclareFunction,
+ experimental_utils_1.AST_NODE_TYPES.TSExportAssignment,
+ experimental_utils_1.AST_NODE_TYPES.TSImportEqualsDeclaration,
+ experimental_utils_1.AST_NODE_TYPES.TSTypeAliasDeclaration,
+ ].reduce((acc, node) => {
+ acc[node] = checkForSemicolon;
+ return acc;
+ }, {});
+ return Object.assign(Object.assign(Object.assign({}, rules), nodesToCheck), { ExportDefaultDeclaration(node) {
+ if (node.declaration.type !== experimental_utils_1.AST_NODE_TYPES.TSInterfaceDeclaration) {
+ rules.ExportDefaultDeclaration(node);
+ }
+ } });
+ },
+});
+//# sourceMappingURL=semi.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js.map
new file mode 100644
index 000000000..5c2e0f7f7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/semi.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"semi.js","sourceRoot":"","sources":["../../src/rules/semi.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8EAI+C;AAC/C,iEA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BAAsB,EAAE;oBACnE,KAAK,CAAC,wBAAwB,CAAC,IAAI,CAAC,CAAC;iBACtC;YACH,CAAC,IACD;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js
new file mode 100644
index 000000000..3d9772307
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js
@@ -0,0 +1,158 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'space-before-function-paren',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Enforces consistent spacing before function parenthesis',
+ category: 'Stylistic Issues',
+ recommended: false,
+ extendsBaseRule: true,
+ },
+ fixable: 'whitespace',
+ schema: [
+ {
+ oneOf: [
+ {
+ enum: ['always', 'never'],
+ },
+ {
+ type: 'object',
+ properties: {
+ anonymous: {
+ enum: ['always', 'never', 'ignore'],
+ },
+ named: {
+ enum: ['always', 'never', 'ignore'],
+ },
+ asyncArrow: {
+ enum: ['always', 'never', 'ignore'],
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ ],
+ messages: {
+ unexpected: 'Unexpected space before function parentheses.',
+ missing: 'Missing space before function parentheses.',
+ },
+ },
+ defaultOptions: ['always'],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const baseConfig = typeof context.options[0] === 'string' ? context.options[0] : 'always';
+ const overrideConfig = typeof context.options[0] === 'object' ? context.options[0] : {};
+ /**
+ * Determines whether a function has a name.
+ * @param {ASTNode} node The function node.
+ * @returns {boolean} Whether the function has a name.
+ */
+ function isNamedFunction(node) {
+ if (node.id != null) {
+ return true;
+ }
+ const parent = node.parent;
+ return (parent.type === experimental_utils_1.AST_NODE_TYPES.MethodDefinition ||
+ parent.type === experimental_utils_1.AST_NODE_TYPES.TSAbstractMethodDefinition ||
+ (parent.type === experimental_utils_1.AST_NODE_TYPES.Property &&
+ (parent.kind === 'get' || parent.kind === 'set' || parent.method)));
+ }
+ /**
+ * Gets the config for a given function
+ * @param {ASTNode} node The function node
+ * @returns {string} "always", "never", or "ignore"
+ */
+ function getConfigForFunction(node) {
+ var _a, _b, _c;
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression) {
+ // Always ignore non-async functions and arrow functions without parens, e.g. async foo => bar
+ if (node.async &&
+ util.isOpeningParenToken(sourceCode.getFirstToken(node, { skip: 1 }))) {
+ return (_a = overrideConfig.asyncArrow) !== null && _a !== void 0 ? _a : baseConfig;
+ }
+ }
+ else if (isNamedFunction(node)) {
+ return (_b = overrideConfig.named) !== null && _b !== void 0 ? _b : baseConfig;
+ // `generator-star-spacing` should warn anonymous generators. E.g. `function* () {}`
+ }
+ else if (!node.generator) {
+ return (_c = overrideConfig.anonymous) !== null && _c !== void 0 ? _c : baseConfig;
+ }
+ return 'ignore';
+ }
+ /**
+ * Checks the parens of a function node
+ * @param {ASTNode} node A function node
+ * @returns {void}
+ */
+ function checkFunction(node) {
+ const functionConfig = getConfigForFunction(node);
+ if (functionConfig === 'ignore') {
+ return;
+ }
+ let leftToken, rightToken;
+ if (node.typeParameters) {
+ leftToken = sourceCode.getLastToken(node.typeParameters);
+ rightToken = sourceCode.getTokenAfter(leftToken);
+ }
+ else {
+ rightToken = sourceCode.getFirstToken(node, util.isOpeningParenToken);
+ leftToken = sourceCode.getTokenBefore(rightToken);
+ }
+ const hasSpacing = sourceCode.isSpaceBetweenTokens(leftToken, rightToken);
+ if (hasSpacing && functionConfig === 'never') {
+ context.report({
+ node,
+ loc: {
+ start: leftToken.loc.end,
+ end: rightToken.loc.start,
+ },
+ messageId: 'unexpected',
+ fix: fixer => fixer.removeRange([leftToken.range[1], rightToken.range[0]]),
+ });
+ }
+ else if (!hasSpacing &&
+ functionConfig === 'always' &&
+ (!node.typeParameters || node.id)) {
+ context.report({
+ node,
+ loc: rightToken.loc,
+ messageId: 'missing',
+ fix: fixer => fixer.insertTextAfter(leftToken, ' '),
+ });
+ }
+ }
+ return {
+ ArrowFunctionExpression: checkFunction,
+ FunctionDeclaration: checkFunction,
+ FunctionExpression: checkFunction,
+ TSEmptyBodyFunctionExpression: checkFunction,
+ TSDeclareFunction: checkFunction,
+ };
+ },
+});
+//# sourceMappingURL=space-before-function-paren.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js.map
new file mode 100644
index 000000000..4f69e1993
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/space-before-function-paren.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"space-before-function-paren.js","sourceRoot":"","sources":["../../src/rules/space-before-function-paren.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAehC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE;QACJ,IAAI,EAAE,QA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,aAAa;YAClC,kBAAkB,EAAE,aAAa;YACjC,6BAA6B,EAAE,aAAa;YAC5C,iBAAiB,EAAE,aAAa;SACjC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js
new file mode 100644
index 000000000..3f2454c2a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js
@@ -0,0 +1,265 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const ts = __importStar(require("typescript"));
+const tsutils = __importStar(require("tsutils"));
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'strict-boolean-expressions',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Restricts the types allowed in boolean expressions',
+ category: 'Best Practices',
+ recommended: false,
+ requiresTypeChecking: true,
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ allowString: { type: 'boolean' },
+ allowNumber: { type: 'boolean' },
+ allowNullableObject: { type: 'boolean' },
+ allowNullableBoolean: { type: 'boolean' },
+ allowNullableString: { type: 'boolean' },
+ allowNullableNumber: { type: 'boolean' },
+ allowAny: { type: 'boolean' },
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ messages: {
+ conditionErrorOther: 'Unexpected value in conditional. ' +
+ 'A boolean expression is required.',
+ conditionErrorAny: 'Unexpected any value in conditional. ' +
+ 'An explicit comparison or type cast is required.',
+ conditionErrorNullish: 'Unexpected nullish value in conditional. ' +
+ 'The condition is always false.',
+ conditionErrorNullableBoolean: 'Unexpected nullable boolean value in conditional. ' +
+ 'Please handle the nullish case explicitly.',
+ conditionErrorString: 'Unexpected string value in conditional. ' +
+ 'An explicit empty string check is required.',
+ conditionErrorNullableString: 'Unexpected nullable string value in conditional. ' +
+ 'Please handle the nullish/empty cases explicitly.',
+ conditionErrorNumber: 'Unexpected number value in conditional. ' +
+ 'An explicit zero/NaN check is required.',
+ conditionErrorNullableNumber: 'Unexpected nullable number value in conditional. ' +
+ 'Please handle the nullish/zero/NaN cases explicitly.',
+ conditionErrorObject: 'Unexpected object value in conditional. ' +
+ 'The condition is always true.',
+ conditionErrorNullableObject: 'Unexpected nullable object value in conditional. ' +
+ 'An explicit null check is required.',
+ noStrictNullCheck: 'This rule requires the `strictNullChecks` compiler option to be turned on to function correctly.',
+ },
+ },
+ defaultOptions: [
+ {
+ allowString: true,
+ allowNumber: true,
+ allowNullableObject: true,
+ allowNullableBoolean: false,
+ allowNullableString: false,
+ allowNullableNumber: false,
+ allowAny: false,
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
+ },
+ ],
+ create(context, [options]) {
+ const service = util.getParserServices(context);
+ const checker = service.program.getTypeChecker();
+ const compilerOptions = service.program.getCompilerOptions();
+ const isStrictNullChecks = tsutils.isStrictCompilerOptionEnabled(compilerOptions, 'strictNullChecks');
+ if (!isStrictNullChecks &&
+ options.allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing !== true) {
+ context.report({
+ loc: {
+ start: { line: 0, column: 0 },
+ end: { line: 0, column: 0 },
+ },
+ messageId: 'noStrictNullCheck',
+ });
+ }
+ const checkedNodes = new Set();
+ return {
+ ConditionalExpression: checkTestExpression,
+ DoWhileStatement: checkTestExpression,
+ ForStatement: checkTestExpression,
+ IfStatement: checkTestExpression,
+ WhileStatement: checkTestExpression,
+ 'LogicalExpression[operator!="??"]': checkNode,
+ 'UnaryExpression[operator="!"]': checkUnaryLogicalExpression,
+ };
+ function checkTestExpression(node) {
+ if (node.test == null) {
+ return;
+ }
+ checkNode(node.test, true);
+ }
+ function checkUnaryLogicalExpression(node) {
+ checkNode(node.argument, true);
+ }
+ /**
+ * This function analyzes the type of a node and checks if it is allowed in a boolean context.
+ * It can recurse when checking nested logical operators, so that only the outermost operands are reported.
+ * The right operand of a logical expression is ignored unless it's a part of a test expression (if/while/ternary/etc).
+ * @param node The AST node to check.
+ * @param isTestExpr Whether the node is a descendant of a test expression.
+ */
+ function checkNode(node, isTestExpr = false) {
+ // prevent checking the same node multiple times
+ if (checkedNodes.has(node)) {
+ return;
+ }
+ checkedNodes.add(node);
+ // for logical operator, we check its operands
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.LogicalExpression &&
+ node.operator !== '??') {
+ checkNode(node.left, isTestExpr);
+ // we ignore the right operand when not in a context of a test expression
+ if (isTestExpr) {
+ checkNode(node.right, isTestExpr);
+ }
+ return;
+ }
+ const tsNode = service.esTreeNodeToTSNodeMap.get(node);
+ const type = util.getConstrainedTypeAtLocation(checker, tsNode);
+ const types = inspectVariantTypes(tsutils.unionTypeParts(type));
+ const is = (...wantedTypes) => types.size === wantedTypes.length &&
+ wantedTypes.every(type => types.has(type));
+ // boolean
+ if (is('boolean')) {
+ // boolean is always okay
+ return;
+ }
+ // never
+ if (is('never')) {
+ // never is always okay
+ return;
+ }
+ // nullish
+ if (is('nullish')) {
+ // condition is always false
+ context.report({ node, messageId: 'conditionErrorNullish' });
+ return;
+ }
+ // nullable boolean
+ if (is('nullish', 'boolean')) {
+ if (!options.allowNullableBoolean) {
+ context.report({ node, messageId: 'conditionErrorNullableBoolean' });
+ }
+ return;
+ }
+ // string
+ if (is('string')) {
+ if (!options.allowString) {
+ context.report({ node, messageId: 'conditionErrorString' });
+ }
+ return;
+ }
+ // nullable string
+ if (is('nullish', 'string')) {
+ if (!options.allowNullableString) {
+ context.report({ node, messageId: 'conditionErrorNullableString' });
+ }
+ return;
+ }
+ // number
+ if (is('number')) {
+ if (!options.allowNumber) {
+ context.report({ node, messageId: 'conditionErrorNumber' });
+ }
+ return;
+ }
+ // nullable number
+ if (is('nullish', 'number')) {
+ if (!options.allowNullableNumber) {
+ context.report({ node, messageId: 'conditionErrorNullableNumber' });
+ }
+ return;
+ }
+ // object
+ if (is('object')) {
+ // condition is always true
+ context.report({ node, messageId: 'conditionErrorObject' });
+ return;
+ }
+ // nullable object
+ if (is('nullish', 'object')) {
+ if (!options.allowNullableObject) {
+ context.report({ node, messageId: 'conditionErrorNullableObject' });
+ }
+ return;
+ }
+ // any
+ if (is('any')) {
+ if (!options.allowAny) {
+ context.report({ node, messageId: 'conditionErrorAny' });
+ }
+ return;
+ }
+ // other
+ context.report({ node, messageId: 'conditionErrorOther' });
+ }
+ /**
+ * Check union variants for the types we care about
+ */
+ function inspectVariantTypes(types) {
+ const variantTypes = new Set();
+ if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.Null | ts.TypeFlags.Undefined | ts.TypeFlags.VoidLike))) {
+ variantTypes.add('nullish');
+ }
+ if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.BooleanLike))) {
+ variantTypes.add('boolean');
+ }
+ if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.StringLike))) {
+ variantTypes.add('string');
+ }
+ if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.NumberLike | ts.TypeFlags.BigIntLike))) {
+ variantTypes.add('number');
+ }
+ if (types.some(type => !tsutils.isTypeFlagSet(type, ts.TypeFlags.Null |
+ ts.TypeFlags.Undefined |
+ ts.TypeFlags.VoidLike |
+ ts.TypeFlags.BooleanLike |
+ ts.TypeFlags.StringLike |
+ ts.TypeFlags.NumberLike |
+ ts.TypeFlags.BigIntLike |
+ ts.TypeFlags.Any |
+ ts.TypeFlags.Unknown |
+ ts.TypeFlags.Never))) {
+ variantTypes.add('object');
+ }
+ if (types.some(type => util.isTypeAnyType(type) || util.isTypeUnknownType(type))) {
+ variantTypes.add('any');
+ }
+ if (types.some(type => tsutils.isTypeFlagSet(type, ts.TypeFlags.Never))) {
+ variantTypes.add('never');
+ }
+ return variantTypes;
+ }
+ },
+});
+//# sourceMappingURL=strict-boolean-expressions.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js.map
new file mode 100644
index 000000000..0c4d8dfb5
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/strict-boolean-expressions.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"strict-boolean-expressions.js","sourceRoot":"","sources":["../../src/rules/strict-boolean-expressions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,+CAAiC;AACjC,iDAAmC;AACnC,8CAAgC;AA4BhC,kBAAe,IAAI,CAAC,UAAU,CAAqB;IACjD,IAAI,EAAE,4BAA4B;IAClC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,oDAAoD;YACjE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,oBAAoB,EAAE,IAAI;SAC3B;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,WAAW,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBAChC,W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AAG,CAAC,OAAO,CAAC,CAAC;aAC3B;YAED,OAAO,YAAY,CAAC;QACtB,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js
new file mode 100644
index 000000000..92ea5fa38
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js
@@ -0,0 +1,158 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const ts = __importStar(require("typescript"));
+const util_1 = require("../util");
+const tsutils_1 = require("tsutils");
+exports.default = util_1.createRule({
+ name: 'switch-exhaustiveness-check',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Exhaustiveness checking in switch with union type',
+ category: 'Best Practices',
+ recommended: false,
+ suggestion: true,
+ requiresTypeChecking: true,
+ },
+ schema: [],
+ messages: {
+ switchIsNotExhaustive: 'Switch is not exhaustive. Cases not matched: {{missingBranches}}',
+ addMissingCases: 'Add branches for missing cases.',
+ },
+ },
+ defaultOptions: [],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ const service = util_1.getParserServices(context);
+ const checker = service.program.getTypeChecker();
+ const compilerOptions = service.program.getCompilerOptions();
+ function requiresQuoting(name) {
+ if (name.length === 0) {
+ return true;
+ }
+ if (!ts.isIdentifierStart(name.charCodeAt(0), compilerOptions.target)) {
+ return true;
+ }
+ for (let i = 1; i < name.length; i += 1) {
+ if (!ts.isIdentifierPart(name.charCodeAt(i), compilerOptions.target)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ function getNodeType(node) {
+ const tsNode = service.esTreeNodeToTSNodeMap.get(node);
+ return util_1.getConstrainedTypeAtLocation(checker, tsNode);
+ }
+ function fixSwitch(fixer, node, missingBranchTypes, symbolName) {
+ var _a;
+ const lastCase = node.cases.length > 0 ? node.cases[node.cases.length - 1] : null;
+ const caseIndent = lastCase
+ ? ' '.repeat(lastCase.loc.start.column)
+ : // if there are no cases, use indentation of the switch statement
+ // and leave it to user to format it correctly
+ ' '.repeat(node.loc.start.column);
+ const missingCases = [];
+ for (const missingBranchType of missingBranchTypes) {
+ // While running this rule on checker.ts of TypeScript project
+ // the fix introduced a compiler error due to:
+ //
+ // type __String = (string & {
+ // __escapedIdentifier: void;
+ // }) | (void & {
+ // __escapedIdentifier: void;
+ // }) | InternalSymbolName;
+ //
+ // The following check fixes it.
+ if (missingBranchType.isIntersection()) {
+ continue;
+ }
+ const missingBranchName = (_a = missingBranchType.getSymbol()) === null || _a === void 0 ? void 0 : _a.escapedName;
+ let caseTest = checker.typeToString(missingBranchType);
+ if (symbolName &&
+ (missingBranchName || missingBranchName === '') &&
+ requiresQuoting(missingBranchName.toString())) {
+ caseTest = `${symbolName}['${missingBranchName}']`;
+ }
+ const errorMessage = `Not implemented yet: ${caseTest} case`;
+ missingCases.push(`case ${caseTest}: { throw new Error('${errorMessage}') }`);
+ }
+ const fixString = missingCases
+ .map(code => `${caseIndent}${code}`)
+ .join('\n');
+ if (lastCase) {
+ return fixer.insertTextAfter(lastCase, `\n${fixString}`);
+ }
+ // there were no existing cases
+ const openingBrace = sourceCode.getTokenAfter(node.discriminant, util_1.isOpeningBraceToken);
+ const closingBrace = sourceCode.getTokenAfter(node.discriminant, util_1.isClosingBraceToken);
+ return fixer.replaceTextRange([openingBrace.range[0], closingBrace.range[1]], ['{', fixString, `${caseIndent}}`].join('\n'));
+ }
+ function checkSwitchExhaustive(node) {
+ var _a;
+ const discriminantType = getNodeType(node.discriminant);
+ const symbolName = (_a = discriminantType.getSymbol()) === null || _a === void 0 ? void 0 : _a.escapedName;
+ if (discriminantType.isUnion()) {
+ const unionTypes = tsutils_1.unionTypeParts(discriminantType);
+ const caseTypes = new Set();
+ for (const switchCase of node.cases) {
+ if (switchCase.test === null) {
+ // Switch has 'default' branch - do nothing.
+ return;
+ }
+ caseTypes.add(getNodeType(switchCase.test));
+ }
+ const missingBranchTypes = unionTypes.filter(unionType => !caseTypes.has(unionType));
+ if (missingBranchTypes.length === 0) {
+ // All cases matched - do nothing.
+ return;
+ }
+ context.report({
+ node: node.discriminant,
+ messageId: 'switchIsNotExhaustive',
+ data: {
+ missingBranches: missingBranchTypes
+ .map(missingType => {
+ var _a;
+ return tsutils_1.isTypeFlagSet(missingType, ts.TypeFlags.ESSymbolLike)
+ ? `typeof ${(_a = missingType.getSymbol()) === null || _a === void 0 ? void 0 : _a.escapedName}`
+ : checker.typeToString(missingType);
+ })
+ .join(' | '),
+ },
+ suggest: [
+ {
+ messageId: 'addMissingCases',
+ fix(fixer) {
+ return fixSwitch(fixer, node, missingBranchTypes, symbolName === null || symbolName === void 0 ? void 0 : symbolName.toString());
+ },
+ },
+ ],
+ });
+ }
+ }
+ return {
+ SwitchStatement: checkSwitchExhaustive,
+ };
+ },
+});
+//# sourceMappingURL=switch-exhaustiveness-check.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map
new file mode 100644
index 000000000..0a8b9daf6
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/switch-exhaustiveness-check.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"switch-exhaustiveness-check.js","sourceRoot":"","sources":["../../src/rules/switch-exhaustiveness-check.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA,+CAAiC;AACjC,kCAMiB;AACjB,qCAAwD;AAExD,kBAAe,iBAAU,CAAC;IACxB,IAAI,EAAE,6BAA6B;IACnC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,mDAAmD;YAChE,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,IAAI;YAChB,oBAAoB,EAAE,IAAI;SAC3B;QACD,MAAM,EAAE,EAAE;QACV,QAAQ,EAAE;YACR,qBAAqB,EACnB,kEAAkE;YACpE,eAAe,EAAE,iCAAiC;SACnD;KACF;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3C,MAAM,OAAO,GAAG,wBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,CAAC;QACjD,MAAM,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,kBAAkB,EAAE,CAAC;QAE7D,SAAS,eAAe,CAAC,IAAY;YACnC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;gBACrB,OAAO,IAAI,CAAC;aACb;YAED,IAAI,CAAC,EAAE,CAAC,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,EAAE;gBACrE,OAAO,IAAI,CAAC;aACb;YAED,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,E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,EACL,IAAI,EACJ,kBAAkB,EAClB,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,GACrB,CAAC;4BACJ,CAAC;yBACF;qBACF;iBACF,CAAC,CAAC;aACJ;QACH,CAAC;QAED,OAAO;YACL,eAAe,EAAE,qBAAqB;SACvC,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js
new file mode 100644
index 000000000..943df2eb8
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js
@@ -0,0 +1,125 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'triple-slash-reference',
+ meta: {
+ type: 'suggestion',
+ docs: {
+ description: 'Sets preference level for triple slash directives versus ES6-style import declarations',
+ category: 'Best Practices',
+ recommended: 'error',
+ },
+ messages: {
+ tripleSlashReference: 'Do not use a triple slash reference for {{module}}, use `import` style instead.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ lib: {
+ enum: ['always', 'never'],
+ },
+ path: {
+ enum: ['always', 'never'],
+ },
+ types: {
+ enum: ['always', 'never', 'prefer-import'],
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ {
+ lib: 'always',
+ path: 'never',
+ types: 'prefer-import',
+ },
+ ],
+ create(context, [{ lib, path, types }]) {
+ let programNode;
+ const sourceCode = context.getSourceCode();
+ const references = [];
+ function hasMatchingReference(source) {
+ references.forEach(reference => {
+ if (reference.importName === source.value) {
+ context.report({
+ node: reference.comment,
+ messageId: 'tripleSlashReference',
+ data: {
+ module: reference.importName,
+ },
+ });
+ }
+ });
+ }
+ return {
+ ImportDeclaration(node) {
+ if (programNode) {
+ hasMatchingReference(node.source);
+ }
+ },
+ TSImportEqualsDeclaration(node) {
+ if (programNode) {
+ const source = node.moduleReference
+ .expression;
+ hasMatchingReference(source);
+ }
+ },
+ Program(node) {
+ if (lib === 'always' && path === 'always' && types == 'always') {
+ return;
+ }
+ programNode = node;
+ const referenceRegExp = /^\/\s* {
+ if (comment.type !== experimental_utils_1.AST_TOKEN_TYPES.Line) {
+ return;
+ }
+ const referenceResult = referenceRegExp.exec(comment.value);
+ if (referenceResult) {
+ if ((referenceResult[1] === 'types' && types === 'never') ||
+ (referenceResult[1] === 'path' && path === 'never') ||
+ (referenceResult[1] === 'lib' && lib === 'never')) {
+ context.report({
+ node: comment,
+ messageId: 'tripleSlashReference',
+ data: {
+ module: referenceResult[2],
+ },
+ });
+ return;
+ }
+ if (referenceResult[1] === 'types' && types === 'prefer-import') {
+ references.push({ comment, importName: referenceResult[2] });
+ }
+ }
+ });
+ },
+ };
+ },
+});
+//# sourceMappingURL=triple-slash-reference.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js.map
new file mode 100644
index 000000000..3efae8a3f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/triple-slash-reference.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"triple-slash-reference.js","sourceRoot":"","sources":["../../src/rules/triple-slash-reference.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAWhC,kBAAe,IAAI,CAAC,UAAU,CAAsB;IAClD,IAAI,EAAE,wBAAwB;IAC9B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EACT,wFAAwF;YAC1F,QAAQ,EAAE,gBAAgB;YAC1B,WAAW,EAAE,OAAO;SACrB;QACD,QAAQ,EAAE;YACR,oBAAoB,EAClB,iFAAiF;SACpF;QACD,MAAM,EAAE;YACN;gBACE,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,GAAG,EAAE;wBACH,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;qBAC1B;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;qBAC1B;oBACD,KAAK,EAAE;wBACL,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,eAAe,CAAC;qBAC3C;iBACF;gBACD,oBAAoB,EAAE,KAAK;aAC5B;SACF;KACF;IACD,cAAc,EAAE;QACd;YACE,GAAG,EAAE,QAAQ;YACb,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,eAAe;SACvB;KACF;IACD,MAAM,CAAC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;QACpC,IAAI,WAA0B,CAAC;QAC/B,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAC3C,MAAM,UAAU,GAGV,EAAE,CAAC;QAET,SAAS,oBAAoB,CAAC,MAAwB;YACpD,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAC7B,IAAI,SAAS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,CAAC;4BACnD,CAAC,eAAe,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,OAAO,CAAC,EACjD;4BACA,OAAO,CAAC,MAAM,CAAC;gCACb,IAAI,EAAE,OAAO;gCACb,SAAS,EAAE,sBAAsB;gCACjC,IAAI,EAAE;oCACJ,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC;iCAC3B;6BACF,CAAC,CAAC;4BACH,OAAO;yBACR;wBACD,IAAI,eAAe,CAAC,CAAC,CAAC,KAAK,OAAO,IAAI,KAAK,KAAK,eAAe,EAAE;4BAC/D,UAAU,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;yBAC9D;qBACF;gBACH,CAAC,CAAC,CAAC;YACL,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js
new file mode 100644
index 000000000..fc017d7a9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js
@@ -0,0 +1,221 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const util = __importStar(require("../util"));
+const util_1 = require("../util");
+const definition = {
+ type: 'object',
+ properties: {
+ before: { type: 'boolean' },
+ after: { type: 'boolean' },
+ },
+ additionalProperties: false,
+};
+function createRules(options) {
+ var _a;
+ const globals = Object.assign(Object.assign({}, ((options === null || options === void 0 ? void 0 : options.before) !== undefined ? { before: options.before } : {})), ((options === null || options === void 0 ? void 0 : options.after) !== undefined ? { after: options.after } : {}));
+ const override = (_a = options === null || options === void 0 ? void 0 : options.overrides) !== null && _a !== void 0 ? _a : {};
+ const colon = Object.assign(Object.assign({ before: false, after: true }, globals), override === null || override === void 0 ? void 0 : override.colon);
+ const arrow = Object.assign(Object.assign({ before: true, after: true }, globals), override === null || override === void 0 ? void 0 : override.arrow);
+ return {
+ colon: colon,
+ arrow: arrow,
+ variable: Object.assign(Object.assign({}, colon), override === null || override === void 0 ? void 0 : override.variable),
+ property: Object.assign(Object.assign({}, colon), override === null || override === void 0 ? void 0 : override.property),
+ parameter: Object.assign(Object.assign({}, colon), override === null || override === void 0 ? void 0 : override.parameter),
+ returnType: Object.assign(Object.assign({}, colon), override === null || override === void 0 ? void 0 : override.returnType),
+ };
+}
+function getIdentifierRules(rules, node) {
+ const scope = node === null || node === void 0 ? void 0 : node.parent;
+ if (util_1.isVariableDeclarator(scope)) {
+ return rules.variable;
+ }
+ else if (util_1.isFunctionOrFunctionType(scope)) {
+ return rules.parameter;
+ }
+ else {
+ return rules.colon;
+ }
+}
+function getRules(rules, node) {
+ var _a;
+ const scope = (_a = node === null || node === void 0 ? void 0 : node.parent) === null || _a === void 0 ? void 0 : _a.parent;
+ if (util_1.isTSFunctionType(scope) || util_1.isTSConstructorType(scope)) {
+ return rules.arrow;
+ }
+ else if (util_1.isIdentifier(scope)) {
+ return getIdentifierRules(rules, scope);
+ }
+ else if (util_1.isClassOrTypeElement(scope)) {
+ return rules.property;
+ }
+ else if (util_1.isFunction(scope)) {
+ return rules.returnType;
+ }
+ else {
+ return rules.colon;
+ }
+}
+exports.default = util.createRule({
+ name: 'type-annotation-spacing',
+ meta: {
+ type: 'layout',
+ docs: {
+ description: 'Require consistent spacing around type annotations',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ fixable: 'whitespace',
+ messages: {
+ expectedSpaceAfter: "Expected a space after the '{{type}}'.",
+ expectedSpaceBefore: "Expected a space before the '{{type}}'.",
+ unexpectedSpaceAfter: "Unexpected space after the '{{type}}'.",
+ unexpectedSpaceBefore: "Unexpected space before the '{{type}}'.",
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ before: { type: 'boolean' },
+ after: { type: 'boolean' },
+ overrides: {
+ type: 'object',
+ properties: {
+ colon: definition,
+ arrow: definition,
+ variable: definition,
+ parameter: definition,
+ property: definition,
+ returnType: definition,
+ },
+ additionalProperties: false,
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ },
+ defaultOptions: [
+ // technically there is a default, but the overrides mean
+ // that if we apply them here, it will break the no override case.
+ {},
+ ],
+ create(context, [options]) {
+ const punctuators = [':', '=>'];
+ const sourceCode = context.getSourceCode();
+ const ruleSet = createRules(options);
+ /**
+ * Checks if there's proper spacing around type annotations (no space
+ * before colon, one space after).
+ */
+ function checkTypeAnnotationSpacing(typeAnnotation) {
+ const nextToken = typeAnnotation;
+ const punctuatorTokenEnd = sourceCode.getTokenBefore(nextToken);
+ let punctuatorTokenStart = punctuatorTokenEnd;
+ let previousToken = sourceCode.getTokenBefore(punctuatorTokenEnd);
+ let type = punctuatorTokenEnd.value;
+ if (!punctuators.includes(type)) {
+ return;
+ }
+ const { before, after } = getRules(ruleSet, typeAnnotation);
+ if (type === ':' && previousToken.value === '?') {
+ // shift the start to the ?
+ type = '?:';
+ punctuatorTokenStart = previousToken;
+ previousToken = sourceCode.getTokenBefore(previousToken);
+ // handle the +/- modifiers for optional modification operators
+ if (previousToken.value === '+' || previousToken.value === '-') {
+ type = `${previousToken.value}?:`;
+ punctuatorTokenStart = previousToken;
+ previousToken = sourceCode.getTokenBefore(previousToken);
+ }
+ }
+ const previousDelta = punctuatorTokenStart.range[0] - previousToken.range[1];
+ const nextDelta = nextToken.range[0] - punctuatorTokenEnd.range[1];
+ if (after && nextDelta === 0) {
+ context.report({
+ node: punctuatorTokenEnd,
+ messageId: 'expectedSpaceAfter',
+ data: {
+ type,
+ },
+ fix(fixer) {
+ return fixer.insertTextAfter(punctuatorTokenEnd, ' ');
+ },
+ });
+ }
+ else if (!after && nextDelta > 0) {
+ context.report({
+ node: punctuatorTokenEnd,
+ messageId: 'unexpectedSpaceAfter',
+ data: {
+ type,
+ },
+ fix(fixer) {
+ return fixer.removeRange([
+ punctuatorTokenEnd.range[1],
+ nextToken.range[0],
+ ]);
+ },
+ });
+ }
+ if (before && previousDelta === 0) {
+ context.report({
+ node: punctuatorTokenStart,
+ messageId: 'expectedSpaceBefore',
+ data: {
+ type,
+ },
+ fix(fixer) {
+ return fixer.insertTextAfter(previousToken, ' ');
+ },
+ });
+ }
+ else if (!before && previousDelta > 0) {
+ context.report({
+ node: punctuatorTokenStart,
+ messageId: 'unexpectedSpaceBefore',
+ data: {
+ type,
+ },
+ fix(fixer) {
+ return fixer.removeRange([
+ previousToken.range[1],
+ punctuatorTokenStart.range[0],
+ ]);
+ },
+ });
+ }
+ }
+ return {
+ TSMappedType(node) {
+ if (node.typeAnnotation) {
+ checkTypeAnnotationSpacing(node.typeAnnotation);
+ }
+ },
+ TSTypeAnnotation(node) {
+ checkTypeAnnotationSpacing(node.typeAnnotation);
+ },
+ };
+ },
+});
+//# sourceMappingURL=type-annotation-spacing.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js.map
new file mode 100644
index 000000000..fb0086405
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/type-annotation-spacing.js.map
@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CAAC;yBAC9B,CAAC,CAAC;oBACL,CAAC;iBACF,CAAC,CAAC;aACJ;QACH,CAAC;QAED,OAAO;YACL,YAAY,CAAC,IAAI;gBACf,IAAI,IAAI,CAAC,cAAc,EAAE;oBACvB,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;iBACjD;YACH,CAAC;YACD,gBAAgB,CAAC,IAAI;gBACnB,0BAA0B,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;YAClD,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js
new file mode 100644
index 000000000..fb4c63ca4
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js
@@ -0,0 +1,204 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'typedef',
+ meta: {
+ docs: {
+ description: 'Requires type annotations to exist',
+ category: 'Stylistic Issues',
+ recommended: false,
+ },
+ messages: {
+ expectedTypedef: 'Expected a type annotation.',
+ expectedTypedefNamed: 'Expected {{name}} to have a type annotation.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ ["arrayDestructuring" /* ArrayDestructuring */]: { type: 'boolean' },
+ ["arrowParameter" /* ArrowParameter */]: { type: 'boolean' },
+ ["memberVariableDeclaration" /* MemberVariableDeclaration */]: { type: 'boolean' },
+ ["objectDestructuring" /* ObjectDestructuring */]: { type: 'boolean' },
+ ["parameter" /* Parameter */]: { type: 'boolean' },
+ ["propertyDeclaration" /* PropertyDeclaration */]: { type: 'boolean' },
+ ["variableDeclaration" /* VariableDeclaration */]: { type: 'boolean' },
+ ["variableDeclarationIgnoreFunction" /* VariableDeclarationIgnoreFunction */]: { type: 'boolean' },
+ },
+ },
+ ],
+ type: 'suggestion',
+ },
+ defaultOptions: [
+ {
+ ["arrayDestructuring" /* ArrayDestructuring */]: false,
+ ["arrowParameter" /* ArrowParameter */]: false,
+ ["memberVariableDeclaration" /* MemberVariableDeclaration */]: false,
+ ["objectDestructuring" /* ObjectDestructuring */]: false,
+ ["parameter" /* Parameter */]: false,
+ ["propertyDeclaration" /* PropertyDeclaration */]: false,
+ ["variableDeclaration" /* VariableDeclaration */]: false,
+ ["variableDeclarationIgnoreFunction" /* VariableDeclarationIgnoreFunction */]: false,
+ },
+ ],
+ create(context, [options]) {
+ function report(location, name) {
+ context.report({
+ node: location,
+ messageId: name ? 'expectedTypedefNamed' : 'expectedTypedef',
+ data: { name },
+ });
+ }
+ function getNodeName(node) {
+ return node.type === experimental_utils_1.AST_NODE_TYPES.Identifier ? node.name : undefined;
+ }
+ function isForOfStatementContext(node) {
+ let current = node.parent;
+ while (current) {
+ switch (current.type) {
+ case experimental_utils_1.AST_NODE_TYPES.VariableDeclarator:
+ case experimental_utils_1.AST_NODE_TYPES.VariableDeclaration:
+ case experimental_utils_1.AST_NODE_TYPES.ObjectPattern:
+ case experimental_utils_1.AST_NODE_TYPES.ArrayPattern:
+ case experimental_utils_1.AST_NODE_TYPES.Property:
+ current = current.parent;
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.ForOfStatement:
+ return true;
+ default:
+ current = undefined;
+ }
+ }
+ return false;
+ }
+ function checkParameters(params) {
+ for (const param of params) {
+ let annotationNode;
+ switch (param.type) {
+ case experimental_utils_1.AST_NODE_TYPES.AssignmentPattern:
+ annotationNode = param.left;
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.TSParameterProperty:
+ annotationNode = param.parameter;
+ // Check TS parameter property with default value like `constructor(private param: string = 'something') {}`
+ if (annotationNode &&
+ annotationNode.type === experimental_utils_1.AST_NODE_TYPES.AssignmentPattern) {
+ annotationNode = annotationNode.left;
+ }
+ break;
+ default:
+ annotationNode = param;
+ break;
+ }
+ if (annotationNode !== undefined && !annotationNode.typeAnnotation) {
+ report(param, getNodeName(param));
+ }
+ }
+ }
+ function isVariableDeclarationIgnoreFunction(node) {
+ return (!!options["variableDeclarationIgnoreFunction" /* VariableDeclarationIgnoreFunction */] &&
+ (node.type === experimental_utils_1.AST_NODE_TYPES.FunctionExpression ||
+ node.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression));
+ }
+ return {
+ ArrayPattern(node) {
+ var _a;
+ if (((_a = node.parent) === null || _a === void 0 ? void 0 : _a.type) === experimental_utils_1.AST_NODE_TYPES.RestElement &&
+ node.parent.typeAnnotation) {
+ return;
+ }
+ if (options["arrayDestructuring" /* ArrayDestructuring */] &&
+ !node.typeAnnotation &&
+ !isForOfStatementContext(node)) {
+ report(node);
+ }
+ },
+ ArrowFunctionExpression(node) {
+ if (options["arrowParameter" /* ArrowParameter */]) {
+ checkParameters(node.params);
+ }
+ },
+ ClassProperty(node) {
+ if (node.value && isVariableDeclarationIgnoreFunction(node.value)) {
+ return;
+ }
+ if (options["memberVariableDeclaration" /* MemberVariableDeclaration */] &&
+ !node.typeAnnotation) {
+ report(node, node.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier
+ ? node.key.name
+ : undefined);
+ }
+ },
+ 'FunctionDeclaration, FunctionExpression'(node) {
+ if (options["parameter" /* Parameter */]) {
+ checkParameters(node.params);
+ }
+ },
+ ObjectPattern(node) {
+ if (options["objectDestructuring" /* ObjectDestructuring */] &&
+ !node.typeAnnotation &&
+ !isForOfStatementContext(node)) {
+ report(node);
+ }
+ },
+ 'TSIndexSignature, TSPropertySignature'(node) {
+ if (options["propertyDeclaration" /* PropertyDeclaration */] && !node.typeAnnotation) {
+ report(node, node.type === experimental_utils_1.AST_NODE_TYPES.TSPropertySignature
+ ? getNodeName(node.key)
+ : undefined);
+ }
+ },
+ VariableDeclarator(node) {
+ if (!options["variableDeclaration" /* VariableDeclaration */] ||
+ node.id.typeAnnotation ||
+ (node.id.type === experimental_utils_1.AST_NODE_TYPES.ArrayPattern &&
+ !options["arrayDestructuring" /* ArrayDestructuring */]) ||
+ (node.id.type === experimental_utils_1.AST_NODE_TYPES.ObjectPattern &&
+ !options["objectDestructuring" /* ObjectDestructuring */]) ||
+ (node.init && isVariableDeclarationIgnoreFunction(node.init))) {
+ return;
+ }
+ let current = node.parent;
+ while (current) {
+ switch (current.type) {
+ case experimental_utils_1.AST_NODE_TYPES.VariableDeclaration:
+ // Keep looking upwards
+ current = current.parent;
+ break;
+ case experimental_utils_1.AST_NODE_TYPES.ForOfStatement:
+ case experimental_utils_1.AST_NODE_TYPES.ForInStatement:
+ // Stop traversing and don't report an error
+ return;
+ default:
+ // Stop traversing
+ current = undefined;
+ break;
+ }
+ }
+ report(node, getNodeName(node.id));
+ },
+ };
+ },
+});
+//# sourceMappingURL=typedef.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js.map
new file mode 100644
index 000000000..bc2080836
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/typedef.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"typedef.js","sourceRoot":"","sources":["../../src/rules/typed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AI,EAAE;wBACpB,KAAK,mCAAc,CAAC,mBAAmB;4BACrC,uBAAuB;4BACvB,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC;4BACzB,MAAM;wBACR,KAAK,mCAAc,CAAC,cAAc,CAAC;wBACnC,KAAK,mCAAc,CAAC,cAAc;4BAChC,4CAA4C;4BAC5C,OAAO;wBACT;4BACE,kBAAkB;4BAClB,OAAO,GAAG,SAAS,CAAC;4BACpB,MAAM;qBACT;iBACF;gBAED,MAAM,CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;YACrC,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js
new file mode 100644
index 000000000..88777e02a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js
@@ -0,0 +1,258 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const tsutils = __importStar(require("tsutils"));
+const ts = __importStar(require("typescript"));
+const util = __importStar(require("../util"));
+/**
+ * The following is a list of exceptions to the rule
+ * Generated via the following script.
+ * This is statically defined to save making purposely invalid calls every lint run
+ * ```
+SUPPORTED_GLOBALS.flatMap(namespace => {
+ const object = window[namespace];
+ return Object.getOwnPropertyNames(object)
+ .filter(
+ name =>
+ !name.startsWith('_') &&
+ typeof object[name] === 'function',
+ )
+ .map(name => {
+ try {
+ const x = object[name];
+ x();
+ } catch (e) {
+ if (e.message.includes("called on non-object")) {
+ return `${namespace}.${name}`;
+ }
+ }
+ });
+}).filter(Boolean);
+ * ```
+ */
+const nativelyNotBoundMembers = new Set([
+ 'Promise.all',
+ 'Promise.race',
+ 'Promise.resolve',
+ 'Promise.reject',
+ 'Promise.allSettled',
+ 'Object.defineProperties',
+ 'Object.defineProperty',
+ 'Reflect.defineProperty',
+ 'Reflect.deleteProperty',
+ 'Reflect.get',
+ 'Reflect.getOwnPropertyDescriptor',
+ 'Reflect.getPrototypeOf',
+ 'Reflect.has',
+ 'Reflect.isExtensible',
+ 'Reflect.ownKeys',
+ 'Reflect.preventExtensions',
+ 'Reflect.set',
+ 'Reflect.setPrototypeOf',
+]);
+const SUPPORTED_GLOBALS = [
+ 'Number',
+ 'Object',
+ 'String',
+ 'RegExp',
+ 'Symbol',
+ 'Array',
+ 'Proxy',
+ 'Date',
+ 'Infinity',
+ 'Atomics',
+ 'Reflect',
+ 'console',
+ 'Math',
+ 'JSON',
+ 'Intl',
+];
+const nativelyBoundMembers = SUPPORTED_GLOBALS.map(namespace => {
+ if (!(namespace in global)) {
+ // node.js might not have namespaces like Intl depending on compilation options
+ // https://nodejs.org/api/intl.html#intl_options_for_building_node_js
+ return [];
+ }
+ const object = global[namespace];
+ return Object.getOwnPropertyNames(object)
+ .filter(name => !name.startsWith('_') &&
+ typeof object[name] === 'function')
+ .map(name => `${namespace}.${name}`);
+})
+ .reduce((arr, names) => arr.concat(names), [])
+ .filter(name => !nativelyNotBoundMembers.has(name));
+const isNotImported = (symbol, currentSourceFile) => {
+ const { valueDeclaration } = symbol;
+ if (!valueDeclaration) {
+ // working around https://github.com/microsoft/TypeScript/issues/31294
+ return false;
+ }
+ return (!!currentSourceFile &&
+ currentSourceFile !== valueDeclaration.getSourceFile());
+};
+const getNodeName = (node) => node.type === experimental_utils_1.AST_NODE_TYPES.Identifier ? node.name : null;
+const getMemberFullName = (node) => `${getNodeName(node.object)}.${getNodeName(node.property)}`;
+exports.default = util.createRule({
+ name: 'unbound-method',
+ meta: {
+ docs: {
+ category: 'Best Practices',
+ description: 'Enforces unbound methods are called with their expected scope',
+ recommended: 'error',
+ requiresTypeChecking: true,
+ },
+ messages: {
+ unbound: 'Avoid referencing unbound methods which may cause unintentional scoping of `this`.',
+ },
+ schema: [
+ {
+ type: 'object',
+ properties: {
+ ignoreStatic: {
+ type: 'boolean',
+ },
+ },
+ additionalProperties: false,
+ },
+ ],
+ type: 'problem',
+ },
+ defaultOptions: [
+ {
+ ignoreStatic: false,
+ },
+ ],
+ create(context, [{ ignoreStatic }]) {
+ const parserServices = util.getParserServices(context);
+ const checker = parserServices.program.getTypeChecker();
+ const currentSourceFile = parserServices.program.getSourceFile(context.getFilename());
+ return {
+ MemberExpression(node) {
+ if (isSafeUse(node)) {
+ return;
+ }
+ const objectSymbol = checker.getSymbolAtLocation(parserServices.esTreeNodeToTSNodeMap.get(node.object));
+ if (objectSymbol &&
+ nativelyBoundMembers.includes(getMemberFullName(node)) &&
+ isNotImported(objectSymbol, currentSourceFile)) {
+ return;
+ }
+ const originalNode = parserServices.esTreeNodeToTSNodeMap.get(node);
+ const symbol = checker.getSymbolAtLocation(originalNode);
+ if (symbol && isDangerousMethod(symbol, ignoreStatic)) {
+ context.report({
+ messageId: 'unbound',
+ node,
+ });
+ }
+ },
+ 'VariableDeclarator, AssignmentExpression'(node) {
+ const [idNode, initNode] = node.type === experimental_utils_1.AST_NODE_TYPES.VariableDeclarator
+ ? [node.id, node.init]
+ : [node.left, node.right];
+ if (initNode && idNode.type === experimental_utils_1.AST_NODE_TYPES.ObjectPattern) {
+ const tsNode = parserServices.esTreeNodeToTSNodeMap.get(initNode);
+ const rightSymbol = checker.getSymbolAtLocation(tsNode);
+ const initTypes = checker.getTypeAtLocation(tsNode);
+ const notImported = rightSymbol && isNotImported(rightSymbol, currentSourceFile);
+ idNode.properties.forEach(property => {
+ if (property.type === experimental_utils_1.AST_NODE_TYPES.Property &&
+ property.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ if (notImported &&
+ util.isIdentifier(initNode) &&
+ nativelyBoundMembers.includes(`${initNode.name}.${property.key.name}`)) {
+ return;
+ }
+ const symbol = initTypes.getProperty(property.key.name);
+ if (symbol && isDangerousMethod(symbol, ignoreStatic)) {
+ context.report({
+ messageId: 'unbound',
+ node,
+ });
+ }
+ }
+ });
+ }
+ },
+ };
+ },
+});
+function isDangerousMethod(symbol, ignoreStatic) {
+ var _a;
+ const { valueDeclaration } = symbol;
+ if (!valueDeclaration) {
+ // working around https://github.com/microsoft/TypeScript/issues/31294
+ return false;
+ }
+ switch (valueDeclaration.kind) {
+ case ts.SyntaxKind.PropertyDeclaration:
+ return (((_a = valueDeclaration.initializer) === null || _a === void 0 ? void 0 : _a.kind) ===
+ ts.SyntaxKind.FunctionExpression);
+ case ts.SyntaxKind.MethodDeclaration:
+ case ts.SyntaxKind.MethodSignature:
+ return !(ignoreStatic &&
+ tsutils.hasModifier(valueDeclaration.modifiers, ts.SyntaxKind.StaticKeyword));
+ }
+ return false;
+}
+function isSafeUse(node) {
+ const parent = node.parent;
+ switch (parent === null || parent === void 0 ? void 0 : parent.type) {
+ case experimental_utils_1.AST_NODE_TYPES.IfStatement:
+ case experimental_utils_1.AST_NODE_TYPES.ForStatement:
+ case experimental_utils_1.AST_NODE_TYPES.MemberExpression:
+ case experimental_utils_1.AST_NODE_TYPES.SwitchStatement:
+ case experimental_utils_1.AST_NODE_TYPES.UpdateExpression:
+ case experimental_utils_1.AST_NODE_TYPES.WhileStatement:
+ return true;
+ case experimental_utils_1.AST_NODE_TYPES.CallExpression:
+ return parent.callee === node;
+ case experimental_utils_1.AST_NODE_TYPES.ConditionalExpression:
+ return parent.test === node;
+ case experimental_utils_1.AST_NODE_TYPES.TaggedTemplateExpression:
+ return parent.tag === node;
+ case experimental_utils_1.AST_NODE_TYPES.UnaryExpression:
+ // the first case is safe for obvious
+ // reasons. The second one is also fine
+ // since we're returning something falsy
+ return ['typeof', '!', 'void', 'delete'].includes(parent.operator);
+ case experimental_utils_1.AST_NODE_TYPES.BinaryExpression:
+ return ['instanceof', '==', '!=', '===', '!=='].includes(parent.operator);
+ case experimental_utils_1.AST_NODE_TYPES.AssignmentExpression:
+ return parent.operator === '=' && node === parent.left;
+ case experimental_utils_1.AST_NODE_TYPES.ChainExpression:
+ case experimental_utils_1.AST_NODE_TYPES.TSNonNullExpression:
+ case experimental_utils_1.AST_NODE_TYPES.TSAsExpression:
+ case experimental_utils_1.AST_NODE_TYPES.TSTypeAssertion:
+ return isSafeUse(parent);
+ case experimental_utils_1.AST_NODE_TYPES.LogicalExpression:
+ if (parent.operator === '&&' && parent.left === node) {
+ // this is safe, as && will return the left if and only if it's falsy
+ return true;
+ }
+ // in all other cases, it's likely the logical expression will return the method ref
+ // so make sure the parent is a safe usage
+ return isSafeUse(parent);
+ }
+ return false;
+}
+//# sourceMappingURL=unbound-method.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map
new file mode 100644
index 000000000..a42745e42
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unbound-method.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"unbound-method.js","sourceRoot":"","sources":["../../src/rules/unbound-method.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,iDAAmC;AACnC,+CAAiC;AACjC,8CAAgC;AAchC;;;;;;;;;;;;;;;;;;;;;;;;;GA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,GAAG,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAErE,KAAK,mCAAc,CAAC,gBAAgB;YAClC,OAAO,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAE5E,KAAK,mCAAc,CAAC,oBAAoB;YACtC,OAAO,MAAM,CAAC,QAAQ,KAAK,GAAG,IAAI,IAAI,KAAK,MAAM,CAAC,IAAI,CAAC;QAEzD,KAAK,mCAAc,CAAC,eAAe,CAAC;QACpC,KAAK,mCAAc,CAAC,mBAAmB,CAAC;QACxC,KAAK,mCAAc,CAAC,cAAc,CAAC;QACnC,KAAK,mCAAc,CAAC,eAAe;YACjC,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;QAE3B,KAAK,mCAAc,CAAC,iBAAiB;YACnC,IAAI,MAAM,CAAC,QAAQ,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,KAAK,IAAI,EAAE;gBACpD,qEAAqE;gBACrE,OAAO,IAAI,CAAC;aACb;YAED,oFAAoF;YACpF,0CAA0C;YAC1C,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC;KAC5B;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js
new file mode 100644
index 000000000..c20553a4c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js
@@ -0,0 +1,396 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const util = __importStar(require("../util"));
+exports.default = util.createRule({
+ name: 'unified-signatures',
+ meta: {
+ docs: {
+ description: 'Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter',
+ category: 'Variables',
+ // too opinionated to be recommended
+ recommended: false,
+ },
+ type: 'suggestion',
+ messages: {
+ omittingRestParameter: '{{failureStringStart}} with a rest parameter.',
+ omittingSingleParameter: '{{failureStringStart}} with an optional parameter.',
+ singleParameterDifference: '{{failureStringStart}} taking `{{type1}} | {{type2}}`.',
+ },
+ schema: [],
+ },
+ defaultOptions: [],
+ create(context) {
+ const sourceCode = context.getSourceCode();
+ //----------------------------------------------------------------------
+ // Helpers
+ //----------------------------------------------------------------------
+ function failureStringStart(otherLine) {
+ // For only 2 overloads we don't need to specify which is the other one.
+ const overloads = otherLine === undefined
+ ? 'These overloads'
+ : `This overload and the one on line ${otherLine}`;
+ return `${overloads} can be combined into one signature`;
+ }
+ function addFailures(failures) {
+ for (const failure of failures) {
+ const { unify, only2 } = failure;
+ switch (unify.kind) {
+ case 'single-parameter-difference': {
+ const { p0, p1 } = unify;
+ const lineOfOtherOverload = only2 ? undefined : p0.loc.start.line;
+ const typeAnnotation0 = isTSParameterProperty(p0)
+ ? p0.parameter.typeAnnotation
+ : p0.typeAnnotation;
+ const typeAnnotation1 = isTSParameterProperty(p1)
+ ? p1.parameter.typeAnnotation
+ : p1.typeAnnotation;
+ context.report({
+ loc: p1.loc,
+ messageId: 'singleParameterDifference',
+ data: {
+ failureStringStart: failureStringStart(lineOfOtherOverload),
+ type1: sourceCode.getText(typeAnnotation0 === null || typeAnnotation0 === void 0 ? void 0 : typeAnnotation0.typeAnnotation),
+ type2: sourceCode.getText(typeAnnotation1 === null || typeAnnotation1 === void 0 ? void 0 : typeAnnotation1.typeAnnotation),
+ },
+ node: p1,
+ });
+ break;
+ }
+ case 'extra-parameter': {
+ const { extraParameter, otherSignature } = unify;
+ const lineOfOtherOverload = only2
+ ? undefined
+ : otherSignature.loc.start.line;
+ context.report({
+ loc: extraParameter.loc,
+ messageId: extraParameter.type === experimental_utils_1.AST_NODE_TYPES.RestElement
+ ? 'omittingRestParameter'
+ : 'omittingSingleParameter',
+ data: {
+ failureStringStart: failureStringStart(lineOfOtherOverload),
+ },
+ node: extraParameter,
+ });
+ }
+ }
+ }
+ }
+ function checkOverloads(signatures, typeParameters) {
+ const result = [];
+ const isTypeParameter = getIsTypeParameter(typeParameters);
+ for (const overloads of signatures) {
+ if (overloads.length === 2) {
+ const signature0 = overloads[0].value || overloads[0];
+ const signature1 = overloads[1].value || overloads[1];
+ const unify = compareSignatures(signature0, signature1, isTypeParameter);
+ if (unify !== undefined) {
+ result.push({ unify, only2: true });
+ }
+ }
+ else {
+ forEachPair(overloads, (a, b) => {
+ const signature0 = a.value || a;
+ const signature1 = b.value || b;
+ const unify = compareSignatures(signature0, signature1, isTypeParameter);
+ if (unify !== undefined) {
+ result.push({ unify, only2: false });
+ }
+ });
+ }
+ }
+ return result;
+ }
+ function compareSignatures(a, b, isTypeParameter) {
+ if (!signaturesCanBeUnified(a, b, isTypeParameter)) {
+ return undefined;
+ }
+ return a.params.length === b.params.length
+ ? signaturesDifferBySingleParameter(a.params, b.params)
+ : signaturesDifferByOptionalOrRestParameter(a, b);
+ }
+ function signaturesCanBeUnified(a, b, isTypeParameter) {
+ // Must return the same type.
+ const aTypeParams = a.typeParameters !== undefined ? a.typeParameters.params : undefined;
+ const bTypeParams = b.typeParameters !== undefined ? b.typeParameters.params : undefined;
+ return (typesAreEqual(a.returnType, b.returnType) &&
+ // Must take the same type parameters.
+ // If one uses a type parameter (from outside) and the other doesn't, they shouldn't be joined.
+ util.arraysAreEqual(aTypeParams, bTypeParams, typeParametersAreEqual) &&
+ signatureUsesTypeParameter(a, isTypeParameter) ===
+ signatureUsesTypeParameter(b, isTypeParameter));
+ }
+ /** Detect `a(x: number, y: number, z: number)` and `a(x: number, y: string, z: number)`. */
+ function signaturesDifferBySingleParameter(types1, types2) {
+ const index = getIndexOfFirstDifference(types1, types2, parametersAreEqual);
+ if (index === undefined) {
+ return undefined;
+ }
+ // If remaining arrays are equal, the signatures differ by just one parameter type
+ if (!util.arraysAreEqual(types1.slice(index + 1), types2.slice(index + 1), parametersAreEqual)) {
+ return undefined;
+ }
+ const a = types1[index];
+ const b = types2[index];
+ // Can unify `a?: string` and `b?: number`. Can't unify `...args: string[]` and `...args: number[]`.
+ // See https://github.com/Microsoft/TypeScript/issues/5077
+ return parametersHaveEqualSigils(a, b) &&
+ a.type !== experimental_utils_1.AST_NODE_TYPES.RestElement
+ ? { kind: 'single-parameter-difference', p0: a, p1: b }
+ : undefined;
+ }
+ /**
+ * Detect `a(): void` and `a(x: number): void`.
+ * Returns the parameter declaration (`x: number` in this example) that should be optional/rest, and overload it's a part of.
+ */
+ function signaturesDifferByOptionalOrRestParameter(a, b) {
+ const sig1 = a.params;
+ const sig2 = b.params;
+ const minLength = Math.min(sig1.length, sig2.length);
+ const longer = sig1.length < sig2.length ? sig2 : sig1;
+ const shorter = sig1.length < sig2.length ? sig1 : sig2;
+ const shorterSig = sig1.length < sig2.length ? a : b;
+ // If one is has 2+ parameters more than the other, they must all be optional/rest.
+ // Differ by optional parameters: f() and f(x), f() and f(x, ?y, ...z)
+ // Not allowed: f() and f(x, y)
+ for (let i = minLength + 1; i < longer.length; i++) {
+ if (!parameterMayBeMissing(longer[i])) {
+ return undefined;
+ }
+ }
+ for (let i = 0; i < minLength; i++) {
+ const sig1i = sig1[i];
+ const sig2i = sig2[i];
+ const typeAnnotation1 = isTSParameterProperty(sig1i)
+ ? sig1i.parameter.typeAnnotation
+ : sig1i.typeAnnotation;
+ const typeAnnotation2 = isTSParameterProperty(sig2i)
+ ? sig2i.parameter.typeAnnotation
+ : sig2i.typeAnnotation;
+ if (!typesAreEqual(typeAnnotation1, typeAnnotation2)) {
+ return undefined;
+ }
+ }
+ if (minLength > 0 &&
+ shorter[minLength - 1].type === experimental_utils_1.AST_NODE_TYPES.RestElement) {
+ return undefined;
+ }
+ return {
+ extraParameter: longer[longer.length - 1],
+ kind: 'extra-parameter',
+ otherSignature: shorterSig,
+ };
+ }
+ /** Given type parameters, returns a function to test whether a type is one of those parameters. */
+ function getIsTypeParameter(typeParameters) {
+ if (typeParameters === undefined) {
+ return (() => false);
+ }
+ const set = new Set();
+ for (const t of typeParameters.params) {
+ set.add(t.name.name);
+ }
+ return (typeName => set.has(typeName));
+ }
+ /** True if any of the outer type parameters are used in a signature. */
+ function signatureUsesTypeParameter(sig, isTypeParameter) {
+ return sig.params.some((p) => typeContainsTypeParameter(isTSParameterProperty(p)
+ ? p.parameter.typeAnnotation
+ : p.typeAnnotation));
+ function typeContainsTypeParameter(type) {
+ if (!type) {
+ return false;
+ }
+ if (type.type === experimental_utils_1.AST_NODE_TYPES.TSTypeReference) {
+ const typeName = type.typeName;
+ if (isIdentifier(typeName) && isTypeParameter(typeName.name)) {
+ return true;
+ }
+ }
+ return typeContainsTypeParameter(type.typeAnnotation ||
+ type.elementType);
+ }
+ }
+ function isTSParameterProperty(node) {
+ return (node.type ===
+ experimental_utils_1.AST_NODE_TYPES.TSParameterProperty);
+ }
+ function parametersAreEqual(a, b) {
+ const typeAnnotationA = isTSParameterProperty(a)
+ ? a.parameter.typeAnnotation
+ : a.typeAnnotation;
+ const typeAnnotationB = isTSParameterProperty(b)
+ ? b.parameter.typeAnnotation
+ : b.typeAnnotation;
+ return (parametersHaveEqualSigils(a, b) &&
+ typesAreEqual(typeAnnotationA, typeAnnotationB));
+ }
+ /** True for optional/rest parameters. */
+ function parameterMayBeMissing(p) {
+ const optional = isTSParameterProperty(p)
+ ? p.parameter.optional
+ : p.optional;
+ return p.type === experimental_utils_1.AST_NODE_TYPES.RestElement || optional;
+ }
+ /** False if one is optional and the other isn't, or one is a rest parameter and the other isn't. */
+ function parametersHaveEqualSigils(a, b) {
+ const optionalA = isTSParameterProperty(a)
+ ? a.parameter.optional
+ : a.optional;
+ const optionalB = isTSParameterProperty(b)
+ ? b.parameter.optional
+ : b.optional;
+ return ((a.type === experimental_utils_1.AST_NODE_TYPES.RestElement) ===
+ (b.type === experimental_utils_1.AST_NODE_TYPES.RestElement) &&
+ (optionalA !== undefined) === (optionalB !== undefined));
+ }
+ function typeParametersAreEqual(a, b) {
+ return (a.name.name === b.name.name &&
+ constraintsAreEqual(a.constraint, b.constraint));
+ }
+ function typesAreEqual(a, b) {
+ return (a === b ||
+ (a !== undefined &&
+ b !== undefined &&
+ sourceCode.getText(a.typeAnnotation) ===
+ sourceCode.getText(b.typeAnnotation)));
+ }
+ function constraintsAreEqual(a, b) {
+ return (a === b || (a !== undefined && b !== undefined && a.type === b.type));
+ }
+ /* Returns the first index where `a` and `b` differ. */
+ function getIndexOfFirstDifference(a, b, equal) {
+ for (let i = 0; i < a.length && i < b.length; i++) {
+ if (!equal(a[i], b[i])) {
+ return i;
+ }
+ }
+ return undefined;
+ }
+ /** Calls `action` for every pair of values in `values`. */
+ function forEachPair(values, action) {
+ for (let i = 0; i < values.length; i++) {
+ for (let j = i + 1; j < values.length; j++) {
+ action(values[i], values[j]);
+ }
+ }
+ }
+ const scopes = [];
+ let currentScope = {
+ overloads: new Map(),
+ };
+ function createScope(parent, typeParameters) {
+ currentScope && scopes.push(currentScope);
+ currentScope = {
+ overloads: new Map(),
+ parent,
+ typeParameters,
+ };
+ }
+ function checkScope() {
+ const failures = checkOverloads(Array.from(currentScope.overloads.values()), currentScope.typeParameters);
+ addFailures(failures);
+ currentScope = scopes.pop();
+ }
+ function addOverload(signature, key, containingNode) {
+ key = key !== null && key !== void 0 ? key : getOverloadKey(signature);
+ if (currentScope &&
+ (containingNode || signature).parent === currentScope.parent) {
+ const overloads = currentScope.overloads.get(key);
+ if (overloads !== undefined) {
+ overloads.push(signature);
+ }
+ else {
+ currentScope.overloads.set(key, [signature]);
+ }
+ }
+ }
+ //----------------------------------------------------------------------
+ // Public
+ //----------------------------------------------------------------------
+ return {
+ Program: createScope,
+ TSModuleBlock: createScope,
+ TSInterfaceDeclaration(node) {
+ createScope(node.body, node.typeParameters);
+ },
+ ClassDeclaration(node) {
+ createScope(node.body, node.typeParameters);
+ },
+ TSTypeLiteral: createScope,
+ // collect overloads
+ TSDeclareFunction(node) {
+ var _a, _b;
+ const exportingNode = getExportingNode(node);
+ addOverload(node, (_b = (_a = node.id) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : exportingNode === null || exportingNode === void 0 ? void 0 : exportingNode.type, exportingNode);
+ },
+ TSCallSignatureDeclaration: addOverload,
+ TSConstructSignatureDeclaration: addOverload,
+ TSMethodSignature: addOverload,
+ TSAbstractMethodDefinition(node) {
+ if (!node.value.body) {
+ addOverload(node);
+ }
+ },
+ MethodDefinition(node) {
+ if (!node.value.body) {
+ addOverload(node);
+ }
+ },
+ // validate scopes
+ 'Program:exit': checkScope,
+ 'TSModuleBlock:exit': checkScope,
+ 'TSInterfaceDeclaration:exit': checkScope,
+ 'ClassDeclaration:exit': checkScope,
+ 'TSTypeLiteral:exit': checkScope,
+ };
+ },
+});
+function getExportingNode(node) {
+ return node.parent &&
+ (node.parent.type === experimental_utils_1.AST_NODE_TYPES.ExportNamedDeclaration ||
+ node.parent.type === experimental_utils_1.AST_NODE_TYPES.ExportDefaultDeclaration)
+ ? node.parent
+ : undefined;
+}
+function getOverloadKey(node) {
+ const info = getOverloadInfo(node);
+ return ((node.computed ? '0' : '1') +
+ (node.static ? '0' : '1') +
+ info);
+}
+function getOverloadInfo(node) {
+ switch (node.type) {
+ case experimental_utils_1.AST_NODE_TYPES.TSConstructSignatureDeclaration:
+ return 'constructor';
+ case experimental_utils_1.AST_NODE_TYPES.TSCallSignatureDeclaration:
+ return '()';
+ default: {
+ const { key } = node;
+ return isIdentifier(key) ? key.name : key.raw;
+ }
+ }
+}
+function isIdentifier(node) {
+ return node.type === experimental_utils_1.AST_NODE_TYPES.Identifier;
+}
+//# sourceMappingURL=unified-signatures.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map
new file mode 100644
index 000000000..ce84d5caf
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/rules/unified-signatures.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"unified-signatures.js","sourceRoot":"","sources":["../../src/rules/unified-signatures.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,8EAG+C;AAC/C,8CAAgC;AAiDhC,kBAAe,IAAI,CAAC,UAAU,CAAC;IAC7B,IAAI,EAAE,oBAAoB;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE;YACJ,WAAW,EACT,2GAA2G;YAC7G,QAAQ,EAAE,WAAW;YACrB,oCAAoC;YACpC,WAAW,EAAE,KAAK;SACnB;QACD,IAAI,EAAE,YAAY;QAClB,QAAQ,EAAE;YACR,qBAAqB,EAAE,+CAA+C;YACtE,uBAAuB,EACrB,oDAAoD;YACtD,yBAAyB,EACvB,wDAAwD;SAC3D;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;QAE3C,wEAAwE;QACxE,UAAU;QACV,wEAAwE;QAExE,SAAS,kBAAkB,CAAC,SAAkB;YAC5C,wEAAwE;YACxE,MAAM,SAAS,GACb,SA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OAAO,aAAa,CAAC;QACvB,KAAK,mCAAc,CAAC,0BAA0B;YAC5C,OAAO,IAAI,CAAC;QACd,OAAO,CAAC,CAAC;YACP,MAAM,EAAE,GAAG,EAAE,GAAG,IAAwB,CAAC;YAEzC,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAE,GAAwB,CAAC,GAAG,CAAC;SACrE;KACF;AACH,CAAC;AAED,SAAS,YAAY,CAAC,IAAmB;IACvC,OAAO,IAAI,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU,CAAC;AACjD,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js
new file mode 100644
index 000000000..249bf798b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js
@@ -0,0 +1,15 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+// deeply re-export, for convenience
+__exportStar(require("@typescript-eslint/experimental-utils/dist/ast-utils"), exports);
+//# sourceMappingURL=astUtils.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js.map
new file mode 100644
index 000000000..872e04e40
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/astUtils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"astUtils.js","sourceRoot":"","sources":["../../src/util/astUtils.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,oCAAoC;AACpC,uFAAqE"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js
new file mode 100644
index 000000000..b7066ab41
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js
@@ -0,0 +1,8 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.createRule = void 0;
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+// note - cannot migrate this to an import statement because it will make TSC copy the package.json to the dist folder
+const version = require('../../package.json').version;
+exports.createRule = experimental_utils_1.ESLintUtils.RuleCreator(name => `https://github.com/typescript-eslint/typescript-eslint/blob/v${version}/packages/eslint-plugin/docs/rules/${name}.md`);
+//# sourceMappingURL=createRule.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js.map
new file mode 100644
index 000000000..768d51b07
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/createRule.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"createRule.js","sourceRoot":"","sources":["../../src/util/createRule.ts"],"names":[],"mappings":";;;AAAA,8EAAoE;AAEpE,sHAAsH;AACtH,MAAM,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,OAAO,CAAC;AAEzC,QAAA,UAAU,GAAG,gCAAW,CAAC,WAAW,CAC/C,IAAI,CAAC,EAAE,CACL,gEAAgE,OAAO,sCAAsC,IAAI,KAAK,CACzH,CAAC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js
new file mode 100644
index 000000000..ad102492d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js
@@ -0,0 +1,241 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isTypedFunctionExpression = exports.doesImmediatelyReturnFunctionExpression = exports.checkFunctionReturnType = exports.checkFunctionExpressionReturnType = void 0;
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+const astUtils_1 = require("./astUtils");
+const nullThrows_1 = require("./nullThrows");
+/**
+ * Creates a report location for the given function.
+ * The location only encompasses the "start" of the function, and not the body
+ *
+ * eg.
+ * function foo(args) {}
+ * ^^^^^^^^^^^^^^^^^^
+ *
+ * get y(args) {}
+ * ^^^^^^^^^^^
+ *
+ * const x = (args) => {}
+ * ^^^^^^^^^
+ */
+function getReporLoc(node, sourceCode) {
+ /**
+ * Returns start column position
+ * @param node
+ */
+ function getLocStart() {
+ /* highlight method name */
+ const parent = node.parent;
+ if (parent &&
+ (parent.type === experimental_utils_1.AST_NODE_TYPES.MethodDefinition ||
+ (parent.type === experimental_utils_1.AST_NODE_TYPES.Property && parent.method))) {
+ return parent.loc.start;
+ }
+ return node.loc.start;
+ }
+ /**
+ * Returns end column position
+ * @param node
+ */
+ function getLocEnd() {
+ /* highlight `=>` */
+ if (node.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression) {
+ return sourceCode.getTokenBefore(node.body, token => token.type === experimental_utils_1.AST_TOKEN_TYPES.Punctuator && token.value === '=>').loc.end;
+ }
+ return sourceCode.getTokenBefore(node.body).loc.end;
+ }
+ return {
+ start: getLocStart(),
+ end: getLocEnd(),
+ };
+}
+/**
+ * Checks if a node is a variable declarator with a type annotation.
+ * ```
+ * const x: Foo = ...
+ * ```
+ */
+function isVariableDeclaratorWithTypeAnnotation(node) {
+ return (node.type === experimental_utils_1.AST_NODE_TYPES.VariableDeclarator && !!node.id.typeAnnotation);
+}
+/**
+ * Checks if a node is a class property with a type annotation.
+ * ```
+ * public x: Foo = ...
+ * ```
+ */
+function isClassPropertyWithTypeAnnotation(node) {
+ return node.type === experimental_utils_1.AST_NODE_TYPES.ClassProperty && !!node.typeAnnotation;
+}
+/**
+ * Checks if a node belongs to:
+ * ```
+ * new Foo(() => {})
+ * ^^^^^^^^
+ * ```
+ */
+function isConstructorArgument(node) {
+ return node.type === experimental_utils_1.AST_NODE_TYPES.NewExpression;
+}
+/**
+ * Checks if a node belongs to:
+ * ```
+ * const x: Foo = { prop: () => {} }
+ * const x = { prop: () => {} } as Foo
+ * const x = { prop: () => {} }
+ * ```
+ */
+function isPropertyOfObjectWithType(property) {
+ if (!property || property.type !== experimental_utils_1.AST_NODE_TYPES.Property) {
+ return false;
+ }
+ const objectExpr = property.parent; // this shouldn't happen, checking just in case
+ /* istanbul ignore if */ if (!objectExpr ||
+ objectExpr.type !== experimental_utils_1.AST_NODE_TYPES.ObjectExpression) {
+ return false;
+ }
+ const parent = objectExpr.parent; // this shouldn't happen, checking just in case
+ /* istanbul ignore if */ if (!parent) {
+ return false;
+ }
+ return (astUtils_1.isTypeAssertion(parent) ||
+ isClassPropertyWithTypeAnnotation(parent) ||
+ isVariableDeclaratorWithTypeAnnotation(parent) ||
+ isFunctionArgument(parent));
+}
+/**
+ * Checks if a function belongs to:
+ * ```
+ * () => () => ...
+ * () => function () { ... }
+ * () => { return () => ... }
+ * () => { return function () { ... } }
+ * function fn() { return () => ... }
+ * function fn() { return function() { ... } }
+ * ```
+ */
+function doesImmediatelyReturnFunctionExpression({ body, }) {
+ // Should always have a body; really checking just in case
+ /* istanbul ignore if */ if (!body) {
+ return false;
+ }
+ // Check if body is a block with a single statement
+ if (body.type === experimental_utils_1.AST_NODE_TYPES.BlockStatement && body.body.length === 1) {
+ const [statement] = body.body;
+ // Check if that statement is a return statement with an argument
+ if (statement.type === experimental_utils_1.AST_NODE_TYPES.ReturnStatement &&
+ !!statement.argument) {
+ // If so, check that returned argument as body
+ body = statement.argument;
+ }
+ }
+ // Check if the body being returned is a function expression
+ return (body.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression ||
+ body.type === experimental_utils_1.AST_NODE_TYPES.FunctionExpression);
+}
+exports.doesImmediatelyReturnFunctionExpression = doesImmediatelyReturnFunctionExpression;
+/**
+ * Checks if a node belongs to:
+ * ```
+ * foo(() => 1)
+ * ```
+ */
+function isFunctionArgument(parent, callee) {
+ return (parent.type === experimental_utils_1.AST_NODE_TYPES.CallExpression &&
+ // make sure this isn't an IIFE
+ parent.callee !== callee);
+}
+/**
+ * Checks if a function belongs to:
+ * ```
+ * () => ({ action: 'xxx' } as const)
+ * ```
+ */
+function returnsConstAssertionDirectly(node) {
+ const { body } = node;
+ if (astUtils_1.isTypeAssertion(body)) {
+ const { typeAnnotation } = body;
+ if (typeAnnotation.type === experimental_utils_1.AST_NODE_TYPES.TSTypeReference) {
+ const { typeName } = typeAnnotation;
+ if (typeName.type === experimental_utils_1.AST_NODE_TYPES.Identifier &&
+ typeName.name === 'const') {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+/**
+ * True when the provided function expression is typed.
+ */
+function isTypedFunctionExpression(node, options) {
+ const parent = nullThrows_1.nullThrows(node.parent, nullThrows_1.NullThrowsReasons.MissingParent);
+ if (!options.allowTypedFunctionExpressions) {
+ return false;
+ }
+ return (astUtils_1.isTypeAssertion(parent) ||
+ isVariableDeclaratorWithTypeAnnotation(parent) ||
+ isClassPropertyWithTypeAnnotation(parent) ||
+ isPropertyOfObjectWithType(parent) ||
+ isFunctionArgument(parent, node) ||
+ isConstructorArgument(parent));
+}
+exports.isTypedFunctionExpression = isTypedFunctionExpression;
+/**
+ * Check whether the function expression return type is either typed or valid
+ * with the provided options.
+ */
+function isValidFunctionExpressionReturnType(node, options) {
+ if (isTypedFunctionExpression(node, options)) {
+ return true;
+ }
+ const parent = nullThrows_1.nullThrows(node.parent, nullThrows_1.NullThrowsReasons.MissingParent);
+ if (options.allowExpressions &&
+ parent.type !== experimental_utils_1.AST_NODE_TYPES.VariableDeclarator &&
+ parent.type !== experimental_utils_1.AST_NODE_TYPES.MethodDefinition &&
+ parent.type !== experimental_utils_1.AST_NODE_TYPES.ExportDefaultDeclaration &&
+ parent.type !== experimental_utils_1.AST_NODE_TYPES.ClassProperty) {
+ return true;
+ }
+ // https://github.com/typescript-eslint/typescript-eslint/issues/653
+ if (options.allowDirectConstAssertionInArrowFunctions &&
+ node.type === experimental_utils_1.AST_NODE_TYPES.ArrowFunctionExpression &&
+ returnsConstAssertionDirectly(node)) {
+ return true;
+ }
+ return false;
+}
+/**
+ * Check that the function expression or declaration is valid.
+ */
+function isValidFunctionReturnType(node, options) {
+ if (options.allowHigherOrderFunctions &&
+ doesImmediatelyReturnFunctionExpression(node)) {
+ return true;
+ }
+ if (node.returnType || astUtils_1.isConstructor(node.parent) || astUtils_1.isSetter(node.parent)) {
+ return true;
+ }
+ return false;
+}
+/**
+ * Checks if a function declaration/expression has a return type.
+ */
+function checkFunctionReturnType(node, options, sourceCode, report) {
+ if (isValidFunctionReturnType(node, options)) {
+ return;
+ }
+ report(getReporLoc(node, sourceCode));
+}
+exports.checkFunctionReturnType = checkFunctionReturnType;
+/**
+ * Checks if a function declaration/expression has a return type.
+ */
+function checkFunctionExpressionReturnType(node, options, sourceCode, report) {
+ if (isValidFunctionExpressionReturnType(node, options)) {
+ return;
+ }
+ checkFunctionReturnType(node, options, sourceCode, report);
+}
+exports.checkFunctionExpressionReturnType = checkFunctionExpressionReturnType;
+//# sourceMappingURL=explicitReturnTypeUtils.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js.map
new file mode 100644
index 000000000..1dbb920a0
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/explicitReturnTypeUtils.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"explicitReturnTypeUtils.js","sourceRoot":"","sources":["../../src/util/explicitReturnTypeUtils.ts"],"names":[],"m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AAI,mBAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE;QAC1E,OAAO,IAAI,CAAC;KACb;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;GAEG;AACH,SAAS,uBAAuB,CAC9B,IAAkB,EAClB,OAAgB,EAChB,UAA+B,EAC/B,MAA8C;IAE9C,IAAI,yBAAyB,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QAC5C,OAAO;KACR;IAED,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;AACxC,CAAC;AAoBC,0DAAuB;AAlBzB;;GAEG;AACH,SAAS,iCAAiC,CACxC,IAAwB,EACxB,OAAgB,EAChB,UAA+B,EAC/B,MAA8C;IAE9C,IAAI,mCAAmC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE;QACtD,OAAO;KACR;IAED,uBAAuB,CAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;AAC7D,CAAC;AAGC,8EAAiC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js
new file mode 100644
index 000000000..9ab6ac9a2
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js
@@ -0,0 +1,28 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __exportStar = (this && this.__exportStar) || function(m, exports) {
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getParserServices = exports.isObjectNotArray = exports.deepMerge = exports.applyDefault = void 0;
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+__exportStar(require("./astUtils"), exports);
+__exportStar(require("./createRule"), exports);
+__exportStar(require("./isTypeReadonly"), exports);
+__exportStar(require("./misc"), exports);
+__exportStar(require("./nullThrows"), exports);
+__exportStar(require("./objectIterators"), exports);
+__exportStar(require("./types"), exports);
+// this is done for convenience - saves migrating all of the old rules
+const { applyDefault, deepMerge, isObjectNotArray, getParserServices, } = experimental_utils_1.ESLintUtils;
+exports.applyDefault = applyDefault;
+exports.deepMerge = deepMerge;
+exports.isObjectNotArray = isObjectNotArray;
+exports.getParserServices = getParserServices;
+//# sourceMappingURL=index.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map
new file mode 100644
index 000000000..d3ef1edb1
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/index.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,8EAAoE;AAEpE,6CAA2B;AAC3B,+CAA6B;AAC7B,mDAAiC;AACjC,yCAAuB;AACvB,+CAA6B;AAC7B,oDAAkC;AAClC,0CAAwB;AAExB,sEAAsE;AACtE,MAAM,EACJ,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,iBAAiB,GAClB,GAAG,gCAAW,CAAC;AAOd,oCAAY;AACZ,8BAAS;AACT,4CAAgB;AAChB,8CAAiB"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeReadonly.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeReadonly.js
new file mode 100644
index 000000000..754b09d2a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeReadonly.js
@@ -0,0 +1,140 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.isTypeReadonly = void 0;
+const tsutils_1 = require("tsutils");
+const ts = __importStar(require("typescript"));
+const _1 = require(".");
+function isTypeReadonlyArrayOrTuple(checker, type, seenTypes) {
+ function checkTypeArguments(arrayType) {
+ const typeArguments = checker.getTypeArguments(arrayType);
+ // this shouldn't happen in reality as:
+ // - tuples require at least 1 type argument
+ // - ReadonlyArray requires at least 1 type argument
+ /* istanbul ignore if */ if (typeArguments.length === 0) {
+ return 3 /* Readonly */;
+ }
+ // validate the element types are also readonly
+ if (typeArguments.some(typeArg => isTypeReadonlyRecurser(checker, typeArg, seenTypes) ===
+ 2 /* Mutable */)) {
+ return 2 /* Mutable */;
+ }
+ return 3 /* Readonly */;
+ }
+ if (checker.isArrayType(type)) {
+ const symbol = _1.nullThrows(type.getSymbol(), _1.NullThrowsReasons.MissingToken('symbol', 'array type'));
+ const escapedName = symbol.getEscapedName();
+ if (escapedName === 'Array') {
+ return 2 /* Mutable */;
+ }
+ return checkTypeArguments(type);
+ }
+ if (checker.isTupleType(type)) {
+ if (!type.target.readonly) {
+ return 2 /* Mutable */;
+ }
+ return checkTypeArguments(type);
+ }
+ return 1 /* UnknownType */;
+}
+function isTypeReadonlyObject(checker, type, seenTypes) {
+ function checkIndexSignature(kind) {
+ const indexInfo = checker.getIndexInfoOfType(type, kind);
+ if (indexInfo) {
+ return indexInfo.isReadonly
+ ? 3 /* Readonly */
+ : 2 /* Mutable */;
+ }
+ return 1 /* UnknownType */;
+ }
+ const properties = type.getProperties();
+ if (properties.length) {
+ // ensure the properties are marked as readonly
+ for (const property of properties) {
+ if (!tsutils_1.isPropertyReadonlyInType(type, property.getEscapedName(), checker)) {
+ return 2 /* Mutable */;
+ }
+ }
+ // all properties were readonly
+ // now ensure that all of the values are readonly also.
+ // do this after checking property readonly-ness as a perf optimization,
+ // as we might be able to bail out early due to a mutable property before
+ // doing this deep, potentially expensive check.
+ for (const property of properties) {
+ const propertyType = _1.nullThrows(checker.getTypeOfPropertyOfType(type, property.getName()), _1.NullThrowsReasons.MissingToken(`property "${property.name}"`, 'type'));
+ // handle recursive types.
+ // we only need this simple check, because a mutable recursive type will break via the above prop readonly check
+ if (seenTypes.has(propertyType)) {
+ continue;
+ }
+ if (isTypeReadonlyRecurser(checker, propertyType, seenTypes) ===
+ 2 /* Mutable */) {
+ return 2 /* Mutable */;
+ }
+ }
+ }
+ const isStringIndexSigReadonly = checkIndexSignature(ts.IndexKind.String);
+ if (isStringIndexSigReadonly === 2 /* Mutable */) {
+ return isStringIndexSigReadonly;
+ }
+ const isNumberIndexSigReadonly = checkIndexSignature(ts.IndexKind.Number);
+ if (isNumberIndexSigReadonly === 2 /* Mutable */) {
+ return isNumberIndexSigReadonly;
+ }
+ return 3 /* Readonly */;
+}
+// a helper function to ensure the seenTypes map is always passed down, except by the external caller
+function isTypeReadonlyRecurser(checker, type, seenTypes) {
+ seenTypes.add(type);
+ if (tsutils_1.isUnionType(type)) {
+ // all types in the union must be readonly
+ const result = tsutils_1.unionTypeParts(type).every(t => isTypeReadonlyRecurser(checker, t, seenTypes));
+ const readonlyness = result ? 3 /* Readonly */ : 2 /* Mutable */;
+ return readonlyness;
+ }
+ // all non-object, non-intersection types are readonly.
+ // this should only be primitive types
+ if (!tsutils_1.isObjectType(type) && !tsutils_1.isUnionOrIntersectionType(type)) {
+ return 3 /* Readonly */;
+ }
+ // pure function types are readonly
+ if (type.getCallSignatures().length > 0 &&
+ type.getProperties().length === 0) {
+ return 3 /* Readonly */;
+ }
+ const isReadonlyArray = isTypeReadonlyArrayOrTuple(checker, type, seenTypes);
+ if (isReadonlyArray !== 1 /* UnknownType */) {
+ return isReadonlyArray;
+ }
+ const isReadonlyObject = isTypeReadonlyObject(checker, type, seenTypes);
+ /* istanbul ignore else */ if (isReadonlyObject !== 1 /* UnknownType */) {
+ return isReadonlyObject;
+ }
+ throw new Error('Unhandled type');
+}
+/**
+ * Checks if the given type is readonly
+ */
+function isTypeReadonly(checker, type) {
+ return (isTypeReadonlyRecurser(checker, type, new Set()) === 3 /* Readonly */);
+}
+exports.isTypeReadonly = isTypeReadonly;
+//# sourceMappingURL=isTypeReadonly.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeReadonly.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeReadonly.js.map
new file mode 100644
index 000000000..e4705c029
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/isTypeReadonly.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"isTypeReadonly.js","sourceRoot":"","sources":["../../src/util/isTypeReadonly.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,qCAMiB;AACjB,+CAAiC;AACjC,wBAAkD;AAWlD,SAAS,0BAA0B,CACjC,OAAuB,EACvB,IAAa,EACb,SAAuB;IAEvB,SAAS,kBAAkB,CAAC,SAA2B;QACrD,MAAM,aAAa,GAAG,OAAO,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC;QAC1D,uCAAuC;QACvC,4CAA4C;QAC5C,oDAAoD;QACpD,wBAAwB,CAAC,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE;YACvD,wBAA6B;SAC9B;QAED,+CAA+C;QAC/C,IACE,aAAa,CAAC,IAAI,CAChB,OAA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,GAAG,MAAM,CAAC,CAAC,kBAAuB,CAAC,gBAAqB,CAAC;QAC3E,OAAO,YAAY,CAAC;KACrB;IAED,uDAAuD;IACvD,sCAAsC;IACtC,IAAI,CAAC,sBAAY,CAAC,IAAI,CAAC,IAAI,CAAC,mCAAyB,CAAC,IAAI,CAAC,EAAE;QAC3D,wBAA6B;KAC9B;IAED,mCAAmC;IACnC,IACE,IAAI,CAAC,iBAAiB,EAAE,CAAC,MAAM,GAAG,CAAC;QACnC,IAAI,CAAC,aAAa,EAAE,CAAC,MAAM,KAAK,CAAC,EACjC;QACA,wBAA6B;KAC9B;IAED,MAAM,eAAe,GAAG,0BAA0B,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IAC7E,IAAI,eAAe,wBAA6B,EAAE;QAChD,OAAO,eAAe,CAAC;KACxB;IAED,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,SAAS,CAAC,CAAC;IACxE,0BAA0B,CAAC,IACzB,gBAAgB,wBAA6B,EAC7C;QACA,OAAO,gBAAgB,CAAC;KACzB;IAED,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,OAAuB,EAAE,IAAa;IAC5D,OAAO,CACL,sBAAsB,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,qBAA0B,CAC3E,CAAC;AACJ,CAAC;AAEQ,wCAAc"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js
new file mode 100644
index 000000000..0cb96ca50
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js
@@ -0,0 +1,67 @@
+"use strict";
+/**
+ * @fileoverview Really small utility functions that didn't deserve their own files
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.upperCaseFirst = exports.isDefinitionFile = exports.getNameFromMember = exports.getNameFromIndexSignature = exports.getEnumNames = exports.findFirstResult = exports.arraysAreEqual = void 0;
+const experimental_utils_1 = require("@typescript-eslint/experimental-utils");
+/**
+ * Check if the context file name is *.d.ts or *.d.tsx
+ */
+function isDefinitionFile(fileName) {
+ return /\.d\.tsx?$/i.test(fileName || '');
+}
+exports.isDefinitionFile = isDefinitionFile;
+/**
+ * Upper cases the first character or the string
+ */
+function upperCaseFirst(str) {
+ return str[0].toUpperCase() + str.slice(1);
+}
+exports.upperCaseFirst = upperCaseFirst;
+function arraysAreEqual(a, b, eq) {
+ return (a === b ||
+ (a !== undefined &&
+ b !== undefined &&
+ a.length === b.length &&
+ a.every((x, idx) => eq(x, b[idx]))));
+}
+exports.arraysAreEqual = arraysAreEqual;
+/** Returns the first non-`undefined` result. */
+function findFirstResult(inputs, getResult) {
+ for (const element of inputs) {
+ const result = getResult(element);
+ if (result !== undefined) {
+ return result;
+ }
+ }
+ return undefined;
+}
+exports.findFirstResult = findFirstResult;
+/**
+ * Gets a string representation of the name of the index signature.
+ */
+function getNameFromIndexSignature(node) {
+ const propName = node.parameters.find((parameter) => parameter.type === experimental_utils_1.AST_NODE_TYPES.Identifier);
+ return propName ? propName.name : '(index signature)';
+}
+exports.getNameFromIndexSignature = getNameFromIndexSignature;
+/**
+ * Gets a string name representation of the name of the given MethodDefinition
+ * or ClassProperty node, with handling for computed property names.
+ */
+function getNameFromMember(member, sourceCode) {
+ if (member.key.type === experimental_utils_1.AST_NODE_TYPES.Identifier) {
+ return member.key.name;
+ }
+ if (member.key.type === experimental_utils_1.AST_NODE_TYPES.Literal) {
+ return `${member.key.value}`;
+ }
+ return sourceCode.text.slice(...member.key.range);
+}
+exports.getNameFromMember = getNameFromMember;
+function getEnumNames(myEnum) {
+ return Object.keys(myEnum).filter(x => isNaN(parseInt(x)));
+}
+exports.getEnumNames = getEnumNames;
+//# sourceMappingURL=misc.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js.map
new file mode 100644
index 000000000..c3a0e4802
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/misc.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"misc.js","sourceRoot":"","sources":["../../src/util/misc.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,8EAI+C;AAE/C;;GAEG;AACH,SAAS,gBAAgB,CAAC,QAAgB;IACxC,OAAO,aAAa,CAAC,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC;AAC5C,CAAC;AAiGC,4CAAgB;AA/FlB;;GAEG;AACH,SAAS,cAAc,CAAC,GAAW;IACjC,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC7C,CAAC;AA4FC,wCAAc;AAvFhB,SAAS,cAAc,CACrB,CAAkB,EAClB,CAAkB,EAClB,EAA2B;IAE3B,OAAO,CACL,CAAC,KAAK,CAAC;QACP,CAAC,CAAC,KAAK,SAAS;YACd,CAAC,KAAK,SAAS;YACf,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;YACrB,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CACtC,CAAC;AACJ,CAAC;AAkEC,wCAAc;AAhEhB,gDAAgD;AAChD,SAAS,eAAe,CACtB,MAAW,EACX,SAAkC;IAElC,KAAK,MAAM,OAAO,IAAI,MAAM,EAAE;QAC5B,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC;QAClC,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,OAAO,MAAM,CAAC;SACf;KACF;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAuDC,0CAAe;AArDjB;;GAEG;AACH,SAAS,yBAAyB,CAAC,IAA+B;IAChE,MAAM,QAAQ,GAAsC,IAAI,CAAC,UAAU,CAAC,IAAI,CACtE,CAAC,SAA6B,EAAoC,EAAE,CAClE,SAAS,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU,CAC/C,CAAC;IACF,OAAO,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,CAAC;AACxD,CAAC;AA8CC,8DAAyB;AA5C3B;;;GAGG;AACH,SAAS,iBAAiB,CACxB,MAOgC,EAChC,UAA+B;IAE/B,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,KAAK,mCAAc,CAAC,UAAU,EAAE;QACjD,OAAO,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC;KACxB;IACD,IAAI,MAAM,CAAC,GAAG,CAAC,IAAI,KAAK,mCAAc,CAAC,OAAO,EAAE;QAC9C,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;KAC9B;IAED,OAAO,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AACpD,CAAC;AAsBC,8CAAiB;AAXnB,SAAS,YAAY,CAAmB,MAA0B;IAChE,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAQ,CAAC;AACpE,CAAC;AAOC,oCAAY"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/nullThrows.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/nullThrows.js
new file mode 100644
index 000000000..e5507a2ed
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/nullThrows.js
@@ -0,0 +1,28 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.NullThrowsReasons = exports.nullThrows = void 0;
+/**
+ * A set of common reasons for calling nullThrows
+ */
+const NullThrowsReasons = {
+ MissingParent: 'Expected node to have a parent.',
+ MissingToken: (token, thing) => `Expected to find a ${token} for the ${thing}.`,
+};
+exports.NullThrowsReasons = NullThrowsReasons;
+/**
+ * Assert that a value must not be null or undefined.
+ * This is a nice explicit alternative to the non-null assertion operator.
+ */
+function nullThrows(value, message) {
+ // this function is primarily used to keep types happy in a safe way
+ // i.e. is used when we expect that a value is never nullish
+ // this means that it's pretty much impossible to test the below if...
+ // so ignore it in coverage metrics.
+ /* istanbul ignore if */
+ if (value === null || value === undefined) {
+ throw new Error(`Non-null Assertion Failed: ${message}`);
+ }
+ return value;
+}
+exports.nullThrows = nullThrows;
+//# sourceMappingURL=nullThrows.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/nullThrows.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/nullThrows.js.map
new file mode 100644
index 000000000..acc485af0
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/nullThrows.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"nullThrows.js","sourceRoot":"","sources":["../../src/util/nullThrows.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAM,iBAAiB,GAAG;IACxB,aAAa,EAAE,iCAAiC;IAChD,YAAY,EAAE,CAAC,KAAa,EAAE,KAAa,EAAE,EAAE,CAC7C,sBAAsB,KAAK,YAAY,KAAK,GAAG;CACzC,CAAC;AAoBU,8CAAiB;AAlBtC;;;GAGG;AACH,SAAS,UAAU,CAAI,KAA2B,EAAE,OAAe;IACjE,oEAAoE;IACpE,4DAA4D;IAC5D,sEAAsE;IAEtE,oCAAoC;IACpC,wBAAwB;IACxB,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,8BAA8B,OAAO,EAAE,CAAC,CAAC;KAC1D;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAEQ,gCAAU"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js
new file mode 100644
index 000000000..16f733641
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js
@@ -0,0 +1,27 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.objectReduceKey = exports.objectMapKey = exports.objectForEachKey = void 0;
+function objectForEachKey(obj, callback) {
+ const keys = Object.keys(obj);
+ for (const key of keys) {
+ callback(key);
+ }
+}
+exports.objectForEachKey = objectForEachKey;
+function objectMapKey(obj, callback) {
+ const values = [];
+ objectForEachKey(obj, key => {
+ values.push(callback(key));
+ });
+ return values;
+}
+exports.objectMapKey = objectMapKey;
+function objectReduceKey(obj, callback, initial) {
+ let accumulator = initial;
+ objectForEachKey(obj, key => {
+ accumulator = callback(accumulator, key);
+ });
+ return accumulator;
+}
+exports.objectReduceKey = objectReduceKey;
+//# sourceMappingURL=objectIterators.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js.map
new file mode 100644
index 000000000..82a35bf95
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/objectIterators.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"objectIterators.js","sourceRoot":"","sources":["../../src/util/objectIterators.ts"],"names":[],"mappings":";;;AAAA,SAAS,gBAAgB,CACvB,GAAM,EACN,QAAgC;IAEhC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC9B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACtB,QAAQ,CAAC,GAAG,CAAC,CAAC;KACf;AACH,CAAC;AAyBQ,4CAAgB;AAvBzB,SAAS,YAAY,CACnB,GAAM,EACN,QAAmC;IAEnC,MAAM,MAAM,GAAc,EAAE,CAAC;IAC7B,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;QAC1B,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC;AAc0B,oCAAY;AAZvC,SAAS,eAAe,CACtB,GAAM,EACN,QAA2D,EAC3D,OAAqB;IAErB,IAAI,WAAW,GAAG,OAAO,CAAC;IAC1B,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;QAC1B,WAAW,GAAG,QAAQ,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IAC3C,CAAC,CAAC,CAAC;IACH,OAAO,WAAW,CAAC;AACrB,CAAC;AAEwC,0CAAe"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js b/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js
new file mode 100644
index 000000000..bb543a358
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js
@@ -0,0 +1,411 @@
+"use strict";
+var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
+}) : (function(o, m, k, k2) {
+ if (k2 === undefined) k2 = k;
+ o[k2] = m[k];
+}));
+var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
+}) : function(o, v) {
+ o["default"] = v;
+});
+var __importStar = (this && this.__importStar) || function (mod) {
+ if (mod && mod.__esModule) return mod;
+ var result = {};
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
+ __setModuleDefault(result, mod);
+ return result;
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.getContextualType = exports.isUnsafeAssignment = exports.isAnyOrAnyArrayTypeDiscriminated = exports.isTypeUnknownArrayType = exports.isTypeAnyArrayType = exports.isTypeAnyType = exports.isTypeUnknownType = exports.getTypeArguments = exports.getEqualsKind = exports.getTokenAtPosition = exports.getSourceFileOfNode = exports.typeIsOrHasBaseType = exports.isTypeFlagSet = exports.getTypeFlags = exports.getDeclaration = exports.isNullableType = exports.getConstrainedTypeAtLocation = exports.getTypeName = exports.containsAllTypesByName = exports.isTypeArrayTypeOrUnionOfArrayTypes = void 0;
+const debug_1 = __importDefault(require("debug"));
+const tsutils_1 = require("tsutils");
+const ts = __importStar(require("typescript"));
+const log = debug_1.default('typescript-eslint:eslint-plugin:utils:types');
+/**
+ * Checks if the given type is either an array type,
+ * or a union made up solely of array types.
+ */
+function isTypeArrayTypeOrUnionOfArrayTypes(type, checker) {
+ for (const t of tsutils_1.unionTypeParts(type)) {
+ if (!checker.isArrayType(t)) {
+ return false;
+ }
+ }
+ return true;
+}
+exports.isTypeArrayTypeOrUnionOfArrayTypes = isTypeArrayTypeOrUnionOfArrayTypes;
+/**
+ * @param type Type being checked by name.
+ * @param allowedNames Symbol names checking on the type.
+ * @returns Whether the type is, extends, or contains all of the allowed names.
+ */
+function containsAllTypesByName(type, allowAny, allowedNames) {
+ if (isTypeFlagSet(type, ts.TypeFlags.Any | ts.TypeFlags.Unknown)) {
+ return !allowAny;
+ }
+ if (tsutils_1.isTypeReference(type)) {
+ type = type.target;
+ }
+ const symbol = type.getSymbol();
+ if (symbol && allowedNames.has(symbol.name)) {
+ return true;
+ }
+ if (tsutils_1.isUnionOrIntersectionType(type)) {
+ return type.types.every(t => containsAllTypesByName(t, allowAny, allowedNames));
+ }
+ const bases = type.getBaseTypes();
+ return (typeof bases !== 'undefined' &&
+ bases.length > 0 &&
+ bases.every(t => containsAllTypesByName(t, allowAny, allowedNames)));
+}
+exports.containsAllTypesByName = containsAllTypesByName;
+/**
+ * Get the type name of a given type.
+ * @param typeChecker The context sensitive TypeScript TypeChecker.
+ * @param type The type to get the name of.
+ */
+function getTypeName(typeChecker, type) {
+ // It handles `string` and string literal types as string.
+ if ((type.flags & ts.TypeFlags.StringLike) !== 0) {
+ return 'string';
+ }
+ // If the type is a type parameter which extends primitive string types,
+ // but it was not recognized as a string like. So check the constraint
+ // type of the type parameter.
+ if ((type.flags & ts.TypeFlags.TypeParameter) !== 0) {
+ // `type.getConstraint()` method doesn't return the constraint type of
+ // the type parameter for some reason. So this gets the constraint type
+ // via AST.
+ const symbol = type.getSymbol();
+ const decls = symbol === null || symbol === void 0 ? void 0 : symbol.getDeclarations();
+ const typeParamDecl = decls === null || decls === void 0 ? void 0 : decls[0];
+ if (ts.isTypeParameterDeclaration(typeParamDecl) &&
+ typeParamDecl.constraint != null) {
+ return getTypeName(typeChecker, typeChecker.getTypeFromTypeNode(typeParamDecl.constraint));
+ }
+ }
+ // If the type is a union and all types in the union are string like,
+ // return `string`. For example:
+ // - `"a" | "b"` is string.
+ // - `string | string[]` is not string.
+ if (type.isUnion() &&
+ type.types
+ .map(value => getTypeName(typeChecker, value))
+ .every(t => t === 'string')) {
+ return 'string';
+ }
+ // If the type is an intersection and a type in the intersection is string
+ // like, return `string`. For example: `string & {__htmlEscaped: void}`
+ if (type.isIntersection() &&
+ type.types
+ .map(value => getTypeName(typeChecker, value))
+ .some(t => t === 'string')) {
+ return 'string';
+ }
+ return typeChecker.typeToString(type);
+}
+exports.getTypeName = getTypeName;
+/**
+ * Resolves the given node's type. Will resolve to the type's generic constraint, if it has one.
+ */
+function getConstrainedTypeAtLocation(checker, node) {
+ const nodeType = checker.getTypeAtLocation(node);
+ const constrained = checker.getBaseConstraintOfType(nodeType);
+ return constrained !== null && constrained !== void 0 ? constrained : nodeType;
+}
+exports.getConstrainedTypeAtLocation = getConstrainedTypeAtLocation;
+/**
+ * Checks if the given type is (or accepts) nullable
+ * @param isReceiver true if the type is a receiving type (i.e. the type of a called function's parameter)
+ */
+function isNullableType(type, { isReceiver = false, allowUndefined = true, } = {}) {
+ const flags = getTypeFlags(type);
+ if (isReceiver && flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) {
+ return true;
+ }
+ if (allowUndefined) {
+ return (flags & (ts.TypeFlags.Null | ts.TypeFlags.Undefined)) !== 0;
+ }
+ else {
+ return (flags & ts.TypeFlags.Null) !== 0;
+ }
+}
+exports.isNullableType = isNullableType;
+/**
+ * Gets the declaration for the given variable
+ */
+function getDeclaration(checker, node) {
+ var _a;
+ const symbol = checker.getSymbolAtLocation(node);
+ if (!symbol) {
+ return null;
+ }
+ const declarations = symbol.getDeclarations();
+ return (_a = declarations === null || declarations === void 0 ? void 0 : declarations[0]) !== null && _a !== void 0 ? _a : null;
+}
+exports.getDeclaration = getDeclaration;
+/**
+ * Gets all of the type flags in a type, iterating through unions automatically
+ */
+function getTypeFlags(type) {
+ let flags = 0;
+ for (const t of tsutils_1.unionTypeParts(type)) {
+ flags |= t.flags;
+ }
+ return flags;
+}
+exports.getTypeFlags = getTypeFlags;
+/**
+ * Checks if the given type is (or accepts) the given flags
+ * @param isReceiver true if the type is a receiving type (i.e. the type of a called function's parameter)
+ */
+function isTypeFlagSet(type, flagsToCheck, isReceiver) {
+ const flags = getTypeFlags(type);
+ if (isReceiver && flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) {
+ return true;
+ }
+ return (flags & flagsToCheck) !== 0;
+}
+exports.isTypeFlagSet = isTypeFlagSet;
+/**
+ * @returns Whether a type is an instance of the parent type, including for the parent's base types.
+ */
+function typeIsOrHasBaseType(type, parentType) {
+ const parentSymbol = parentType.getSymbol();
+ if (!type.getSymbol() || !parentSymbol) {
+ return false;
+ }
+ const typeAndBaseTypes = [type];
+ const ancestorTypes = type.getBaseTypes();
+ if (ancestorTypes) {
+ typeAndBaseTypes.push(...ancestorTypes);
+ }
+ for (const baseType of typeAndBaseTypes) {
+ const baseSymbol = baseType.getSymbol();
+ if (baseSymbol && baseSymbol.name === parentSymbol.name) {
+ return true;
+ }
+ }
+ return false;
+}
+exports.typeIsOrHasBaseType = typeIsOrHasBaseType;
+/**
+ * Gets the source file for a given node
+ */
+function getSourceFileOfNode(node) {
+ while (node && node.kind !== ts.SyntaxKind.SourceFile) {
+ node = node.parent;
+ }
+ return node;
+}
+exports.getSourceFileOfNode = getSourceFileOfNode;
+function getTokenAtPosition(sourceFile, position) {
+ const queue = [sourceFile];
+ let current;
+ while (queue.length > 0) {
+ current = queue.shift();
+ // find the child that contains 'position'
+ for (const child of current.getChildren(sourceFile)) {
+ const start = child.getFullStart();
+ if (start > position) {
+ // If this child begins after position, then all subsequent children will as well.
+ return current;
+ }
+ const end = child.getEnd();
+ if (position < end ||
+ (position === end && child.kind === ts.SyntaxKind.EndOfFileToken)) {
+ queue.push(child);
+ break;
+ }
+ }
+ }
+ return current;
+}
+exports.getTokenAtPosition = getTokenAtPosition;
+function getEqualsKind(operator) {
+ switch (operator) {
+ case '==':
+ return {
+ isPositive: true,
+ isStrict: false,
+ };
+ case '===':
+ return {
+ isPositive: true,
+ isStrict: true,
+ };
+ case '!=':
+ return {
+ isPositive: false,
+ isStrict: false,
+ };
+ case '!==':
+ return {
+ isPositive: false,
+ isStrict: true,
+ };
+ default:
+ return undefined;
+ }
+}
+exports.getEqualsKind = getEqualsKind;
+function getTypeArguments(type, checker) {
+ var _a;
+ // getTypeArguments was only added in TS3.7
+ if (checker.getTypeArguments) {
+ return checker.getTypeArguments(type);
+ }
+ return (_a = type.typeArguments) !== null && _a !== void 0 ? _a : [];
+}
+exports.getTypeArguments = getTypeArguments;
+/**
+ * @returns true if the type is `unknown`
+ */
+function isTypeUnknownType(type) {
+ return isTypeFlagSet(type, ts.TypeFlags.Unknown);
+}
+exports.isTypeUnknownType = isTypeUnknownType;
+/**
+ * @returns true if the type is `any`
+ */
+function isTypeAnyType(type) {
+ if (isTypeFlagSet(type, ts.TypeFlags.Any)) {
+ if (type.intrinsicName === 'error') {
+ log('Found an "error" any type');
+ }
+ return true;
+ }
+ return false;
+}
+exports.isTypeAnyType = isTypeAnyType;
+/**
+ * @returns true if the type is `any[]`
+ */
+function isTypeAnyArrayType(type, checker) {
+ return (checker.isArrayType(type) &&
+ isTypeAnyType(
+ // getTypeArguments was only added in TS3.7
+ getTypeArguments(type, checker)[0]));
+}
+exports.isTypeAnyArrayType = isTypeAnyArrayType;
+/**
+ * @returns true if the type is `unknown[]`
+ */
+function isTypeUnknownArrayType(type, checker) {
+ return (checker.isArrayType(type) &&
+ isTypeUnknownType(
+ // getTypeArguments was only added in TS3.7
+ getTypeArguments(type, checker)[0]));
+}
+exports.isTypeUnknownArrayType = isTypeUnknownArrayType;
+/**
+ * @returns `AnyType.Any` if the type is `any`, `AnyType.AnyArray` if the type is `any[]` or `readonly any[]`,
+ * otherwise it returns `AnyType.Safe`.
+ */
+function isAnyOrAnyArrayTypeDiscriminated(node, checker) {
+ const type = checker.getTypeAtLocation(node);
+ if (isTypeAnyType(type)) {
+ return 0 /* Any */;
+ }
+ if (isTypeAnyArrayType(type, checker)) {
+ return 1 /* AnyArray */;
+ }
+ return 2 /* Safe */;
+}
+exports.isAnyOrAnyArrayTypeDiscriminated = isAnyOrAnyArrayTypeDiscriminated;
+/**
+ * Does a simple check to see if there is an any being assigned to a non-any type.
+ *
+ * This also checks generic positions to ensure there's no unsafe sub-assignments.
+ * Note: in the case of generic positions, it makes the assumption that the two types are the same.
+ *
+ * @example See tests for examples
+ *
+ * @returns false if it's safe, or an object with the two types if it's unsafe
+ */
+function isUnsafeAssignment(type, receiver, checker) {
+ var _a, _b;
+ if (isTypeAnyType(type)) {
+ // Allow assignment of any ==> unknown.
+ if (isTypeUnknownType(receiver)) {
+ return false;
+ }
+ if (!isTypeAnyType(receiver)) {
+ return { sender: type, receiver };
+ }
+ }
+ if (tsutils_1.isTypeReference(type) && tsutils_1.isTypeReference(receiver)) {
+ // TODO - figure out how to handle cases like this,
+ // where the types are assignable, but not the same type
+ /*
+ function foo(): ReadonlySet { return new Set(); }
+
+ // and
+
+ type Test = { prop: T }
+ type Test2 = { prop: string }
+ declare const a: Test;
+ const b: Test2 = a;
+ */
+ if (type.target !== receiver.target) {
+ // if the type references are different, assume safe, as we won't know how to compare the two types
+ // the generic positions might not be equivalent for both types
+ return false;
+ }
+ const typeArguments = (_a = type.typeArguments) !== null && _a !== void 0 ? _a : [];
+ const receiverTypeArguments = (_b = receiver.typeArguments) !== null && _b !== void 0 ? _b : [];
+ for (let i = 0; i < typeArguments.length; i += 1) {
+ const arg = typeArguments[i];
+ const receiverArg = receiverTypeArguments[i];
+ const unsafe = isUnsafeAssignment(arg, receiverArg, checker);
+ if (unsafe) {
+ return { sender: type, receiver };
+ }
+ }
+ return false;
+ }
+ return false;
+}
+exports.isUnsafeAssignment = isUnsafeAssignment;
+/**
+ * Returns the contextual type of a given node.
+ * Contextual type is the type of the target the node is going into.
+ * i.e. the type of a called function's parameter, or the defined type of a variable declaration
+ */
+function getContextualType(checker, node) {
+ const parent = node.parent;
+ if (!parent) {
+ return;
+ }
+ if (tsutils_1.isCallExpression(parent) || tsutils_1.isNewExpression(parent)) {
+ if (node === parent.expression) {
+ // is the callee, so has no contextual type
+ return;
+ }
+ }
+ else if (tsutils_1.isVariableDeclaration(parent) ||
+ tsutils_1.isPropertyDeclaration(parent) ||
+ tsutils_1.isParameterDeclaration(parent)) {
+ return parent.type ? checker.getTypeFromTypeNode(parent.type) : undefined;
+ }
+ else if (tsutils_1.isJsxExpression(parent)) {
+ return checker.getContextualType(parent);
+ }
+ else if (tsutils_1.isPropertyAssignment(parent) && tsutils_1.isIdentifier(node)) {
+ return checker.getContextualType(node);
+ }
+ else if (![ts.SyntaxKind.TemplateSpan, ts.SyntaxKind.JsxExpression].includes(parent.kind)) {
+ // parent is not something we know we can get the contextual type of
+ return;
+ }
+ // TODO - support return statement checking
+ return checker.getContextualType(node);
+}
+exports.getContextualType = getContextualType;
+//# sourceMappingURL=types.js.map
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js.map b/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js.map
new file mode 100644
index 000000000..275e1eedd
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/dist/util/types.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/util/types.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,qCAYiB;AACjB,+CAAiC;AAEjC,MAAM,GAAG,GAAG,eAAK,CAAC,6CAA6C,CAAC,CAAC;AAEjE;;;GAGG;AACH,SAAgB,kCAAkC,CAChD,IAAa,EACb,OAAuB;IAEvB,KAAK,MAAM,CAAC,IAAI,wBAAc,CAAC,IAAI,CAAC,EAAE;QACpC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE;YAC3B,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,gFAWC;AAED;;;;GAIG;AACH,SAAgB,sBAAsB,CACpC,IAAa,EACb,QAAiB,EACjB,YAAyB;IAEzB,IAAI,aAAa,CAAC,IAAI,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,GAAG,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;QAChE,OAAO,CAAC,QAAQ,CAAC;KAClB;IAED,IAAI,yBAAe,CAAC,IAAI,CAAC,EAAE;QACzB,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC;KACpB;IAED,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,EAAE,CAAC;IAChC,IAAI,MAAM,IAAI,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QAC3C,OAAO,IAAI,CAAC;KACb;IAED,IAAI,mCAAyB,CAAC,IAAI,CAAC,EAAE;QACnC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC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IAAI,yBAAe,CAAC,MAAM,CAAC,EAAE;QACvD,IAAI,IAAI,KAAK,MAAM,CAAC,UAAU,EAAE;YAC9B,2CAA2C;YAC3C,OAAO;SACR;KACF;SAAM,IACL,+BAAqB,CAAC,MAAM,CAAC;QAC7B,+BAAqB,CAAC,MAAM,CAAC;QAC7B,gCAAsB,CAAC,MAAM,CAAC,EAC9B;QACA,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;KAC3E;SAAM,IAAI,yBAAe,CAAC,MAAM,CAAC,EAAE;QAClC,OAAO,OAAO,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;KAC1C;SAAM,IAAI,8BAAoB,CAAC,MAAM,CAAC,IAAI,sBAAY,CAAC,IAAI,CAAC,EAAE;QAC7D,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;KACxC;SAAM,IACL,CAAC,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,QAAQ,CACjE,MAAM,CAAC,IAAI,CACZ,EACD;QACA,oEAAoE;QACpE,OAAO;KACR;IACD,2CAA2C;IAE3C,OAAO,OAAO,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAnCD,8CAmCC"}
\ No newline at end of file
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md
new file mode 100644
index 000000000..e7a1596d1
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/adjacent-overload-signatures.md
@@ -0,0 +1,89 @@
+# Require that member overloads be consecutive (`adjacent-overload-signatures`)
+
+Grouping overloaded members together can improve readability of the code.
+
+## Rule Details
+
+This rule aims to standardize the way overloaded members are organized.
+
+The following patterns are considered warnings:
+
+```ts
+declare namespace Foo {
+ export function foo(s: string): void;
+ export function foo(n: number): void;
+ export function bar(): void;
+ export function foo(sn: string | number): void;
+}
+
+type Foo = {
+ foo(s: string): void;
+ foo(n: number): void;
+ bar(): void;
+ foo(sn: string | number): void;
+};
+
+interface Foo {
+ foo(s: string): void;
+ foo(n: number): void;
+ bar(): void;
+ foo(sn: string | number): void;
+}
+
+class Foo {
+ foo(s: string): void;
+ foo(n: number): void;
+ bar(): void {}
+ foo(sn: string | number): void {}
+}
+
+export function foo(s: string): void;
+export function foo(n: number): void;
+export function bar(): void;
+export function foo(sn: string | number): void;
+```
+
+The following patterns are not warnings:
+
+```ts
+declare namespace Foo {
+ export function foo(s: string): void;
+ export function foo(n: number): void;
+ export function foo(sn: string | number): void;
+ export function bar(): void;
+}
+
+type Foo = {
+ foo(s: string): void;
+ foo(n: number): void;
+ foo(sn: string | number): void;
+ bar(): void;
+};
+
+interface Foo {
+ foo(s: string): void;
+ foo(n: number): void;
+ foo(sn: string | number): void;
+ bar(): void;
+}
+
+class Foo {
+ foo(s: string): void;
+ foo(n: number): void;
+ foo(sn: string | number): void {}
+ bar(): void {}
+}
+
+export function bar(): void;
+export function foo(s: string): void;
+export function foo(n: number): void;
+export function foo(sn: string | number): void;
+```
+
+## When Not To Use It
+
+If you don't care about the general structure of the code, then you will not need this rule.
+
+## Compatibility
+
+- TSLint: [adjacent-overload-signatures](https://palantir.github.io/tslint/rules/adjacent-overload-signatures/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md
new file mode 100644
index 000000000..2ed521c29
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/array-type.md
@@ -0,0 +1,97 @@
+# Requires using either `T[]` or `Array` for arrays (`array-type`)
+
+Using the same style for array definitions across your codebase makes it easier for your developers to read and understand the types.
+
+## Rule Details
+
+This rule aims to standardize usage of array types within your codebase.
+
+## Options
+
+```ts
+type ArrayOption = 'array' | 'generic' | 'array-simple';
+type Options = {
+ default: ArrayOption;
+ readonly?: ArrayOption;
+};
+
+const defaultOptions: Options = {
+ default: 'array',
+};
+```
+
+The rule accepts an options object with the following properties:
+
+- `default` - sets the array type expected for mutable cases.
+- `readonly` - sets the array type expected for readonly arrays. If this is omitted, then the value for `default` will be used.
+
+Each property can be set to one of three strings: `'array' | 'generic' | 'array-simple'`.
+
+The default config will enforce that all mutable and readonly arrays use the `'array'` syntax.
+
+### `"array"`
+
+Always use `T[]` or `readonly T[]` for all array types.
+
+Incorrect code for `"array"`:
+
+```ts
+const x: Array = ['a', 'b'];
+const y: ReadonlyArray = ['a', 'b'];
+```
+
+Correct code for `"array"`:
+
+```ts
+const x: string[] = ['a', 'b'];
+const y: readonly string[] = ['a', 'b'];
+```
+
+### `"generic"`
+
+Always use `Array` or `ReadonlyArray` for all array types.
+
+Incorrect code for `"generic"`:
+
+```ts
+const x: string[] = ['a', 'b'];
+const y: readonly string[] = ['a', 'b'];
+```
+
+Correct code for `"generic"`:
+
+```ts
+const x: Array = ['a', 'b'];
+const y: ReadonlyArray = ['a', 'b'];
+```
+
+### `"array-simple"`
+
+Use `T[]` or `readonly T[]` for simple types (i.e. types which are just primitive names or type references).
+Use `Array` or `ReadonlyArray` for all other types (union types, intersection types, object types, function types, etc).
+
+Incorrect code for `"array-simple"`:
+
+```ts
+const a: (string | number)[] = ['a', 'b'];
+const b: { prop: string }[] = [{ prop: 'a' }];
+const c: (() => void)[] = [() => {}];
+const d: Array = ['a', 'b'];
+const e: Array = ['a', 'b'];
+const f: ReadonlyArray = ['a', 'b'];
+```
+
+Correct code for `"array-simple"`:
+
+```ts
+const a: Array = ['a', 'b'];
+const b: Array<{ prop: string }> = [{ prop: 'a' }];
+const c: Array<() => void> = [() => {}];
+const d: MyType[] = ['a', 'b'];
+const e: string[] = ['a', 'b'];
+const f: readonly string[] = ['a', 'b'];
+```
+
+## Related to
+
+- TSLint: [array-type](https://palantir.github.io/tslint/rules/array-type/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md
new file mode 100644
index 000000000..fc65df9be
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/await-thenable.md
@@ -0,0 +1,33 @@
+# Disallows awaiting a value that is not a Thenable (`await-thenable`)
+
+This rule disallows awaiting a value that is not a "Thenable" (an object which has `then` method, such as a Promise).
+While it is valid JavaScript to await a non-`Promise`-like value (it will resolve immediately), this pattern is often a programmer error, such as forgetting to add parenthesis to call a function that returns a Promise.
+
+## Rule Details
+
+Examples of **incorrect** code for this rule:
+
+```ts
+await 'value';
+
+const createValue = () => 'value';
+await createValue();
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+await Promise.resolve('value');
+
+const createValue = async () => 'value';
+await createValue();
+```
+
+## When Not To Use It
+
+If you want to allow code to `await` non-Promise values.
+This is generally not preferred, but can sometimes be useful for visual consistency.
+
+## Related to
+
+- TSLint: ['await-promise'](https://palantir.github.io/tslint/rules/await-promise)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md
new file mode 100644
index 000000000..2509793eb
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-ts-comment.md
@@ -0,0 +1,116 @@
+# Bans `// @ts-` comments from being used or requires descriptions after directive (`ban-ts-comment`)
+
+TypeScript provides several directive comments that can be used to alter how it processes files.
+Using these to suppress TypeScript Compiler Errors reduces the effectiveness of TypeScript overall.
+
+The directive comments supported by TypeScript are:
+
+```ts
+// @ts-expect-error
+// @ts-ignore
+// @ts-nocheck
+// @ts-check
+```
+
+## Rule Details
+
+This rule lets you set which directive comments you want to allow in your codebase.
+By default, only `@ts-check` is allowed, as it enables rather than suppresses errors.
+
+The configuration looks like this:
+
+```ts
+interface Options {
+ 'ts-expect-error'?: boolean | 'allow-with-description';
+ 'ts-ignore'?: boolean | 'allow-with-description';
+ 'ts-nocheck'?: boolean | 'allow-with-description';
+ 'ts-check'?: boolean | 'allow-with-description';
+ minimumDescriptionLength?: number;
+}
+
+const defaultOptions: Options = {
+ 'ts-expect-error': 'allow-with-description',
+ 'ts-ignore': true,
+ 'ts-nocheck': true,
+ 'ts-check': false,
+ minimumDescriptionLength: 3,
+};
+```
+
+### `ts-expect-error`, `ts-ignore`, `ts-nocheck`, `ts-check` directives
+
+A value of `true` for a particular directive means that this rule will report if it finds any usage of said directive.
+
+For example, with the defaults above the following patterns are considered warnings:
+
+```ts
+if (false) {
+ // @ts-ignore: Unreachable code error
+ console.log('hello');
+}
+```
+
+The following patterns are not warnings:
+
+```ts
+if (false) {
+ // Compiler warns about unreachable code error
+ console.log('hello');
+}
+```
+
+### `allow-with-description`
+
+A value of `'allow-with-description'` for a particular directive means that this rule will report if it finds a directive that does not have a description following the directive (on the same line).
+
+For example, with `{ 'ts-expect-error': 'allow-with-description' }` the following pattern is considered a warning:
+
+```ts
+if (false) {
+ // @ts-expect-error
+ console.log('hello');
+}
+```
+
+The following pattern is not a warning:
+
+```ts
+if (false) {
+ // @ts-expect-error: Unreachable code error
+ console.log('hello');
+}
+```
+
+### `minimumDescriptionLength`
+
+Use `minimumDescriptionLength` to set a minimum length for descriptions when using the `allow-with-description` option for a directive.
+
+For example, with `{ 'ts-expect-error': 'allow-with-description', minimumDescriptionLength: 10 }` the following pattern is considered a warning:
+
+```ts
+if (false) {
+ // @ts-expect-error: TODO
+ console.log('hello');
+}
+```
+
+The following pattern is not a warning:
+
+```ts
+if (false) {
+ // @ts-expect-error The rationale for this override is described in issue #1337 on GitLab
+ console.log('hello');
+}
+```
+
+## When Not To Use It
+
+If you want to use all of the TypeScript directives.
+
+## Further Reading
+
+- TypeScript [Type Checking JavaScript Files](https://www.typescriptlang.org/docs/handbook/type-checking-javascript-files.html)
+
+## Compatibility
+
+- TSLint: [ban-ts-ignore](https://palantir.github.io/tslint/rules/ban-ts-ignore/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md
new file mode 100644
index 000000000..6af168f4b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-tslint-comment.md
@@ -0,0 +1,29 @@
+# Bans `// tslint:` comments from being used (`ban-tslint-comment`)
+
+Useful when migrating from TSLint to ESLint. Once TSLint has been removed, this rule helps locate TSLint annotations (e.g. `// tslint:disable`).
+
+## Rule Details
+
+Examples of **incorrect** code for this rule:
+
+All TSLint [rule flags](https://palantir.github.io/tslint/usage/rule-flags/)
+
+```js
+/* tslint:disable */
+/* tslint:enable */
+/* tslint:disable:rule1 rule2 rule3... */
+/* tslint:enable:rule1 rule2 rule3... */
+// tslint:disable-next-line
+someCode(); // tslint:disable-line
+// tslint:disable-next-line:rule1 rule2 rule3...
+```
+
+Examples of **correct** code for this rule:
+
+```js
+// This is a comment that just happens to mention tslint
+```
+
+## When Not To Use It
+
+If you are still using TSLint.
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md
new file mode 100644
index 000000000..9f279ea7b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/ban-types.md
@@ -0,0 +1,187 @@
+# Bans specific types from being used (`ban-types`)
+
+Some builtin types have aliases, some types are considered dangerous or harmful.
+It's often a good idea to ban certain types to help with consistency and safety.
+
+## Rule Details
+
+This rule bans specific types and can suggest alternatives.
+Note that it does not ban the corresponding runtime objects from being used.
+
+## Options
+
+```ts
+type Options = {
+ types?: {
+ [typeName: string]:
+ | false
+ | string
+ | {
+ message: string;
+ fixWith?: string;
+ };
+ };
+ extendDefaults?: boolean;
+};
+```
+
+The rule accepts a single object as options, with the following keys:
+
+- `types` - An object whose keys are the types you want to ban, and the values are error messages.
+ - The type can either be a type name literal (`Foo`), a type name with generic parameter instantiation(s) (`Foo`), or the empty object literal (`{}`).
+ - The values can be a string, which is the error message to be reported, `false` to specifically disable this type
+ or it can be an object with the following properties:
+ - `message: string` - the message to display when the type is matched.
+ - `fixWith?: string` - a string to replace the banned type with when the fixer is run. If this is omitted, no fix will be done.
+- `extendDefaults` - if you're specifying custom `types`, you can set this to `true` to extend the default `types` configuration.
+ - This is a convenience option to save you copying across the defaults when adding another type.
+ - If this is `false`, the rule will _only_ use the types defined in your configuration.
+
+Example configuration:
+
+```jsonc
+{
+ "@typescript-eslint/ban-types": [
+ "error",
+ {
+ "types": {
+ // add a custom message to help explain why not to use it
+ "Foo": "Don't use Far because it is unsafe",
+
+ // add a custom message, AND tell the plugin how to fix it
+ "String": {
+ "message": "Use string instead",
+ "fixWith": "string"
+ },
+
+ "{}": {
+ "message": "Use object instead",
+ "fixWith": "object"
+ }
+ }
+ }
+ ]
+}
+```
+
+### Default Options
+
+The default options provide a set of "best practices", intended to provide safety and standardization in your codebase:
+
+- Don't use the upper-case primitive types, you should use the lower-case types for consistency.
+- Avoid the `Function` type, as it provides little safety for the following reasons:
+ - It provides no type safety when calling the value, which means it's easy to provide the wrong arguments.
+ - It accepts class declarations, which will fail when called, as they are called without the `new` keyword.
+- Avoid the `Object` and `{}` types, as they mean "any non-nullish value".
+ - This is a point of confusion for many developers, who think it means "any object type".
+- Avoid the `object` type, as it is currently hard to use due to not being able to assert that keys exist.
+ - See [microsoft/TypeScript#21732](https://github.com/microsoft/TypeScript/issues/21732).
+
+**_Important note:_** the default options suggest using `Record`; this was a stylistic decision, as the built-in `Record` type is considered to look cleaner.
+
+
+Default Options
+
+```ts
+const defaultTypes = {
+ String: {
+ message: 'Use string instead',
+ fixWith: 'string',
+ },
+ Boolean: {
+ message: 'Use boolean instead',
+ fixWith: 'boolean',
+ },
+ Number: {
+ message: 'Use number instead',
+ fixWith: 'number',
+ },
+ Symbol: {
+ message: 'Use symbol instead',
+ fixWith: 'symbol',
+ },
+
+ Function: {
+ message: [
+ 'The `Function` type accepts any function-like value.',
+ 'It provides no type safety when calling the function, which can be a common source of bugs.',
+ 'It also accepts things like class declarations, which will throw at runtime as they will not be called with `new`.',
+ 'If you are expecting the function to accept certain arguments, you should explicitly define the function shape.',
+ ].join('\n'),
+ },
+
+ // object typing
+ Object: {
+ message: [
+ 'The `Object` type actually means "any non-nullish value", so it is marginally better than `unknown`.',
+ '- If you want a type meaning "any object", you probably want `Record` instead.',
+ '- If you want a type meaning "any value", you probably want `unknown` instead.',
+ ].join('\n'),
+ },
+ '{}': {
+ message: [
+ '`{}` actually means "any non-nullish value".',
+ '- If you want a type meaning "any object", you probably want `Record` instead.',
+ '- If you want a type meaning "any value", you probably want `unknown` instead.',
+ ].join('\n'),
+ },
+ object: {
+ message: [
+ 'The `object` type is currently hard to use ([see this issue](https://github.com/microsoft/TypeScript/issues/21732)).',
+ 'Consider using `Record` instead, as it allows you to more easily inspect and use the keys.',
+ ].join('\n'),
+ },
+};
+```
+
+
+
+### Examples
+
+Examples of **incorrect** code with the default options:
+
+```ts
+// use lower-case primitives for consistency
+const str: String = 'foo';
+const bool: Boolean = true;
+const num: Number = 1;
+const symb: Symbol = Symbol('foo');
+
+// use a proper function type
+const func: Function = () => 1;
+
+// use safer object types
+const lowerObj: object = {};
+
+const capitalObj1: Object = 1;
+const capitalObj2: Object = { a: 'string' };
+
+const curly1: {} = 1;
+const curly2: {} = { a: 'string' };
+```
+
+Examples of **correct** code with the default options:
+
+```ts
+// use lower-case primitives for consistency
+const str: string = 'foo';
+const bool: boolean = true;
+const num: number = 1;
+const symb: symbol = Symbol('foo');
+
+// use a proper function type
+const func: () => number = () => 1;
+
+// use safer object types
+const lowerObj: Record = {};
+
+const capitalObj1: number = 1;
+const capitalObj2: { a: string } = { a: 'string' };
+
+const curly1: number = 1;
+const curly2: Record<'a', string> = { a: 'string' };
+```
+
+## Compatibility
+
+- TSLint: [ban-types](https://palantir.github.io/tslint/rules/ban-types/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md
new file mode 100644
index 000000000..06dfa1619
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/brace-style.md
@@ -0,0 +1,22 @@
+# Enforce consistent brace style for blocks (`brace-style`)
+
+## Rule Details
+
+This rule extends the base [`eslint/brace-style`](https://eslint.org/docs/rules/brace-style) rule.
+It adds support for `enum`, `interface`, `namespace` and `module` declarations.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "brace-style": "off",
+ "@typescript-eslint/brace-style": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/brace-style` options](https://eslint.org/docs/rules/brace-style#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/brace-style.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md
new file mode 100644
index 000000000..cea282249
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/camelcase.md
@@ -0,0 +1,8 @@
+## DEPRECATED
+
+This rule has been deprecated in favour of the [`naming-convention`](./naming-convention.md) rule.
+
+
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md
new file mode 100644
index 000000000..1bca8390f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/class-literal-property-style.md
@@ -0,0 +1,96 @@
+# Ensures that literals on classes are exposed in a consistent style (`class-literal-property-style`)
+
+When writing TypeScript applications, it's typically safe to store literal values on classes using fields with the `readonly` modifier to prevent them from being reassigned.
+When writing TypeScript libraries that could be used by JavaScript users however, it's typically safer to expose these literals using `getter`s, since the `readonly` modifier is enforced at compile type.
+
+## Rule Details
+
+This rule aims to ensure that literals exposed by classes are done so consistently, in one of the two style described above.
+By default this rule prefers the `fields` style as it means JS doesn't have to setup & teardown a function closure.
+
+Note that this rule only checks for constant _literal_ values (string, template string, number, bigint, boolean, regexp, null). It does not check objects or arrays, because a readonly field behaves differently to a getter in those cases. It also does not check functions, as it is a common pattern to use readonly fields with arrow function values as auto-bound methods.
+This is because these types can be mutated and carry with them more complex implications about their usage.
+
+### The `fields` style
+
+This style checks for any getter methods that return literal values, and requires them to be defined using fields with the `readonly` modifier instead.
+
+Examples of **correct** code with the `fields` style:
+
+```ts
+/* eslint @typescript-eslint/class-literal-property-style: ["error", "fields"] */
+
+class Mx {
+ public readonly myField1 = 1;
+
+ // not a literal
+ public readonly myField2 = [1, 2, 3];
+
+ private readonly ['myField3'] = 'hello world';
+
+ public get myField4() {
+ return `hello from ${window.location.href}`;
+ }
+}
+```
+
+Examples of **incorrect** code with the `fields` style:
+
+```ts
+/* eslint @typescript-eslint/class-literal-property-style: ["error", "fields"] */
+
+class Mx {
+ public static get myField1() {
+ return 1;
+ }
+
+ private get ['myField2']() {
+ return 'hello world';
+ }
+}
+```
+
+### The `getters` style
+
+This style checks for any `readonly` fields that are assigned literal values, and requires them to be defined as getters instead.
+This style pairs well with the [`@typescript-eslint/prefer-readonly`](prefer-readonly.md) rule,
+as it will identify fields that can be `readonly`, and thus should be made into getters.
+
+Examples of **correct** code with the `getters` style:
+
+```ts
+/* eslint @typescript-eslint/class-literal-property-style: ["error", "getters"] */
+
+class Mx {
+ // no readonly modifier
+ public myField1 = 'hello';
+
+ // not a literal
+ public readonly myField2 = [1, 2, 3];
+
+ public static get myField3() {
+ return 1;
+ }
+
+ private get ['myField4']() {
+ return 'hello world';
+ }
+}
+```
+
+Examples of **incorrect** code with the `getters` style:
+
+```ts
+/* eslint @typescript-eslint/class-literal-property-style: ["error", "getters"] */
+
+class Mx {
+ readonly myField1 = 1;
+ readonly myField2 = `hello world`;
+ private readonly myField3 = 'hello world';
+}
+```
+
+## When Not To Use It
+
+When you have no strong preference, or do not wish to enforce a particular style
+for how literal values are exposed by your classes.
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md
new file mode 100644
index 000000000..092018041
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/comma-spacing.md
@@ -0,0 +1,22 @@
+# Enforces consistent spacing before and after commas (`comma-spacing`)
+
+## Rule Details
+
+This rule extends the base [`eslint/comma-spacing`](https://eslint.org/docs/rules/comma-spacing) rule.
+It adds support for trailing comma in a types parameters list.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "comma-spacing": "off",
+ "@typescript-eslint/comma-spacing": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/comma-spacing` options](https://eslint.org/docs/rules/comma-spacing#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/comma-spacing.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md
new file mode 100644
index 000000000..43e67b755
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-assertions.md
@@ -0,0 +1,93 @@
+# Enforces consistent usage of type assertions (`consistent-type-assertions`)
+
+## Rule Details
+
+This rule aims to standardize the use of type assertion style across the codebase.
+
+Type assertions are also commonly referred as "type casting" in TypeScript (even though it is technically slightly different to what is understood by type casting in other languages), so you can think of type assertions and type casting referring to the same thing. It is essentially you saying to the TypeScript compiler, "in this case, I know better than you!".
+
+In addition to ensuring that type assertions are written in a consistent way, this rule also helps make your codebase more type-safe.
+
+`const` assertions, [introduced in TypeScript 3.4](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#const-assertions), is always allowed by this rule. Examples of it include `let x = "hello" as const;` and `let x = "hello";`.
+
+## Options
+
+```ts
+type Options =
+ | {
+ assertionStyle: 'as' | 'angle-bracket';
+ objectLiteralTypeAssertions: 'allow' | 'allow-as-parameter' | 'never';
+ }
+ | {
+ assertionStyle: 'never';
+ };
+
+const defaultOptions: Options = {
+ assertionStyle: 'as',
+ objectLiteralTypeAssertions: 'allow',
+};
+```
+
+### `assertionStyle`
+
+This option defines the expected assertion style. Valid values for `assertionStyle` are:
+
+- `as` will enforce that you always use `... as foo`.
+- `angle-bracket` will enforce that you always use `...`
+- `never` will enforce that you do not do any type assertions.
+
+Most codebases will want to enforce not using `angle-bracket` style because it conflicts with JSX syntax, and is confusing when paired with generic syntax.
+
+Some codebases like to go for an extra level of type safety, and ban assertions altogether via the `never` option.
+
+### `objectLiteralTypeAssertions`
+
+Always prefer `const x: T = { ... };` to `const x = { ... } as T;` (or similar with angle brackets). The type assertion in the latter case is either unnecessary or will probably hide an error.
+
+The compiler will warn for excess properties with this syntax, but not missing _required_ fields. For example: `const x: { foo: number } = {};` will fail to compile, but `const x = {} as { foo: number }` will succeed.
+
+The const assertion `const x = { foo: 1 } as const`, introduced in TypeScript 3.4, is considered beneficial and is ignored by this option.
+
+Assertions to `any` are also ignored by this option.
+
+Examples of **incorrect** code for `{ assertionStyle: 'as', objectLiteralTypeAssertions: 'never' }` (and for `{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }`)
+
+```ts
+const x = { ... } as T;
+
+function foo() {
+ return { ... } as T;
+}
+```
+
+Examples of **correct** code for `{ assertionStyle: 'as', objectLiteralTypeAssertions: 'never' }`.
+
+```ts
+const x: T = { ... };
+const y = { ... } as any;
+const z = { ... } as unknown;
+
+function foo(): T {
+ return { ... };
+}
+```
+
+Examples of **correct** code for `{ assertionStyle: 'as', objectLiteralTypeAssertions: 'allow-as-parameter' }`.
+
+```ts
+const x: T = { ... };
+const y = { ... } as any;
+const z = { ... } as unknown;
+foo({ ... } as T);
+new Clazz({ ... } as T);
+function foo() { throw { bar: 5 } as Foo }
+```
+
+## When Not To Use It
+
+If you do not want to enforce consistent type assertions.
+
+## Compatibility
+
+- TSLint: [no-angle-bracket-type-assertion](https://palantir.github.io/tslint/rules/no-angle-bracket-type-assertion/)
+- TSLint: [no-object-literal-type-assertion](https://palantir.github.io/tslint/rules/no-object-literal-type-assertion/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md
new file mode 100644
index 000000000..1688552d8
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-definitions.md
@@ -0,0 +1,74 @@
+# Consistent with type definition either `interface` or `type` (`consistent-type-definitions`)
+
+There are two ways to define a type.
+
+```ts
+// type alias
+type T1 = {
+ a: string;
+ b: number;
+};
+
+// interface keyword
+interface T2 {
+ a: string;
+ b: number;
+}
+```
+
+## Options
+
+This rule accepts one string option:
+
+- `"interface"`: enforce using `interface`s for object type definitions.
+- `"type"`: enforce using `type`s for object type definitions.
+
+For example:
+
+```CJSON
+{
+ // Use type for object definitions
+ "@typescript-eslint/consistent-type-definitions": ["error", "type"]
+}
+```
+
+## Rule Details
+
+Examples of **incorrect** code with `interface` option.
+
+```ts
+type T = { x: number };
+```
+
+Examples of **correct** code with `interface` option.
+
+```ts
+type T = string;
+type Foo = string | {};
+
+interface T {
+ x: number;
+}
+```
+
+Examples of **incorrect** code with `type` option.
+
+```ts
+interface T {
+ x: number;
+}
+```
+
+Examples of **correct** code with `type` option.
+
+```ts
+type T = { x: number };
+```
+
+## When Not To Use It
+
+If you specifically want to use an interface or type literal for stylistic reasons, you can disable this rule.
+
+## Compatibility
+
+- TSLint: [interface-over-type-literal](https://palantir.github.io/tslint/rules/interface-over-type-literal/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md
new file mode 100644
index 000000000..3487bf9b5
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/consistent-type-imports.md
@@ -0,0 +1,64 @@
+# Enforces consistent usage of type imports (`consistent-type-imports`)
+
+TypeScript 3.8 added support for type-only imports.
+Type-only imports allow you to specify that an import can only be used in a type location, allowing certain optimizations within compilers.
+
+## Rule Details
+
+This rule aims to standardize the use of type imports style across the codebase.
+
+## Options
+
+```ts
+type Options = {
+ prefer: 'type-imports' | 'no-type-imports';
+ disallowTypeAnnotations: boolean;
+};
+
+const defaultOptions: Options = {
+ prefer: 'type-imports',
+ disallowTypeAnnotations: true,
+};
+```
+
+### `prefer`
+
+This option defines the expected import kind for type-only imports. Valid values for `prefer` are:
+
+- `type-imports` will enforce that you always use `import type Foo from '...'`. It is default.
+- `no-type-imports` will enforce that you always use `import Foo from '...'`.
+
+Examples of **correct** code with `{prefer: 'type-imports'}`, and **incorrect** code with `{prefer: 'no-type-imports'}`.
+
+```ts
+import type { Foo } from 'Foo';
+import type Bar from 'Bar';
+type T = Foo;
+const x: Bar = 1;
+```
+
+Examples of **incorrect** code with `{prefer: 'type-imports'}`, and **correct** code with `{prefer: 'no-type-imports'}`.
+
+```ts
+import { Foo } from 'Foo';
+import Bar from 'Bar';
+type T = Foo;
+const x: Bar = 1;
+```
+
+### `disallowTypeAnnotations`
+
+If `true`, type imports in type annotations (`import()`) is not allowed.
+Default is `true`.
+
+Examples of **incorrect** code with `{disallowTypeAnnotations: true}`.
+
+```ts
+type T = import('Foo').Foo;
+const x: import('Bar') = 1;
+```
+
+## When Not To Use It
+
+- If you are not using TypeScript 3.8 (or greater), then you will not be able to use this rule, as type-only imports are not allowed.
+- If you specifically want to use both import kinds for stylistic reasons, you can disable this rule.
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md
new file mode 100644
index 000000000..c9c51df40
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/default-param-last.md
@@ -0,0 +1,56 @@
+# Enforce default parameters to be last (`default-param-last`)
+
+## Rule Details
+
+This rule extends the base [`eslint/default-param-last`](https://eslint.org/docs/rules/default-param-last) rule.
+It adds support for optional parameters.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+/* eslint @typescript-eslint/default-param-last: ["error"] */
+
+function f(a = 0, b: number) {}
+function f(a: number, b = 0, c: number) {}
+function f(a: number, b?: number, c: number) {}
+class Foo {
+ constructor(public a = 10, private b: number) {}
+}
+class Foo {
+ constructor(public a?: number, private b: number) {}
+}
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+/* eslint @typescript-eslint/default-param-last: ["error"] */
+
+function f(a = 0) {}
+function f(a: number, b = 0) {}
+function f(a: number, b?: number) {}
+function f(a: number, b?: number, c = 0) {}
+function f(a: number, b = 0, c?: number) {}
+class Foo {
+ constructor(public a, private b = 0) {}
+}
+class Foo {
+ constructor(public a, private b?: number) {}
+}
+```
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "default-param-last": "off",
+ "@typescript-eslint/default-param-last": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/default-param-last` options](https://eslint.org/docs/rules/default-param-last#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/default-param-last.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md
new file mode 100644
index 000000000..f827b003e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/dot-notation.md
@@ -0,0 +1,46 @@
+# enforce dot notation whenever possible (`dot-notation`)
+
+## Rule Details
+
+This rule extends the base [`eslint/dot-notation`](https://eslint.org/docs/rules/dot-notation) rule.
+It adds support for optionally ignoring computed `private` member access.
+
+## How to use
+
+```cjson
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "dot-notation": "off",
+ "@typescript-eslint/dot-notation": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/dot-notation`](https://eslint.org/docs/rules/dot-notation#options) options.
+This rule adds the following options:
+
+```ts
+interface Options extends BaseDotNotationOptions {
+ allowPrivateClassPropertyAccess?: boolean;
+}
+const defaultOptions: Options = {
+ ...baseDotNotationDefaultOptions,
+ allowPrivateClassPropertyAccess: false,
+};
+```
+
+### `allowPrivateClassPropertyAccess`
+
+Example of a correct code when `allowPrivateClassPropertyAccess` is set to `true`
+
+```ts
+class X {
+ private priv_prop = 123;
+}
+
+const x = new X();
+x['priv_prop'] = 123;
+```
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/dot-notation.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md
new file mode 100644
index 000000000..3cafe4224
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-function-return-type.md
@@ -0,0 +1,229 @@
+# Require explicit return types on functions and class methods (`explicit-function-return-type`)
+
+Explicit types for function return values makes it clear to any calling code what type is returned.
+This ensures that the return value is assigned to a variable of the correct type; or in the case
+where there is no return value, that the calling code doesn't try to use the undefined value when it
+shouldn't.
+
+## Rule Details
+
+This rule aims to ensure that the values returned from functions are of the expected type.
+
+The following patterns are considered warnings:
+
+```ts
+// Should indicate that no value is returned (void)
+function test() {
+ return;
+}
+
+// Should indicate that a number is returned
+var fn = function () {
+ return 1;
+};
+
+// Should indicate that a string is returned
+var arrowFn = () => 'test';
+
+class Test {
+ // Should indicate that no value is returned (void)
+ method() {
+ return;
+ }
+}
+```
+
+The following patterns are not warnings:
+
+```ts
+// No return value should be expected (void)
+function test(): void {
+ return;
+}
+
+// A return value of type number
+var fn = function (): number {
+ return 1;
+};
+
+// A return value of type string
+var arrowFn = (): string => 'test';
+
+class Test {
+ // No return value should be expected (void)
+ method(): void {
+ return;
+ }
+}
+```
+
+## Options
+
+The rule accepts an options object with the following properties:
+
+```ts
+type Options = {
+ // if true, only functions which are part of a declaration will be checked
+ allowExpressions?: boolean;
+ // if true, type annotations are also allowed on the variable of a function expression rather than on the function directly
+ allowTypedFunctionExpressions?: boolean;
+ // if true, functions immediately returning another function expression will not be checked
+ allowHigherOrderFunctions?: boolean;
+ // if true, concise arrow functions that start with the void keyword will not be checked
+ allowConciseArrowFunctionExpressionsStartingWithVoid?: boolean;
+};
+
+const defaults = {
+ allowExpressions: false,
+ allowTypedFunctionExpressions: true,
+ allowHigherOrderFunctions: true,
+ allowConciseArrowFunctionExpressionsStartingWithVoid: true,
+};
+```
+
+### Configuring in a mixed JS/TS codebase
+
+If you are working on a codebase within which you lint non-TypeScript code (i.e. `.js`/`.jsx`), you should ensure that you should use [ESLint `overrides`](https://eslint.org/docs/user-guide/configuring#disabling-rules-only-for-a-group-of-files) to only enable the rule on `.ts`/`.tsx` files. If you don't, then you will get unfixable lint errors reported within `.js`/`.jsx` files.
+
+```jsonc
+{
+ "rules": {
+ // disable the rule for all files
+ "@typescript-eslint/explicit-function-return-type": "off"
+ },
+ "overrides": [
+ {
+ // enable the rule specifically for TypeScript files
+ "files": ["*.ts", "*.tsx"],
+ "rules": {
+ "@typescript-eslint/explicit-function-return-type": ["error"]
+ }
+ }
+ ]
+}
+```
+
+### `allowExpressions`
+
+Examples of **incorrect** code for this rule with `{ allowExpressions: true }`:
+
+```ts
+function test() {}
+
+const fn = () => {};
+
+export default () => {};
+```
+
+Examples of **correct** code for this rule with `{ allowExpressions: true }`:
+
+```ts
+node.addEventListener('click', () => {});
+
+node.addEventListener('click', function () {});
+
+const foo = arr.map(i => i * i);
+```
+
+### `allowTypedFunctionExpressions`
+
+Examples of **incorrect** code for this rule with `{ allowTypedFunctionExpressions: true }`:
+
+```ts
+let arrowFn = () => 'test';
+
+let funcExpr = function () {
+ return 'test';
+};
+
+let objectProp = {
+ foo: () => 1,
+};
+```
+
+Examples of additional **correct** code for this rule with `{ allowTypedFunctionExpressions: true }`:
+
+```ts
+type FuncType = () => string;
+
+let arrowFn: FuncType = () => 'test';
+
+let funcExpr: FuncType = function() {
+ return 'test';
+};
+
+let asTyped = (() => '') as () => string;
+let castTyped = <() => string>(() => '');
+
+interface ObjectType {
+ foo(): number;
+}
+let objectProp: ObjectType = {
+ foo: () => 1,
+};
+let objectPropAs = {
+ foo: () => 1,
+} as ObjectType;
+let objectPropCast = {
+ foo: () => 1,
+};
+
+declare functionWithArg(arg: () => number);
+functionWithArg(() => 1);
+
+declare functionWithObjectArg(arg: { method: () => number });
+functionWithObjectArg({
+ method() {
+ return 1;
+ },
+});
+```
+
+### `allowHigherOrderFunctions`
+
+Examples of **incorrect** code for this rule with `{ allowHigherOrderFunctions: true }`:
+
+```ts
+var arrowFn = () => () => {};
+
+function fn() {
+ return function () {};
+}
+```
+
+Examples of **correct** code for this rule with `{ allowHigherOrderFunctions: true }`:
+
+```ts
+var arrowFn = () => (): void => {};
+
+function fn() {
+ return function (): void {};
+}
+```
+
+### `allowConciseArrowFunctionExpressionsStartingWithVoid`
+
+Examples of **incorrect** code for this rule with `{ allowConciseArrowFunctionExpressionsStartingWithVoid: true }`:
+
+```ts
+var join = (a: string, b: string) => `${a}${b}`;
+
+const log = (message: string) => {
+ console.log(message);
+};
+```
+
+Examples of **correct** code for this rule with `{ allowConciseArrowFunctionExpressionsStartingWithVoid: true }`:
+
+```ts
+var log = (message: string) => void console.log(message);
+```
+
+## When Not To Use It
+
+If you don't wish to prevent calling code from using function return values in unexpected ways, then
+you will not need this rule.
+
+## Further Reading
+
+- TypeScript [Functions](https://www.typescriptlang.org/docs/handbook/functions.html#function-types)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md
new file mode 100644
index 000000000..9b148d95c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-member-accessibility.md
@@ -0,0 +1,344 @@
+# Require explicit accessibility modifiers on class properties and methods (`explicit-member-accessibility`)
+
+Leaving off accessibility modifier and making everything public can make
+your interface hard to use by others.
+If you make all internal pieces private or protected, your interface will
+be easier to use.
+
+## Rule Details
+
+This rule aims to make code more readable and explicit about who can use
+which properties.
+
+## Options
+
+```ts
+type AccessibilityLevel =
+ | 'explicit' // require an accessor (including public)
+ | 'no-public' // don't require public
+ | 'off'; // don't check
+
+type Options = {
+ accessibility?: AccessibilityLevel;
+ ignoredMethodNames?: string[];
+ overrides?: {
+ accessors?: AccessibilityLevel;
+ constructors?: AccessibilityLevel;
+ methods?: AccessibilityLevel;
+ properties?: AccessibilityLevel;
+ parameterProperties?: AccessibilityLevel;
+ };
+};
+
+const defaultOptions: Options = {
+ accessibility: 'explicit',
+};
+```
+
+### Configuring in a mixed JS/TS codebase
+
+If you are working on a codebase within which you lint non-TypeScript code (i.e. `.js`/`.jsx`), you should ensure that you should use [ESLint `overrides`](https://eslint.org/docs/user-guide/configuring#disabling-rules-only-for-a-group-of-files) to only enable the rule on `.ts`/`.tsx` files. If you don't, then you will get unfixable lint errors reported within `.js`/`.jsx` files.
+
+```jsonc
+{
+ "rules": {
+ // disable the rule for all files
+ "@typescript-eslint/explicit-member-accessibility": "off"
+ },
+ "overrides": [
+ {
+ // enable the rule specifically for TypeScript files
+ "files": ["*.ts", "*.tsx"],
+ "rules": {
+ "@typescript-eslint/explicit-member-accessibility": ["error"]
+ }
+ }
+ ]
+}
+```
+
+### `accessibility`
+
+This rule in its default state requires no configuration and will enforce that every class member has an accessibility modifier. If you would like to allow for some implicit public members then you have the following options:
+
+```ts
+{
+ accessibility: 'explicit',
+ overrides: {
+ accessors: 'explicit',
+ constructors: 'no-public',
+ methods: 'explicit',
+ properties: 'off',
+ parameterProperties: 'explicit'
+ }
+}
+```
+
+Note the above is an example of a possible configuration you could use - it is not the default configuration.
+
+The following patterns are considered incorrect code if no options are provided:
+
+```ts
+class Animal {
+ constructor(name) {
+ // No accessibility modifier
+ this.animalName = name;
+ }
+ animalName: string; // No accessibility modifier
+ get name(): string {
+ // No accessibility modifier
+ return this.animalName;
+ }
+ set name(value: string) {
+ // No accessibility modifier
+ this.animalName = value;
+ }
+ walk() {
+ // method
+ }
+}
+```
+
+The following patterns are considered correct with the default options `{ accessibility: 'explicit' }`:
+
+```ts
+class Animal {
+ public constructor(public breed, name) {
+ // Parameter property and constructor
+ this.animalName = name;
+ }
+ private animalName: string; // Property
+ get name(): string {
+ // get accessor
+ return this.animalName;
+ }
+ set name(value: string) {
+ // set accessor
+ this.animalName = value;
+ }
+ public walk() {
+ // method
+ }
+}
+```
+
+The following patterns are considered incorrect with the accessibility set to **no-public** `[{ accessibility: 'no-public' }]`:
+
+```ts
+class Animal {
+ public constructor(public breed, name) {
+ // Parameter property and constructor
+ this.animalName = name;
+ }
+ public animalName: string; // Property
+ public get name(): string {
+ // get accessor
+ return this.animalName;
+ }
+ public set name(value: string) {
+ // set accessor
+ this.animalName = value;
+ }
+ public walk() {
+ // method
+ }
+}
+```
+
+The following patterns are considered correct with the accessibility set to **no-public** `[{ accessibility: 'no-public' }]`:
+
+```ts
+class Animal {
+ constructor(protected breed, name) {
+ // Parameter property and constructor
+ this.name = name;
+ }
+ private animalName: string; // Property
+ get name(): string {
+ // get accessor
+ return this.animalName;
+ }
+ private set name(value: string) {
+ // set accessor
+ this.animalName = value;
+ }
+ protected walk() {
+ // method
+ }
+}
+```
+
+### Overrides
+
+There are three ways in which an override can be used.
+
+- To disallow the use of public on a given member.
+- To enforce explicit member accessibility when the root has allowed implicit public accessibility
+- To disable any checks on given member type
+
+#### Disallow the use of public on a given member
+
+e.g. `[ { overrides: { constructors: 'no-public' } } ]`
+
+The following patterns are considered incorrect with the example override
+
+```ts
+class Animal {
+ public constructor(protected animalName) {}
+ public get name() {
+ return this.animalName;
+ }
+}
+```
+
+The following patterns are considered correct with the example override
+
+```ts
+class Animal {
+ constructor(protected animalName) {}
+ public get name() {
+ return this.animalName;
+ }
+}
+```
+
+#### Require explicit accessibility for a given member
+
+e.g. `[ { accessibility: 'no-public', overrides: { properties: 'explicit' } } ]`
+
+The following patterns are considered incorrect with the example override
+
+```ts
+class Animal {
+ constructor(protected animalName) {}
+ get name() {
+ return this.animalName;
+ }
+ protected set name(value: string) {
+ this.animalName = value;
+ }
+ legs: number;
+ private hasFleas: boolean;
+}
+```
+
+The following patterns are considered correct with the example override
+
+```ts
+class Animal {
+ constructor(protected animalName) {}
+ get name() {
+ return this.animalName;
+ }
+ protected set name(value: string) {
+ this.animalName = value;
+ }
+ public legs: number;
+ private hasFleas: boolean;
+}
+```
+
+e.g. `[ { accessibility: 'off', overrides: { parameterProperties: 'explicit' } } ]`
+
+The following code is considered incorrect with the example override
+
+```ts
+class Animal {
+ constructor(readonly animalName: string) {}
+}
+```
+
+The following code patterns are considered correct with the example override
+
+```ts
+class Animal {
+ constructor(public readonly animalName: string) {}
+}
+
+class Animal {
+ constructor(public animalName: string) {}
+}
+```
+
+e.g. `[ { accessibility: 'off', overrides: { parameterProperties: 'no-public' } } ]`
+
+The following code is considered incorrect with the example override
+
+```ts
+class Animal {
+ constructor(public readonly animalName: string) {}
+}
+```
+
+The following code is considered correct with the example override
+
+```ts
+class Animal {
+ constructor(public animalName: string) {}
+}
+```
+
+#### Disable any checks on given member type
+
+e.g. `[{ overrides: { accessors : 'off' } } ]`
+
+As no checks on the overridden member type are performed all permutations of visibility are permitted for that member type
+
+The follow pattern is considered incorrect for the given configuration
+
+```ts
+class Animal {
+ constructor(protected animalName) {}
+ public get name() {
+ return this.animalName;
+ }
+ get legs() {
+ return this.legCount;
+ }
+}
+```
+
+The following patterns are considered correct with the example override
+
+```ts
+class Animal {
+ public constructor(protected animalName) {}
+ public get name() {
+ return this.animalName;
+ }
+ get legs() {
+ return this.legCount;
+ }
+}
+```
+
+### Except specific methods
+
+If you want to ignore some specific methods, you can do it by specifying method names. Note that this option does not care for the context, and will ignore every method with these names, which could lead to it missing some cases. You should use this sparingly.
+e.g. `[ { ignoredMethodNames: ['specificMethod', 'whateverMethod'] } ]`
+
+```ts
+class Animal {
+ get specificMethod() {
+ console.log('No error because you specified this method on option');
+ }
+ get whateverMethod() {
+ console.log('No error because you specified this method on option');
+ }
+ public get otherMethod() {
+ console.log('This method comply with this rule');
+ }
+}
+```
+
+## When Not To Use It
+
+If you think defaulting to public is a good default, then you should consider using the `no-public` setting. If you want to mix implicit and explicit public members then disable this rule.
+
+## Further Reading
+
+- TypeScript [Accessibility Modifiers](https://www.typescriptlang.org/docs/handbook/classes.html#public-private-and-protected-modifiers)
+
+## Compatibility
+
+- TSLint: [member-access](http://palantir.github.io/tslint/rules/member-access/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md
new file mode 100644
index 000000000..f33a8d5b7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/explicit-module-boundary-types.md
@@ -0,0 +1,274 @@
+# Require explicit return and argument types on exported functions' and classes' public class methods (`explicit-module-boundary-types`)
+
+Explicit types for function return values and arguments makes it clear to any calling code what is the module boundary's input and output.
+
+Consider using this rule in place of [`no-untyped-public-signature`](./no-untyped-public-signature.md) which has been deprecated.
+
+## Rule Details
+
+This rule aims to ensure that the values returned from a module are of the expected type.
+
+The following patterns are considered warnings:
+
+```ts
+// Should indicate that no value is returned (void)
+export function test() {
+ return;
+}
+
+// Should indicate that a number is returned
+export default function () {
+ return 1;
+}
+
+// Should indicate that a string is returned
+export var arrowFn = () => 'test';
+
+// All arguments should be typed
+export var arrowFn = (arg): string => `test ${arg}`;
+export var arrowFn = (arg: any): string => `test ${arg}`;
+
+export class Test {
+ // Should indicate that no value is returned (void)
+ method() {
+ return;
+ }
+}
+```
+
+The following patterns are not warnings:
+
+```ts
+// Function is not exported
+function test() {
+ return;
+}
+
+// A return value of type number
+export var fn = function (): number {
+ return 1;
+};
+
+// A return value of type string
+export var arrowFn = (arg: string): string => `test ${arg}`;
+
+// All arguments should be typed
+export var arrowFn = (arg: string): string => `test ${arg}`;
+export var arrowFn = (arg: unknown): string => `test ${arg}`;
+
+// Class is not exported
+class Test {
+ method() {
+ return;
+ }
+}
+```
+
+## Options
+
+The rule accepts an options object with the following properties:
+
+```ts
+type Options = {
+ /**
+ * If true, the rule will not report for arguments that are explicitly typed as `any`
+ */
+ allowArgumentsExplicitlyTypedAsAny?: boolean;
+ /**
+ * If true, body-less arrow functions that return an `as const` type assertion will not
+ * require an explicit return value annotation.
+ * You must still type the parameters of the function.
+ */
+ allowDirectConstAssertionInArrowFunctions?: boolean;
+ /**
+ * An array of function/method names that will not have their arguments or their return values checked.
+ */
+ allowedNames?: string[];
+ /**
+ * If true, functions immediately returning another function expression will not
+ * require an explicit return value annotation.
+ * You must still type the parameters of the function.
+ */
+ allowHigherOrderFunctions?: boolean;
+ /**
+ * If true, type annotations are also allowed on the variable of a function expression
+ * rather than on the function arguments/return value directly.
+ */
+ allowTypedFunctionExpressions?: boolean;
+};
+
+const defaults = {
+ allowArgumentsExplicitlyTypedAsAny: false,
+ allowDirectConstAssertionInArrowFunctions: true,
+ allowedNames: [],
+ allowHigherOrderFunctions: true,
+ allowTypedFunctionExpressions: true,
+};
+```
+
+### Configuring in a mixed JS/TS codebase
+
+If you are working on a codebase within which you lint non-TypeScript code (i.e. `.js`/`.jsx`), you should ensure that you should use [ESLint `overrides`](https://eslint.org/docs/user-guide/configuring#disabling-rules-only-for-a-group-of-files) to only enable the rule on `.ts`/`.tsx` files. If you don't, then you will get unfixable lint errors reported within `.js`/`.jsx` files.
+
+```jsonc
+{
+ "rules": {
+ // disable the rule for all files
+ "@typescript-eslint/explicit-module-boundary-types": "off"
+ },
+ "overrides": [
+ {
+ // enable the rule specifically for TypeScript files
+ "files": ["*.ts", "*.tsx"],
+ "rules": {
+ "@typescript-eslint/explicit-module-boundary-types": ["error"]
+ }
+ }
+ ]
+}
+```
+
+### `allowArgumentsExplicitlyTypedAsAny`
+
+Examples of **incorrect** code for this rule with `{ allowArgumentsExplicitlyTypedAsAny: true }`:
+
+```ts
+export const func = (value: any): void => ({ type: 'X', value });
+export function foo(value: any): void {}
+```
+
+Examples of **correct** code for this rule with `{ allowArgumentsExplicitlyTypedAsAny: true }`:
+
+```ts
+export const func = (value: number): void => ({ type: 'X', value });
+export function foo(value: number): void {}
+```
+
+### `allowDirectConstAssertionInArrowFunctions`
+
+Examples of **incorrect** code for this rule with `{ allowDirectConstAssertionInArrowFunctions: true }`:
+
+```ts
+export const func = (value: number) => ({ type: 'X', value });
+export const foo = () => {
+ return {
+ bar: true,
+ } as const;
+};
+export const bar = () => 1;
+export const baz = arg => arg as const;
+```
+
+Examples of **correct** code for this rule with `{ allowDirectConstAssertionInArrowFunctions: true }`:
+
+```ts
+export const func = (value: number) => ({ type: 'X', value } as const);
+export const foo = () =>
+ ({
+ bar: true,
+ } as const);
+export const bar = () => 1 as const;
+export const baz = (arg: string) => arg as const;
+```
+
+### `allowedNames`
+
+You may pass function/method names you would like this rule to ignore, like so:
+
+```json
+{
+ "@typescript-eslint/explicit-module-boundary-types": [
+ "error",
+ {
+ "allowedNames": ["ignoredFunctionName", "ignoredMethodName"]
+ }
+ ]
+}
+```
+
+### `allowHigherOrderFunctions`
+
+Examples of **incorrect** code for this rule with `{ allowHigherOrderFunctions: true }`:
+
+```ts
+export var arrowFn = () => () => {};
+
+export function fn() {
+ return function () {};
+}
+
+export function foo(outer) {
+ return function (inner): void {};
+}
+```
+
+Examples of **correct** code for this rule with `{ allowHigherOrderFunctions: true }`:
+
+```ts
+export var arrowFn = () => (): void => {};
+
+export function fn() {
+ return function (): void {};
+}
+
+export function foo(outer: string) {
+ return function (inner: string): void {};
+}
+```
+
+### `allowTypedFunctionExpressions`
+
+Examples of **incorrect** code for this rule with `{ allowTypedFunctionExpressions: true }`:
+
+```ts
+export let arrowFn = () => 'test';
+
+export let funcExpr = function () {
+ return 'test';
+};
+
+export let objectProp = {
+ foo: () => 1,
+};
+
+export const foo = bar => {};
+```
+
+Examples of additional **correct** code for this rule with `{ allowTypedFunctionExpressions: true }`:
+
+```ts
+type FuncType = () => string;
+
+export let arrowFn: FuncType = () => 'test';
+
+export let funcExpr: FuncType = function () {
+ return 'test';
+};
+
+export let asTyped = (() => '') as () => string;
+export let castTyped = <() => string>(() => '');
+
+interface ObjectType {
+ foo(): number;
+}
+export let objectProp: ObjectType = {
+ foo: () => 1,
+};
+export let objectPropAs = {
+ foo: () => 1,
+} as ObjectType;
+export let objectPropCast = {
+ foo: () => 1,
+};
+
+type FooType = (bar: string) => void;
+export const foo: FooType = bar => {};
+```
+
+## When Not To Use It
+
+If you wish to make sure all functions have explicit return types, as opposed to only the module boundaries, you can use [explicit-function-return-type](./explicit-function-return-type.md)
+
+## Further Reading
+
+- TypeScript [Functions](https://www.typescriptlang.org/docs/handbook/functions.html#function-types)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md
new file mode 100644
index 000000000..8aa9e7e0c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/func-call-spacing.md
@@ -0,0 +1,22 @@
+# Require or disallow spacing between function identifiers and their invocations (`func-call-spacing`)
+
+## Rule Details
+
+This rule extends the base [`eslint/func-call-spacing`](https://eslint.org/docs/rules/func-call-spacing) rule.
+It adds support for generic type parameters on function calls.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "func-call-spacing": "off",
+ "@typescript-eslint/func-call-spacing": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/func-call-spacing` options](https://eslint.org/docs/rules/func-call-spacing#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/func-call-spacing.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md
new file mode 100644
index 000000000..023c77465
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/indent.md
@@ -0,0 +1,24 @@
+# Enforce consistent indentation (`indent`)
+
+## PLEASE READ THIS ISSUE BEFORE USING THIS RULE [#1824](https://github.com/typescript-eslint/typescript-eslint/issues/1824)
+
+## Rule Details
+
+This rule extends the base [`eslint/indent`](https://eslint.org/docs/rules/indent) rule.
+It adds support for TypeScript nodes.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "indent": "off",
+ "@typescript-eslint/indent": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/indent` options](https://eslint.org/docs/rules/indent#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/indent.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md
new file mode 100644
index 000000000..8888e2efe
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/init-declarations.md
@@ -0,0 +1,22 @@
+# require or disallow initialization in variable declarations (`init-declarations`)
+
+## Rule Details
+
+This rule extends the base [`eslint/init-declarations`](https://eslint.org/docs/rules/init-declarations) rule.
+It adds support for TypeScript's `declare` variables.
+
+## How to use
+
+```cjson
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "init-declarations": "off",
+ "@typescript-eslint/init-declarations": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/init-declarations` options](https://eslint.org/docs/rules/init-declarations#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/init-declarations.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md
new file mode 100644
index 000000000..ca2926d6c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/keyword-spacing.md
@@ -0,0 +1,22 @@
+# Enforce consistent spacing before and after keywords (`keyword-spacing`)
+
+## Rule Details
+
+This rule extends the base [`eslint/keyword-spacing`](https://eslint.org/docs/rules/keyword-spacing) rule.
+This version adds support for generic type parameters on function calls.
+
+## How to use
+
+```cjson
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "keyword-spacing": "off",
+ "@typescript-eslint/keyword-spacing": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/keyword-spacing` options](https://eslint.org/docs/rules/keyword-spacing#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/keyword-spacing.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md
new file mode 100644
index 000000000..06cdf5542
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/lines-between-class-members.md
@@ -0,0 +1,73 @@
+# Require or disallow an empty line between class members (`lines-between-class-members`)
+
+This rule improves readability by enforcing lines between class members. It will not check empty lines before the first member and after the last member. This rule require or disallow an empty line between class members.
+
+## Rule Details
+
+This rule extends the base [`eslint/lines-between-class-members`](https://eslint.org/docs/rules/lines-between-class-members) rule.
+It adds support for ignoring overload methods in a class.
+
+See the [ESLint documentation](https://eslint.org/docs/rules/lines-between-class-members) for more details on the `lines-between-class-members` rule.
+
+## Rule Changes
+
+```cjson
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "lines-between-class-members": "off",
+ "@typescript-eslint/lines-between-class-members": ["error"]
+}
+```
+
+In addition to the options supported by the `lines-between-class-members` rule in ESLint core, the rule adds the following options:
+
+## Options
+
+This rule has a string option and an object option.
+
+- Object option:
+
+ - `"exceptAfterOverload": true` (default) - Skip checking empty lines after overload class members
+ - `"exceptAfterOverload": false` - **do not** skip checking empty lines after overload class members
+
+- [See the other options allowed](https://github.com/eslint/eslint/blob/master/docs/rules/lines-between-class-members.md#options)
+
+### `exceptAfterOverload: true`
+
+Examples of **correct** code for the `{ "exceptAfterOverload": true }` option:
+
+```ts
+/*eslint @typescript-eslint/lines-between-class-members: ["error", "always", { "exceptAfterOverload": true }]*/
+
+class foo {
+ bar(a: string): void;
+ bar(a: string, b: string): void;
+ bar(a: string, b: string) {}
+
+ baz() {}
+
+ qux() {}
+}
+```
+
+### `exceptAfterOverload: false`
+
+Examples of **correct** code for the `{ "exceptAfterOverload": false }` option:
+
+```ts
+/*eslint @typescript-eslint/lines-between-class-members: ["error", "always", { "exceptAfterOverload": false }]*/
+
+class foo {
+ bar(a: string): void;
+
+ bar(a: string, b: string): void;
+
+ bar(a: string, b: string) {}
+
+ baz() {}
+
+ qux() {}
+}
+```
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/lines-between-class-members.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md
new file mode 100644
index 000000000..ed1b09577
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-delimiter-style.md
@@ -0,0 +1,194 @@
+# Require a specific member delimiter style for interfaces and type literals (`member-delimiter-style`)
+
+Enforces a consistent member delimiter style in interfaces and type literals. There are three member delimiter styles primarily used in TypeScript:
+
+- Semicolon style (default, preferred in TypeScript).
+
+
+```ts
+interface Foo {
+ name: string;
+ greet(): void;
+}
+
+type Bar = {
+ name: string;
+ greet(): void;
+}
+```
+
+- Comma style (JSON style).
+
+
+```ts
+interface Foo {
+ name: string,
+ greet(): void,
+}
+
+type Bar = {
+ name: string,
+ greet(): void,
+}
+```
+
+- Line break (none) style.
+
+
+```ts
+interface Foo {
+ name: string
+ greet(): void
+}
+
+type Bar = {
+ name: string
+ greet(): void
+}
+```
+
+The rule also enforces the presence (or absence) of the delimiter in the last member of the interface and/or type literal.
+Finally, this rule can enforce separate delimiter syntax for single line declarations.
+
+## Rule Details
+
+This rule aims to standardize the way interface and type literal members are delimited.
+
+## Options
+
+```ts
+interface BaseConfig {
+ multiline?: {
+ delimiter?: 'none' | 'semi' | 'comma';
+ requireLast?: boolean;
+ };
+ singleline?: {
+ delimiter?: 'semi' | 'comma';
+ requireLast?: boolean;
+ };
+}
+type Config = BaseConfig & {
+ overrides?: {
+ interface?: BaseConfig;
+ typeLiteral?: BaseConfig;
+ };
+};
+```
+
+Default config:
+
+```JSON
+{
+ "multiline": {
+ "delimiter": "semi",
+ "requireLast": true
+ },
+ "singleline": {
+ "delimiter": "semi",
+ "requireLast": false
+ }
+}
+```
+
+`multiline` config only applies to multiline `interface`/`type` definitions.
+`singleline` config only applies to single line `interface`/`type` definitions.
+The two configs are entirely separate, and do not effect one another.
+
+### `delimiter`
+
+Accepts three values (or two for `singleline`):
+
+- `comma` - each member should be delimited with a comma (`,`).
+- `semi` - each member should be delimited with a semicolon (`;`).
+- `none` - each member should be delimited with nothing.
+ - NOTE - this is not an option for `singleline` because having no delimiter between members on a single line is a syntax error in TS.
+
+### `requireLast`
+
+Determines whether or not the last member in the `interface`/`type` should have a delimiter:
+
+- `true` - the last member **_must_** have a delimiter.
+- `false` - the last member **_must not_** have a delimiter.
+
+### `overrides`
+
+Allows you to specify options specifically for either `interface`s or `type` definitions / inline `type`s.
+
+For example, to require commas for `type`s, and semicolons for multiline `interface`s:
+
+```JSON
+{
+ "multiline": {
+ "delimiter": "comma",
+ "requireLast": true
+ },
+ "singleline": {
+ "delimiter": "comma",
+ "requireLast": true
+ },
+ "overrides": {
+ "interface": {
+ "multiline": {
+ "delimiter": "semi",
+ "requireLast": true
+ }
+ }
+ }
+}
+```
+
+## Examples
+
+Examples of **incorrect** code for this rule with the default config:
+
+
+```ts
+// missing semicolon delimiter
+interface Foo {
+ name: string
+ greet(): string
+}
+
+// using incorrect delimiter
+interface Bar {
+ name: string,
+ greet(): string,
+}
+
+// missing last member delimiter
+interface Baz {
+ name: string;
+ greet(): string
+}
+
+// incorrect delimiter
+type FooBar = { name: string, greet(): string }
+
+// last member should not have delimiter
+type FooBar = { name: string; greet(): string; }
+```
+
+Examples of **correct** code for this rule with the default config:
+
+
+```ts
+interface Foo {
+ name: string;
+ greet(): string;
+}
+
+interface Foo { name: string }
+
+type Bar = {
+ name: string;
+ greet(): string;
+}
+
+type Bar = { name: string }
+
+type FooBar = { name: string; greet(): string }
+```
+
+## When Not To Use It
+
+If you don't care about enforcing a consistent member delimiter in interfaces and type literals, then you will not need this rule.
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md
new file mode 100644
index 000000000..eda1c573c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/member-ordering.md
@@ -0,0 +1,867 @@
+# Require a consistent member declaration order (`member-ordering`)
+
+A consistent ordering of fields, methods and constructors can make interfaces, type literals, classes and class expressions easier to read, navigate and edit.
+
+## Rule Details
+
+This rule aims to standardize the way class declarations, class expressions, interfaces and type literals are structured and ordered.
+
+### Grouping and sorting member groups
+
+It allows to group members by their type (e.g. `public-static-field`, `protected-static-field`, `private-static-field`, `public-instance-field`, ...) and enforce a certain order for these groups. By default, their order is the same inside `classes`, `classExpressions`, `interfaces` and `typeLiterals` (note: not all member types apply to `interfaces` and `typeLiterals`). It is possible to define the order for any of those individually or to change the default order for all of them by setting the `default` option.
+
+### Sorting members
+
+Besides grouping the members and sorting their groups, this rule also allows to sort the members themselves (e.g. `a`, `b`, `c`, ...). You have 2 options: Sort all of them while ignoring their type or sort them while respecting their types (e.g. sort all fields in an interface alphabetically).
+
+## Options
+
+These options allow to specify how to group the members and sort their groups.
+
+- Sort groups, don't enforce member order: Use `memberTypes`
+- Sort members, don't enforce group order: Use `order`
+- Sort members within groups: Use `memberTypes` and `order`
+
+```ts
+type TypeOptions =
+ | {
+ memberTypes: Array | 'never',
+ order?: 'alphabetically' | 'as-written',
+ }
+ | {
+ order: 'alphabetically',
+ };
+
+{
+ default?: TypeOptions,
+
+ classes?: TypeOptions,
+ classExpressions?: TypeOptions,
+
+ interfaces?: TypeOptions<'signature' | 'field' | 'method' | 'constructor'>,
+ typeLiterals?: TypeOptions<'signature' | 'field' | 'method' | 'constructor'>,
+}
+```
+
+See below for the possible definitions of `MemberType`.
+
+### Deprecated syntax
+
+Note: There is a deprecated syntax to specify the member types as an array.
+
+### Member types (granular form)
+
+There are multiple ways to specify the member types. The most explicit and granular form is the following:
+
+```jsonc
+[
+ // Index signature
+ "signature",
+
+ // Fields
+ "public-static-field",
+ "protected-static-field",
+ "private-static-field",
+ "public-decorated-field",
+ "protected-decorated-field",
+ "private-decorated-field",
+ "public-instance-field",
+ "protected-instance-field",
+ "private-instance-field",
+ "public-abstract-field",
+ "protected-abstract-field",
+ "private-abstract-field",
+
+ // Constructors
+ "public-constructor",
+ "protected-constructor",
+ "private-constructor",
+
+ // Methods
+ "public-static-method",
+ "protected-static-method",
+ "private-static-method",
+ "public-decorated-method",
+ "protected-decorated-method",
+ "private-decorated-method",
+ "public-instance-method",
+ "protected-instance-method",
+ "private-instance-method",
+ "public-abstract-method",
+ "protected-abstract-method",
+ "private-abstract-method"
+]
+```
+
+Note: If you only specify some of the possible types, the non-specified ones can have any particular order. This means that they can be placed before, within or after the specified types and the linter won't complain about it.
+
+### Member group types (with accessibility, ignoring scope)
+
+It is also possible to group member types by their accessibility (`static`, `instance`, `abstract`), ignoring their scope.
+
+```jsonc
+[
+ // Index signature
+ // No accessibility for index signature. See above.
+
+ // Fields
+ "public-field", // = ["public-static-field", "public-instance-field"]
+ "protected-field", // = ["protected-static-field", "protected-instance-field"]
+ "private-field", // = ["private-static-field", "private-instance-field"]
+
+ // Constructors
+ // Only the accessibility of constructors is configurable. See below.
+
+ // Methods
+ "public-method", // = ["public-static-method", "public-instance-method"]
+ "protected-method", // = ["protected-static-method", "protected-instance-method"]
+ "private-method" // = ["private-static-method", "private-instance-method"]
+]
+```
+
+### Member group types (with accessibility and a decorator)
+
+It is also possible to group methods or fields with a decorator separately, optionally specifying
+their accessibility.
+
+```jsonc
+[
+ // Index signature
+ // No decorators for index signature.
+
+ // Fields
+ "public-decorated-field",
+ "protected-decorated-field",
+ "private-decorated-field",
+
+ "decorated-field", // = ["public-decorated-field", "protected-decorated-field", "private-decorated-field"]
+
+ // Constructors
+ // There are no decorators for constructors.
+
+ "public-decorated-method",
+ "protected-decorated-method",
+ "private-decorated-method",
+
+ "decorated-method" // = ["public-decorated-method", "protected-decorated-method", "private-decorated-method"]
+]
+```
+
+### Member group types (with scope, ignoring accessibility)
+
+Another option is to group the member types by their scope (`public`, `protected`, `private`), ignoring their accessibility.
+
+```jsonc
+[
+ // Index signature
+ // No scope for index signature. See above.
+
+ // Fields
+ "static-field", // = ["public-static-field", "protected-static-field", "private-static-field"]
+ "instance-field", // = ["public-instance-field", "protected-instance-field", "private-instance-field"]
+ "abstract-field", // = ["public-abstract-field", "protected-abstract-field", "private-abstract-field"]
+
+ // Constructors
+ "constructor", // = ["public-constructor", "protected-constructor", "private-constructor"]
+
+ // Methods
+ "static-method", // = ["public-static-method", "protected-static-method", "private-static-method"]
+ "instance-method", // = ["public-instance-method", "protected-instance-method", "private-instance-method"]
+ "abstract-method" // = ["public-abstract-method", "protected-abstract-method", "private-abstract-method"]
+]
+```
+
+### Member group types (with scope and accessibility)
+
+The third grouping option is to ignore both scope and accessibility.
+
+```jsonc
+[
+ // Index signature
+ // No grouping for index signature. See above.
+
+ // Fields
+ "field", // = ["public-static-field", "protected-static-field", "private-static-field", "public-instance-field", "protected-instance-field", "private-instance-field",
+ // "public-abstract-field", "protected-abstract-field", private-abstract-field"]
+
+ // Constructors
+ // Only the accessibility of constructors is configurable. See above.
+
+ // Methods
+ "method" // = ["public-static-method", "protected-static-method", "private-static-method", "public-instance-method", "protected-instance-method", "private-instance-method",
+ // "public-abstract-method", "protected-abstract-method", "private-abstract-method"]
+]
+```
+
+### Default configuration
+
+The default configuration looks as follows:
+
+```jsonc
+{
+ "default": [
+ // Index signature
+ "signature",
+
+ // Fields
+ "public-static-field",
+ "protected-static-field",
+ "private-static-field",
+
+ "public-decorated-field",
+ "protected-decorated-field",
+ "private-decorated-field",
+
+ "public-instance-field",
+ "protected-instance-field",
+ "private-instance-field",
+
+ "public-abstract-field",
+ "protected-abstract-field",
+ "private-abstract-field",
+
+ "public-field",
+ "protected-field",
+ "private-field",
+
+ "static-field",
+ "instance-field",
+ "abstract-field",
+
+ "decorated-field",
+
+ "field",
+
+ // Constructors
+ "public-constructor",
+ "protected-constructor",
+ "private-constructor",
+
+ "constructor",
+
+ // Methods
+ "public-static-method",
+ "protected-static-method",
+ "private-static-method",
+
+ "public-decorated-method",
+ "protected-decorated-method",
+ "private-decorated-method",
+
+ "public-instance-method",
+ "protected-instance-method",
+ "private-instance-method",
+
+ "public-abstract-method",
+ "protected-abstract-method",
+ "private-abstract-method",
+
+ "public-method",
+ "protected-method",
+ "private-method",
+
+ "static-method",
+ "instance-method",
+ "abstract-method",
+
+ "decorated-method",
+
+ "method"
+ ]
+}
+```
+
+Note: The default configuration contains member group types which contain other member types (see above). This is intentional to provide better error messages.
+
+Note: By default, the members are not sorted. If you want to sort them alphabetically, you have to provide a custom configuration.
+
+## Examples
+
+### Custom `default` configuration
+
+Note: The `default` options are overwritten in these examples.
+
+#### Configuration: `{ "default": ["signature", "method", "constructor", "field"] }`
+
+##### Incorrect examples
+
+```ts
+interface Foo {
+ B: string; // -> field
+
+ new (); // -> constructor
+
+ A(): void; // -> method
+
+ [Z: string]: any; // -> signature
+}
+```
+
+Note: Wrong order.
+
+```ts
+type Foo = {
+ B: string; // -> field
+
+ // no constructor
+
+ A(): void; // -> method
+
+ // no signature
+};
+```
+
+Note: Not all specified member types have to exist.
+
+```ts
+class Foo {
+ private C: string; // -> field
+ public D: string; // -> field
+ protected static E: string; // -> field
+
+ constructor() {} // -> constructor
+
+ public static A(): void {} // -> method
+ public B(): void {} // -> method
+
+ [Z: string]: any; // -> signature
+}
+```
+
+Note: Accessibility or scope are ignored with this configuration.
+
+```ts
+const Foo = class {
+ private C: string; // -> field
+ public D: string; // -> field
+
+ constructor() {} // -> constructor
+
+ public static A(): void {} // -> method
+ public B(): void {} // -> method
+
+ [Z: string]: any; // -> signature
+
+ protected static E: string; // -> field
+};
+```
+
+Note: Not all members have to be grouped to find rule violations.
+
+##### Correct examples
+
+```ts
+interface Foo {
+ [Z: string]: any; // -> signature
+
+ A(): void; // -> method
+
+ new (); // -> constructor
+
+ B: string; // -> field
+}
+```
+
+```ts
+type Foo = {
+ // no signature
+
+ A(): void; // -> method
+
+ // no constructor
+
+ B: string; // -> field
+};
+```
+
+```ts
+class Foo {
+ [Z: string]: any; // -> signature
+
+ public static A(): void {} // -> method
+ public B(): void {} // -> method
+
+ constructor() {} // -> constructor
+
+ private C: string; // -> field
+ public D: string; // -> field
+ protected static E: string; // -> field
+}
+```
+
+```ts
+const Foo = class {
+ [Z: string]: any; // -> signature
+
+ public static A(): void {} // -> method
+ public B(): void {} // -> method
+
+ constructor() {} // -> constructor
+
+ private C: string; // -> field
+ public D: string; // -> field
+ protected static E: string; // -> field
+};
+```
+
+#### Configuration: `{ "default": ["public-instance-method", "public-static-field"] }`
+
+Note: This configuration does not apply to interfaces/type literals as accessibility and scope are not part of interfaces/type literals.
+
+##### Incorrect examples
+
+```ts
+class Foo {
+ private C: string; // (irrelevant)
+
+ public D: string; // (irrelevant)
+
+ public static E: string; // -> public static field
+
+ constructor() {} // (irrelevant)
+
+ public static A(): void {} // (irrelevant)
+
+ [Z: string]: any; // (irrelevant)
+
+ public B(): void {} // -> public instance method
+}
+```
+
+Note: Public instance methods should come first before public static fields. Everything else can be placed anywhere.
+
+```ts
+const Foo = class {
+ private C: string; // (irrelevant)
+
+ [Z: string]: any; // (irrelevant)
+
+ public static E: string; // -> public static field
+
+ public D: string; // (irrelevant)
+
+ constructor() {} // (irrelevant)
+
+ public static A(): void {} // (irrelevant)
+
+ public B(): void {} // -> public instance method
+};
+```
+
+Note: Public instance methods should come first before public static fields. Everything else can be placed anywhere.
+
+##### Correct examples
+
+```ts
+class Foo {
+ public B(): void {} // -> public instance method
+
+ private C: string; // (irrelevant)
+
+ public D: string; // (irrelevant)
+
+ public static E: string; // -> public static field
+
+ constructor() {} // (irrelevant)
+
+ public static A(): void {} // (irrelevant)
+
+ [Z: string]: any; // (irrelevant)
+}
+```
+
+```ts
+const Foo = class {
+ public B(): void {} // -> public instance method
+
+ private C: string; // (irrelevant)
+
+ [Z: string]: any; // (irrelevant)
+
+ public D: string; // (irrelevant)
+
+ constructor() {} // (irrelevant)
+
+ public static A(): void {} // (irrelevant)
+
+ public static E: string; // -> public static field
+};
+```
+
+#### Configuration: `{ "default": ["public-static-field", "static-field", "instance-field"] }`
+
+Note: This configuration does not apply to interfaces/type literals as accessibility and scope are not part of interfaces/type literals.
+
+##### Incorrect examples
+
+```ts
+class Foo {
+ private E: string; // -> instance field
+
+ private static B: string; // -> static field
+ protected static C: string; // -> static field
+ private static D: string; // -> static field
+
+ public static A: string; // -> public static field
+
+ [Z: string]: any; // (irrelevant)
+}
+```
+
+Note: Public static fields should come first, followed by static fields and instance fields.
+
+```ts
+const foo = class {
+ public T(): void {} // (irrelevant)
+
+ private static B: string; // -> static field
+
+ constructor() {} // (irrelevant)
+
+ private E: string; // -> instance field
+
+ protected static C: string; // -> static field
+ private static D: string; // -> static field
+
+ [Z: string]: any; // (irrelevant)
+
+ public static A: string; // -> public static field
+};
+```
+
+Note: Public static fields should come first, followed by static fields and instance fields.
+
+##### Correct examples
+
+```ts
+class Foo {
+ public static A: string; // -> public static field
+
+ private static B: string; // -> static field
+ protected static C: string; // -> static field
+ private static D: string; // -> static field
+
+ private E: string; // -> instance field
+}
+```
+
+```ts
+const foo = class {
+ [Z: string]: any; // -> signature
+
+ public static A: string; // -> public static field
+
+ constructor() {} // -> constructor
+
+ private static B: string; // -> static field
+ protected static C: string; // -> static field
+ private static D: string; // -> static field
+
+ private E: string; // -> instance field
+
+ public T(): void {} // -> method
+};
+```
+
+### Custom `classes` configuration
+
+Note: If this is not set, the `default` will automatically be applied to classes as well. If a `classes` configuration is provided, only this configuration will be used for `classes` (i.e. nothing will be merged with `default`).
+
+Note: The configuration for `classes` does not apply to class expressions (use `classExpressions` for them).
+
+#### Configuration: `{ "classes": ["method", "constructor", "field"] }`
+
+##### Incorrect example
+
+```ts
+class Foo {
+ private C: string; // -> field
+ public D: string; // -> field
+ protected static E: string; // -> field
+
+ constructor() {} // -> constructor
+
+ public static A(): void {} // -> method
+ public B(): void {} // -> method
+}
+```
+
+##### Correct example
+
+```ts
+class Foo {
+ public static A(): void {} // -> method
+ public B(): void {} // -> method
+
+ constructor() {} // -> constructor
+
+ private C: string; // -> field
+ public D: string; // -> field
+ protected static E: string; // -> field
+}
+```
+
+#### Configuration: `{ "classes": ["public-instance-method", "public-static-field"] }`
+
+##### Incorrect example
+
+```ts
+class Foo {
+ private C: string; // (irrelevant)
+
+ public D: string; // (irrelevant)
+
+ public static E: string; // -> public static field
+
+ constructor() {} // (irrelevant)
+
+ public static A(): void {} // (irrelevant)
+
+ public B(): void {} // -> public instance method
+}
+```
+
+##### Correct example
+
+```ts
+class Foo {
+ private C: string; // (irrelevant)
+
+ public D: string; // (irrelevant)
+
+ public B(): void {} // -> public instance method
+
+ constructor() {} // (irrelevant)
+
+ public static A(): void {} // (irrelevant)
+
+ public static E: string; // -> public static field
+}
+```
+
+### Custom `classExpressions` configuration
+
+Note: If this is not set, the `default` will automatically be applied to classes expressions as well. If a `classExpressions` configuration is provided, only this configuration will be used for `classExpressions` (i.e. nothing will be merged with `default`).
+
+Note: The configuration for `classExpressions` does not apply to classes (use `classes` for them).
+
+#### Configuration: `{ "classExpressions": ["method", "constructor", "field"] }`
+
+##### Incorrect example
+
+```ts
+const foo = class {
+ private C: string; // -> field
+ public D: string; // -> field
+ protected static E: string; // -> field
+
+ constructor() {} // -> constructor
+
+ public static A(): void {} // -> method
+ public B(): void {} // -> method
+};
+```
+
+##### Correct example
+
+```ts
+const foo = class {
+ public static A(): void {} // -> method
+ public B(): void {} // -> method
+
+ constructor() {} // -> constructor
+
+ private C: string; // -> field
+ public D: string; // -> field
+ protected static E: string; // -> field
+};
+```
+
+#### Configuration: `{ "classExpressions": ["public-instance-method", "public-static-field"] }`
+
+##### Incorrect example
+
+```ts
+const foo = class {
+ private C: string; // (irrelevant)
+
+ public D: string; // (irrelevant)
+
+ public static E: string; // -> public static field
+
+ constructor() {} // (irrelevant)
+
+ public static A(): void {} // (irrelevant)
+
+ public B(): void {} // -> public instance method
+};
+```
+
+##### Correct example
+
+```ts
+const foo = class {
+ private C: string; // (irrelevant)
+
+ public D: string; // (irrelevant)
+
+ public B(): void {} // -> public instance method
+
+ public static E: string; // -> public static field
+
+ constructor() {} // (irrelevant)
+
+ public static A(): void {} // (irrelevant)
+};
+```
+
+### Custom `interfaces` configuration
+
+Note: If this is not set, the `default` will automatically be applied to classes expressions as well. If a `interfaces` configuration is provided, only this configuration will be used for `interfaces` (i.e. nothing will be merged with `default`).
+
+Note: The configuration for `interfaces` only allows a limited set of member types: `signature`, `field`, `constructor` and `method`.
+
+Note: The configuration for `interfaces` does not apply to type literals (use `typeLiterals` for them).
+
+#### Configuration: `{ "interfaces": ["signature", "method", "constructor", "field"] }`
+
+##### Incorrect example
+
+```ts
+interface Foo {
+ B: string; // -> field
+
+ new (); // -> constructor
+
+ A(): void; // -> method
+
+ [Z: string]: any; // -> signature
+}
+```
+
+##### Correct example
+
+```ts
+interface Foo {
+ [Z: string]: any; // -> signature
+
+ A(): void; // -> method
+
+ new (); // -> constructor
+
+ B: string; // -> field
+}
+```
+
+### Custom `typeLiterals` configuration
+
+Note: If this is not set, the `default` will automatically be applied to classes expressions as well. If a `typeLiterals` configuration is provided, only this configuration will be used for `typeLiterals` (i.e. nothing will be merged with `default`).
+
+Note: The configuration for `typeLiterals` only allows a limited set of member types: `signature`, `field`, `constructor` and `method`.
+
+Note: The configuration for `typeLiterals` does not apply to interfaces (use `interfaces` for them).
+
+#### Configuration: `{ "typeLiterals": ["signature", "method", "constructor", "field"] }`
+
+##### Incorrect example
+
+```ts
+type Foo = {
+ B: string; // -> field
+
+ A(): void; // -> method
+
+ new (); // -> constructor
+
+ [Z: string]: any; // -> signature
+};
+```
+
+##### Correct example
+
+```ts
+type Foo = {
+ [Z: string]: any; // -> signature
+
+ A(): void; // -> method
+
+ new (); // -> constructor
+
+ B: string; // -> field
+};
+```
+
+### Sorting alphabetically within member groups
+
+It is possible to sort all members within a group alphabetically.
+
+#### Configuration: `{ "default": { "memberTypes": , "order": "alphabetically" } }`
+
+This will apply the default order (see above) and enforce an alphabetic order within each group.
+
+##### Incorrect examples
+
+```ts
+interface Foo {
+ a: x;
+ b: x;
+ c: x;
+
+ new (): Bar;
+ (): Baz;
+
+ a(): void;
+ b(): void;
+ c(): void;
+
+ // Wrong group order, should be placed before all field definitions
+ [a: string]: number;
+}
+```
+
+```ts
+interface Foo {
+ [a: string]: number;
+
+ a: x;
+ b: x;
+ c: x;
+
+ new (): Bar;
+ (): Baz;
+
+ // Wrong alphabetic order within group
+ c(): void;
+ b(): void;
+ a(): void;
+}
+```
+
+### Sorting alphabetically while ignoring member groups
+
+It is also possible to sort all members and ignore the member groups completely.
+
+#### Configuration: `{ "default": { "memberTypes": "never", "order": "alphabetically" } }`
+
+##### Incorrect example
+
+```ts
+interface Foo {
+ b(): void;
+ a: b;
+
+ [a: string]: number; // Order doesn't matter (no sortable identifier)
+ new (): Bar; // Order doesn't matter (no sortable identifier)
+ (): Baz; // Order doesn't matter (no sortable identifier)
+}
+```
+
+Note: Wrong alphabetic order `b(): void` should come after `a: b`.
+
+## When Not To Use It
+
+If you don't care about the general structure of your classes and interfaces, then you will not need this rule.
+
+## Compatibility
+
+- TSLint: [member-ordering](https://palantir.github.io/tslint/rules/member-ordering/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md
new file mode 100644
index 000000000..4358ee36c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/method-signature-style.md
@@ -0,0 +1,94 @@
+# Enforces using a particular method signature syntax. (`method-signature-style`)
+
+There are two ways to define an object/interface function property.
+
+```ts
+// method shorthand syntax
+interface T1 {
+ func(arg: string): number;
+}
+
+// regular property with function type
+interface T2 {
+ func: (arg: string) => number;
+}
+```
+
+A good practice is to use the TypeScript's `strict` option (which implies `strictFunctionTypes`) which enables correct typechecking for function properties only (method signatures get old behavior).
+
+TypeScript FAQ:
+
+> A method and a function property of the same type behave differently.
+> Methods are always bivariant in their argument, while function properties are contravariant in their argument under `strictFunctionTypes`.
+
+See the reasoning behind that in the [TypeScript PR for the compiler option](https://github.com/microsoft/TypeScript/pull/18654).
+
+## Options
+
+This rule accepts one string option:
+
+- `"property"`: Enforce using property signature for functions. Use this to enforce maximum correctness together with TypeScript's strict mode.
+- `"method"`: Enforce using method signature for functions. Use this if you aren't using TypeScript's strict mode and prefer this style.
+
+The default is `"property"`.
+
+## Rule Details
+
+Examples of **incorrect** code with `property` option.
+
+```ts
+interface T1 {
+ func(arg: string): number;
+}
+type T2 = {
+ func(arg: boolean): void;
+};
+interface T3 {
+ func(arg: number): void;
+ func(arg: string): void;
+ func(arg: boolean): void;
+}
+```
+
+Examples of **correct** code with `property` option.
+
+```ts
+interface T1 {
+ func: (arg: string) => number;
+}
+type T2 = {
+ func: (arg: boolean) => void;
+};
+// this is equivalent to the overload
+interface T3 {
+ func: ((arg: number) => void) &
+ ((arg: string) => void) &
+ ((arg: boolean) => void);
+}
+```
+
+Examples of **incorrect** code with `method` option.
+
+```ts
+interface T1 {
+ func: (arg: string) => number;
+}
+type T2 = {
+ func: (arg: boolean) => void;
+};
+```
+
+Examples of **correct** code with `method` option.
+
+```ts
+interface T1 {
+ func(arg: string): number;
+}
+type T2 = {
+ func(arg: boolean): void;
+};
+```
+
+## When Not To Use It
+
+If you don't want to enforce a particular style for object/interface function types, and/or if you don't use `strictFunctionTypes`, then you don't need this rule.
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md
new file mode 100644
index 000000000..d57bc1c69
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/naming-convention.md
@@ -0,0 +1,465 @@
+# Enforces naming conventions for everything across a codebase (`naming-convention`)
+
+Enforcing naming conventions helps keep the codebase consistent, and reduces overhead when thinking about how to name a variable.
+Additionally, a well-designed style guide can help communicate intent, such as by enforcing all private properties begin with an `_`, and all global-level constants are written in `UPPER_CASE`.
+
+There are many different rules that have existed over time, but they have had the problem of not having enough granularity, meaning it was hard to have a well defined style guide, and most of the time you needed 3 or more rules at once to enforce different conventions, hoping they didn't conflict.
+
+## Rule Details
+
+This rule allows you to enforce conventions for any identifier, using granular selectors to create a fine-grained style guide.
+
+### Note - this rule only needs type information in specific cases, detailed below
+
+## Options
+
+This rule accepts an array of objects, with each object describing a different naming convention.
+Each property will be described in detail below. Also see the examples section below for illustrated examples.
+
+```ts
+type Options = {
+ // format options
+ format:
+ | (
+ | 'camelCase'
+ | 'strictCamelCase'
+ | 'PascalCase'
+ | 'StrictPascalCase'
+ | 'snake_case'
+ | 'UPPER_CASE'
+ )[]
+ | null;
+ custom?: {
+ regex: string;
+ match: boolean;
+ };
+ leadingUnderscore?: 'forbid' | 'allow' | 'require';
+ trailingUnderscore?: 'forbid' | 'allow' | 'require';
+ prefix?: string[];
+ suffix?: string[];
+
+ // selector options
+ selector: Selector | Selector[];
+ filter?:
+ | string
+ | {
+ regex: string;
+ match: boolean;
+ };
+ // the allowed values for these are dependent on the selector - see below
+ modifiers?: Modifiers[];
+ types?: Types[];
+}[];
+
+// the default config is similar to ESLint's camelcase rule but more strict
+const defaultOptions: Options = [
+ {
+ selector: 'default',
+ format: ['camelCase'],
+ leadingUnderscore: 'allow',
+ trailingUnderscore: 'allow',
+ },
+
+ {
+ selector: 'variable',
+ format: ['camelCase', 'UPPER_CASE'],
+ leadingUnderscore: 'allow',
+ trailingUnderscore: 'allow',
+ },
+
+ {
+ selector: 'typeLike',
+ format: ['PascalCase'],
+ },
+];
+```
+
+### Format Options
+
+Every single selector can have the same set of format options.
+When the format of an identifier is checked, it is checked in the following order:
+
+1. validate leading underscore
+1. validate trailing underscore
+1. validate prefix
+1. validate suffix
+1. validate custom
+1. validate format
+
+For steps 1-4, if the identifier matches the option, the matching part will be removed.
+For example, if you provide the following formatting option: `{ leadingUnderscore: 'allow', prefix: ['I'], format: ['StrictPascalCase'] }`, for the identifier `_IMyInterface`, then the following checks will occur:
+
+1. `name = _IMyInterface`
+1. validate leading underscore - pass
+ - Trim leading underscore - `name = IMyInterface`
+1. validate trailing underscore - no check
+1. validate prefix - pass
+ - Trim prefix - `name = MyInterface`
+1. validate suffix - no check
+1. validate custom - no check
+1. validate format - pass
+
+One final note is that if the name were to become empty via this trimming process, it is considered to match all `format`s. An example of where this might be useful is for generic type parameters, where you want all names to be prefixed with `T`, but also want to allow for the single character `T` name.
+
+#### `format`
+
+The `format` option defines the allowed formats for the identifier. This option accepts an array of the following values, and the identifier can match any of them:
+
+- `camelCase` - standard camelCase format - no underscores are allowed between characters, and consecutive capitals are allowed (i.e. both `myID` and `myId` are valid).
+- `strictCamelCase` - same as `camelCase`, but consecutive capitals are not allowed (i.e. `myId` is valid, but `myID` is not).
+- `PascalCase` - same as `camelCase`, except the first character must be upper-case.
+- `StrictPascalCase` - same as `strictCamelCase`, except the first character must be upper-case.
+- `snake_case` - standard snake_case format - all characters must be lower-case, and underscores are allowed.
+- `UPPER_CASE` - same as `snake_case`, except all characters must be upper-case.
+
+Instead of an array, you may also pass `null`. This signifies "this selector shall not have its format checked".
+This can be useful if you want to enforce no particular format for a specific selector, after applying a group selector.
+
+### `custom`
+
+The `custom` option defines a custom regex that the identifier must (or must not) match. This option allows you to have a bit more finer-grained control over identifiers, letting you ban (or force) certain patterns and substrings.
+Accepts an object with the following properties:
+
+- `regex` - accepts a regular expression (anything accepted into `new RegExp(regex)`).
+- `match` - true if the identifier _must_ match the `regex`, false if the identifier _must not_ match the `regex`.
+
+### `filter`
+
+The `filter` option operates similar to `custom`, accepting the same shaped object, except that it controls if the rest of the configuration should or should not be applied to an identifier.
+
+You can use this to include or exclude specific identifiers from specific configurations.
+
+Accepts an object with the following properties:
+
+- `regex` - accepts a regular expression (anything accepted into `new RegExp(regex)`).
+- `match` - true if the identifier _must_ match the `regex`, false if the identifier _must not_ match the `regex`.
+
+Alternatively, `filter` accepts a regular expression (anything accepted into `new RegExp(filter)`). In this case, it's treated as if you had passed an object with the regex and `match: true`.
+
+#### `leadingUnderscore` / `trailingUnderscore`
+
+The `leadingUnderscore` / `trailingUnderscore` options control whether leading/trailing underscores are considered valid. Accepts one of the following values:
+
+- `forbid` - a leading/trailing underscore is not allowed at all.
+- `allow` - existence of a leading/trailing underscore is not explicitly enforced.
+- `require` - a leading/trailing underscore must be included.
+
+#### `prefix` / `suffix`
+
+The `prefix` / `suffix` options control which prefix/suffix strings must exist for the identifier. Accepts an array of strings.
+
+If these are provided, the identifier must start with one of the provided values. For example, if you provide `{ prefix: ['IFace', 'Class', 'Type'] }`, then the following names are valid: `IFaceFoo`, `ClassBar`, `TypeBaz`, but the name `Bang` is not valid, as it contains none of the prefixes.
+
+**Note:** As [documented above](#format-options), the prefix is trimmed before format is validated, therefore PascalCase must be used to allow variables such as `isEnabled` using the prefix `is`.
+
+### Selector Options
+
+- `selector` (see "Allowed Selectors, Modifiers and Types" below).
+ - Accepts one or array of selectors to define an option block that applies to one or multiple selectors.
+ - For example, if you provide `{ selector: ['variable', 'function'] }`, then it will apply the same option to variable and function nodes.
+- `modifiers` allows you to specify which modifiers to granularly apply to, such as the accessibility (`private`/`public`/`protected`), or if the thing is `static`, etc.
+ - The name must match _all_ of the modifiers.
+ - For example, if you provide `{ modifiers: ['private', 'static', 'readonly'] }`, then it will only match something that is `private static readonly`, and something that is just `private` will not match.
+- `types` allows you to specify which types to match. This option supports simple, primitive types only (`boolean`, `string`, `number`, `array`, `function`).
+ - The name must match _one_ of the types.
+ - **_NOTE - Using this option will require that you lint with type information._**
+ - For example, this lets you do things like enforce that `boolean` variables are prefixed with a verb.
+ - `boolean` matches any type assignable to `boolean | null | undefined`
+ - `string` matches any type assignable to `string | null | undefined`
+ - `number` matches any type assignable to `number | null | undefined`
+ - `array` matches any type assignable to `Array | null | undefined`
+ - `function` matches any type assignable to `Function | null | undefined`
+
+The ordering of selectors does not matter. The implementation will automatically sort the selectors to ensure they match from most-specific to least specific. It will keep checking selectors in that order until it finds one that matches the name.
+
+For example, if you provide the following config:
+
+```ts
+[
+ /* 1 */ { selector: 'default', format: ['camelCase'] },
+ /* 2 */ { selector: 'variable', format: ['snake_case'] },
+ /* 3 */ { selector: 'variable', types: ['boolean'], format: ['UPPER_CASE'] },
+ /* 4 */ { selector: 'variableLike', format: ['PascalCase'] },
+];
+```
+
+Then for the code `const x = 1`, the rule will validate the selectors in the following order: `3`, `2`, `4`, `1`.
+
+#### Allowed Selectors, Modifiers and Types
+
+There are two types of selectors, individual selectors, and grouped selectors.
+
+##### Individual Selectors
+
+Individual Selectors match specific, well-defined sets. There is no overlap between each of the individual selectors.
+
+- `variable` - matches any `var` / `let` / `const` variable name.
+ - Allowed `modifiers`: `const`.
+ - Allowed `types`: `boolean`, `string`, `number`, `function`, `array`.
+- `function` - matches any named function declaration or named function expression.
+ - Allowed `modifiers`: none.
+ - Allowed `types`: none.
+- `parameter` - matches any function parameter. Does not match parameter properties.
+ - Allowed `modifiers`: none.
+ - Allowed `types`: `boolean`, `string`, `number`, `function`, `array`.
+- `property` - matches any object, class, or object type property. Does not match properties that have direct function expression or arrow function expression values.
+ - Allowed `modifiers`: `private`, `protected`, `public`, `static`, `readonly`, `abstract`.
+ - Allowed `types`: `boolean`, `string`, `number`, `function`, `array`.
+- `parameterProperty` - matches any parameter property.
+ - Allowed `modifiers`: `private`, `protected`, `public`, `readonly`.
+ - Allowed `types`: `boolean`, `string`, `number`, `function`, `array`.
+- `method` - matches any object, class, or object type method. Also matches properties that have direct function expression or arrow function expression values. Does not match accessors.
+ - Allowed `modifiers`: `private`, `protected`, `public`, `static`, `readonly`, `abstract`.
+ - Allowed `types`: none.
+- `accessor` - matches any accessor.
+ - Allowed `modifiers`: `private`, `protected`, `public`, `static`, `readonly`, `abstract`.
+ - Allowed `types`: `boolean`, `string`, `number`, `function`, `array`.
+- `enumMember` - matches any enum member.
+ - Allowed `modifiers`: none.
+ - Allowed `types`: none.
+- `class` - matches any class declaration.
+ - Allowed `modifiers`: `abstract`.
+ - Allowed `types`: none.
+- `interface` - matches any interface declaration.
+ - Allowed `modifiers`: none.
+ - Allowed `types`: none.
+- `typeAlias` - matches any type alias declaration.
+ - Allowed `modifiers`: none.
+ - Allowed `types`: none.
+- `enum` - matches any enum declaration.
+ - Allowed `modifiers`: none.
+ - Allowed `types`: none.
+- `typeParameter` - matches any generic type parameter declaration.
+ - Allowed `modifiers`: none.
+ - Allowed `types`: none.
+
+##### Group Selectors
+
+Group Selectors are provided for convenience, and essentially bundle up sets of individual selectors.
+
+- `default` - matches everything.
+ - Allowed `modifiers`: `private`, `protected`, `public`, `static`, `readonly`, `abstract`.
+ - Allowed `types`: none.
+- `variableLike` - matches the same as `variable`, `function` and `parameter`.
+ - Allowed `modifiers`: none.
+ - Allowed `types`: none.
+- `memberLike` - matches the same as `property`, `parameterProperty`, `method`, `accessor`, `enumMember`.
+ - Allowed `modifiers`: `private`, `protected`, `public`, `static`, `readonly`, `abstract`.
+ - Allowed `types`: none.
+- `typeLike` - matches the same as `class`, `interface`, `typeAlias`, `enum`, `typeParameter`.
+ - Allowed `modifiers`: `abstract`.
+ - Allowed `types`: none.
+
+## Examples
+
+### Enforce that all variables, functions and properties follow are camelCase
+
+```json
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ { "selector": "variableLike", "format": ["camelCase"] }
+ ]
+}
+```
+
+### Enforce that private members are prefixed with an underscore
+
+```json
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "memberLike",
+ "modifiers": ["private"],
+ "format": ["camelCase"],
+ "leadingUnderscore": "require"
+ }
+ ]
+}
+```
+
+### Enforce that boolean variables are prefixed with an allowed verb
+
+**Note:** As [documented above](#format-options), the prefix is trimmed before format is validated, thus PascalCase must be used to allow variables such as `isEnabled`.
+
+```json
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "variable",
+ "types": ["boolean"],
+ "format": ["PascalCase"],
+ "prefix": ["is", "should", "has", "can", "did", "will"]
+ }
+ ]
+}
+```
+
+### Enforce that all variables are either in camelCase or UPPER_CASE
+
+```json
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "variable",
+ "format": ["camelCase", "UPPER_CASE"]
+ }
+ ]
+}
+```
+
+### Enforce that all const variables are in UPPER_CASE
+
+```json
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "variable",
+ "modifiers": ["const"],
+ "format": ["UPPER_CASE"]
+ }
+ ]
+}
+```
+
+### Enforce that type parameters (generics) are prefixed with `T`
+
+This allows you to emulate the old `generic-type-naming` rule.
+
+```json
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "typeParameter",
+ "format": ["PascalCase"],
+ "prefix": ["T"]
+ }
+ ]
+}
+```
+
+### Enforce that interface names do not begin with an `I`
+
+This allows you to emulate the old `interface-name-prefix` rule.
+
+```json
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "interface",
+ "format": ["PascalCase"],
+ "custom": {
+ "regex": "^I[A-Z]",
+ "match": false
+ }
+ }
+ ]
+}
+```
+
+### Enforce that variable and function names are in camelCase
+
+This allows you to lint multiple type with same pattern.
+
+```json
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": ["variable", "function"],
+ "format": ["camelCase"],
+ "leadingUnderscore": "allow"
+ }
+ ]
+}
+```
+
+### Ignore properties that require quotes
+
+Sometimes you have to use a quoted name that breaks the convention (for example, HTTP headers).
+If this is a common thing in your codebase, then you can use the `filter` option in one of two ways:
+
+You can use the `filter` option to ignore specific names only:
+
+```jsonc
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "property",
+ "format": ["strictCamelCase"],
+ "filter": {
+ // you can expand this regex to add more allowed names
+ "regex": "^(Property-Name-One|Property-Name-Two)$",
+ "match": false
+ }
+ }
+ ]
+}
+```
+
+You can use the `filter` option to ignore names that require quoting:
+
+```jsonc
+{
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "property",
+ "format": ["strictCamelCase"],
+ "filter": {
+ // you can expand this regex as you find more cases that require quoting that you want to allow
+ "regex": "[- ]",
+ "match": false
+ }
+ }
+ ]
+}
+```
+
+### Enforce the codebase follows ESLint's `camelcase` conventions
+
+```json
+{
+ "camelcase": "off",
+ "@typescript-eslint/naming-convention": [
+ "error",
+ {
+ "selector": "default",
+ "format": ["camelCase"]
+ },
+
+ {
+ "selector": "variable",
+ "format": ["camelCase", "UPPER_CASE"]
+ },
+ {
+ "selector": "parameter",
+ "format": ["camelCase"],
+ "leadingUnderscore": "allow"
+ },
+
+ {
+ "selector": "memberLike",
+ "modifiers": ["private"],
+ "format": ["camelCase"],
+ "leadingUnderscore": "require"
+ },
+
+ {
+ "selector": "typeLike",
+ "format": ["PascalCase"]
+ }
+ ]
+}
+```
+
+## When Not To Use It
+
+If you do not want to enforce naming conventions for anything.
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md
new file mode 100644
index 000000000..fb9a68e74
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-array-constructor.md
@@ -0,0 +1,43 @@
+# Disallow generic `Array` constructors (`no-array-constructor`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-array-constructor`](https://eslint.org/docs/rules/no-array-constructor) rule.
+It adds support for the generically typed `Array` constructor (`new Array()`).
+
+Examples of **incorrect** code for this rule:
+
+```ts
+/*eslint no-array-constructor: "error"*/
+
+Array(0, 1, 2);
+new Array(0, 1, 2);
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+/*eslint no-array-constructor: "error"*/
+
+Array(0, 1, 2);
+new Array(x, y, z);
+
+Array(500);
+new Array(someOtherArray.length);
+```
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-array-constructor": "off",
+ "@typescript-eslint/no-array-constructor": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/no-array-constructor` options](https://eslint.org/docs/rules/no-array-constructor#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-array-constructor.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md
new file mode 100644
index 000000000..f1c2abab3
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-base-to-string.md
@@ -0,0 +1,87 @@
+# Requires that `.toString()` is only called on objects which provide useful information when stringified (`no-base-to-string`)
+
+JavaScript will call `toString()` on an object when it is converted to a string, such as when `+` adding to a string or in `${}` template literals.
+
+The default Object `.toString()` returns `"[object Object]"`, so this rule requires stringified objects define a more useful `.toString()` method.
+
+Note that `Function` provides its own `.toString()` that returns the function's code.
+Functions are not flagged by this rule.
+
+This rule has some overlap with [`restrict-plus-operands`](./restrict-plus-operands.md) and [`restrict-template-expressions`](./restrict-template-expressions.md).
+
+## Rule Details
+
+This rule prevents accidentally defaulting to the base Object `.toString()` method.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+// Passing an object or class instance to string concatenation:
+'' + {};
+
+class MyClass {}
+const value = new MyClass();
+value + '';
+
+// Interpolation and manual .toString() calls too:
+`Value: ${value}`;
+({}.toString());
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+// These types all have useful .toString()s
+'Text' + true;
+`Value: ${123}`;
+`Arrays too: ${[1, 2, 3]}`;
+(() => {}).toString();
+
+// Defining a custom .toString class is considered acceptable
+class CustomToString {
+ toString() {
+ return 'Hello, world!';
+ }
+}
+`Value: ${new CustomToString()}`;
+
+const literalWithToString = {
+ toString: () => 'Hello, world!',
+};
+
+`Value: ${literalWithToString}`;
+```
+
+## Options
+
+```ts
+type Options = {
+ ignoredTypeNames?: string[];
+};
+
+const defaultOptions: Options = {
+ ignoredTypeNames: ['RegExp'],
+};
+```
+
+### `ignoredTypeNames`
+
+A string array of type names to ignore, this is useful for types missing `toString()` (but actually has `toString()`).
+There are some types missing `toString()` in old version TypeScript, like `RegExp`, `URL`, `URLSearchParams` etc.
+
+The following patterns are considered correct with the default options `{ ignoredTypeNames: ["RegExp"] }`:
+
+```ts
+`${/regex/}`;
+'' + /regex/;
+/regex/.toString();
+let value = /regex/;
+value.toString();
+let text = `${value}`;
+```
+
+## When Not To Use It
+
+If you don't mind `"[object Object]"` in your strings, then you will not need this rule.
+
+- [`Object.prototype.toString()` MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md
new file mode 100644
index 000000000..a61f6a8a9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md
@@ -0,0 +1,46 @@
+# Disallow non-null assertion in locations that may be confusing (`no-confusing-non-null-assertion`)
+
+## Rule Details
+
+Using a non-null assertion (`!`) next to an assign or equals check (`=` or `==` or `===`) creates code that is confusing as it looks similar to a not equals check (`!=` `!==`).
+
+```typescript
+a! == b; // a non-null assertions(`!`) and an equals test(`==`)
+a !== b; // not equals test(`!==`)
+a! === b; // a non-null assertions(`!`) and an triple equals test(`===`)
+```
+
+Examples of **incorrect** code for this rule:
+
+```ts
+interface Foo {
+ bar?: string;
+ num?: number;
+}
+
+const foo: Foo = getFoo();
+const isEqualsBar = foo.bar! == 'hello';
+const isEqualsNum = 1 + foo.num! == 2;
+```
+
+Examples of **correct** code for this rule:
+
+
+```ts
+interface Foo {
+ bar?: string;
+ num?: number;
+}
+
+const foo: Foo = getFoo();
+const isEqualsBar = foo.bar == 'hello';
+const isEqualsNum = (1 + foo.num!) == 2;
+```
+
+## When Not To Use It
+
+If you don't care about this confusion, then you will not need this rule.
+
+## Further Reading
+
+- [`Issue: Easy misunderstanding: "! ==="`](https://github.com/microsoft/TypeScript/issues/37837) in [TypeScript repo](https://github.com/microsoft/TypeScript)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md
new file mode 100644
index 000000000..ddfc1b9f1
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dupe-class-members.md
@@ -0,0 +1,22 @@
+# Disallow duplicate class members (`no-dupe-class-members`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-dupe-class-members`](https://eslint.org/docs/rules/no-dupe-class-members) rule.
+It adds support for TypeScript's method overload definitions.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-dupe-class-members": "off",
+ "@typescript-eslint/no-dupe-class-members": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/no-dupe-class-members` options](https://eslint.org/docs/rules/no-dupe-class-members#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-dupe-class-members.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md
new file mode 100644
index 000000000..5d84cb1c9
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-dynamic-delete.md
@@ -0,0 +1,49 @@
+# Disallow the delete operator with computed key expressions (`no-dynamic-delete`)
+
+Deleting dynamically computed keys can be dangerous and in some cases not well optimized.
+
+## Rule Details
+
+Using the `delete` operator on keys that aren't runtime constants could be a sign that you're using the wrong data structures.
+Using `Object`s with added and removed keys can cause occasional edge case bugs, such as if a key is named `"hasOwnProperty"`.
+Consider using a `Map` or `Set` if you’re storing collections of objects.
+
+Examples of **correct** code with this rule:
+
+```ts
+const container: { [i: string]: number } = {
+ /* ... */
+};
+
+// Constant runtime lookups by string index
+delete container.aaa;
+
+// Constants that must be accessed by []
+delete container[7];
+delete container['-Infinity'];
+```
+
+Examples of **incorrect** code with this rule:
+
+```ts
+// Can be replaced with the constant equivalents, such as container.aaa
+delete container['aaa'];
+delete container['Infinity'];
+
+// Dynamic, difficult-to-reason-about lookups
+const name = 'name';
+delete container[name];
+delete container[name.toUpperCase()];
+```
+
+## When Not To Use It
+
+When you know your keys are safe to delete, this rule can be unnecessary.
+Some environments such as older browsers might not support `Map` and `Set`.
+
+Do not consider this rule as performance advice before profiling your code's bottlenecks.
+Even repeated minor performance slowdowns likely do not significantly affect your application's general perceived speed.
+
+## Related to
+
+- TSLint: [no-dynamic-delete](https://palantir.github.io/tslint/rules/no-dynamic-delete)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md
new file mode 100644
index 000000000..071584e99
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-function.md
@@ -0,0 +1,78 @@
+# Disallow empty functions (`no-empty-function`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-empty-function`](https://eslint.org/docs/rules/no-empty-function) rule.
+It adds support for handling TypeScript specific code that would otherwise trigger the rule.
+
+One example of valid TypeScript specific code that would otherwise trigger the `no-empty-function` rule is the use of [parameter properties](https://www.typescriptlang.org/docs/handbook/classes.html#parameter-properties) in constructor functions.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-empty-function": "off",
+ "@typescript-eslint/no-empty-function": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/no-empty-function` options](https://eslint.org/docs/rules/no-empty-function#options).
+This rule adds the following options:
+
+```ts
+type AdditionalAllowOptionEntries =
+ | 'private-constructors'
+ | 'protected-constructors'
+ | 'decoratedFunctions';
+
+type AllowOptionEntries =
+ | BaseNoEmptyFunctionAllowOptionEntries
+ | AdditionalAllowOptionEntries;
+
+interface Options extends BaseNoEmptyFunctionOptions {
+ allow?: Array;
+}
+const defaultOptions: Options = {
+ ...baseNoEmptyFunctionDefaultOptions,
+ allow: [],
+};
+```
+
+### allow: `private-constructors`
+
+Examples of correct code for the `{ "allow": ["private-constructors"] }` option:
+
+```ts
+class Foo {
+ private constructor() {}
+}
+```
+
+### allow: `protected-constructors`
+
+Examples of correct code for the `{ "allow": ["protected-constructors"] }` option:
+
+```ts
+class Foo {
+ protected constructor() {}
+}
+```
+
+### allow: `decoratedFunctions`
+
+Examples of correct code for the `{ "allow": ["decoratedFunctions"] }` option:
+
+```ts
+@decorator()
+function foo() {}
+
+class Foo {
+ @decorator()
+ foo() {}
+}
+```
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-empty-function.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md
new file mode 100644
index 000000000..7df218a7e
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-empty-interface.md
@@ -0,0 +1,64 @@
+# Disallow the declaration of empty interfaces (`no-empty-interface`)
+
+An empty interface is equivalent to its supertype. If the interface does not implement a supertype, then
+the interface is equivalent to an empty object (`{}`). In both cases it can be omitted.
+
+## Rule Details
+
+This rule aims to ensure that only meaningful interfaces are declared in the code.
+
+The following patterns are considered warnings:
+
+```ts
+// an empty interface
+interface Foo {}
+
+// an interface with only one supertype (Bar === Foo)
+interface Bar extends Foo {}
+
+// an interface with an empty list of supertypes
+interface Baz {}
+```
+
+The following patterns are not warnings:
+
+```ts
+// an interface with any number of members
+interface Foo {
+ name: string;
+}
+
+// same as above
+interface Bar {
+ age: number;
+}
+
+// an interface with more than one supertype
+// in this case the interface can be used as a replacement of a union type.
+interface Baz extends Foo, Bar {}
+```
+
+### Options
+
+This rule accepts a single object option with the following default configuration:
+
+```json
+{
+ "@typescript-eslint/no-empty-interface": [
+ "error",
+ {
+ "allowSingleExtends": false
+ }
+ ]
+}
+```
+
+- `allowSingleExtends: true` will silence warnings about extending a single interface without adding additional members
+
+## When Not To Use It
+
+If you don't care about having empty/meaningless interfaces, then you will not need this rule.
+
+## Compatibility
+
+- TSLint: [no-empty-interface](https://palantir.github.io/tslint/rules/no-empty-interface/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md
new file mode 100644
index 000000000..7aeb46587
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-explicit-any.md
@@ -0,0 +1,181 @@
+# Disallow usage of the `any` type (`no-explicit-any`)
+
+Using the `any` type defeats the purpose of using TypeScript.
+When `any` is used, all compiler type checks around that value are ignored.
+
+## Rule Details
+
+This rule doesn't allow `any` types to be defined.
+It aims to keep TypeScript maximally useful.
+TypeScript has a compiler flag for `--noImplicitAny` that will prevent
+an `any` type from being implied by the compiler, but doesn't prevent
+`any` from being explicitly used.
+
+The following patterns are considered warnings:
+
+```ts
+const age: any = 'seventeen';
+```
+
+```ts
+const ages: any[] = ['seventeen'];
+```
+
+```ts
+const ages: Array = ['seventeen'];
+```
+
+```ts
+function greet(): any {}
+```
+
+```ts
+function greet(): any[] {}
+```
+
+```ts
+function greet(): Array {}
+```
+
+```ts
+function greet(): Array> {}
+```
+
+```ts
+function greet(param: Array): string {}
+```
+
+```ts
+function greet(param: Array): Array {}
+```
+
+The following patterns are not warnings:
+
+```ts
+const age: number = 17;
+```
+
+```ts
+const ages: number[] = [17];
+```
+
+```ts
+const ages: Array = [17];
+```
+
+```ts
+function greet(): string {}
+```
+
+```ts
+function greet(): string[] {}
+```
+
+```ts
+function greet(): Array {}
+```
+
+```ts
+function greet(): Array> {}
+```
+
+```ts
+function greet(param: Array): string {}
+```
+
+```ts
+function greet(param: Array): Array {}
+```
+
+## Options
+
+The rule accepts an options object with the following properties:
+
+```ts
+type Options = {
+ // if true, auto-fixing will be made available in which the "any" type is converted to an "unknown" type
+ fixToUnknown: boolean;
+ // specify if arrays from the rest operator are considered okay
+ ignoreRestArgs: boolean;
+};
+
+const defaults = {
+ fixToUnknown: false,
+ ignoreRestArgs: false,
+};
+```
+
+### `ignoreRestArgs`
+
+A boolean to specify if arrays from the rest operator are considered okay. `false` by default.
+
+Examples of **incorrect** code for the `{ "ignoreRestArgs": false }` option:
+
+```ts
+/*eslint @typescript-eslint/no-explicit-any: ["error", { "ignoreRestArgs": false }]*/
+
+function foo1(...args: any[]): void {}
+function foo2(...args: readonly any[]): void {}
+function foo3(...args: Array): void {}
+function foo4(...args: ReadonlyArray): void {}
+
+declare function bar(...args: any[]): void;
+
+const baz = (...args: any[]) => {};
+const qux = function (...args: any[]) {};
+
+type Quux = (...args: any[]) => void;
+type Quuz = new (...args: any[]) => void;
+
+interface Grault {
+ (...args: any[]): void;
+}
+interface Corge {
+ new (...args: any[]): void;
+}
+interface Garply {
+ f(...args: any[]): void;
+}
+```
+
+Examples of **correct** code for the `{ "ignoreRestArgs": true }` option:
+
+```ts
+/*eslint @typescript-eslint/no-explicit-any: ["error", { "ignoreRestArgs": true }]*/
+
+function foo1(...args: any[]): void {}
+function foo2(...args: readonly any[]): void {}
+function foo3(...args: Array): void {}
+function foo4(...args: ReadonlyArray): void {}
+
+declare function bar(...args: any[]): void;
+
+const baz = (...args: any[]) => {};
+const qux = function (...args: any[]) {};
+
+type Quux = (...args: any[]) => void;
+type Quuz = new (...args: any[]) => void;
+
+interface Grault {
+ (...args: any[]): void;
+}
+interface Corge {
+ new (...args: any[]): void;
+}
+interface Garply {
+ f(...args: any[]): void;
+}
+```
+
+## When Not To Use It
+
+If an unknown type or a library without typings is used
+and you want to be able to specify `any`.
+
+## Further Reading
+
+- TypeScript [any type](https://www.typescriptlang.org/docs/handbook/basic-types.html#any)
+
+## Compatibility
+
+- TSLint: [no-any](https://palantir.github.io/tslint/rules/no-any/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md
new file mode 100644
index 000000000..0991efdee
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-non-null-assertion.md
@@ -0,0 +1,49 @@
+# Disallow extra non-null assertion (`no-extra-non-null-assertion`)
+
+## Rule Details
+
+Examples of **incorrect** code for this rule:
+
+```ts
+const foo: { bar: number } | null = null;
+const bar = foo!!!.bar;
+```
+
+```ts
+function foo(bar: number | undefined) {
+ const bar: number = bar!!!;
+}
+```
+
+```ts
+function foo(bar?: { n: number }) {
+ return bar!?.n;
+}
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+const foo: { bar: number } | null = null;
+const bar = foo!.bar;
+```
+
+```ts
+function foo(bar: number | undefined) {
+ const bar: number = bar!;
+}
+```
+
+```ts
+function foo(bar?: { n: number }) {
+ return bar?.n;
+}
+```
+
+## How to use
+
+```json
+{
+ "@typescript-eslint/no-extra-non-null-assertion": ["error"]
+}
+```
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md
new file mode 100644
index 000000000..8173b2ef1
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-parens.md
@@ -0,0 +1,22 @@
+# Disallow unnecessary parentheses (`no-extra-parens`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-extra-parens`](https://eslint.org/docs/rules/no-extra-parens) rule.
+It adds support for TypeScript type assertions.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-extra-parens": "off",
+ "@typescript-eslint/no-extra-parens": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/no-extra-parens` options](https://eslint.org/docs/rules/no-extra-parens#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-extra-parens.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md
new file mode 100644
index 000000000..f6865bd8b
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extra-semi.md
@@ -0,0 +1,22 @@
+# Disallow unnecessary semicolons (`no-extra-semi`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-extra-semi`](https://eslint.org/docs/rules/no-extra-semi) rule.
+It adds support for class properties.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-extra-semi": "off",
+ "@typescript-eslint/no-extra-semi": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/no-extra-semi` options](https://eslint.org/docs/rules/no-extra-semi#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-extra-semi.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md
new file mode 100644
index 000000000..abc84f272
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-extraneous-class.md
@@ -0,0 +1,80 @@
+# Forbids the use of classes as namespaces (`no-extraneous-class`)
+
+This rule warns when a class is accidentally used as a namespace.
+
+## Rule Details
+
+From TSLint’s docs:
+
+> Users who come from a Java-style OO language may wrap their utility functions in an extra class,
+> instead of putting them at the top level.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+class EmptyClass {}
+
+class ConstructorOnly {
+ constructor() {
+ foo();
+ }
+}
+
+// Use an object instead:
+class StaticOnly {
+ static version = 42;
+ static hello() {
+ console.log('Hello, world!');
+ }
+}
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+class EmptyClass extends SuperClass {}
+
+class ParameterProperties {
+ constructor(public name: string) {}
+}
+
+const StaticOnly = {
+ version: 42,
+ hello() {
+ console.log('Hello, world!');
+ },
+};
+```
+
+### Options
+
+This rule accepts a single object option.
+
+```ts
+type Options = {
+ // allow extraneous classes if they only contain a constructor
+ allowConstructorOnly?: boolean;
+ // allow extraneous classes if they have no body (i.e. are empty)
+ allowEmpty?: boolean;
+ // allow extraneous classes if they only contain static members
+ allowStaticOnly?: boolean;
+ // allow extraneous classes if they have a decorator
+ allowWithDecorator?: boolean;
+};
+
+const defaultOptions: Options = {
+ allowConstructorOnly: false,
+ allowEmpty: false,
+ allowStaticOnly: false,
+ allowWithDecorator: false,
+};
+```
+
+## When Not To Use It
+
+You can disable this rule if you don’t have anyone who would make these kinds of mistakes on your
+team or if you use classes as namespaces.
+
+## Compatibility
+
+[`no-unnecessary-class`](https://palantir.github.io/tslint/rules/no-unnecessary-class/) from TSLint
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md
new file mode 100644
index 000000000..bda8c26b7
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-floating-promises.md
@@ -0,0 +1,104 @@
+# Requires Promise-like values to be handled appropriately (`no-floating-promises`)
+
+This rule forbids usage of Promise-like values in statements without handling
+their errors appropriately. Unhandled promises can cause several issues, such
+as improperly sequenced operations, ignored Promise rejections and more. Valid
+ways of handling a Promise-valued statement include `await`ing, returning, and
+either calling `.then()` with two arguments or `.catch()` with one argument.
+
+## Rule Details
+
+Examples of **incorrect** code for this rule:
+
+```ts
+const promise = new Promise((resolve, reject) => resolve('value'));
+promise;
+
+async function returnsPromise() {
+ return 'value';
+}
+returnsPromise().then(() => {});
+
+Promise.reject('value').catch();
+
+Promise.reject('value').finally();
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+const promise = new Promise((resolve, reject) => resolve('value'));
+await promise;
+
+async function returnsPromise() {
+ return 'value';
+}
+returnsPromise().then(
+ () => {},
+ () => {},
+);
+
+Promise.reject('value').catch(() => {});
+
+Promise.reject('value').finally(() => {});
+```
+
+## Options
+
+The rule accepts an options object with the following properties:
+
+```ts
+type Options = {
+ // if true, checking void expressions will be skipped
+ ignoreVoid?: boolean;
+ // if true, checking for async iife will be skipped
+ ignoreIIFE?: boolean;
+};
+
+const defaults = {
+ ignoreVoid: true,
+ ignoreIIFE: false,
+};
+```
+
+### `ignoreVoid`
+
+This allows you to stop the rule reporting promises consumed with void operator.
+This can be a good way to explicitly mark a promise as intentionally not awaited.
+
+Examples of **correct** code for this rule with `{ ignoreVoid: true }`:
+
+```ts
+async function returnsPromise() {
+ return 'value';
+}
+void returnsPromise();
+
+void Promise.reject('value');
+```
+
+With this option set to `true`, and if you are using `no-void`, you should turn on the [`allowAsAStatement`](https://eslint.org/docs/rules/no-void#allowasstatement) option.
+
+### `ignoreIIFE`
+
+This allows you to skip checking of async iife
+
+Examples of **correct** code for this rule with `{ ignoreIIFE: true }`:
+
+```ts
+await(async function () {
+ await res(1);
+})();
+
+(async function () {
+ await res(1);
+})();
+```
+
+## When Not To Use It
+
+If you do not use Promise-like values in your codebase, or want to allow them to remain unhandled.
+
+## Related to
+
+- TSLint: ['no-floating-promises'](https://palantir.github.io/tslint/rules/no-floating-promises/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md
new file mode 100644
index 000000000..c5d4c3f64
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-for-in-array.md
@@ -0,0 +1,44 @@
+# Disallow iterating over an array with a for-in loop (`no-for-in-array`)
+
+This rule prohibits iterating over an array with a for-in loop.
+
+## Rule Details
+
+Rationale from TSLint:
+
+A for-in loop (`for (var k in o)`) iterates over the properties of an Object.
+While it is legal to use for-in loops with array types, it is not common.
+for-in will iterate over the indices of the array as strings, omitting any "holes" in
+the array.
+More common is to use for-of, which iterates over the values of an array.
+If you want to iterate over the indices, alternatives include:
+
+```js
+array.forEach((value, index) => { ... });
+for (const [index, value] of array.entries()) { ... }
+for (let i = 0; i < array.length; i++) { ... }
+```
+
+Examples of **incorrect** code for this rule:
+
+```js
+for (const x in [3, 4, 5]) {
+ console.log(x);
+}
+```
+
+Examples of **correct** code for this rule:
+
+```js
+for (const x in { a: 3, b: 4, c: 5 }) {
+ console.log(x);
+}
+```
+
+## When Not To Use It
+
+If you want to iterate through a loop using the indices in an array as strings, you can turn off this rule.
+
+## Related to
+
+- TSLint: ['no-for-in-array'](https://palantir.github.io/tslint/rules/no-for-in-array/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md
new file mode 100644
index 000000000..8ef946b42
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implicit-any-catch.md
@@ -0,0 +1,76 @@
+# Disallow usage of the implicit `any` type in catch clauses (`no-implicit-any-catch`)
+
+TypeScript 4.0 added support for adding an explicit `any` or `unknown` type annotation on a catch clause variable.
+
+By default, TypeScript will type a catch clause variable as `any`, so explicitly annotating it as `unknown` can add a lot of safety to your codebase.
+
+The `noImplicitAny` flag in TypeScript does not cover this for backwards compatibility reasons.
+
+## Rule Details
+
+This rule requires an explicit type to be declared on a catch clause variable.
+
+The following pattern is considered a warning:
+
+```ts
+try {
+ // ...
+} catch (e) {
+ // ...
+}
+```
+
+The following pattern is **_not_** considered a warning:
+
+
+
+
+```ts
+try {
+ // ...
+} catch (e: unknown) {
+ // ...
+}
+```
+
+
+
+## Options
+
+The rule accepts an options object with the following properties:
+
+```ts
+type Options = {
+ // if false, disallow specifying `: any` as the error type as well. See also `no-explicit-any`
+ allowExplicitAny: boolean;
+};
+
+const defaults = {
+ allowExplicitAny: false,
+};
+```
+
+### `allowExplicitAny`
+
+The follow is is **_not_** considered a warning with `{ allowExplicitAny: true }`
+
+
+
+
+```ts
+try {
+ // ...
+} catch (e: any) {
+ // ...
+}
+```
+
+
+
+## When Not To Use It
+
+If you are not using TypeScript 4.0 (or greater), then you will not be able to use this rule, annotations on catch clauses is not supported.
+
+## Further Reading
+
+- [TypeScript 4.0 Beta Release Notes](https://devblogs.microsoft.com/typescript/announcing-typescript-4-0-beta/#unknown-on-catch)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md
new file mode 100644
index 000000000..3753adf26
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-implied-eval.md
@@ -0,0 +1,95 @@
+# Disallow the use of `eval()`-like methods (`no-implied-eval`)
+
+It's considered a good practice to avoid using `eval()`. There are security and performance implications involved with doing so, which is why many linters recommend disallowing `eval()`. However, there are some other ways to pass a string and have it interpreted as JavaScript code that have similar concerns.
+
+The first is using `setTimeout()`, `setInterval()`, `setImmediate` or `execScript()` (Internet Explorer only), all of which can accept a string of code as their first argument
+
+```ts
+setTimeout('alert(`Hi!`);', 100);
+```
+
+or using `new Function()`
+
+```ts
+const fn = new Function('a', 'b', 'return a + b');
+```
+
+This is considered an implied `eval()` because a string of code is
+passed in to be interpreted. The same can be done with `setInterval()`, `setImmediate()` and `execScript()`. All interpret the JavaScript code in the global scope.
+
+The best practice is to avoid using `new Function()` or `execScript()` and always use a function for the first argument of `setTimeout()`, `setInterval()` and `setImmediate()`.
+
+## Rule Details
+
+This rule aims to eliminate implied `eval()` through the use of `new Function()`, `setTimeout()`, `setInterval()`, `setImmediate()` or `execScript()`.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+/* eslint @typescript-eslint/no-implied-eval: "error" */
+
+setTimeout('alert(`Hi!`);', 100);
+
+setInterval('alert(`Hi!`);', 100);
+
+setImmediate('alert(`Hi!`)');
+
+execScript('alert(`Hi!`)');
+
+window.setTimeout('count = 5', 10);
+
+window.setInterval('foo = bar', 10);
+
+const fn = '() = {}';
+setTimeout(fn, 100);
+
+const fn = () => {
+ return 'x = 10';
+};
+setTimeout(fn(), 100);
+
+const fn = new Function('a', 'b', 'return a + b');
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+/* eslint @typescript-eslint/no-implied-eval: "error" */
+
+setTimeout(function () {
+ alert('Hi!');
+}, 100);
+
+setInterval(function () {
+ alert('Hi!');
+}, 100);
+
+setImmediate(function () {
+ alert('Hi!');
+});
+
+execScript(function () {
+ alert('Hi!');
+});
+
+const fn = () => {};
+setTimeout(fn, 100);
+
+const foo = {
+ fn: function () {},
+};
+setTimeout(foo.fn, 100);
+setTimeout(foo.fn.bind(this), 100);
+
+class Foo {
+ static fn = () => {};
+}
+
+setTimeout(Foo.fn, 100);
+```
+
+## When Not To Use It
+
+If you want to allow `new Function()` or `setTimeout()`, `setInterval()`, `setImmediate()` and `execScript()` with string arguments, then you can safely disable this rule.
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-implied-eval.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md
new file mode 100644
index 000000000..91fdfe678
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-inferrable-types.md
@@ -0,0 +1,146 @@
+# Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean (`no-inferrable-types`)
+
+Explicit types where they can be easily inferred may add unnecessary verbosity.
+
+## Rule Details
+
+This rule disallows explicit type declarations on parameters, variables
+and properties where the type can be easily inferred from its value.
+
+## Options
+
+This rule accepts the following options:
+
+```ts
+interface Options {
+ ignoreParameters?: boolean;
+ ignoreProperties?: boolean;
+}
+```
+
+### Default
+
+The default options are:
+
+```JSON
+{
+ "ignoreParameters": false,
+ "ignoreProperties": false,
+}
+```
+
+With these options, the following patterns are valid:
+
+```ts
+const a = 10n;
+const a = -10n;
+const a = BigInt(10);
+const a = -BigInt(10);
+const a = false;
+const a = true;
+const a = Boolean(null);
+const a = !0;
+const a = 10;
+const a = +10;
+const a = -10;
+const a = Number('1');
+const a = +Number('1');
+const a = -Number('1');
+const a = Infinity;
+const a = +Infinity;
+const a = -Infinity;
+const a = NaN;
+const a = +NaN;
+const a = -NaN;
+const a = null;
+const a = /a/;
+const a = RegExp('a');
+const a = new RegExp('a');
+const a = 'str';
+const a = `str`;
+const a = String(1);
+const a = Symbol('a');
+const a = undefined;
+const a = void someValue;
+
+class Foo {
+ prop = 5;
+}
+
+function fn(a = 5, b = true) {}
+
+function fn(a: number, b: boolean, c: string) {}
+```
+
+The following are invalid:
+
+```ts
+const a: bigint = 10n;
+const a: bigint = -10n;
+const a: bigint = BigInt(10);
+const a: bigint = -BigInt(10);
+const a: boolean = false;
+const a: boolean = true;
+const a: boolean = Boolean(null);
+const a: boolean = !0;
+const a: number = 10;
+const a: number = +10;
+const a: number = -10;
+const a: number = Number('1');
+const a: number = +Number('1');
+const a: number = -Number('1');
+const a: number = Infinity;
+const a: number = +Infinity;
+const a: number = -Infinity;
+const a: number = NaN;
+const a: number = +NaN;
+const a: number = -NaN;
+const a: null = null;
+const a: RegExp = /a/;
+const a: RegExp = RegExp('a');
+const a: RegExp = new RegExp('a');
+const a: string = 'str';
+const a: string = `str`;
+const a: string = String(1);
+const a: symbol = Symbol('a');
+const a: undefined = undefined;
+const a: undefined = void someValue;
+
+class Foo {
+ prop: number = 5;
+}
+
+function fn(a: number = 5, b: boolean = true) {}
+```
+
+### `ignoreParameters`
+
+When set to true, the following pattern is considered valid:
+
+```ts
+function foo(a: number = 5, b: boolean = true) {
+ // ...
+}
+```
+
+### `ignoreProperties`
+
+When set to true, the following pattern is considered valid:
+
+```ts
+class Foo {
+ prop: number = 5;
+}
+```
+
+## When Not To Use It
+
+If you do not want to enforce inferred types.
+
+## Further Reading
+
+TypeScript [Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html)
+
+## Compatibility
+
+TSLint: [no-inferrable-types](https://palantir.github.io/tslint/rules/no-inferrable-types/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md
new file mode 100644
index 000000000..ac9dc3012
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-this.md
@@ -0,0 +1,26 @@
+# disallow `this` keywords outside of classes or class-like objects (`no-invalid-this`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-invalid-this`](https://eslint.org/docs/rules/no-invalid-this) rule.
+It adds support for TypeScript's `this` parameters.
+
+## How to use
+
+```cjson
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-invalid-this": "off",
+ "@typescript-eslint/no-invalid-this": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/no-invalid-this` options](https://eslint.org/docs/rules/no-invalid-this#options).
+
+## When Not To Use It
+
+When you are indifferent as to how your variables are initialized.
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-invalid-this.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md
new file mode 100644
index 000000000..f1607478a
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-invalid-void-type.md
@@ -0,0 +1,107 @@
+# Disallows usage of `void` type outside of generic or return types (`no-invalid-void-type`)
+
+Disallows usage of `void` type outside of return types or generic type arguments.
+If `void` is used as return type, it shouldn’t be a part of intersection/union type with most other types.
+
+## Rationale
+
+The `void` type means “nothing” or that a function does not return any value,
+in contrast with implicit `undefined` type which means that a function returns a value `undefined`.
+So “nothing” cannot be mixed with any other types, other than `never`, which accepts all types.
+If you need this - use the `undefined` type instead.
+
+## Rule Details
+
+This rule aims to ensure that the `void` type is only used in valid places.
+
+The following patterns are considered warnings:
+
+```ts
+type PossibleValues = string | number | void;
+type MorePossibleValues = string | ((number & any) | (string | void));
+
+function logSomething(thing: void) {}
+function printArg(arg: T) {}
+
+logAndReturn(undefined);
+
+interface Interface {
+ lambda: () => void;
+ prop: void;
+}
+
+class MyClass {
+ private readonly propName: void;
+}
+```
+
+The following patterns are not considered warnings:
+
+```ts
+type NoOp = () => void;
+
+function noop(): void {}
+
+let trulyUndefined = void 0;
+
+async function promiseMeSomething(): Promise {}
+
+type stillVoid = void | never;
+```
+
+### Options
+
+```ts
+interface Options {
+ allowInGenericTypeArguments?: boolean | string[];
+}
+
+const defaultOptions: Options = {
+ allowInGenericTypeArguments: true,
+};
+```
+
+#### `allowInGenericTypeArguments`
+
+This option lets you control if `void` can be used as a valid value for generic type parameters.
+
+Alternatively, you can provide an array of strings which whitelist which types may accept `void` as a generic type parameter.
+
+Any types considered valid by this option will be considered valid as part of a union type with `void`.
+
+This option is `true` by default.
+
+The following patterns are considered warnings with `{ allowInGenericTypeArguments: false }`:
+
+```ts
+logAndReturn(undefined);
+
+let voidPromise: Promise = new Promise(() => {});
+let voidMap: Map = new Map();
+```
+
+The following patterns are considered warnings with `{ allowInGenericTypeArguments: ['Ex.Mx.Tx'] }`:
+
+```ts
+logAndReturn(undefined);
+
+type NotAllowedVoid1 = Mx.Tx;
+type NotAllowedVoid2 = Tx;
+type NotAllowedVoid3 = Promise;
+```
+
+The following patterns are not considered warnings with `{ allowInGenericTypeArguments: ['Ex.Mx.Tx'] }`:
+
+```ts
+type AllowedVoid = Ex.Mx.Tx;
+type AllowedVoidUnion = void | Ex.Mx.Tx;
+```
+
+## When Not To Use It
+
+If you don't care about if `void` is used with other types,
+or in invalid places, then you don't need this rule.
+
+## Compatibility
+
+- TSLint: [invalid-void](https://palantir.github.io/tslint/rules/invalid-void/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md
new file mode 100644
index 000000000..d48d38c20
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loop-func.md
@@ -0,0 +1,22 @@
+# Disallow function declarations that contain unsafe references inside loop statements (`no-loop-func`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-loop-func`](https://eslint.org/docs/rules/no-loop-func) rule.
+It adds support for TypeScript types.
+
+## How to use
+
+```cjson
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-loop-func": "off",
+ "@typescript-eslint/no-loop-func": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/no-loop-func` options](https://eslint.org/docs/rules/no-loop-func#options).
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-loop-func.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md
new file mode 100644
index 000000000..d6cf7b71c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-loss-of-precision.md
@@ -0,0 +1,19 @@
+# Disallow literal numbers that lose precision (`no-loss-of-precision`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-loss-of-precision`](https://eslint.org/docs/rules/no-loss-of-precision) rule.
+It adds support for [numeric separators](https://github.com/tc39/proposal-numeric-separator).
+Note that this rule requires ESLint v7.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-loss-of-precision": "off",
+ "@typescript-eslint/no-loss-of-precision": ["error"]
+}
+```
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-loss-of-precision.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md
new file mode 100644
index 000000000..f41204c13
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-magic-numbers.md
@@ -0,0 +1,119 @@
+# Disallow magic numbers (`no-magic-numbers`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-magic-numbers`](https://eslint.org/docs/rules/no-magic-numbers) rule.
+It adds support for:
+
+- numeric literal types (`type T = 1`),
+- `enum` members (`enum Foo { bar = 1 }`),
+- `readonly` class properties (`class Foo { readonly bar = 1 }`).
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-magic-numbers": "off",
+ "@typescript-eslint/no-magic-numbers": [
+ "error",
+ {
+ /* options */
+ }
+ ]
+}
+```
+
+## Options
+
+See [`eslint/no-magic-numbers` options](https://eslint.org/docs/rules/no-magic-numbers#options).
+This rule adds the following options:
+
+```ts
+interface Options extends BaseNoMagicNumbersOptions {
+ ignoreEnums?: boolean;
+ ignoreNumericLiteralTypes?: boolean;
+ ignoreReadonlyClassProperties?: boolean;
+}
+
+const defaultOptions: Options = {
+ ...baseNoMagicNumbersDefaultOptions,
+ ignoreEnums: false,
+ ignoreNumericLiteralTypes: false,
+ ignoreReadonlyClassProperties: false,
+};
+```
+
+### `ignoreEnums`
+
+A boolean to specify if enums used in TypeScript are considered okay. `false` by default.
+
+Examples of **incorrect** code for the `{ "ignoreEnums": false }` option:
+
+```ts
+/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnums": false }]*/
+
+enum foo = {
+ SECOND = 1000,
+}
+```
+
+Examples of **correct** code for the `{ "ignoreEnums": true }` option:
+
+```ts
+/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreEnums": true }]*/
+
+enum foo = {
+ SECOND = 1000,
+}
+```
+
+### `ignoreNumericLiteralTypes`
+
+A boolean to specify if numbers used in TypeScript numeric literal types are considered okay. `false` by default.
+
+Examples of **incorrect** code for the `{ "ignoreNumericLiteralTypes": false }` option:
+
+```ts
+/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreNumericLiteralTypes": false }]*/
+
+type SmallPrimes = 2 | 3 | 5 | 7 | 11;
+```
+
+Examples of **correct** code for the `{ "ignoreNumericLiteralTypes": true }` option:
+
+```ts
+/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreNumericLiteralTypes": true }]*/
+
+type SmallPrimes = 2 | 3 | 5 | 7 | 11;
+```
+
+### `ignoreReadonlyClassProperties`
+
+Examples of **incorrect** code for the `{ "ignoreReadonlyClassProperties": false }` option:
+
+```ts
+/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreReadonlyClassProperties": false }]*/
+
+class Foo {
+ readonly A = 1;
+ readonly B = 2;
+ public static readonly C = 1;
+ static readonly D = 1;
+}
+```
+
+Examples of **correct** code for the `{ "ignoreReadonlyClassProperties": true }` option:
+
+```ts
+/*eslint @typescript-eslint/no-magic-numbers: ["error", { "ignoreReadonlyClassProperties": true }]*/
+
+class Foo {
+ readonly A = 1;
+ readonly B = 2;
+ public static readonly C = 1;
+ static readonly D = 1;
+}
+```
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-magic-numbers.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md
new file mode 100644
index 000000000..f315fcac2
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-new.md
@@ -0,0 +1,41 @@
+# Enforce valid definition of `new` and `constructor` (`no-misused-new`)
+
+Warns on apparent attempts to define constructors for interfaces or `new` for classes.
+
+## Rule Details
+
+Examples of **incorrect** code for this rule.
+
+```ts
+class C {
+ new(): C;
+}
+
+interface I {
+ new (): I;
+ constructor(): void;
+}
+```
+
+Examples of **correct** code for this rule.
+
+```ts
+class C {
+ constructor() {}
+}
+interface I {
+ new (): C;
+}
+```
+
+## Options
+
+```json
+{
+ "@typescript-eslint/no-misused-new": "error"
+}
+```
+
+## Compatibility
+
+- TSLint: [no-misused-new](https://palantir.github.io/tslint/rules/no-misused-new/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md
new file mode 100644
index 000000000..6a4c2a557
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-misused-promises.md
@@ -0,0 +1,119 @@
+# Avoid using promises in places not designed to handle them (`no-misused-promises`)
+
+This rule forbids using promises in places where the TypeScript compiler
+allows them but they are not handled properly. These situations can often arise
+due to a missing `await` keyword or just a misunderstanding of the way async
+functions are handled/awaited.
+
+## Rule Details
+
+Examples of **incorrect** code for this rule with `checksConditionals: true`:
+
+```ts
+const promise = Promise.resolve('value');
+
+if (promise) {
+ // Do something
+}
+
+const val = promise ? 123 : 456;
+
+while (promise) {
+ // Do something
+}
+```
+
+Examples of **incorrect** code for this rule with `checksVoidReturn: true`:
+
+```ts
+[1, 2, 3].forEach(async value => {
+ await doSomething(value);
+});
+
+new Promise(async (resolve, reject) => {
+ await doSomething();
+ resolve();
+});
+
+const eventEmitter = new EventEmitter();
+eventEmitter.on('some-event', async () => {
+ await doSomething();
+});
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+const promise = Promise.resolve('value');
+
+if (await promise) {
+ // Do something
+}
+
+const val = (await promise) ? 123 : 456;
+
+while (await promise) {
+ // Do something
+}
+
+for (const value of [1, 2, 3]) {
+ await doSomething(value);
+}
+
+new Promise((resolve, reject) => {
+ // Do something
+ resolve();
+});
+
+const eventEmitter = new EventEmitter();
+eventEmitter.on('some-event', () => {
+ doSomething();
+});
+```
+
+## Options
+
+This rule accepts a single option which is an object with `checksConditionals`
+and `checksVoidReturn` properties indicating which types of misuse to flag.
+Both are enabled by default
+
+If you don't want functions that return promises where a void return is
+expected to be checked, your configuration will look like this:
+
+```json
+{
+ "@typescript-eslint/no-misused-promises": [
+ "error",
+ {
+ "checksVoidReturn": false
+ }
+ ]
+}
+```
+
+Likewise, if you don't want to check conditionals, you can configure the rule
+like this:
+
+```json
+{
+ "@typescript-eslint/no-misused-promises": [
+ "error",
+ {
+ "checksConditionals": false
+ }
+ ]
+}
+```
+
+## When Not To Use It
+
+If you do not use Promises in your codebase or are not concerned with possible
+misuses of them outside of what the TypeScript compiler will check.
+
+## Related to
+
+- [`no-floating-promises`](./no-floating-promises.md)
+
+## Further Reading
+
+- [TypeScript void function assignability](https://github.com/Microsoft/TypeScript/wiki/FAQ#why-are-functions-returning-non-void-assignable-to-function-returning-void)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md
new file mode 100644
index 000000000..b155c2aeb
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-namespace.md
@@ -0,0 +1,115 @@
+# Disallow the use of custom TypeScript modules and namespaces (`no-namespace`)
+
+Custom TypeScript modules (`module foo {}`) and namespaces (`namespace foo {}`) are considered outdated
+ways to organize TypeScript code. ES2015 module syntax is now preferred (`import`/`export`).
+
+This rule still allows the use of TypeScript module declarations to describe external APIs (`declare module 'foo' {}`).
+
+## Rule Details
+
+This rule aims to standardize the way modules are declared.
+
+## Options
+
+This rule, in its default state, does not require any argument. If you would like to enable one
+or more of the following you may pass an object with the options set as follows:
+
+- `allowDeclarations` set to `true` will allow you to `declare` custom TypeScript modules and namespaces (Default: `false`).
+- `allowDefinitionFiles` set to `true` will allow you to `declare` and use custom TypeScript modules and namespaces
+ inside definition files (Default: `true`).
+
+Examples of **incorrect** code for the default `{ "allowDeclarations": false, "allowDefinitionFiles": false }` options:
+
+```ts
+module foo {}
+namespace foo {}
+
+declare module foo {}
+declare namespace foo {}
+
+// anything inside a d.ts file
+```
+
+Examples of **correct** code for the default `{ "allowDeclarations": false, "allowDefinitionFiles": false }` options:
+
+```ts
+declare module 'foo' {}
+```
+
+### `allowDeclarations`
+
+Examples of **incorrect** code for the `{ "allowDeclarations": true }` option:
+
+```ts
+module foo {}
+namespace foo {}
+```
+
+Examples of **correct** code for the `{ "allowDeclarations": true }` option:
+
+```ts
+declare module 'foo' {}
+declare module foo {}
+declare namespace foo {}
+
+declare global {
+ namespace foo {}
+}
+
+declare module foo {
+ namespace foo {}
+}
+```
+
+Examples of **incorrect** code for the `{ "allowDeclarations": false }` option:
+
+```ts
+module foo {}
+namespace foo {}
+declare module foo {}
+declare namespace foo {}
+```
+
+Examples of **correct** code for the `{ "allowDeclarations": false }` option:
+
+```ts
+declare module 'foo' {}
+```
+
+### `allowDefinitionFiles`
+
+Examples of **incorrect** code for the `{ "allowDefinitionFiles": true }` option:
+
+```ts
+// if outside a d.ts file
+module foo {}
+namespace foo {}
+
+// if outside a d.ts file and allowDeclarations = false
+module foo {}
+namespace foo {}
+declare module foo {}
+declare namespace foo {}
+```
+
+Examples of **correct** code for the `{ "allowDefinitionFiles": true }` option:
+
+```ts
+declare module 'foo' {}
+
+// anything inside a d.ts file
+```
+
+## When Not To Use It
+
+If you are using the ES2015 module syntax, then you will not need this rule.
+
+## Further Reading
+
+- [Modules](https://www.typescriptlang.org/docs/handbook/modules.html)
+- [Namespaces](https://www.typescriptlang.org/docs/handbook/namespaces.html)
+- [Namespaces and Modules](https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html)
+
+## Compatibility
+
+- TSLint: [no-namespace](https://palantir.github.io/tslint/rules/no-namespace/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md
new file mode 100644
index 000000000..fdb2a8a18
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md
@@ -0,0 +1,48 @@
+# Disallows using a non-null assertion after an optional chain expression (`no-non-null-asserted-optional-chain`)
+
+## Rule Details
+
+Optional chain expressions are designed to return `undefined` if the optional property is nullish.
+Using non-null assertions after an optional chain expression is wrong, and introduces a serious type safety hole into your code.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+/* eslint @typescript-eslint/no-non-null-asserted-optional-chain: "error" */
+
+foo?.bar!;
+foo?.bar()!;
+
+// Prior to TS3.9, foo?.bar!.baz meant (foo?.bar).baz - i.e. the non-null assertion is applied to the entire chain so far.
+// For TS3.9 and greater, the non-null assertion is only applied to the property itself, so it's safe.
+// The following is incorrect code if you're using less than TS3.9
+foo?.bar!.baz;
+foo?.bar!();
+foo?.bar!().baz;
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+/* eslint @typescript-eslint/no-non-null-asserted-optional-chain: "error" */
+
+foo?.bar;
+(foo?.bar).baz;
+foo?.bar();
+foo?.bar();
+foo?.bar().baz;
+
+// The following is correct code if you're using TS3.9 or greater
+foo?.bar!.baz;
+foo?.bar!();
+foo?.bar!().baz;
+```
+
+## When Not To Use It
+
+If you are not using TypeScript 3.7 (or greater), then you will not need to use this rule, as the operator is not supported.
+
+## Further Reading
+
+- [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html)
+- [Optional Chaining Proposal](https://github.com/tc39/proposal-optional-chaining/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md
new file mode 100644
index 000000000..04de57686
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-non-null-assertion.md
@@ -0,0 +1,35 @@
+# Disallows non-null assertions using the `!` postfix operator (`no-non-null-assertion`)
+
+## Rule Details
+
+Using non-null assertions cancels the benefits of the strict null-checking mode.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+interface Foo {
+ bar?: string;
+}
+
+const foo: Foo = getFoo();
+const includesBaz: boolean = foo.bar!.includes('baz');
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+interface Foo {
+ bar?: string;
+}
+
+const foo: Foo = getFoo();
+const includesBaz: boolean = foo.bar?.includes('baz') ?? false;
+```
+
+## When Not To Use It
+
+If you don't care about strict null-checking, then you will not need this rule.
+
+## Further Reading
+
+- [`no-non-null-assertion`](https://palantir.github.io/tslint/rules/no-non-null-assertion/) in [TSLint](https://palantir.github.io/tslint/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md
new file mode 100644
index 000000000..bb2fd2691
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-parameter-properties.md
@@ -0,0 +1,367 @@
+# Disallow the use of parameter properties in class constructors (`no-parameter-properties`)
+
+Parameter properties can be confusing to those new to TypeScript as they are less explicit than other ways
+of declaring and initializing class members.
+
+## Rule Details
+
+This rule disallows the use of parameter properties in constructors, forcing the user to explicitly
+declare all properties in the class.
+
+## Options
+
+This rule, in its default state, does not require any argument and would completely disallow the use of parameter properties.
+If you would like to allow certain types of parameter properties then you may pass an object with the following options:
+
+- `allows`, an array containing one or more of the allowed modifiers. Valid values are:
+ - `readonly`, allows **readonly** parameter properties.
+ - `private`, allows **private** parameter properties.
+ - `protected`, allows **protected** parameter properties.
+ - `public`, allows **public** parameter properties.
+ - `private readonly`, allows **private readonly** parameter properties.
+ - `protected readonly`, allows **protected readonly** parameter properties.
+ - `public readonly`, allows **public readonly** parameter properties.
+
+### default
+
+Examples of **incorrect** code for this rule with no options at all:
+
+```ts
+class Foo {
+ constructor(readonly name: string) {}
+}
+
+class Foo {
+ constructor(private name: string) {}
+}
+
+class Foo {
+ constructor(protected name: string) {}
+}
+
+class Foo {
+ constructor(public name: string) {}
+}
+
+class Foo {
+ constructor(private readonly name: string) {}
+}
+
+class Foo {
+ constructor(protected readonly name: string) {}
+}
+
+class Foo {
+ constructor(public readonly name: string) {}
+}
+```
+
+Examples of **correct** code for this rule with no options at all:
+
+```ts
+class Foo {
+ constructor(name: string) {}
+}
+```
+
+### readonly
+
+Examples of **incorrect** code for the `{ "allows": ["readonly"] }` options:
+
+```ts
+class Foo {
+ constructor(private name: string) {}
+}
+
+class Foo {
+ constructor(protected name: string) {}
+}
+
+class Foo {
+ constructor(public name: string) {}
+}
+
+class Foo {
+ constructor(private readonly name: string) {}
+}
+
+class Foo {
+ constructor(protected readonly name: string) {}
+}
+
+class Foo {
+ constructor(public readonly name: string) {}
+}
+```
+
+Examples of **correct** code for the `{ "allows": ["readonly"] }` options:
+
+```ts
+class Foo {
+ constructor(name: string) {}
+}
+
+class Foo {
+ constructor(readonly name: string) {}
+}
+```
+
+### private
+
+Examples of **incorrect** code for the `{ "allows": ["private"] }` options:
+
+```ts
+class Foo {
+ constructor(readonly name: string) {}
+}
+
+class Foo {
+ constructor(protected name: string) {}
+}
+
+class Foo {
+ constructor(public name: string) {}
+}
+
+class Foo {
+ constructor(private readonly name: string) {}
+}
+
+class Foo {
+ constructor(protected readonly name: string) {}
+}
+
+class Foo {
+ constructor(public readonly name: string) {}
+}
+```
+
+Examples of **correct** code for the `{ "allows": ["private"] }` options:
+
+```ts
+class Foo {
+ constructor(name: string) {}
+}
+
+class Foo {
+ constructor(private name: string) {}
+}
+```
+
+### protected
+
+Examples of **incorrect** code for the `{ "allows": ["protected"] }` options:
+
+```ts
+class Foo {
+ constructor(readonly name: string) {}
+}
+
+class Foo {
+ constructor(private name: string) {}
+}
+
+class Foo {
+ constructor(public name: string) {}
+}
+
+class Foo {
+ constructor(private readonly name: string) {}
+}
+
+class Foo {
+ constructor(protected readonly name: string) {}
+}
+
+class Foo {
+ constructor(public readonly name: string) {}
+}
+```
+
+Examples of **correct** code for the `{ "allows": ["protected"] }` options:
+
+```ts
+class Foo {
+ constructor(name: string) {}
+}
+
+class Foo {
+ constructor(protected name: string) {}
+}
+```
+
+### public
+
+Examples of **incorrect** code for the `{ "allows": ["public"] }` options:
+
+```ts
+class Foo {
+ constructor(readonly name: string) {}
+}
+
+class Foo {
+ constructor(private name: string) {}
+}
+
+class Foo {
+ constructor(protected name: string) {}
+}
+
+class Foo {
+ constructor(private readonly name: string) {}
+}
+
+class Foo {
+ constructor(protected readonly name: string) {}
+}
+
+class Foo {
+ constructor(public readonly name: string) {}
+}
+```
+
+Examples of **correct** code for the `{ "allows": ["public"] }` options:
+
+```ts
+class Foo {
+ constructor(name: string) {}
+}
+
+class Foo {
+ constructor(public name: string) {}
+}
+```
+
+### private readonly
+
+Examples of **incorrect** code for the `{ "allows": ["private readonly"] }` options:
+
+```ts
+class Foo {
+ constructor(readonly name: string) {}
+}
+
+class Foo {
+ constructor(private name: string) {}
+}
+
+class Foo {
+ constructor(protected name: string) {}
+}
+
+class Foo {
+ constructor(public name: string) {}
+}
+
+class Foo {
+ constructor(protected readonly name: string) {}
+}
+
+class Foo {
+ constructor(public readonly name: string) {}
+}
+```
+
+Examples of **correct** code for the `{ "allows": ["private readonly"] }` options:
+
+```ts
+class Foo {
+ constructor(name: string) {}
+}
+
+class Foo {
+ constructor(private readonly name: string) {}
+}
+```
+
+### protected readonly
+
+Examples of **incorrect** code for the `{ "allows": ["protected readonly"] }` options:
+
+```ts
+class Foo {
+ constructor(readonly name: string) {}
+}
+
+class Foo {
+ constructor(private name: string) {}
+}
+
+class Foo {
+ constructor(protected name: string) {}
+}
+
+class Foo {
+ constructor(public name: string) {}
+}
+
+class Foo {
+ constructor(private readonly name: string) {}
+}
+
+class Foo {
+ constructor(public readonly name: string) {}
+}
+```
+
+Examples of **correct** code for the `{ "allows": ["protected readonly"] }` options:
+
+```ts
+class Foo {
+ constructor(name: string) {}
+}
+
+class Foo {
+ constructor(protected readonly name: string) {}
+}
+```
+
+### public readonly
+
+Examples of **incorrect** code for the `{ "allows": ["public readonly"] }` options:
+
+```ts
+class Foo {
+ constructor(readonly name: string) {}
+}
+
+class Foo {
+ constructor(private name: string) {}
+}
+
+class Foo {
+ constructor(protected name: string) {}
+}
+
+class Foo {
+ constructor(public name: string) {}
+}
+
+class Foo {
+ constructor(private readonly name: string) {}
+}
+
+class Foo {
+ constructor(protected readonly name: string) {}
+}
+```
+
+Examples of **correct** code for the `{ "allows": ["public readonly"] }` options:
+
+```ts
+class Foo {
+ constructor(name: string) {}
+}
+
+class Foo {
+ constructor(public readonly name: string) {}
+}
+```
+
+## When Not To Use It
+
+If you don't care about the using parameter properties in constructors, then you will not need this rule.
+
+## Compatibility
+
+- TSLint: [no-parameter-properties](https://palantir.github.io/tslint/rules/no-parameter-properties/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md
new file mode 100644
index 000000000..d9e704244
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-redeclare.md
@@ -0,0 +1,79 @@
+# Disallow variable redeclaration (`no-redeclare`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-redeclare`](https://eslint.org/docs/rules/no-redeclare) rule.
+It adds support for TypeScript function overloads, and declaration merging.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-redeclare": "off",
+ "@typescript-eslint/no-redeclare": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/no-redeclare` options](https://eslint.org/docs/rules/no-redeclare#options).
+This rule adds the following options:
+
+```ts
+interface Options extends BaseNoShadowOptions {
+ ignoreDeclarationMerge?: boolean;
+}
+
+const defaultOptions: Options = {
+ ...baseNoShadowDefaultOptions,
+ ignoreDeclarationMerge: true,
+};
+```
+
+### `ignoreDeclarationMerge`
+
+When set to `true`, the rule will ignore declaration merges between the following sets:
+
+- interface + interface
+- namespace + namespace
+- class + interface
+- class + namespace
+- class + interface + namespace
+- function + namespace
+
+Examples of **correct** code with `{ ignoreDeclarationMerge: true }`:
+
+```ts
+interface A {
+ prop1: 1;
+}
+interface A {
+ prop2: 2;
+}
+
+namespace Foo {
+ export const a = 1;
+}
+namespace Foo {
+ export const b = 2;
+}
+
+class Bar {}
+namespace Bar {}
+
+function Baz() {}
+namespace Baz {}
+```
+
+**Note:** Even with this option set to true, this rule will report if you name a type and a variable the same name. **_This is intentional_**.
+Declaring a variable and a type and a variable the same is usually an accident, and it can lead to hard-to-understand code.
+If you have a rare case where you're intentionally naming a type the same name as a variable, use a disable comment. For example:
+
+```ts
+type something = string;
+// eslint-disable-next-line @typescript-eslint/no-redeclare -- intentionally naming the variable the same as the type
+const something = 2;
+```
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-redeclare.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md
new file mode 100644
index 000000000..655fc57bd
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-require-imports.md
@@ -0,0 +1,34 @@
+# Disallows invocation of `require()` (`no-require-imports`)
+
+Prefer the newer ES6-style imports over `require()`.
+
+## Rule Details
+
+Examples of **incorrect** code for this rule:
+
+```ts
+var lib = require('lib');
+let lib2 = require('lib2');
+var lib5 = require('lib5'),
+ lib6 = require('lib6');
+import lib8 = require('lib8');
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+import { l } from 'lib';
+var lib3 = load('not_an_import');
+var lib4 = lib2.subImport;
+var lib7 = 700;
+import lib9 = lib2.anotherSubImport;
+import lib10 from 'lib10';
+```
+
+## When Not To Use It
+
+If you don't care about TypeScript module syntax, then you will not need this rule.
+
+## Compatibility
+
+- TSLint: [no-require-imports](https://palantir.github.io/tslint/rules/no-require-imports/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md
new file mode 100644
index 000000000..ed241b807
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-shadow.md
@@ -0,0 +1,87 @@
+# Disallow variable declarations from shadowing variables declared in the outer scope (`no-shadow`)
+
+## Rule Details
+
+This rule extends the base [`eslint/no-shadow`](https://eslint.org/docs/rules/no-shadow) rule.
+It adds support for TypeScript's `this` parameters, and adds options for TypeScript features.
+
+## How to use
+
+```jsonc
+{
+ // note you must disable the base rule as it can report incorrect errors
+ "no-shadow": "off",
+ "@typescript-eslint/no-shadow": ["error"]
+}
+```
+
+## Options
+
+See [`eslint/no-shadow` options](https://eslint.org/docs/rules/no-shadow#options).
+This rule adds the following options:
+
+```ts
+interface Options extends BaseNoShadowOptions {
+ ignoreTypeValueShadow?: boolean;
+ ignoreFunctionTypeParameterNameValueShadow?: boolean;
+}
+
+const defaultOptions: Options = {
+ ...baseNoShadowDefaultOptions,
+ ignoreTypeValueShadow: true,
+ ignoreFunctionTypeParameterNameValueShadow: true,
+};
+```
+
+### `ignoreTypeValueShadow`
+
+When set to `true`, the rule will ignore the case when you name a type the same as a variable.
+
+TypeScript allows types and variables to shadow one-another. This is generally safe because you cannot use variables in type locations without a `typeof` operator, so there's little risk of confusion.
+
+Examples of **correct** code with `{ ignoreTypeValueShadow: true }`:
+
+```ts
+type Foo = number;
+const Foo = 1;
+
+interface Bar {
+ prop: number;
+}
+const Bar = 'test';
+```
+
+### `ignoreFunctionTypeParameterNameValueShadow`
+
+When set to `true`, the rule will ignore the case when you name a function type argument the same as a variable.
+
+Each of a function type's arguments creates a value variable within the scope of the function type. This is done so that you can reference the type later using the `typeof` operator:
+
+```ts
+type Func = (test: string) => typeof test;
+
+declare const fn: Func;
+const result = fn('str'); // typeof result === string
+```
+
+This means that function type arguments shadow value variable names in parent scopes:
+
+```ts
+let test = 1;
+type TestType = typeof test; // === number
+type Func = (test: string) => typeof test; // this "test" references the argument, not the variable
+
+declare const fn: Func;
+const result = fn('str'); // typeof result === string
+```
+
+If you do not use the `typeof` operator in a function type return type position, you can safely turn this option on.
+
+Examples of **correct** code with `{ ignoreFunctionTypeParameterNameValueShadow: true }`:
+
+```ts
+const test = 1;
+type Func = (test: string) => typeof test;
+```
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-shadow.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md
new file mode 100644
index 000000000..324929e52
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-this-alias.md
@@ -0,0 +1,60 @@
+# Disallow aliasing `this` (`no-this-alias`)
+
+This rule prohibits assigning variables to `this`.
+
+## Rule Details
+
+Rationale from TSLint:
+
+> Assigning a variable to `this` instead of properly using arrow lambdas may be a symptom of pre-ES6 practices
+> or not managing scope well.
+>
+> Instead of storing a reference to `this` and using it inside a `function () {`:
+>
+> ```js
+> const self = this;
+>
+> setTimeout(function () {
+> self.doWork();
+> });
+> ```
+>
+> Use `() =>` arrow lambdas, as they preserve `this` scope for you:
+>
+> ```js
+> setTimeout(() => {
+> this.doWork();
+> });
+> ```
+
+Examples of **incorrect** code for this rule:
+
+(see the rationale above)
+
+Examples of **correct** code for this rule:
+
+(see the rationale above)
+
+### Options
+
+You can pass an object option:
+
+```jsonc
+{
+ "@typescript-eslint/no-this-alias": [
+ "error",
+ {
+ "allowDestructuring": true, // Allow `const { props, state } = this`; false by default
+ "allowedNames": ["self"] // Allow `const self = this`; `[]` by default
+ }
+ ]
+}
+```
+
+## When Not To Use It
+
+If you need to assign `this` to variables, you shouldn’t use this rule.
+
+## Related to
+
+- TSLint: [`no-this-assignment`](https://palantir.github.io/tslint/rules/no-this-assignment/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md
new file mode 100644
index 000000000..3b7ee9c2d
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-throw-literal.md
@@ -0,0 +1,84 @@
+# Disallow throwing literals as exceptions (`no-throw-literal`)
+
+It is considered good practice to only `throw` the `Error` object itself or an object using the `Error` object as base objects for user-defined exceptions.
+The fundamental benefit of `Error` objects is that they automatically keep track of where they were built and originated.
+
+This rule restricts what can be thrown as an exception. When it was first created, it only prevented literals from being thrown (hence the name), but it has now been expanded to only allow expressions which have a possibility of being an `Error` object.
+
+## Rule Details
+
+This rule is aimed at maintaining consistency when throwing exception by disallowing to throw literals and other expressions which cannot possibly be an `Error` object.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+/*eslint @typescript-eslint/no-throw-literal: "error"*/
+
+throw 'error';
+
+throw 0;
+
+throw undefined;
+
+throw null;
+
+const err = new Error();
+throw 'an ' + err;
+
+const err = new Error();
+throw `${err}`;
+
+const err = '';
+throw err;
+
+function err() {
+ return '';
+}
+throw err();
+
+const foo = {
+ bar: '',
+};
+throw foo.bar;
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+/*eslint @typescript-eslint/no-throw-literal: "error"*/
+
+throw new Error();
+
+throw new Error("error");
+
+const e = new Error("error");
+throw e;
+
+try {
+ throw new Error("error");
+} catch (e) {
+ throw e;
+}
+
+const err = new Error();
+throw err;
+
+function err() {
+ return new Error();
+}
+throw err();
+
+const foo = {
+ bar: new Error();
+}
+throw foo.bar;
+
+class CustomError extends Error {
+ // ...
+};
+throw new CustomError();
+```
+
+---
+
+Taken with ❤️ [from ESLint core](https://github.com/eslint/eslint/blob/master/docs/rules/no-throw-literal.md)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md
new file mode 100644
index 000000000..5b720b2f3
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-type-alias.md
@@ -0,0 +1,569 @@
+# Disallow the use of type aliases (`no-type-alias`)
+
+In TypeScript, type aliases serve three purposes:
+
+- Aliasing other types so that we can refer to them using a simpler name.
+
+```ts
+// this...
+type Person = {
+ firstName: string,
+ lastName: string,
+ age: number
+};
+
+function addPerson(person : Person) { ... }
+
+// is easier to read than this...
+function addPerson(person : { firstName: string, lastName: string, age: number}) { ... }
+```
+
+- Act sort of like an interface, providing a set of methods and properties that must exist
+ in the objects implementing the type.
+
+```ts
+type Person = {
+ firstName: string,
+ lastName: string,
+ age: number,
+ walk: () => void,
+ talk: () => void
+};
+
+// you know person will have 3 properties and 2 methods,
+// because the structure has already been defined.
+var person : Person = { ... }
+
+// so we can be sure that this will work
+person.walk();
+```
+
+- Act like mapping tools between types to allow quick modifications.
+
+```ts
+type Immutable = { readonly [P in keyof T]: T[P] };
+
+type Person = {
+ name: string;
+ age: number;
+};
+
+type ImmutablePerson = Immutable;
+
+var person: ImmutablePerson = { name: 'John', age: 30 };
+person.name = 'Brad'; // error, readonly property
+```
+
+When aliasing, the type alias does not create a new type, it just creates a new name
+to refer to the original type. So aliasing primitives and other simple types, tuples, unions
+or intersections can some times be redundant.
+
+```ts
+// this doesn't make much sense
+type myString = string;
+```
+
+On the other hand, using a type alias as an interface can limit your ability to:
+
+- Reuse your code: interfaces can be extended or implemented by other types. Type aliases cannot.
+- Debug your code: interfaces create a new name, so is easy to identify the base type of an object
+ while debugging the application.
+
+Finally, mapping types is an advanced technique and leaving it open can quickly become a pain point
+in your application.
+
+## Rule Details
+
+This rule disallows the use of type aliases in favor of interfaces
+and simplified types (primitives, tuples, unions, intersections, etc).
+
+## Options
+
+This rule, in its default state, does not require any argument. If you would like to enable one
+or more of the following you may pass an object with the options set as follows:
+
+- `allowAliases` set to `"always"` will allow you to do aliasing (Defaults to `"never"`).
+- `allowCallbacks` set to `"always"` will allow you to use type aliases with callbacks (Defaults to `"never"`)
+- `allowConditionalTypes` set to `"always"` will allow you to use type aliases with conditional types (Defaults to `"never"`)
+- `allowConstructors` set to `"always"` will allow you to use type aliases with constructors (Defaults to `"never"`)
+- `allowLiterals` set to `"always"` will allow you to use type aliases with literal objects (Defaults to `"never"`)
+- `allowMappedTypes` set to `"always"` will allow you to use type aliases as mapping tools (Defaults to `"never"`)
+- `allowTupleTypes` set to `"always"` will allow you to use type aliases with tuples (Defaults to `"never"`)
+
+### `allowAliases`
+
+This applies to primitive types and reference types.
+
+The setting accepts the following values:
+
+- `"always"` or `"never"` to active or deactivate the feature.
+- `"in-unions"`, allows aliasing in union statements, e.g. `type Foo = string | string[];`
+- `"in-intersections"`, allows aliasing in intersection statements, e.g. `type Foo = string & string[];`
+- `"in-unions-and-intersections"`, allows aliasing in union and/or intersection statements.
+
+Examples of **correct** code for the `{ "allowAliases": "always" }` options:
+
+```ts
+// primitives
+type Foo = 'a';
+
+type Foo = 'a' | 'b';
+
+type Foo = string;
+
+type Foo = string | string[];
+
+type Foo = string & string[];
+
+// reference types
+interface Bar {}
+class Baz implements Bar {}
+
+type Foo = Bar;
+
+type Foo = Bar | Baz;
+
+type Foo = Bar & Baz;
+```
+
+Examples of **incorrect** code for the `{ "allowAliases": "in-unions" }` option:
+
+```ts
+// primitives
+type Foo = 'a';
+
+type Foo = string;
+
+type Foo = string & string[];
+
+// reference types
+interface Bar {}
+class Baz implements Bar {}
+
+type Foo = Bar;
+
+type Foo = Bar & Baz;
+```
+
+Examples of **correct** code for the `{ "allowAliases": "in-unions" }` option:
+
+```ts
+// primitives
+type Foo = 'a' | 'b';
+
+type Foo = string | string[];
+
+// reference types
+interface Bar {}
+class Baz implements Bar {}
+
+type Foo = Bar | Baz;
+```
+
+Examples of **incorrect** code for the `{ "allowAliases": "in-intersections" }` option:
+
+```ts
+// primitives
+type Foo = 'a';
+
+type Foo = 'a' | 'b';
+
+type Foo = string;
+
+type Foo = string | string[];
+
+// reference types
+interface Bar {}
+class Baz implements Bar {}
+
+type Foo = Bar;
+
+type Foo = Bar | Baz;
+```
+
+Examples of **correct** code for the `{ "allowAliases": "in-intersections" }` option:
+
+```ts
+// primitives
+type Foo = string & string[];
+
+// reference types
+interface Bar {}
+class Baz implements Bar {}
+
+type Foo = Bar & Baz;
+```
+
+Examples of **incorrect** code for the `{ "allowAliases": "in-unions-and-intersections" }` option:
+
+```ts
+// primitives
+type Foo = 'a';
+
+type Foo = string;
+
+// reference types
+interface Bar {}
+class Baz implements Bar {}
+
+type Foo = Bar;
+```
+
+Examples of **correct** code for the `{ "allowAliases": "in-unions-and-intersections" }` option:
+
+```ts
+// primitives
+type Foo = 'a' | 'b';
+
+type Foo = string | string[];
+
+type Foo = string & string[];
+
+// reference types
+interface Bar {}
+class Baz implements Bar {}
+
+type Foo = Bar | Baz;
+
+type Foo = Bar & Baz;
+```
+
+### `allowCallbacks`
+
+This applies to function types.
+
+The setting accepts the following values:
+
+- `"always"` or `"never"` to active or deactivate the feature.
+
+Examples of **correct** code for the `{ "allowCallbacks": "always" }` option:
+
+```ts
+type Foo = () => void;
+
+type Foo = (name: string) => string;
+
+class Person {}
+
+type Foo = (name: string, age: number) => string | Person;
+
+type Foo = (name: string, age: number) => string & Person;
+```
+
+### `allowConditionalTypes`
+
+This applies to conditional types.
+
+Examples of **correct** code for the `{ "allowConditionalTypes": "always" }` option:
+
+```ts
+type Foo = T extends number ? number : null;
+```
+
+### `allowConstructors`
+
+This applies to constructor types.
+
+The setting accepts the following values:
+
+- `"always"` or `"never"` to active or deactivate the feature.
+
+Examples of **correct** code for the `{ "allowConstructors": "always" }` option:
+
+```ts
+type Foo = new () => void;
+```
+
+### `allowLiterals`
+
+This applies to literal types (`type Foo = { ... }`).
+
+The setting accepts the following options:
+
+- `"always"` or `"never"` to active or deactivate the feature.
+- `"in-unions"`, allows literals in union statements, e.g. `type Foo = string | string[];`
+- `"in-intersections"`, allows literals in intersection statements, e.g. `type Foo = string & string[];`
+- `"in-unions-and-intersections"`, allows literals in union and/or intersection statements.
+
+Examples of **correct** code for the `{ "allowLiterals": "always" }` options:
+
+```ts
+type Foo = {};
+
+type Foo = {
+ name: string;
+ age: number;
+};
+
+type Foo = {
+ name: string;
+ age: number;
+ walk: (miles: number) => void;
+};
+
+type Foo = { name: string } | { age: number };
+
+type Foo = { name: string } & { age: number };
+```
+
+Examples of **incorrect** code for the `{ "allowLiterals": "in-unions" }` option:
+
+```ts
+type Foo = {};
+
+type Foo = {
+ name: string;
+ age: number;
+};
+
+type Foo = {
+ name: string;
+ age: number;
+ walk: (miles: number) => void;
+};
+
+type Foo = { name: string } & { age: number };
+```
+
+Examples of **correct** code for the `{ "allowLiterals": "in-unions" }` option:
+
+```ts
+type Foo = { name: string } | { age: number };
+```
+
+Examples of **incorrect** code for the `{ "allowLiterals": "in-intersections" }` option:
+
+```ts
+type Foo = {};
+
+type Foo = {
+ name: string;
+ age: number;
+};
+
+type Foo = {
+ name: string;
+ age: number;
+ walk: (miles: number) => void;
+};
+
+type Foo = { name: string } | { age: number };
+```
+
+Examples of **correct** code for the `{ "allowLiterals": "in-intersections" }` option:
+
+```ts
+type Foo = { name: string } & { age: number };
+```
+
+Examples of **incorrect** code for the `{ "allowLiterals": "in-unions-and-intersections" }` option:
+
+```ts
+type Foo = {};
+
+type Foo = {
+ name: string;
+ age: number;
+};
+
+type Foo = {
+ name: string;
+ age: number;
+ walk: (miles: number) => void;
+};
+```
+
+Examples of **correct** code for the `{ "allowLiterals": "in-unions-and-intersections" }` option:
+
+```ts
+type Foo = { name: string } | { age: number };
+
+type Foo = { name: string } & { age: number };
+```
+
+### `allowMappedTypes`
+
+This applies to literal types.
+
+The setting accepts the following values:
+
+- `"always"` or `"never"` to active or deactivate the feature.
+- `"in-unions"`, allows aliasing in union statements, e.g. `type Foo = string | string[];`
+- `"in-intersections"`, allows aliasing in intersection statements, e.g. `type Foo = string & string[];`
+- `"in-unions-and-intersections"`, allows aliasing in union and/or intersection statements.
+
+Examples of **correct** code for the `{ "allowMappedTypes": "always" }` options:
+
+```ts
+type Foo = { readonly [P in keyof T]: T[P] };
+
+type Foo = { [P in keyof T]?: T[P] };
+
+type Foo =
+ | { readonly [P in keyof T]: T[P] }
+ | { readonly [P in keyof U]: U[P] };
+
+type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] };
+
+type Foo = { readonly [P in keyof T]: T[P] } &
+ { readonly [P in keyof U]: U[P] };
+
+type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] };
+```
+
+Examples of **incorrect** code for the `{ "allowMappedTypes": "in-unions" }` option:
+
+```ts
+type Foo = { readonly [P in keyof T]: T[P] };
+
+type Foo = { [P in keyof T]?: T[P] };
+
+type Foo = { readonly [P in keyof T]: T[P] } &
+ { readonly [P in keyof U]: U[P] };
+
+type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] };
+```
+
+Examples of **correct** code for the `{ "allowMappedTypes": "in-unions" }` option:
+
+```ts
+type Foo =
+ | { readonly [P in keyof T]: T[P] }
+ | { readonly [P in keyof U]: U[P] };
+
+type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] };
+```
+
+Examples of **incorrect** code for the `{ "allowMappedTypes": "in-intersections" }` option:
+
+```ts
+type Foo = { readonly [P in keyof T]: T[P] };
+
+type Foo = { [P in keyof T]?: T[P] };
+
+type Foo =
+ | { readonly [P in keyof T]: T[P] }
+ | { readonly [P in keyof U]: U[P] };
+
+type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] };
+```
+
+Examples of **correct** code for the `{ "allowMappedTypes": "in-intersections" }` option:
+
+```ts
+type Foo = { readonly [P in keyof T]: T[P] } &
+ { readonly [P in keyof U]: U[P] };
+
+type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] };
+```
+
+Examples of **incorrect** code for the `{ "allowMappedTypes": "in-unions-and-intersections" }` option:
+
+```ts
+type Foo = { readonly [P in keyof T]: T[P] };
+
+type Foo = { [P in keyof T]?: T[P] };
+```
+
+Examples of **correct** code for the `{ "allowMappedTypes": "in-unions-and-intersections" }` option:
+
+```ts
+type Foo =
+ | { readonly [P in keyof T]: T[P] }
+ | { readonly [P in keyof U]: U[P] };
+
+type Foo = { [P in keyof T]?: T[P] } | { [P in keyof U]?: U[P] };
+
+type Foo = { readonly [P in keyof T]: T[P] } &
+ { readonly [P in keyof U]: U[P] };
+
+type Foo = { [P in keyof T]?: T[P] } & { [P in keyof U]?: U[P] };
+```
+
+### `allowTupleTypes`
+
+This applies to tuple types (`type Foo = [number]`).
+
+The setting accepts the following options:
+
+- `"always"` or `"never"` to active or deactivate the feature.
+- `"in-unions"`, allows tuples in union statements, e.g. `type Foo = [string] | [string, string];`
+- `"in-intersections"`, allows tuples in intersection statements, e.g. `type Foo = [string] & [string, string];`
+- `"in-unions-and-intersections"`, allows tuples in union and/or intersection statements.
+
+Examples of **correct** code for the `{ "allowTupleTypes": "always" }` options:
+
+```ts
+type Foo = [number];
+
+type Foo = [number] | [number, number];
+
+type Foo = [number] & [number, number];
+
+type Foo = [number] | ([number, number] & [string, string]);
+```
+
+Examples of **incorrect** code for the `{ "allowTupleTypes": "in-unions" }` option:
+
+```ts
+type Foo = [number];
+
+type Foo = [number] & [number, number];
+
+type Foo = [string] & [number];
+```
+
+Examples of **correct** code for the `{ "allowTupleTypes": "in-unions" }` option:
+
+```ts
+type Foo = [number] | [number, number];
+
+type Foo = [string] | [number];
+```
+
+Examples of **incorrect** code for the `{ "allowTupleTypes": "in-intersections" }` option:
+
+```ts
+type Foo = [number];
+
+type Foo = [number] | [number, number];
+
+type Foo = [string] | [number];
+```
+
+Examples of **correct** code for the `{ "allowTupleTypes": "in-intersections" }` option:
+
+```ts
+type Foo = [number] & [number, number];
+
+type Foo = [string] & [number];
+```
+
+Examples of **incorrect** code for the `{ "allowTupleTypes": "in-unions-and-intersections" }` option:
+
+```ts
+type Foo = [number];
+
+type Foo = [string];
+```
+
+Examples of **correct** code for the `{ "allowLiterals": "in-unions-and-intersections" }` option:
+
+```ts
+type Foo = [number] & [number, number];
+
+type Foo = [string] | [number];
+```
+
+## When Not To Use It
+
+When you can't express some shape with an interface or you need to use a union, tuple type,
+callback, etc. that would cause the code to be unreadable or impractical.
+
+## Further Reading
+
+- [Advance Types](https://www.typescriptlang.org/docs/handbook/advanced-types.html)
+
+## Related to
+
+- TSLint: [interface-over-type-literal](https://palantir.github.io/tslint/rules/interface-over-type-literal/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md
new file mode 100644
index 000000000..d600bb793
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md
@@ -0,0 +1,134 @@
+# Flags unnecessary equality comparisons against boolean literals (`no-unnecessary-boolean-literal-compare`)
+
+Comparing boolean values to boolean literals is unnecessary, those comparisons result in the same booleans. Using the boolean values directly, or via a unary negation (`!value`), is more concise and clearer.
+
+## Rule Details
+
+This rule ensures that you do not include unnecessary comparisons with boolean literals.
+A comparison is considered unnecessary if it checks a boolean literal against any variable with just the `boolean` type.
+A comparison is **_not_** considered unnecessary if the type is a union of booleans (`string | boolean`, `someObject | boolean`).
+
+**Note**: Throughout this page, only strict equality (`===` and `!==`) are
+used in the examples. However, the implementation of the rule does not
+distinguish between strict and loose equality. Any example below that uses
+`===` would be treated the same way if `==` was used, and any example below
+that uses `!==` would be treated the same way if `!=` was used.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+declare const someCondition: boolean;
+if (someCondition === true) {
+}
+```
+
+Examples of **correct** code for this rule
+
+```ts
+declare const someCondition: boolean;
+if (someCondition) {
+}
+
+declare const someObjectBoolean: boolean | Record;
+if (someObjectBoolean === true) {
+}
+
+declare const someStringBoolean: boolean | string;
+if (someStringBoolean === true) {
+}
+```
+
+## Options
+
+The rule accepts an options object with the following properties.
+
+```ts
+type Options = {
+ // if false, comparisons between a nullable boolean variable to `true` will be checked and fixed
+ allowComparingNullableBooleansToTrue?: boolean;
+ // if false, comparisons between a nullable boolean variable to `false` will be checked and fixed
+ allowComparingNullableBooleansToFalse?: boolean;
+};
+```
+
+### Defaults
+
+This rule always checks comparisons between a boolean variable and a boolean
+literal. Comparisons between nullable boolean variables and boolean literals
+are **not** checked by default.
+
+```ts
+const defaults = {
+ allowComparingNullableBooleansToTrue: true,
+ allowComparingNullableBooleansToFalse: true,
+};
+```
+
+### `allowComparingNullableBooleansToTrue`
+
+Examples of **incorrect** code for this rule with `{ allowComparingNullableBooleansToTrue: false }`:
+
+```ts
+declare const someUndefinedCondition: boolean | undefined;
+if (someUndefinedCondition === true) {
+}
+
+declare const someNullCondition: boolean | null;
+if (someNullCondition !== true) {
+}
+```
+
+Examples of **correct** code for this rule with `{ allowComparingNullableBooleansToTrue: false }`:
+
+```ts
+declare const someUndefinedCondition: boolean | undefined;
+if (someUndefinedCondition) {
+}
+
+declare const someNullCondition: boolean | null;
+if (!someNullCondition) {
+}
+```
+
+### `allowComparingNullableBooleansToFalse`
+
+Examples of **incorrect** code for this rule with `{ allowComparingNullableBooleansToFalse: false }`:
+
+```ts
+declare const someUndefinedCondition: boolean | undefined;
+if (someUndefinedCondition === false) {
+}
+
+declare const someNullCondition: boolean | null;
+if (someNullCondition !== false) {
+}
+```
+
+Examples of **correct** code for this rule with `{ allowComparingNullableBooleansToFalse: false }`:
+
+```ts
+declare const someUndefinedCondition: boolean | undefined;
+if (someUndefinedCondition ?? true) {
+}
+
+declare const someNullCondition: boolean | null;
+if (!(someNullCondition ?? true)) {
+}
+```
+
+## Fixer
+
+| Comparison | Fixer Output | Notes |
+| :----------------------------: | ------------------------------- | ----------------------------------------------------------------------------------- |
+| `booleanVar === true` | `booleanLiteral` | |
+| `booleanVar !== true` | `!booleanLiteral` | |
+| `booleanVar === false` | `!booleanLiteral` | |
+| `booleanVar !== false` | `booleanLiteral` | |
+| `nullableBooleanVar === true` | `nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
+| `nullableBooleanVar !== true` | `!nullableBooleanVar` | Only checked/fixed if the `allowComparingNullableBooleansToTrue` option is `false` |
+| `nullableBooleanVar === false` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
+| `nullableBooleanVar !== false` | `!(nullableBooleanVar ?? true)` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` |
+
+## Related to
+
+- TSLint: [no-boolean-literal-compare](https://palantir.github.io/tslint/rules/no-boolean-literal-compare)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md
new file mode 100644
index 000000000..bff0f548f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-condition.md
@@ -0,0 +1,107 @@
+# Prevents conditionals where the type is always truthy or always falsy (`no-unnecessary-condition`)
+
+Any expression being used as a condition must be able to evaluate as truthy or falsy in order to be considered "necessary". Conversely, any expression that always evaluates to truthy or always evaluates to falsy, as determined by the type of the expression, is considered unnecessary and will be flagged by this rule.
+
+The following expressions are checked:
+
+- Arguments to the `&&`, `||` and `?:` (ternary) operators
+- Conditions for `if`, `for`, `while`, and `do-while` statements
+- Base values of optional chain expressions
+
+Examples of **incorrect** code for this rule:
+
+```ts
+function head(items: T[]) {
+ // items can never be nullable, so this is unnecessary
+ if (items) {
+ return items[0].toUpperCase();
+ }
+}
+
+function foo(arg: 'bar' | 'baz') {
+ // arg is never nullable or empty string, so this is unnecessary
+ if (arg) {
+ }
+}
+
+function bar(arg: string) {
+ // arg can never be nullish, so ?. is unnecessary
+ return arg?.length;
+}
+
+// Checks array predicate return types, where possible
+[
+ [1, 2],
+ [3, 4],
+].filter(t => t); // number[] is always truthy
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+function head(items: T[]) {
+ // Necessary, since items.length might be 0
+ if (items.length) {
+ return items[0].toUpperCase();
+ }
+}
+
+function foo(arg: string) {
+ // Necessary, since foo might be ''.
+ if (arg) {
+ }
+}
+
+function bar(arg?: string | null) {
+ // Necessary, since arg might be nullish
+ return arg?.length;
+}
+
+[0, 1, 2, 3].filter(t => t); // number can be truthy or falsy
+```
+
+## Options
+
+```ts
+type Options = {
+ // if true, the rule will ignore constant loop conditions
+ allowConstantLoopConditions?: boolean;
+ // if true, the rule will not error when running with a tsconfig that has strictNullChecks turned **off**
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing?: boolean;
+};
+
+const defaultOptions: Options = {
+ allowConstantLoopConditions: false,
+ allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
+};
+```
+
+### `allowConstantLoopConditions`
+
+Example of correct code for `{ allowConstantLoopConditions: true }`:
+
+```ts
+while (true) {}
+for (; true; ) {}
+do {} while (true);
+```
+
+### `allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing`
+
+If this is set to `false`, then the rule will error on every file whose `tsconfig.json` does _not_ have the `strictNullChecks` compiler option (or `strict`) set to `true`.
+
+Without `strictNullChecks`, TypeScript essentially erases `undefined` and `null` from the types. This means when this rule inspects the types from a variable, **it will not be able to tell that the variable might be `null` or `undefined`**, which essentially makes this rule useless.
+
+You should be using `strictNullChecks` to ensure complete type-safety in your codebase.
+
+If for some reason you cannot turn on `strictNullChecks`, but still want to use this rule - you can use this option to allow it - but know that the behavior of this rule is _undefined_ with the compiler option turned off. We will not accept bug reports if you are using this option.
+
+## When Not To Use It
+
+The main downside to using this rule is the need for type information.
+
+## Related To
+
+- ESLint: [no-constant-condition](https://eslint.org/docs/rules/no-constant-condition) - `no-unnecessary-condition` is essentially a stronger version of `no-constant-condition`, but requires type information.
+
+- [strict-boolean-expressions](./strict-boolean-expressions.md) - a more opinionated version of `no-unnecessary-condition`. `strict-boolean-expressions` enforces a specific code style, while `no-unnecessary-condition` is about correctness.
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md
new file mode 100644
index 000000000..56aba181c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-qualifier.md
@@ -0,0 +1,79 @@
+# Warns when a namespace qualifier is unnecessary (`no-unnecessary-qualifier`)
+
+## Rule Details
+
+This rule aims to let users know when a namespace or enum qualifier is unnecessary,
+whether used for a type or for a value.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+namespace A {
+ export type B = number;
+ const x: A.B = 3;
+}
+```
+
+```ts
+namespace A {
+ export const x = 3;
+ export const y = A.x;
+}
+```
+
+```ts
+enum A {
+ B,
+ C = A.B,
+}
+```
+
+```ts
+namespace A {
+ export namespace B {
+ export type T = number;
+ const x: A.B.T = 3;
+ }
+}
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+namespace X {
+ export type T = number;
+}
+
+namespace Y {
+ export const x: X.T = 3;
+}
+```
+
+```ts
+enum A {
+ X,
+ Y,
+}
+
+enum B {
+ Z = A.X,
+}
+```
+
+```ts
+namespace X {
+ export type T = number;
+ namespace Y {
+ type T = string;
+ const x: X.T = 0;
+ }
+}
+```
+
+## When Not To Use It
+
+If you don't care about having unneeded namespace or enum qualifiers, then you don't need to use this rule.
+
+## Further Reading
+
+- TSLint: [no-unnecessary-qualifier](https://palantir.github.io/tslint/rules/no-unnecessary-qualifier/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md
new file mode 100644
index 000000000..f5caaa42c
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md
@@ -0,0 +1,53 @@
+# Enforces that type arguments will not be used if not required (`no-unnecessary-type-arguments`)
+
+Warns if an explicitly specified type argument is the default for that type parameter.
+
+## Rule Details
+
+Type parameters in TypeScript may specify a default value.
+For example:
+
+```ts
+function f() {}
+```
+
+It is redundant to provide an explicit type parameter equal to that default.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+function f() {}
+f();
+
+function g() {}
+g();
+
+class C {}
+function h(c: C) {}
+new C();
+class D extends C {}
+
+interface I {}
+class Impl implements I {}
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+function f() {}
+f();
+
+function g() {}
+g();
+
+class C {}
+new C();
+class D extends C {}
+
+interface I {}
+class Impl implements I {}
+```
+
+## Related to
+
+- TSLint: [use-default-type-parameter](https://palantir.github.io/tslint/rules/use-default-type-parameter)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md
new file mode 100644
index 000000000..4464b6483
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md
@@ -0,0 +1,73 @@
+# Warns if a type assertion does not change the type of an expression (`no-unnecessary-type-assertion`)
+
+This rule prohibits using a type assertion that does not change the type of an expression.
+
+## Rule Details
+
+This rule aims to prevent unnecessary type assertions.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+const foo = 3;
+const bar = foo!;
+```
+
+```ts
+const foo = <3>3;
+```
+
+```ts
+type Foo = 3;
+const foo = 3;
+```
+
+```ts
+type Foo = 3;
+const foo = 3 as Foo;
+```
+
+```ts
+function foo(x: number): number {
+ return x!; // unnecessary non-null
+}
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+const foo = 3;
+```
+
+```ts
+const foo = 3 as number;
+```
+
+```ts
+const foo = 'foo' as const;
+```
+
+```ts
+function foo(x: number | undefined): number {
+ return x!;
+}
+```
+
+### Options
+
+This rule optionally takes an object with a single property `typesToIgnore`, which can be set to a list of type names to ignore.
+
+For example, with `@typescript-eslint/no-unnecessary-type-assertion: ["error", { typesToIgnore: ['Foo'] }]`, the following is **correct** code":
+
+```ts
+type Foo = 3;
+const foo: Foo = 3;
+```
+
+## When Not To Use It
+
+If you don't care about having no-op type assertions in your code, then you can turn off this rule.
+
+## Related to
+
+- TSLint: ['no-unnecessary-type-assertion`](https://palantir.github.io/tslint/rules/no-unnecessary-type-assertion/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md
new file mode 100644
index 000000000..64207e536
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-assignment.md
@@ -0,0 +1,72 @@
+# Disallows assigning any to variables and properties (`no-unsafe-assignment`)
+
+Despite your best intentions, the `any` type can sometimes leak into your codebase.
+Assigning an `any` typed value to a variable can be hard to pick up on, particularly if it leaks in from an external library. Operations on the variable will not be checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase.
+
+## Rule Details
+
+This rule disallows assigning `any` to a variable, and assigning `any[]` to an array destructuring.
+This rule also compares the assigned type to the variable's type to ensure you don't assign an unsafe `any` in a generic position to a receiver that's expecting a specific type. For example, it will error if you assign `Set` to a variable declared as `Set`.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+const x = 1 as any,
+ y = 1 as any;
+const [x] = 1 as any;
+const [x] = [] as any[];
+const [x] = [1 as any];
+[x] = [1] as [any];
+
+function foo(a = 1 as any) {}
+class Foo {
+ constructor(private a = 1 as any) {}
+}
+class Foo {
+ private a = 1 as any;
+}
+
+// generic position examples
+const x: Set = new Set();
+const x: Map = new Map();
+const x: Set = new Set();
+const x: Set>> = new Set>>();
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+const x = 1,
+ y = 1;
+const [x] = [1];
+[x] = [1] as [number];
+
+function foo(a = 1) {}
+class Foo {
+ constructor(private a = 1) {}
+}
+class Foo {
+ private a = 1;
+}
+
+// generic position examples
+const x: Set = new Set();
+const x: Map = new Map();
+const x: Set = new Set();
+const x: Set>> = new Set>>();
+```
+
+There are cases where the rule allows assignment of `any` to `unknown`.
+
+Example of `any` to `unknown` assignment that are allowed.
+
+```ts
+const x: unknown = y as any;
+const x: unknown[] = y as any[];
+const x: Set = y as Set;
+```
+
+## Related to
+
+- [`no-explicit-any`](./no-explicit-any.md)
+- TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md
new file mode 100644
index 000000000..1000e5921
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-call.md
@@ -0,0 +1,48 @@
+# Disallows calling an any type value (`no-unsafe-call`)
+
+Despite your best intentions, the `any` type can sometimes leak into your codebase.
+The arguments to, and return value of calling an `any` typed variable are not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase.
+
+## Rule Details
+
+This rule disallows calling any variable that is typed as `any`.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+declare const anyVar: any;
+declare const nestedAny: { prop: any };
+
+anyVar();
+anyVar.a.b();
+
+nestedAny.prop();
+nestedAny.prop['a']();
+
+new anyVar();
+new nestedAny.prop();
+
+anyVar`foo`;
+nestedAny.prop`foo`;
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+declare const typedVar: () => void;
+declare const typedNested: { prop: { a: () => void } };
+
+typedVar();
+typedNested.prop.a();
+
+(() => {})();
+
+new Map();
+
+String.raw`foo`;
+```
+
+## Related to
+
+- [`no-explicit-any`](./no-explicit-any.md)
+- TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md
new file mode 100644
index 000000000..2c2d8831f
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-member-access.md
@@ -0,0 +1,54 @@
+# Disallows member access on any typed variables (`no-unsafe-member-access`)
+
+Despite your best intentions, the `any` type can sometimes leak into your codebase.
+Member access on `any` typed variables is not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase.
+
+## Rule Details
+
+This rule disallows member access on any variable that is typed as `any`.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+declare const anyVar: any;
+declare const nestedAny: { prop: any };
+
+anyVar.a;
+anyVar.a.b;
+anyVar['a'];
+anyVar['a']['b'];
+
+nestedAny.prop.a;
+nestedAny.prop['a'];
+
+const key = 'a';
+nestedAny.prop[key];
+
+// Using an any to access a member is unsafe
+const arr = [1, 2, 3];
+arr[anyVar];
+nestedAny[anyVar];
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+declare const properlyTyped: { prop: { a: string } };
+
+nestedAny.prop.a;
+nestedAny.prop['a'];
+
+const key = 'a';
+nestedAny.prop[key];
+
+const arr = [1, 2, 3];
+arr[1];
+const idx = 1;
+arr[idx];
+arr[idx++];
+```
+
+## Related to
+
+- [`no-explicit-any`](./no-explicit-any.md)
+- TSLint: [`no-unsafe-any`](https://palantir.github.io/tslint/rules/no-unsafe-any/)
diff --git a/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md
new file mode 100644
index 000000000..9810be3cf
--- /dev/null
+++ b/node_modules/@typescript-eslint/eslint-plugin/docs/rules/no-unsafe-return.md
@@ -0,0 +1,89 @@
+# Disallows returning any from a function (`no-unsafe-return`)
+
+Despite your best intentions, the `any` type can sometimes leak into your codebase.
+Returned `any` typed values not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase.
+
+## Rule Details
+
+This rule disallows returning `any` or `any[]` from a function.
+This rule also compares the return type to the function's declared/inferred return type to ensure you don't return an unsafe `any` in a generic position to a receiver that's expecting a specific type. For example, it will error if you return `Set` from a function declared as returning `Set`.
+
+Examples of **incorrect** code for this rule:
+
+```ts
+function foo1() {
+ return 1 as any;
+}
+function foo2() {
+ return Object.create(null);
+}
+const foo3 = () => {
+ return 1 as any;
+};
+const foo4 = () => Object.create(null);
+
+function foo5() {
+ return [] as any[];
+}
+function foo6() {
+ return [] as Array;
+}
+function foo7() {
+ return [] as readonly any[];
+}
+function foo8() {
+ return [] as Readonly;
+}
+const foo9 = () => {
+ return [] as any[];
+};
+const foo10 = () => [] as any[];
+
+const foo11 = (): string[] => [1, 2, 3] as any[];
+
+// generic position examples
+function assignability1(): Set {
+ return new Set([1]);
+}
+type TAssign = () => Set;
+const assignability2: TAssign = () => new Set([true]);
+```
+
+Examples of **correct** code for this rule:
+
+```ts
+function foo1() {
+ return 1;
+}
+function foo2() {
+ return Object.create(null) as Record