diff --git a/.cspell.json b/.cspell.json index 4691cd152db..0c5b1d6c286 100644 --- a/.cspell.json +++ b/.cspell.json @@ -8,7 +8,7 @@ "**/*.{json,snap}", "**/**/CHANGELOG.md", "**/**/CONTRIBUTORS.md", - "**/**/ROADMAP.md", + "**/**/TSLINT_RULE_ALTERNATIVES.md", "**/coverage/**", "**/dist/**", "**/fixtures/**", @@ -59,6 +59,7 @@ "declarators", "destructure", "destructured", + "dprint", "errored", "erroring", "ESLint", @@ -88,6 +89,7 @@ "preact", "Premade", "prettier's", + "Quickstart", "recurse", "redeclaration", "redeclarations", diff --git a/.eslintrc.js b/.eslintrc.js index 4d2673c632c..f3f97eebf54 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -15,6 +15,7 @@ module.exports = { }, extends: [ 'eslint:recommended', + 'plugin:eslint-plugin/recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', ], @@ -194,7 +195,7 @@ module.exports = { '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-return': 'off', - 'eslint-plugin/no-identical-tests': 'error', + 'eslint-plugin/consistent-output': 'off', // Might eventually be removed from `eslint-plugin/recommended`: https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/issues/284 'jest/no-disabled-tests': 'warn', 'jest/no-focused-tests': 'error', 'jest/no-alias-methods': 'error', diff --git a/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml b/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml index 47cf18170d2..af01af154c2 100644 --- a/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml +++ b/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml @@ -1,9 +1,9 @@ -name: "๐Ÿ› Report a Bug With a Rule" -description: "Report a bug you encountered with a lint rule" -title: "Bug: [rule name here] " +name: '๐Ÿ› Report a Bug With a Rule' +description: 'Report a bug you encountered with a lint rule' +title: 'Bug: [rule name here] ' labels: - bug - - "package: eslint-plugin" + - 'package: eslint-plugin' - triage body: - type: checkboxes diff --git a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml index b04b5f2d127..8b857b50548 100644 --- a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml +++ b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml @@ -1,9 +1,9 @@ -name: "โœจ Propose a New Rule Option or Additional Checks" -description: "Propose a new lint rule option or propose that a lint rule checks more cases" -title: "Enhancement: [rule-name] " +name: 'โœจ Propose a New Rule Option or Additional Checks' +description: 'Propose a new lint rule option or propose that a lint rule checks more cases' +title: 'Enhancement: [rule-name] ' labels: - - "enhancement: plugin rule option" - - "package: eslint-plugin" + - 'enhancement: plugin rule option' + - 'package: eslint-plugin' - triage body: - type: checkboxes diff --git a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml index b7481356d70..2e01a8d2c58 100644 --- a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml +++ b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml @@ -1,9 +1,9 @@ -name: "โœจ Propose a New Rule" -description: "Propose a new lint rule" -title: "Rule proposal: " +name: 'โœจ Propose a New Rule' +description: 'Propose a new lint rule' +title: 'Rule proposal: ' labels: - - "enhancement: new plugin rule" - - "package: eslint-plugin" + - 'enhancement: new plugin rule' + - 'package: eslint-plugin' - triage body: - type: checkboxes diff --git a/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml b/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml index ee30ab1f42f..1c02ebe658a 100644 --- a/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml +++ b/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml @@ -1,9 +1,9 @@ -name: "โœจ Propose a New Base Rule Extension" -description: "Propose a new base lint rule extension" -title: "Base rule extension: [rule-name] " +name: 'โœจ Propose a New Base Rule Extension' +description: 'Propose a new base lint rule extension' +title: 'Base rule extension: [rule-name] ' labels: - - "enhancement: new base rule extension" - - "package: eslint-plugin" + - 'enhancement: new base rule extension' + - 'package: eslint-plugin' - triage body: - type: markdown diff --git a/.github/ISSUE_TEMPLATE/05-documentation-request.yml b/.github/ISSUE_TEMPLATE/05-documentation-request.yml index 08a98658047..f21358bf8ed 100644 --- a/.github/ISSUE_TEMPLATE/05-documentation-request.yml +++ b/.github/ISSUE_TEMPLATE/05-documentation-request.yml @@ -1,6 +1,6 @@ -name: "๐Ÿ“ Documentation Request" -description: "Request a change in documentation" -title: "Docs: " +name: '๐Ÿ“ Documentation Request' +description: 'Request a change in documentation' +title: 'Docs: ' labels: - documentation - triage diff --git a/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml b/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml index 015e3a05ba7..6340c525b37 100644 --- a/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml +++ b/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml @@ -1,6 +1,6 @@ -name: "๐Ÿ› Report a Bug With Another Package" -description: "Report a bug you encountered with another one of our packages (parser, util, scope-manager, etc)" -title: "Bug: " +name: '๐Ÿ› Report a Bug With Another Package' +description: 'Report a bug you encountered with another one of our packages (parser, util, scope-manager, etc)' +title: 'Bug: ' labels: - bug - triage diff --git a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml index d68dea5a65e..686ee970a67 100644 --- a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml +++ b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml @@ -1,6 +1,6 @@ -name: "โœจ Propose an Enhancement With Another Package" -description: "Report an enhancement to another one of our packages (parser, util, scope-manager, etc)" -title: "Enhancement: " +name: 'โœจ Propose an Enhancement With Another Package' +description: 'Report an enhancement to another one of our packages (parser, util, scope-manager, etc)' +title: 'Enhancement: ' labels: - enhancement - triage diff --git a/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml b/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml index 81fa9be184a..1292c539f27 100644 --- a/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml +++ b/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml @@ -1,6 +1,6 @@ -name: "๐Ÿ› Report a Complex Bug With a Reproduction Repository" +name: '๐Ÿ› Report a Complex Bug With a Reproduction Repository' description: Report a complex bug you encountered by providing an isolated reproduction repository -title: "Bug: " +title: 'Bug: ' labels: - bug - triage diff --git a/.github/ISSUE_TEMPLATE/09-config-change.yaml b/.github/ISSUE_TEMPLATE/09-config-change.yaml index b743f8ee4a5..6f31c3f96b0 100644 --- a/.github/ISSUE_TEMPLATE/09-config-change.yaml +++ b/.github/ISSUE_TEMPLATE/09-config-change.yaml @@ -1,9 +1,9 @@ -name: "โ™ป Propose a Change to Preset Configurations" -description: "Propose an addition, removal, or general change to a preset config" -title: "Configs: " +name: 'โ™ป Propose a Change to Preset Configurations' +description: 'Propose an addition, removal, or general change to a preset config' +title: 'Configs: ' labels: - - "package: eslint-plugin" - - "preset config change" + - 'package: eslint-plugin' + - 'preset config change' - triage body: - type: checkboxes diff --git a/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml b/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml index 1f35a7cd59b..55787d4d407 100644 --- a/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml +++ b/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml @@ -1,8 +1,8 @@ -name: "๐Ÿ— Suggest an Improvement with Repository Maintenance" +name: '๐Ÿ— Suggest an Improvement with Repository Maintenance' description: Report a bug or request a feature related to developing the typescript-eslint monorepo -title: "Repo: " +title: 'Repo: ' labels: - - "repo maintenance" + - 'repo maintenance' - triage body: - type: markdown diff --git a/.github/actions/prepare-build/action.yml b/.github/actions/prepare-build/action.yml index a83f403c0ff..ce69eddedc5 100644 --- a/.github/actions/prepare-build/action.yml +++ b/.github/actions/prepare-build/action.yml @@ -1,15 +1,15 @@ -name: "Prepare: Build" -description: "Prepares the repo for a job by running the build" +name: 'Prepare: Build' +description: 'Prepares the repo for a job by running the build' # inputs: - no inputs # outputs: - no outputs runs: - using: "composite" + using: 'composite' steps: - uses: actions/cache@v3 id: build-cache with: - path: "**/dist/**" + path: '**/dist/**' key: ${{ runner.os }}-build-${{ github.ref }} restore-keys: | ${{ runner.os }}-build- diff --git a/.github/actions/prepare-install/action.yml b/.github/actions/prepare-install/action.yml index 4d28fccf7b2..bcb843c9a61 100644 --- a/.github/actions/prepare-install/action.yml +++ b/.github/actions/prepare-install/action.yml @@ -1,17 +1,17 @@ -name: "Prepare: Checkout and Install" -description: "Prepares the repo for a job by checking out and installing dependencies" +name: 'Prepare: Checkout and Install' +description: 'Prepares the repo for a job by checking out and installing dependencies' inputs: node-version: - description: "The node version to setup" + description: 'The node version to setup' required: true registry-url: - description: "Define registry-url" + description: 'Define registry-url' required: false # outputs: - no outputs runs: - using: "composite" + using: 'composite' steps: - name: echo github.ref shell: bash diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 1c84b2de3d0..3e72e13f7a9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -6,9 +6,9 @@ Otherwise we may not be able to review your PR. ## PR Checklist -- [ ] Addresses an existing open issue: fixes #000 -- [ ] That issue was marked as [accepting prs](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22) -- [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md) were taken +- [ ] Addresses an existing open issue: fixes #000 +- [ ] That issue was marked as [accepting prs](https://github.com/typescript-eslint/typescript-eslint/issues?q=is%3Aopen+is%3Aissue+label%3A%22accepting+prs%22) +- [ ] Steps in [CONTRIBUTING.md](https://github.com/typescript-eslint/typescript-eslint/blob/main/CONTRIBUTING.md) were taken ## Overview diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6363babb0df..924efa87564 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,11 +55,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - lint-task: [ - "check-spelling", - "check-format", - "lint-markdown", - ] + lint-task: ['check-spelling', 'check-format', 'lint-markdown'] steps: - name: Checkout uses: actions/checkout@v3 @@ -78,10 +74,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - lint-task: [ - "lint", - "typecheck", - ] + lint-task: ['lint', 'typecheck'] steps: - name: Checkout uses: actions/checkout@v3 @@ -122,18 +115,19 @@ jobs: matrix: # just run on the oldest and latest supported versions and assume the intermediate versions are good node-version: [12, 18] - package: [ - "ast-spec", - "eslint-plugin", - "eslint-plugin-internal", - "eslint-plugin-tslint", - "parser", - "scope-manager", - "type-utils", - "typescript-estree", - "utils", - "visitor-keys", - ] + package: + [ + 'ast-spec', + 'eslint-plugin', + 'eslint-plugin-internal', + 'eslint-plugin-tslint', + 'parser', + 'scope-manager', + 'type-utils', + 'typescript-estree', + 'utils', + 'visitor-keys', + ] env: # Added the - at the end to function as a separator to improve readability in the PR comment from the Nx cloud app NX_CLOUD_ENV_NAME: 'Node ${{ matrix.node-version }} -' @@ -228,17 +222,10 @@ jobs: flags: unittest name: codecov - publish_canary_version: name: Publish the latest code as a canary version runs-on: ubuntu-latest - needs: - [ - integration_tests, - lint_with_build, - lint_without_build, - unit_tests, - ] + needs: [integration_tests, lint_with_build, lint_without_build, unit_tests] if: github.repository == 'typescript-eslint/typescript-eslint' && github.ref == 'refs/heads/main' steps: - name: Checkout @@ -247,7 +234,7 @@ jobs: uses: ./.github/actions/prepare-install with: node-version: ${{ env.PRIMARY_NODE_VERSION }} - registry-url: "https://registry.npmjs.org" + registry-url: 'https://registry.npmjs.org' - name: Build uses: ./.github/actions/prepare-build diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 84152062b22..4b73d71b7a0 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -1,8 +1,8 @@ -name: "Lock threads" +name: 'Lock threads' on: schedule: - - cron: "0 0 * * *" + - cron: '0 0 * * *' jobs: lock: @@ -11,9 +11,9 @@ jobs: - uses: dessant/lock-threads@v3 with: github-token: ${{ github.token }} - issue-inactive-days: "30" - issue-lock-reason: "resolved" - issue-comment: "" - pr-inactive-days: "30" - pr-lock-reason: "resolved" - pr-comment: "" + issue-inactive-days: '30' + issue-lock-reason: 'resolved' + issue-comment: '' + pr-inactive-days: '30' + pr-lock-reason: 'resolved' + pr-comment: '' diff --git a/.prettierignore b/.prettierignore index eda67619c87..637f32f77bf 100644 --- a/.prettierignore +++ b/.prettierignore @@ -8,15 +8,10 @@ **/.nyc_output **/.vs packages/eslint-plugin-tslint/tests/test-tslint-rules-directory/alwaysFailRule.js -.github packages/eslint-plugin/src/configs/*.json -.all-contributorsrc CONTRIBUTORS.md packages/ast-spec/src/*/*/fixtures/_error_/*/fixture.ts -# Syntax not yet supported -packages/scope-manager/tests/fixtures/type-declaration/type-query-with-parameters.ts - # Ignore CHANGELOG.md files to avoid issues with automated release job CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 33f3fd241ba..73b6a7f4ed6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,78 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + + +### Bug Fixes + +* missing placeholders in violation messages for `no-unnecessary-type-constraint` and `no-unsafe-argument` (and enable `eslint-plugin/recommended` rules internally) ([#5453](https://github.com/typescript-eslint/typescript-eslint/issues/5453)) ([d023910](https://github.com/typescript-eslint/typescript-eslint/commit/d0239104f4dbffd2b5ecdb19e520c7d4b71962e0)) + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + + +### Bug Fixes + +* **eslint-plugin:** [no-extra-parens] handle await with type assertion ([#5428](https://github.com/typescript-eslint/typescript-eslint/issues/5428)) ([e03826f](https://github.com/typescript-eslint/typescript-eslint/commit/e03826f08ce8bfdd6d6702025d975cfb7d867097)) +* **website:** add explicit frontmatter description to rule docs ([#5429](https://github.com/typescript-eslint/typescript-eslint/issues/5429)) ([63cba5f](https://github.com/typescript-eslint/typescript-eslint/commit/63cba5f4c1884e102927b3b14b18a00e96ac63a1)) + + +### Features + +* **eslint-plugin:** [member-ordering] support static blocks ([#5417](https://github.com/typescript-eslint/typescript-eslint/issues/5417)) ([5983e5a](https://github.com/typescript-eslint/typescript-eslint/commit/5983e5ab3bfb94fec782bea54a37457fe31db545)) +* **eslint-plugin:** [prefer-as-const] adds support for class properties ([#5413](https://github.com/typescript-eslint/typescript-eslint/issues/5413)) ([d2394f8](https://github.com/typescript-eslint/typescript-eslint/commit/d2394f810960fda07b9c8affd47b769d16f4b8cb)) + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + + +### Features + +* **eslint-plugin:** [no-use-before-define] add "allowNamedExports" option ([#5397](https://github.com/typescript-eslint/typescript-eslint/issues/5397)) ([ad412cd](https://github.com/typescript-eslint/typescript-eslint/commit/ad412cdd74dc5619fbe4bf27c0a5eb5c5a4b65ca)) + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + + +### Bug Fixes + +* **eslint-plugin:** [typedef] Support nested array destructuring with type annotation ([#5311](https://github.com/typescript-eslint/typescript-eslint/issues/5311)) ([6d19efe](https://github.com/typescript-eslint/typescript-eslint/commit/6d19efed16d1cf0357ad363b6373d2021c49a8c8)) +* **scope-manager:** handle typeParameters of TSInstantiationExpression ([#5355](https://github.com/typescript-eslint/typescript-eslint/issues/5355)) ([2595ccf](https://github.com/typescript-eslint/typescript-eslint/commit/2595ccf67cd5158edbd6bebd9ac2dbd8bbd8b99c)) + + +### Features + +* **eslint-plugin:** [consistent-generic-ctors] check class field declaration ([#5288](https://github.com/typescript-eslint/typescript-eslint/issues/5288)) ([48f996e](https://github.com/typescript-eslint/typescript-eslint/commit/48f996e8dda79c9c865e8ca6552069902836648b)) +* **eslint-plugin:** [prefer-nullish-coalescing] add ignoreTernaryTests option ([#4965](https://github.com/typescript-eslint/typescript-eslint/issues/4965)) ([f82727f](https://github.com/typescript-eslint/typescript-eslint/commit/f82727ffeb97475c07773ca1d1e5b9609fcc5e68)) + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + + +### Bug Fixes + +* **eslint-plugin:** [no-inferrable] fix optional param to valid code ([#5342](https://github.com/typescript-eslint/typescript-eslint/issues/5342)) ([98f6d5e](https://github.com/typescript-eslint/typescript-eslint/commit/98f6d5e6d08d1eb9789da52a15f337f5f53438bd)) +* **eslint-plugin:** [no-unused-vars] highlight last write reference ([#5267](https://github.com/typescript-eslint/typescript-eslint/issues/5267)) ([c3f199a](https://github.com/typescript-eslint/typescript-eslint/commit/c3f199a65a16aa72f5bb83e81a1ce0ffb5f69772)) +* expose types supporting old versions of typescript ([#5339](https://github.com/typescript-eslint/typescript-eslint/issues/5339)) ([4ba9bdb](https://github.com/typescript-eslint/typescript-eslint/commit/4ba9bdb93f87e6bc370f13aa1de48f435abe3f88)) +* **scope-manager:** allow visiting of constraint in infer type ([#5331](https://github.com/typescript-eslint/typescript-eslint/issues/5331)) ([b2846a1](https://github.com/typescript-eslint/typescript-eslint/commit/b2846a16777a3aea7b1e6ac9d81b9b6dce0bb874)) + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/typescript-eslint diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index e4c447067d3..8be7d260525 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -21,8 +21,8 @@ Thanks goes to these wonderful people:
Nicholas C. Zakas
-
Jed Fox

Joshua Chen
+
Jed Fox

YeonJuan

Rafael Santana
@@ -52,25 +52,25 @@ Thanks goes to these wonderful people:
Kanitkorn Sujautra

cherryblossom

Daniil Dubrava
-
Anix
+
Zzzen
+
Anix

Pete Gonzalez

ldrick

Susisu

G r e y
-
Zzzen

Gavin Barron

Kevin Partington

Lucas Duailibe
-
Validark
+
Niles Salter

Pavel Birukov

Shahar Dawn Or
-
islandryu
+
SHIMA RYUHEI

koooge

thomas michael wallace

ulrichb
@@ -84,9 +84,9 @@ Thanks goes to these wonderful people:
James Garbutt
-
zz
-
Bence Dรกnyi
-
Eric Wang
+
Jonathan Delgado
+
Philipp A.
+
Pig Fang
diff --git a/_redirects b/_redirects new file mode 100644 index 00000000000..1b61a020ea0 --- /dev/null +++ b/_redirects @@ -0,0 +1,4 @@ +/docs/linting /docs +/docs/linting/type-linting /docs/linting/typed-linting +/docs/linting/monorepo /docs/linting/typed-linting/monorepos +/docs/linting/tslint /docs/linting/troubleshooting/tslint diff --git a/docs/README.md b/docs/README.md index dfac81e925a..23cbcd84ffa 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,13 +1,79 @@ --- +id: getting-started title: Getting Started -sidebar_label: Getting Started slug: / --- -These docs will give you a quick overview of the project and all of its pieces, as well as provide guides to help you get set up. +## Quickstart -The docs are broken down into the following categories: +These steps will get you running ESLint with our recommended rules on your TypeScript code as quickly as possible. -- [I want to lint my TypeScript codebase.](./linting/README.md) +### Step 1: Installation -- [I want to develop an ESLint plugin in TypeScript.](./development/CUSTOM_RULES.md) +First, install the required packages for [ESLint](https://eslint.io), [TypeScript](https://typescriptlang.org), and this plugin: + +```bash npm2yarn +npm install --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin eslint typescript +``` + +### Step 2: Configuration + +Next, create a `.eslintrc.cjs` config file in the root of your project, and populate it with the following: + +```js title=".eslintrc.cjs" +module.exports = { + extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'], + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + root: true, +}; +``` + +:::info +If your project doesn't use ESM, naming the file as `.eslintrc.js` is fine. See [ESLint's Configuration Files docs](https://eslint.org/docs/user-guide/configuring/configuration-files) for more info. +::: + +### Step 3: Running ESLint + +Open a terminal to the root of your project and run the following command: + + + + +```bash +npx eslint . +``` + + + + +```bash +yarn eslint . +``` + + + + +ESLint will lint all TypeScript compatible files within the current folder, and will output the results to your terminal. + +## Details + +- You can read more about configuring ESLint [in their documentation on configuration](https://eslint.org/docs/user-guide/configuring). +- You can read more about the rules provided by ESLint [in their documentation on their rules](https://eslint.org/docs/rules/). +- You can read more about the rules provided by typescript-eslint in [our rules documentation](/rules). + +### Configuration Values + +- `parser: '@typescript-eslint/parser'` tells ESLint to use the [`@typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser) package you installed to parse your source files. + - This is required, or else ESLint will throw errors as it tries to parse TypeScript code as if it were regular JavaScript. +- `plugins: ['@typescript-eslint']` tells ESLint to load the [`@typescript-eslint/eslint-plugin`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin) package as a plugin. + - This allows you to use typescript-eslint's rules within your codebase. +- `extends: [ ... ]` tells ESLint that your config extends the given configurations. + - `eslint:recommended` is ESLint's inbuilt "recommended" config - it turns on a small, sensible set of rules which lint for well-known best-practices. + - `plugin:@typescript-eslint/recommended` is our "recommended" config - it's just like `eslint:recommended`, except it only turns on rules from our TypeScript-specific plugin. + +## Next Steps + +We provide a plethora of powerful rules that utilize the power of TypeScript's type information. [Visit the next page for a setup guide](./linting/TYPED_LINTING.md 'Visit the next page for a typed rules setup guide'). + +If you're having problems getting this working, please have a look at our [Troubleshooting & FAQs](./linting/TROUBLESHOOTING.md). diff --git a/docs/development/architecture/PACKAGES.md b/docs/development/architecture/PACKAGES.md index 461cc021812..f798e35b2e4 100644 --- a/docs/development/architecture/PACKAGES.md +++ b/docs/development/architecture/PACKAGES.md @@ -66,7 +66,7 @@ Any custom rules you write generally will be as well. [`@typescript-eslint/eslint-plugin-tslint`] is a separate ESLint plugin that allows running TSLint rules within ESLint to help you migrate from TSLint to ESLint. :::caution -**TSLint is deprecated.** It is in your best interest to migrate off it entirely. See [Linting > TSLint](../../linting/TSLINT.md). +**TSLint is deprecated.** It is in your best interest to migrate off it. See [Linting > Troubleshooting & FAQs > What About TSLint?](../../linting/troubleshooting/TSLINT.md). ::: [`@typescript-eslint/eslint-plugin-tslint`]: https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin-tslint diff --git a/docs/linting/CONFIGS.md b/docs/linting/CONFIGURATIONS.md similarity index 61% rename from docs/linting/CONFIGS.md rename to docs/linting/CONFIGURATIONS.md index 659064c6901..de05a216ff8 100644 --- a/docs/linting/CONFIGS.md +++ b/docs/linting/CONFIGURATIONS.md @@ -1,9 +1,10 @@ --- id: configs -sidebar_label: Configurations title: Configurations --- +[ESLint shareable configurations](https://eslint.org/docs/latest/developer-guide/shareable-configs) exist to provide a comprehensive base config for you, with the intention that you add the config and it gives you an opinionated setup. + ## Built-In Configurations `@typescript-eslint/eslint-plugin` includes built-in configurations you can extend from to pull in the recommended starting rules. @@ -11,6 +12,10 @@ title: Configurations With the exception of `strict`, all configurations are considered "stable". Rule additions and removals are treated as breaking changes and will only be done in major version bumps. +:::note +We recommend most packages extend from [`recommended-requiring-type-checking`](#recommended-requiring-type-checking) (which requires [typed linting](./TYPED_LINTING.md)). +::: + ### `eslint-recommended` This ruleset is meant to be used after extending `eslint:recommended`. @@ -60,7 +65,7 @@ Rules in this configuration are similarly useful to those in `recommended`. :::tip We recommend all TypeScript projects extend from this configuration, with the caveat that rules using type information take longer to run. -See [Linting with Type Information](/docs/linting/type-linting) for more details. +See [Linting with Type Information](/docs/linting/typed-linting) for more details. ::: ### `strict` @@ -89,4 +94,29 @@ See [ESLint's Configuring Rules docs](https://eslint.org/docs/user-guide/configu ### Suggesting Configuration Changes -If you feel strongly that a specific rule should (or should not) be one of these configurations, please feel free to [file an issue](https://github.com/typescript-eslint/typescript-eslint/issues/new/choose) along with a **detailed** argument explaining your reasoning. +If you feel strongly that a specific rule should (or should not) be one of these configurations, please [file an issue](https://github.com/typescript-eslint/typescript-eslint/issues/new?assignees=&labels=package%3A+eslint-plugin%2Cpreset+config+change%2Ctriage&template=09-config-change.yaml&title=Configs%3A+%3Ca+short+description+of+my+proposal%3E) along with a **detailed** argument explaining your reasoning. + +## Prettier + +If you use [`prettier`](https://www.npmjs.com/package/prettier), there is also a helpful config to help ensure ESLint doesn't report on formatting issues that prettier will fix: [`eslint-config-prettier`](https://www.npmjs.com/package/eslint-config-prettier). + +Using this config by adding it to the end of your `extends`: + +```js title=".eslintrc.js" +module.exports = { + root: true, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + // Add this line + 'prettier', + ], +}; +``` + +:::warning +**We strongly recommend you use Prettier or an equivalent**, not ESLint formatting rules. +See [this issue](https://github.com/typescript-eslint/typescript-eslint/issues/4907 'Issue: Docs: Add our opinion on delegating stylistic issues to a tool such as Prettier #4907') for more information. +::: diff --git a/docs/linting/MONOREPO.md b/docs/linting/MONOREPO.md deleted file mode 100644 index 4ec2df16136..00000000000 --- a/docs/linting/MONOREPO.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -id: monorepo -title: Monorepo Configuration -sidebar_label: Monorepo Configuration ---- - -If you're using a monorepo, these docs will help you figure out how to setup typed linting. -If you don't want to use typed linting, then you can stop here - you don't need to do anything special. - -The first question to answer is how are your `tsconfig.json` setup? You should have one of two setups: - -1. One `tsconfig.json` per package (and an optional one in the root) -2. One root `tsconfig.json` - -## One `tsconfig.json` per package (and an optional one in the root) - -Earlier in our docs on [typed linting](./TYPED_LINTING.md), we showed you how to setup a config for typed linting using the `parserOptions.project` option. This option accepts an array of relative paths, allowing you to specify each and every `tsconfig.json` in your monorepo. For those of you with too many packages, you can also supply a [glob path](https://github.com/isaacs/node-glob/blob/f5a57d3d6e19b324522a3fa5bdd5075fd1aa79d1/README.md#glob-primer). - -For example, this is how we specify all of our `tsconfig.json` within this repo. - -```js title=".eslintrc.js" -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - parserOptions: { - tsconfigRootDir: __dirname, - // Remove this line - project: ['./tsconfig.json'], - // Add this line - project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'], - }, - plugins: ['@typescript-eslint'], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking', - ], -}; -``` - -If you're looking for an example of what the `.eslintrc.js`, and referenced `tsconfig.json` might look like in a real example, look no further than this very repo. We're a multi-package monorepo that uses one `tsconfig.json` per package, that also uses typed linting. - -### Important note regarding large (> 10) multi-package monorepos - -We've had reports that for sufficiently large and/or interdependent projects, you may run into OOMs using this approach. Our advice is to set it up and test first, as there are very few cases that trigger this OOM. We are in the process of investigating solutions with the help of the TypeScript team. - -See [#1192](https://github.com/typescript-eslint/typescript-eslint/issues/1192) for more information and discussion. - -If you do run into an OOM, please comment on the above issue and let us know about your repo - the more information we have, the better. As an interim workaround, consider one of the following: - -- Switching to one root `tsconfig.eslint.json` (see below) -- Using a shell script to only lint one package at a time, using your existing config above. - -## One root `tsconfig.json` - -If you've only got one, you should inspect the `include` paths. If it doesn't include all of your files, then we won't be able to lint them. In this instance, you have two options: add them in to the `include`, or create a new config. - -The former doesn't always work for everyone if they've got a complex build, as adding more paths (like test paths) to `include` could break the build. -In those cases we suggest creating a new config called `tsconfig.eslint.json`, that looks something like this: - -```jsonc title="tsconfig.eslint.json" -{ - // extend your base config to share compilerOptions, etc - "extends": "./tsconfig.json", - "compilerOptions": { - // ensure that nobody can accidentally use this config for a build - "noEmit": true - }, - "include": [ - // whatever paths you intend to lint - "src", - "test", - "tools" - ] -} -``` - -Ensure you update your `.eslintrc.js` to point at this new config file. - -## Troubleshooting - -If you're having problems getting this working, please have a look at our [Troubleshooting FAQ](./TROUBLESHOOTING.md). diff --git a/docs/linting/README.md b/docs/linting/README.md deleted file mode 100644 index 23f0a2b1981..00000000000 --- a/docs/linting/README.md +++ /dev/null @@ -1,223 +0,0 @@ ---- -id: linting -title: Linting your TypeScript Codebase -sidebar_label: Linting your TypeScript Codebase ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -Whether you're adding linting to a new TypeScript codebase, adding TypeScript to an old codebase, or migrating from the deprecated [TSLint](https://www.npmjs.com/package/tslint), the steps aren't a whole lot different. - -## Installation - -First step is to make sure you've got the required packages installed: - -```bash npm2yarn -npm install --save-dev eslint typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin -``` - -## Configuration - -Next, create a `.eslintrc.cjs` config file in the root of your project, and populate it with the following: - - -```js title=".eslintrc.cjs" -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - plugins: [ - '@typescript-eslint', - ], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - ], -}; -``` - -This is about the smallest config file we recommend. There's a lot more you can add to this as you further onboard, but this will be enough to get you started. - -:::info - -The `.cjs` extension will explicitly set the file to a [CommonJS module](https://nodejs.org/dist/latest-v18.x/docs/api/modules.html), in case your project has `"type": "module"` in its package.json. - -If your project doesn't use ESM, naming the file as `.eslintrc.js` is fine. See [ESLint's Configuration Files docs](https://eslint.org/docs/user-guide/configuring/configuration-files) for more info. - -::: - -### Details - -Explaining the important bits: - -- `parser: '@typescript-eslint/parser'` tells ESLint to use the parser package you installed ([`@typescript-eslint/parser`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/parser)). - - This allows ESLint to understand TypeScript syntax. - - This is required, or else ESLint will throw errors as it tries to parse TypeScript code as if it were regular JavaScript. -- `plugins: ['@typescript-eslint']` tells ESLint to load the plugin package you installed ([`@typescript-eslint/eslint-plugin`](https://github.com/typescript-eslint/typescript-eslint/tree/main/packages/eslint-plugin)). - - This allows you to use the rules within your codebase. -- `extends: [ ... ]` tells ESLint that your config extends the given configurations. - - `eslint:recommended` is ESLint's inbuilt "recommended" config - it turns on a small, sensible set of rules which lint for well-known best-practices. - - `plugin:@typescript-eslint/recommended` is our "recommended" config - it's just like `eslint:recommended`, except it only turns on rules from our TypeScript-specific plugin. - -### Ignoring unnecessary files - -Next, create a `.eslintignore` file in the root of your project. -This file will tell ESLint which files and folders it should never lint. - -Add the following lines to the file: - -```ignore title=".eslintignore" -# don't lint build output (make sure it's set to your correct build folder name) -dist -``` - -### Further Configuration Documentation - -- You can read more about configuring ESLint [in their documentation on configuration](https://eslint.org/docs/user-guide/configuring). -- You can read more about the rules provided by ESLint [in their documentation on their rules](https://eslint.org/docs/rules/). -- You can read more about the rules provided by us in [our plugin documentation](https://typescript-eslint.io/rules/). - -## Running ESLint - -With that configured, open a terminal to the root of your project, and run the following command: - - - - -```bash -npx eslint . -``` - - - - -```bash -yarn eslint . -``` - - - - -That's it - ESLint will lint all TypeScript compatible files within the current folder, and will output the results to your terminal. - -You are also recommended to add an npm script in your package.json, so you don't have to repeat the same command every time you run ESLint. - -```json title="package.json" -{ - "scripts": { - "lint": "eslint ." - } -} -``` - -This way, you can invoke the `lint` script directly: - -```bash npm2yarn -npm run lint -``` - -:::note -If you use non-standard file extensions, you will need to explicitly tell ESLint to lint those extensions using the [`--ext` flag](https://eslint.org/docs/user-guide/command-line-interface#--ext) -::: - -You can also get results in realtime inside most IDEs via a plugin - search your IDE's extension store. - -## Next Steps - -With that configured you can now start to delve into the wide and extensive ESLint ecosystem of plugins and configs. - -### Type-Aware Rules - -We have a lot of awesome rules which utilize the power of TypeScript's type information. They require a little bit of extra setup beyond this first step, [so visit the next page to see how to set this up.](./TYPED_LINTING.md) - -### Prettier - -If you use [`prettier`](https://www.npmjs.com/package/prettier), there is also a helpful config to help ensure ESLint doesn't report on formatting issues that prettier will fix: [`eslint-config-prettier`](https://www.npmjs.com/package/eslint-config-prettier). - -Using this config by adding it to the end of your `extends`: - -```js title=".eslintrc.js" -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - // Add this line - 'prettier', - ], -}; -``` - -### Community Configs - -Configurations exist solely to provide a comprehensive base config for you, with the intention that you add the config and it gives you an opinionated setup. -Many configuration packages exist in the ESLint ecosystem. -A few popular all-in-one configs are: - -- Airbnb's ESLint config: [`eslint-config-airbnb-typescript`](https://www.npmjs.com/package/eslint-config-airbnb-typescript). -- Standard: [`eslint-config-standard-with-typescript`](https://www.npmjs.com/package/eslint-config-standard-with-typescript). - -To use one of these complete config packages, you would replace the `extends` with the package name. -For example: - -```js title=".eslintrc.js" -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - extends: [ - // Removed lines start - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - // Removed lines end - // Add this line - 'airbnb-typescript', - ], -}; -``` - - - -Search ["eslint-config" on npm](https://www.npmjs.com/search?q=eslint-config) for more. - -### Plugins - -ESLint plugins provide additional rules and other functionality on top of ESLint. -Below are just a few examples: - -- ESLint comment restrictions: [`eslint-plugin-eslint-comments`](https://www.npmjs.com/package/eslint-plugin-eslint-comments) -- Import/export conventions : [`eslint-plugin-import`](https://www.npmjs.com/package/eslint-plugin-import) -- Jest testing: [`eslint-plugin-jest`](https://www.npmjs.com/package/eslint-plugin-jest) -- NodeJS best practices: [`eslint-plugin-node`](https://www.npmjs.com/package/eslint-plugin-node) -- React best practices: [`eslint-plugin-react`](https://www.npmjs.com/package/eslint-plugin-react) and [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks) - -Every plugin that is out there includes documentation on the various configurations and rules they offer. -A typical plugin might be used like: - -```js title=".eslintrc.js" -module.exports = { - root: true, - parser: '@typescript-eslint/parser', - plugins: [ - '@typescript-eslint', - // Add this line - 'jest', - ], - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - // Add this line - 'plugin:jest/recommended', - ], -}; -``` - - - -Search ["eslint-plugin" on npm](https://www.npmjs.com/search?q=eslint-plugin) for more. - -## Troubleshooting - -If you're having problems getting this working, please have a look at our [Troubleshooting FAQ](./TROUBLESHOOTING.md). diff --git a/docs/linting/TROUBLESHOOTING.md b/docs/linting/TROUBLESHOOTING.md index d9c447b4d0e..f37f8780a33 100644 --- a/docs/linting/TROUBLESHOOTING.md +++ b/docs/linting/TROUBLESHOOTING.md @@ -1,7 +1,6 @@ --- id: troubleshooting title: Troubleshooting & FAQs -sidebar_label: Troubleshooting & FAQs --- ## I am using a rule from ESLint core, and it doesn't work correctly with TypeScript code @@ -31,12 +30,10 @@ If you don't find an existing extension rule, or the extension rule doesn't work ## I get errors telling me "The file must be included in at least one of the projects provided" -This error means that the file that's being linted is not included in any of the tsconfig files you provided us. +This error means that the file that's being linted is not included in any of the TSConfig files you provided us. This happens when users have test files, config files, or similar that are not included. -There are a couple of solutions to this, depending on what you want to achieve. - -See our docs on [type aware linting](./TYPED_LINTING.md#i-get-errors-telling-me-the-file-must-be-included-in-at-least-one-of-the-projects-provided) for solutions to this. +See our docs on [type aware linting](./TYPED_LINTING.md#i-get-errors-telling-me-the-file-must-be-included-in-at-least-one-of-the-projects-provided) for solutions. ## I use a framework (like Vue) that requires custom file extensions, and I get errors like "You should add `parserOptions.extraFileExtensions` to your config" diff --git a/docs/linting/TYPED_LINTING.md b/docs/linting/TYPED_LINTING.md index ae58028e442..7a037e9a178 100644 --- a/docs/linting/TYPED_LINTING.md +++ b/docs/linting/TYPED_LINTING.md @@ -1,11 +1,9 @@ --- -id: type-linting +id: typed-linting title: Linting with Type Information -sidebar_label: Linting with Type Information --- -Under the hood, the typescript-eslint parser uses TypeScript's compiler APIs to parse the files. This means that we can provide lint rules with access to all of the type information that TypeScript knows about your codebase. - +Some typescript-eslint rules tap utilize the awesome power of TypeScript's type checking APIs to provide much deeper insights into your code. To tap into TypeScript's additional powers, there are two small changes you need to make to your config file: ```js title=".eslintrc.js" @@ -32,22 +30,23 @@ In more detail: - `parserOptions.tsconfigRootDir` tells our parser the absolute path of your project's root directory. - `parserOptions.project` tells our parser the relative path where your project's `tsconfig.json` is. - - If your project is a multi-package monorepo, see [our docs on configuring a monorepo](./MONOREPO.md). + - If your project is a multi-package monorepo, see [our docs on configuring a monorepo](./typed-linting/MONOREPOS.md). - `plugin:@typescript-eslint/recommended-requiring-type-checking` is another recommended configuration we provide. This one contains rules that specifically require type information. With that done, run the same lint command you ran before. -You will see new rules reporting errors based on type information! +You may see new rules reporting errors based on type information! ## FAQs ### How is performance? -_But wait_ - I hear you exclaim - _why would you ever not want type-aware rules?_ - -Well (for full disclosure) there is a catch; by including `parserOptions.project` in your config, you are essentially asking TypeScript to do a build of your project before ESLint can do its linting. For small projects this takes a negligible amount of time (a few seconds); for large projects, it can take longer (30s or more). +Typed rules come with a catch. +By including `parserOptions.project` in your config, you incur the performance penalty of asking TypeScript to do a build of your project before ESLint can do its linting. +For small projects this takes a negligible amount of time (a few seconds or less); for large projects, it can take longer. -Most of our users are fine with this, as they think the power of type-aware static analysis is worth it. -Additionally, most users primarily consume lint errors via IDE plugins which, through some caching magic, do not suffer the same penalties. This means that generally they usually only run a complete lint before a push, or via their CI, where the extra time really doesn't matter. +Most of our users do not mind this cost as the power and safety of type-aware static analysis rules is worth the tradeoff. +Additionally, most users primarily consume lint errors via IDE plugins which, through caching, do not suffer the same penalties. +This means that generally they usually only run a complete lint before a push, or via their CI, where the extra time often doesn't matter. **We strongly recommend you do use type-aware linting**, but the above information is included so that you can make your own, informed decision. diff --git a/docs/linting/troubleshooting/FORMATTING.md b/docs/linting/troubleshooting/FORMATTING.md new file mode 100644 index 00000000000..2acb36d0e60 --- /dev/null +++ b/docs/linting/troubleshooting/FORMATTING.md @@ -0,0 +1,39 @@ +--- +id: formatting +title: What About Formatting? +--- + +We strongly recommend against using ESLint for formatting. +We strongly recommend using [Prettier](https://prettier.io), [dprint](https://dprint.dev), or an equivalent instead. + +## Formatters vs. Linters + +**Formatters** are tools that verify and correct whitespace issues in code, such as spacing and newlines. +Formatters typically run very quickly because they are only concerned with changing whitespace, not code logic or naming. + +**Linters** are tools that verify and correct logical and non-whitespace style issues in code, such as naming consistency and bug detection. +Linters often take seconds or more to run because they apply many logical rules to code. + +### Problems with Using Linters as Formatters + +Linters apply much more work than formatters -- often including potentially multiple rounds of rule fixers. +That generally makes them run orders of magnitude slower. + +Additionally, modern formatters such as Prettier are architected in a way that applies formatting to all code regardless of original formatting. +Linters typically run on a rule-by-rule basis, typically resulting in many edge cases and missed coverage in formatting. + +### Suggested Usage + +We recommend using [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier) to disable formatting rules in your ESLint configuration. +You can then configure your formatter separately from ESLint. + +## ESLint Core and Formatting + +Per [ESLint's 2020 Changes to Rule Policies blog post](https://eslint.org/blog/2020/05/changes-to-rules-policies#what-are-the-changes): + +> Stylistic rules are frozen - we won't be adding any more options to stylistic rules. +> We've learned that there's no way to satisfy everyone's personal preferences, and most of the rules already have a lot of difficult-to-understand options. +> Stylistic rules are those related to spacing, conventions, and generally anything that does not highlight an error or a better way to do something. + +We support the ESLint team's decision and backing logic to move away from stylistic rules. +With the exception of bug fixes, no new formatting-related pull requests will be accepted into typescript-eslint. diff --git a/docs/linting/TSLINT.md b/docs/linting/troubleshooting/TSLINT.md similarity index 63% rename from docs/linting/TSLINT.md rename to docs/linting/troubleshooting/TSLINT.md index 0d7954dd350..a145f9fca61 100644 --- a/docs/linting/TSLINT.md +++ b/docs/linting/troubleshooting/TSLINT.md @@ -10,9 +10,10 @@ TSLint was a linter equivalent to ESLint that was written specifically to work d ## Migrating from TSLint to ESLint -If you are looking for help in migrating from TSLint to ESLint, see [`tslint-to-eslint-config`](https://github.com/typescript-eslint/tslint-to-eslint-config). +The standard tool to convert a TSLint configuration to the equivalent ESLint configuration is [`tslint-to-eslint-config`](https://github.com/typescript-eslint/tslint-to-eslint-config). +If you are still using TSLint, we strongly recommend you use this tool to switch. -You can look at [`the plugin ROADMAP.md`](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/ROADMAP.md) for an up to date overview of how TSLint rules compare to the ones in this package. +You can look at [the alternatives list](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/TSLINT_RULE_ALTERNATIVES.md) for an up to date overview of how TSLint rules compare to the ones in this package. There is also the ultimate fallback option of using both linters together for a while during your transition if you absolutely have to by using TSLint _within_ ESLint. @@ -27,6 +28,5 @@ TSLint had to reimplement everything from editor extensions to auto-fixing to ru TSLint's backers announced in 2019 that **they would be deprecating TSLint in favor of supporting `typescript-eslint`** in order to benefit the community. You can read more about that here: https://medium.com/palantir/tslint-in-2019-1a144c2317a9. -The TypeScript Team themselves also announced their plans to move the TypeScript codebase from TSLint to `typescript-eslint`, -and they have been big supporters of this project. -More details at https://github.com/microsoft/TypeScript/issues/30553. +The TypeScript team also migrated move the TypeScript codebase from TSLint to `typescript-eslint`, and they have been supporters of this project. +See more details at https://github.com/microsoft/TypeScript/issues/30553. diff --git a/docs/linting/typed-linting/MONOREPOS.md b/docs/linting/typed-linting/MONOREPOS.md new file mode 100644 index 00000000000..a67d05a9c2c --- /dev/null +++ b/docs/linting/typed-linting/MONOREPOS.md @@ -0,0 +1,79 @@ +--- +id: monorepos +title: Monorepo Configuration +--- + +If you're using a monorepo, these docs will help you figure out how to setup typed linting. +If you don't want to use typed linting, then you can stop here - you don't need to do anything special. + +Configurations will look different based on which setup you use: + +1. [One root `tsconfig.json`](#one-root-tsconfigjson) +2. [One `tsconfig.json` per package (and an optional one in the root)](#one-tsconfigjson-per-package-and-an-optional-one-in-the-root) + +## One root `tsconfig.json` + +If you only have one `tsconfig.json` file _and_ its `include` paths include all the files you'd like to lint, you can directly use it with typescript-eslint without further configuration. + +If its `include` paths cannot include all files to be linted, we suggest creating a new config called `tsconfig.eslint.json`, that looks something like this: + +```jsonc title="tsconfig.eslint.json" +{ + // extend your base config to share compilerOptions, etc + "extends": "./tsconfig.json", + "compilerOptions": { + // ensure that nobody can accidentally use this config for a build + "noEmit": true + }, + "include": [ + // whatever paths you intend to lint + "src", + "test", + "tools" + ] +} +``` + +Be sure to update your `.eslintrc.js` to point at this new config file. + +## One `tsconfig.json` per package (and an optional one in the root) + +The `parserOptions.project` option introduced in [Linting with Type Information](../TYPED_LINTING.md) accepts an array of relative paths. +Paths may be provided as [Node globs](https://github.com/isaacs/node-glob/blob/f5a57d3d6e19b324522a3fa5bdd5075fd1aa79d1/README.md#glob-primer). + +```js title=".eslintrc.js" +module.exports = { + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'plugin:@typescript-eslint/recommended-requiring-type-checking', + ], + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: __dirname, + // Remove this line + project: ['./tsconfig.json'], + // Add this line + project: ['./tsconfig.eslint.json', './packages/*/tsconfig.json'], + }, + plugins: ['@typescript-eslint'], + root: true, +}; +``` + +### Important note regarding large (> 10) multi-package monorepos + +We've had reports that for sufficiently large and/or interdependent projects, you may run into OOMs using this approach. +Our advice is to set it up and test first, as there are very few cases that trigger this OOM. + +See [#1192](https://github.com/typescript-eslint/typescript-eslint/issues/1192) for more information and discussion. + +If you do run into an OOM, please comment on the above issue and let us know about your repo - the more information we have, the better. +As an interim workaround, consider one of the following: + +- Switching to one root `tsconfig.eslint.json` (see below) +- Using a shell script to only lint one package at a time, using your existing config above. + +## Troubleshooting + +If you're having problems getting this working, please have a look at our [Troubleshooting FAQ](../TROUBLESHOOTING.md). diff --git a/lerna.json b/lerna.json index c1f3c788a9d..f3b9f4a699b 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "5.30.6", + "version": "5.33.1", "npmClient": "yarn", "useWorkspaces": true, "stream": true diff --git a/package.json b/package.json index d73051959b8..da9add07ee0 100644 --- a/package.json +++ b/package.json @@ -26,10 +26,10 @@ "check-clean-workspace-after-install": "git diff --quiet --exit-code", "check-configs": "nx run-many --target=check-configs --all --parallel", "check-docs": "nx run-many --target=check-docs --all --parallel", - "check-format": "prettier --list-different \"./**/*.{md,mdx,ts,mts,cts,js,cjs,mjs,tsx,jsx}\"", + "check-format": "prettier --list-different .", "check-spelling": "cspell --config=.cspell.json \"**/*.{md,mdx,ts,mts,cts,js,cjs,mjs,tsx,jsx}\"", "clean": "lerna clean && lerna run clean", - "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\"", + "format": "prettier --write .", "generate-contributors": "yarn ts-node --transpile-only ./tools/generate-contributors.ts", "generate-sponsors": "yarn ts-node --transpile-only ./tools/generate-sponsors.ts", "generate-website-dts": "yarn ts-node --transpile-only ./tools/generate-website-dts.ts", @@ -80,7 +80,7 @@ "enhanced-resolve": "^5.9.3", "eslint": "^8.15.0", "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-eslint-plugin": "^4.1.0", + "eslint-plugin-eslint-plugin": "^5.0.1", "eslint-plugin-import": "^2.26.0", "eslint-plugin-jest": "^26.1.5", "eslint-plugin-simple-import-sort": "^7.0.0", @@ -90,12 +90,12 @@ "jest-diff": "^28.1.0", "jest-snapshot": "^28.1.0", "jest-specific-snapshot": "^5.0.0", - "lerna": "5.1.6", + "lerna": "5.4.2", "lint-staged": "^13.0.0", "make-dir": "^3.1.0", "markdownlint-cli": "^0.31.1", "ncp": "^2.0.0", - "prettier": "2.5.1", + "prettier": "2.7.1", "pretty-format": "^28.1.0", "rimraf": "^3.0.2", "tmp": "^0.2.1", @@ -104,7 +104,7 @@ "typescript": ">=3.3.1 <4.8.0" }, "resolutions": { - "typescript": "4.7.2", + "typescript": "4.7.4", "@types/node": "^17.0.31", "pretty-format": "^28.1.0", "//": "Pin jest to v28 across the repo", diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index dce0c343068..8b73864a184 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/ast-spec diff --git a/packages/ast-spec/package.json b/packages/ast-spec/package.json index 0245e01d6a7..313fe643639 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "5.30.6", + "version": "5.33.1", "description": "TypeScript-ESTree AST spec", "private": true, "keywords": [ diff --git a/packages/ast-spec/src/expression/NewExpression/spec.ts b/packages/ast-spec/src/expression/NewExpression/spec.ts index bb75ae3f4b8..1ee93ef507d 100644 --- a/packages/ast-spec/src/expression/NewExpression/spec.ts +++ b/packages/ast-spec/src/expression/NewExpression/spec.ts @@ -1,12 +1,12 @@ import type { AST_NODE_TYPES } from '../../ast-node-types'; import type { BaseNode } from '../../base/BaseNode'; import type { TSTypeParameterInstantiation } from '../../special/TSTypeParameterInstantiation/spec'; -import type { Expression } from '../../unions/Expression'; +import type { CallExpressionArgument } from '../../unions/CallExpressionArgument'; import type { LeftHandSideExpression } from '../../unions/LeftHandSideExpression'; export interface NewExpression extends BaseNode { type: AST_NODE_TYPES.NewExpression; callee: LeftHandSideExpression; - arguments: Expression[]; + arguments: CallExpressionArgument[]; typeParameters?: TSTypeParameterInstantiation; } diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 7067f9f6059..0024f61659e 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,49 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + + +### Bug Fixes + +* missing placeholders in violation messages for `no-unnecessary-type-constraint` and `no-unsafe-argument` (and enable `eslint-plugin/recommended` rules internally) ([#5453](https://github.com/typescript-eslint/typescript-eslint/issues/5453)) ([d023910](https://github.com/typescript-eslint/typescript-eslint/commit/d0239104f4dbffd2b5ecdb19e520c7d4b71962e0)) + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal diff --git a/packages/eslint-plugin-internal/package.json b/packages/eslint-plugin-internal/package.json index b7a7a56387f..b6fe9bf4681 100644 --- a/packages/eslint-plugin-internal/package.json +++ b/packages/eslint-plugin-internal/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-internal", - "version": "5.30.6", + "version": "5.33.1", "private": true, "main": "dist/index.js", "scripts": { @@ -14,8 +14,8 @@ }, "dependencies": { "@types/prettier": "*", - "@typescript-eslint/scope-manager": "5.30.6", - "@typescript-eslint/utils": "5.30.6", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/utils": "5.33.1", "prettier": "*" } } diff --git a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts index 456a17f7da1..108d7bfe0a2 100644 --- a/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts +++ b/packages/eslint-plugin-internal/src/rules/no-poorly-typed-ts-props.ts @@ -35,7 +35,6 @@ export default createRule({ description: "Enforces rules don't use TS API properties with known bad type definitions", recommended: 'error', - suggestion: true, requiresTypeChecking: true, }, fixable: 'code', diff --git a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts index 8b3ec8ffdb8..2ee9b80302e 100644 --- a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts +++ b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts @@ -455,7 +455,7 @@ export default createRule({ continue; } - if (prop.key.name === 'code' || prop.key.name === 'output') { + if (prop.key.name === 'code') { checkExpression(prop.value, isErrorTest); } } diff --git a/packages/eslint-plugin-internal/tests/rules/no-poorly-typed-ts-props.test.ts b/packages/eslint-plugin-internal/tests/rules/no-poorly-typed-ts-props.test.ts index 4c9751489bd..b0b80f56cc3 100644 --- a/packages/eslint-plugin-internal/tests/rules/no-poorly-typed-ts-props.test.ts +++ b/packages/eslint-plugin-internal/tests/rules/no-poorly-typed-ts-props.test.ts @@ -32,7 +32,7 @@ baz.symbol.name; import ts from 'typescript'; declare const thing: ts.Symbol; thing.declarations.map(decl => {}); - `.trimRight(), + `, errors: [ { messageId: 'doNotUseWithFixer', @@ -53,7 +53,7 @@ thing.declarations.map(decl => {}); import ts from 'typescript'; declare const thing: ts.Symbol; thing.getDeclarations().map(decl => {}); - `.trimRight(), + `, }, ], }, @@ -64,7 +64,7 @@ thing.getDeclarations().map(decl => {}); import ts from 'typescript'; declare const thing: ts.Type; thing.symbol; - `.trimRight(), + `, errors: [ { messageId: 'doNotUseWithFixer', @@ -85,7 +85,7 @@ thing.symbol; import ts from 'typescript'; declare const thing: ts.Type; thing.getSymbol(); - `.trimRight(), + `, }, ], }, @@ -96,7 +96,7 @@ thing.getSymbol(); import ts from 'typescript'; declare const thing: ts.Type; thing?.symbol; - `.trimRight(), + `, errors: [ { messageId: 'doNotUseWithFixer', @@ -117,7 +117,7 @@ thing?.symbol; import ts from 'typescript'; declare const thing: ts.Type; thing?.getSymbol(); - `.trimRight(), + `, }, ], }, diff --git a/packages/eslint-plugin-internal/tests/rules/plugin-test-formatting.test.ts b/packages/eslint-plugin-internal/tests/rules/plugin-test-formatting.test.ts index 3b8bb47dafd..81be2118f6c 100644 --- a/packages/eslint-plugin-internal/tests/rules/plugin-test-formatting.test.ts +++ b/packages/eslint-plugin-internal/tests/rules/plugin-test-formatting.test.ts @@ -25,26 +25,6 @@ ruleTester.run({ }); `; } -function wrapWithOutput( - strings: TemplateStringsArray, - ...keys: string[] -): string { - const lastIndex = strings.length - 1; - const code = - strings.slice(0, lastIndex).reduce((p, s, i) => p + s + keys[i], '') + - strings[lastIndex]; - return ` -ruleTester.run({ - invalid: [ - { - code: ${code}, - output: ${code}, - }, - ], -}); - `; -} - ruleTester.run('plugin-test-formatting', rule, { valid: [ // sanity check for valid tests non-object style @@ -365,7 +345,6 @@ ${PARENT_INDENT}\``, code: wrap`\` ${CODE_INDENT}const a=\\\`\\\${a}\\\`; ${PARENT_INDENT}\``, - // make sure it escapes backticks output: wrap`\` ${CODE_INDENT}const a = \\\`\\\${a}\\\`; ${PARENT_INDENT}\``, @@ -376,26 +355,6 @@ ${PARENT_INDENT}\``, ], }, - // sanity check that it runs on both output and code properties - { - code: wrapWithOutput`\` -${CODE_INDENT}const a="1"; -${CODE_INDENT} const b = "2"; -${PARENT_INDENT}\``, - output: wrapWithOutput`\` -${CODE_INDENT}const a = '1'; -${CODE_INDENT}const b = '2'; -${PARENT_INDENT}\``, - errors: [ - { - messageId: 'invalidFormattingErrorTest', - }, - { - messageId: 'invalidFormattingErrorTest', - }, - ], - }, - // sanity check that it handles suggestion output { code: ` @@ -431,7 +390,7 @@ ruleTester.run({ suggestions: [ { messageId: 'bar', - output: 'const x = 1;', + output: 'const x=1;', }, ], }, @@ -444,9 +403,6 @@ ruleTester.run({ { messageId: 'invalidFormattingErrorTest', }, - { - messageId: 'invalidFormattingErrorTest', - }, ], }, @@ -550,28 +506,5 @@ foo }, ], }, - - // checks tests with .trimRight calls - { - code: wrap`'const a=1;'.trimRight()`, - output: wrap`'const a = 1;'.trimRight()`, - errors: [ - { - messageId: 'invalidFormatting', - }, - ], - }, - { - code: wrap`\`const a = "1"; -${CODE_INDENT}\`.trimRight()`, - output: wrap`\` -const a = "1"; -${CODE_INDENT}\`.trimRight()`, - errors: [ - { - messageId: 'templateLiteralEmptyEnds', - }, - ], - }, ], }); diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 7e8a7d577ad..16ecd0712d8 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint diff --git a/packages/eslint-plugin-tslint/package.json b/packages/eslint-plugin-tslint/package.json index c3f0a58f1f3..36e4a8d7989 100644 --- a/packages/eslint-plugin-tslint/package.json +++ b/packages/eslint-plugin-tslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin-tslint", - "version": "5.30.6", + "version": "5.33.1", "main": "dist/index.js", "typings": "src/index.ts", "description": "TSLint wrapper plugin for ESLint", @@ -38,7 +38,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "5.30.6", + "@typescript-eslint/utils": "5.33.1", "lodash": "^4.17.21" }, "peerDependencies": { @@ -48,6 +48,6 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "5.30.6" + "@typescript-eslint/parser": "5.33.1" } } diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 9e21095b710..4ddd503f335 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,76 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + + +### Bug Fixes + +* missing placeholders in violation messages for `no-unnecessary-type-constraint` and `no-unsafe-argument` (and enable `eslint-plugin/recommended` rules internally) ([#5453](https://github.com/typescript-eslint/typescript-eslint/issues/5453)) ([d023910](https://github.com/typescript-eslint/typescript-eslint/commit/d0239104f4dbffd2b5ecdb19e520c7d4b71962e0)) + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + + +### Bug Fixes + +* **eslint-plugin:** [no-extra-parens] handle await with type assertion ([#5428](https://github.com/typescript-eslint/typescript-eslint/issues/5428)) ([e03826f](https://github.com/typescript-eslint/typescript-eslint/commit/e03826f08ce8bfdd6d6702025d975cfb7d867097)) +* **website:** add explicit frontmatter description to rule docs ([#5429](https://github.com/typescript-eslint/typescript-eslint/issues/5429)) ([63cba5f](https://github.com/typescript-eslint/typescript-eslint/commit/63cba5f4c1884e102927b3b14b18a00e96ac63a1)) + + +### Features + +* **eslint-plugin:** [member-ordering] support static blocks ([#5417](https://github.com/typescript-eslint/typescript-eslint/issues/5417)) ([5983e5a](https://github.com/typescript-eslint/typescript-eslint/commit/5983e5ab3bfb94fec782bea54a37457fe31db545)) +* **eslint-plugin:** [prefer-as-const] adds support for class properties ([#5413](https://github.com/typescript-eslint/typescript-eslint/issues/5413)) ([d2394f8](https://github.com/typescript-eslint/typescript-eslint/commit/d2394f810960fda07b9c8affd47b769d16f4b8cb)) + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + + +### Features + +* **eslint-plugin:** [no-use-before-define] add "allowNamedExports" option ([#5397](https://github.com/typescript-eslint/typescript-eslint/issues/5397)) ([ad412cd](https://github.com/typescript-eslint/typescript-eslint/commit/ad412cdd74dc5619fbe4bf27c0a5eb5c5a4b65ca)) + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + + +### Bug Fixes + +* **eslint-plugin:** [typedef] Support nested array destructuring with type annotation ([#5311](https://github.com/typescript-eslint/typescript-eslint/issues/5311)) ([6d19efe](https://github.com/typescript-eslint/typescript-eslint/commit/6d19efed16d1cf0357ad363b6373d2021c49a8c8)) +* **scope-manager:** handle typeParameters of TSInstantiationExpression ([#5355](https://github.com/typescript-eslint/typescript-eslint/issues/5355)) ([2595ccf](https://github.com/typescript-eslint/typescript-eslint/commit/2595ccf67cd5158edbd6bebd9ac2dbd8bbd8b99c)) + + +### Features + +* **eslint-plugin:** [consistent-generic-ctors] check class field declaration ([#5288](https://github.com/typescript-eslint/typescript-eslint/issues/5288)) ([48f996e](https://github.com/typescript-eslint/typescript-eslint/commit/48f996e8dda79c9c865e8ca6552069902836648b)) +* **eslint-plugin:** [prefer-nullish-coalescing] add ignoreTernaryTests option ([#4965](https://github.com/typescript-eslint/typescript-eslint/issues/4965)) ([f82727f](https://github.com/typescript-eslint/typescript-eslint/commit/f82727ffeb97475c07773ca1d1e5b9609fcc5e68)) + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + + +### Bug Fixes + +* **eslint-plugin:** [no-inferrable] fix optional param to valid code ([#5342](https://github.com/typescript-eslint/typescript-eslint/issues/5342)) ([98f6d5e](https://github.com/typescript-eslint/typescript-eslint/commit/98f6d5e6d08d1eb9789da52a15f337f5f53438bd)) +* **eslint-plugin:** [no-unused-vars] highlight last write reference ([#5267](https://github.com/typescript-eslint/typescript-eslint/issues/5267)) ([c3f199a](https://github.com/typescript-eslint/typescript-eslint/commit/c3f199a65a16aa72f5bb83e81a1ce0ffb5f69772)) + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md index 5124ce841ae..f236aeacd81 100644 --- a/packages/eslint-plugin/README.md +++ b/packages/eslint-plugin/README.md @@ -85,7 +85,7 @@ Some highly valuable rules require type-checking in order to be implemented corr 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](https://typescript-eslint.io/docs/linting/type-linting)** +**[You can read more about linting with type information here](https://typescript-eslint.io/docs/linting/typed-linting)** ## Supported Rules diff --git a/packages/eslint-plugin/ROADMAP.md b/packages/eslint-plugin/ROADMAP.md index 6ebff3867c6..e108f6140b7 100644 --- a/packages/eslint-plugin/ROADMAP.md +++ b/packages/eslint-plugin/ROADMAP.md @@ -1,726 +1,3 @@ -# TSLint Migration Guide +# This page moved to [TSLINT_RULE_ALTERNATIVES.md](./TSLINT_RULE_ALTERNATIVES.md) -This document serves as a guide to help you migrate from TSLint. -It lists all TSLint rules along side rules from the ESLint ecosystem that are the same or similar. - -## TSLint rules - -โœ… = done
-๐ŸŒŸ = in ESLint core
-๐Ÿ”Œ = in another plugin
-๐ŸŒ“ = implementations differ or ESLint version is missing functionality
-๐Ÿ›‘ = unimplemented
- -### TypeScript-specific - -| TSLint rule | | ESLint rule | -| --------------------------------- | :-: | ---------------------------------------------------- | -| [`adjacent-overload-signatures`] | โœ… | [`@typescript-eslint/adjacent-overload-signatures`] | -| [`ban-ts-ignore`] | โœ… | [`@typescript-eslint/ban-ts-comment`] | -| [`ban-types`] | ๐ŸŒ“ | [`@typescript-eslint/ban-types`][1] | -| [`invalid-void`] | โœ… | [`@typescript-eslint/no-invalid-void-type`] | -| [`member-access`] | โœ… | [`@typescript-eslint/explicit-member-accessibility`] | -| [`member-ordering`] | โœ… | [`@typescript-eslint/member-ordering`] | -| [`no-any`] | โœ… | [`@typescript-eslint/no-explicit-any`] | -| [`no-empty-interface`] | โœ… | [`@typescript-eslint/no-empty-interface`] | -| [`no-import-side-effect`] | ๐Ÿ”Œ | [`import/no-unassigned-import`] | -| [`no-inferrable-types`] | โœ… | [`@typescript-eslint/no-inferrable-types`] | -| [`no-internal-module`] | โœ… | [`@typescript-eslint/prefer-namespace-keyword`] | -| [`no-magic-numbers`] | โœ… | [`@typescript-eslint/no-magic-numbers`] | -| [`no-namespace`] | โœ… | [`@typescript-eslint/no-namespace`] | -| [`no-non-null-assertion`] | โœ… | [`@typescript-eslint/no-non-null-assertion`] | -| [`no-parameter-reassignment`] | โœ… | [`no-param-reassign`][no-param-reassign] | -| [`no-reference`] | โœ… | [`@typescript-eslint/triple-slash-reference`] | -| [`no-unnecessary-type-assertion`] | โœ… | [`@typescript-eslint/no-unnecessary-type-assertion`] | -| [`no-var-requires`] | โœ… | [`@typescript-eslint/no-var-requires`] | -| [`only-arrow-functions`] | ๐Ÿ”Œ | [`prefer-arrow/prefer-arrow-functions`] | -| [`prefer-for-of`] | โœ… | [`@typescript-eslint/prefer-for-of`] | -| [`promise-function-async`] | โœ… | [`@typescript-eslint/promise-function-async`] | -| [`typedef-whitespace`] | โœ… | [`@typescript-eslint/type-annotation-spacing`] | -| [`typedef`] | โœ… | [`@typescript-eslint/typedef`] | -| [`unified-signatures`] | โœ… | [`@typescript-eslint/unified-signatures`] | - -[1] The ESLint rule only supports exact string matching, rather than regular expressions
- -### Functionality - -| TSLint rule | | ESLint rule | -| ------------------------------------ | :-: | --------------------------------------------------------------------------------------------------------- | -| [`await-promise`] | โœ… | [`@typescript-eslint/await-thenable`] | -| [`ban-comma-operator`] | ๐ŸŒŸ | [`no-sequences`][no-sequences] | -| [`ban`] | ๐ŸŒŸ | [`no-restricted-globals`][no-restricted-globals] & [`no-restricted-properties`][no-restricted-properties] | -| [`curly`] | ๐ŸŒŸ | [`curly`][curly] | -| [`forin`] | ๐ŸŒŸ | [`guard-for-in`][guard-for-in] | -| [`function-constructor`] | ๐ŸŒŸ | [`no-new-func`][no-new-func] | -| [`import-blacklist`] | ๐ŸŒŸ | [`no-restricted-imports`][no-restricted-imports] | -| [`label-position`] | ๐ŸŒŸ | [`no-unused-labels`][no-unused-labels] (similar) | -| [`no-arg`] | ๐ŸŒŸ | [`no-caller`][no-caller] (also blocks `arguments.caller`) | -| [`no-async-without-await`] | โœ… | [`@typescript-eslint/require-await`] | -| [`no-bitwise`] | ๐ŸŒŸ | [`no-bitwise`][no-bitwise] | -| [`no-conditional-assignment`] | ๐ŸŒŸ | [`no-cond-assign`][no-cond-assign][1] | -| [`no-console`] | ๐ŸŒŸ | [`no-console`][no-console] (configuration works slightly differently) | -| [`no-construct`] | ๐ŸŒŸ | [`no-new-wrappers`][no-new-wrappers] | -| [`no-debugger`] | ๐ŸŒŸ | [`no-debugger`][no-debugger] | -| [`no-duplicate-super`] | ๐ŸŒŸ | [`constructor-super`][constructor-super] | -| [`no-duplicate-switch-case`] | ๐ŸŒŸ | [`no-duplicate-case`][no-duplicate-case] | -| [`no-duplicate-variable`] | ๐ŸŒŸ | [`no-redeclare`][no-redeclare] | -| [`no-dynamic-delete`] | โœ… | [`@typescript-eslint/no-dynamic-delete`] | -| [`no-empty`] | ๐ŸŒŸ | [`no-empty`][no-empty] | -| [`no-eval`] | ๐ŸŒŸ | [`no-eval`][no-eval] | -| [`no-floating-promises`] | โœ… | [`@typescript-eslint/no-floating-promises`] | -| [`no-for-in-array`] | โœ… | [`@typescript-eslint/no-for-in-array`] | -| [`no-implicit-dependencies`] | ๐Ÿ”Œ | [`import/no-extraneous-dependencies`] | -| [`no-inferred-empty-object-type`] | ๐Ÿ›‘ | N/A | -| [`no-invalid-template-strings`] | ๐ŸŒŸ | [`no-template-curly-in-string`][no-template-curly-in-string] | -| [`no-invalid-this`] | ๐ŸŒŸ | [`no-invalid-this`][no-invalid-this] | -| [`no-misused-new`] | โœ… | [`@typescript-eslint/no-misused-new`] | -| [`no-null-keyword`] | ๐Ÿ”Œ | [`no-null/no-null`] (doesnโ€™t handle `null` type) | -| [`no-null-undefined-union`] | ๐Ÿ›‘ | N/A | -| [`no-object-literal-type-assertion`] | โœ… | [`@typescript-eslint/consistent-type-assertions`] | -| [`no-promise-as-boolean`] | โœ… | [`@typescript-eslint/no-misused-promises`] | -| [`no-restricted-globals`] | โœ… | [`no-restricted-globals`][no-restricted-globals] | -| [`no-return-await`] | ๐ŸŒŸ | [`no-return-await`][no-return-await] | -| [`no-shadowed-variable`] | ๐ŸŒŸ | [`no-shadow`][no-shadow] | -| [`no-sparse-arrays`] | ๐ŸŒŸ | [`no-sparse-arrays`][no-sparse-arrays] | -| [`no-string-literal`] | ๐ŸŒŸ | [`dot-notation`][dot-notation] | -| [`no-string-throw`] | โœ… | [`@typescript-eslint/no-throw-literal`] | -| [`no-submodule-imports`] | ๐ŸŒ“ | [`import/no-internal-modules`] (slightly different) | -| [`no-switch-case-fall-through`] | ๐ŸŒŸ | [`no-fallthrough`][no-fallthrough] | -| [`no-tautology-expression`] | ๐Ÿ›‘ | N/A | -| [`no-this-assignment`] | โœ… | [`@typescript-eslint/no-this-alias`] | -| [`no-unbound-method`] | โœ… | [`@typescript-eslint/unbound-method`] | -| [`no-unnecessary-class`] | โœ… | [`@typescript-eslint/no-extraneous-class`] | -| [`no-unsafe-any`] | ๐ŸŒ“ | [`@typescript-eslint/no-unsafe-member-access`][2] | -| [`no-unsafe-finally`] | ๐ŸŒŸ | [`no-unsafe-finally`][no-unsafe-finally] | -| [`no-unused-expression`] | ๐ŸŒŸ | [`no-unused-expressions`][no-unused-expressions] | -| [`no-unused-variable`] | ๐ŸŒ“ | [`@typescript-eslint/no-unused-vars`] | -| [`no-use-before-declare`] | โœ… | [`@typescript-eslint/no-use-before-define`] | -| [`no-var-keyword`] | ๐ŸŒŸ | [`no-var`][no-var] | -| [`no-void-expression`] | โœ… | [`@typescript-eslint/no-confusing-void-expression`] | -| [`prefer-conditional-expression`] | ๐Ÿ›‘ | N/A | -| [`prefer-object-spread`] | ๐ŸŒŸ | [`prefer-object-spread`][prefer-object-spread] | -| [`radix`] | ๐ŸŒŸ | [`radix`][radix] | -| [`restrict-plus-operands`] | โœ… | [`@typescript-eslint/restrict-plus-operands`] | -| [`static-this`] | ๐Ÿ›‘ | N/A | -| [`strict-boolean-expressions`] | โœ… | [`@typescript-eslint/strict-boolean-expressions`] | -| [`strict-string-expressions`] | โœ… | [`@typescript-eslint/restrict-plus-operands`] & [`@typescript-eslint/restrict-template-expressions`] | -| [`strict-type-predicates`] | ๐Ÿ›‘ | N/A | -| [`switch-default`] | ๐ŸŒŸ | [`default-case`][default-case] | -| [`triple-equals`] | ๐ŸŒŸ | [`eqeqeq`][eqeqeq] | -| [`typeof-compare`] | ๐ŸŒŸ | [`valid-typeof`][valid-typeof] | -| [`unnecessary-constructor`] | ๐ŸŒŸ | [`no-useless-constructor`][no-useless-constructor] | -| [`use-default-type-parameter`] | โœ… | [`@typescript-eslint/no-unnecessary-type-arguments`] | -| [`use-isnan`] | ๐ŸŒŸ | [`use-isnan`][use-isnan] | - -[1] The ESLint rule also supports silencing with an extra set of parentheses (`if ((foo = bar)) {}`)
-[2] Only checks member expressions - -### Maintainability - -| TSLint rule | | ESLint rule | -| ---------------------------- | :-: | -------------------------------------------------- | -| [`cyclomatic-complexity`] | ๐ŸŒŸ | [`complexity`][complexity] | -| [`deprecation`] | ๐Ÿ”Œ | [`deprecation/deprecation`] | -| [`eofline`] | ๐ŸŒŸ | [`eol-last`][eol-last] | -| [`indent`] | โœ… | [`@typescript-eslint/indent`] or [Prettier] | -| [`linebreak-style`] | ๐ŸŒŸ | [`linebreak-style`][linebreak-style] or [Prettier] | -| [`max-classes-per-file`] | ๐ŸŒŸ | [`max-classes-per-file`][max-classes-per-file] | -| [`max-file-line-count`] | ๐ŸŒŸ | [`max-lines`][max-lines] | -| [`max-line-length`] | ๐ŸŒŸ | [`max-len`][max-len] or [Prettier] | -| [`no-default-export`] | ๐Ÿ”Œ | [`import/no-default-export`] | -| [`no-default-import`] | ๐Ÿ›‘ | N/A | -| [`no-duplicate-imports`] | ๐Ÿ”Œ | [`import/no-duplicates`] | -| [`no-mergeable-namespace`] | ๐Ÿ›‘ | N/A | -| [`no-require-imports`] | โœ… | [`@typescript-eslint/no-require-imports`] | -| [`object-literal-sort-keys`] | ๐ŸŒ“ | [`sort-keys`][sort-keys] [2] | -| [`prefer-const`] | ๐ŸŒŸ | [`prefer-const`][prefer-const] | -| [`prefer-readonly`] | โœ… | [`@typescript-eslint/prefer-readonly`] | -| [`trailing-comma`] | ๐ŸŒ“ | [`comma-dangle`][comma-dangle] or [Prettier] | - -[2] Missing support for blank-line-delimited sections - -### Style - -| TSLint rule | | ESLint rule | -| ----------------------------------- | :-: | ----------------------------------------------------------------------------------- | -| [`align`] | ๐Ÿ›‘ | N/A | -| [`array-type`] | โœ… | [`@typescript-eslint/array-type`] | -| [`arrow-parens`] | ๐ŸŒŸ | [`arrow-parens`][arrow-parens] | -| [`arrow-return-shorthand`] | ๐ŸŒŸ | [`arrow-body-style`][arrow-body-style] | -| [`binary-expression-operand-order`] | ๐ŸŒŸ | [`yoda`][yoda] | -| [`callable-types`] | โœ… | [`@typescript-eslint/prefer-function-type`] | -| [`class-name`] | โœ… | [`@typescript-eslint/naming-convention`] | -| [`comment-format`] | ๐ŸŒŸ | [`capitalized-comments`][capitalized-comments] & [`spaced-comment`][spaced-comment] | -| [`comment-type`] | ๐Ÿ›‘ | N/A | -| [`completed-docs`] | ๐Ÿ”Œ | [`jsdoc/require-jsdoc`] | -| [`encoding`] | ๐Ÿ›‘ | N/A | -| [`file-header`] | ๐Ÿ”Œ | [`eslint-plugin-header`][plugin:header] or [`-file-header`][plugin:file-header] | -| [`file-name-casing`] | ๐Ÿ”Œ | [`unicorn/filename-case`] | -| [`import-spacing`] | ๐Ÿ”Œ | Use [Prettier] | -| [`increment-decrement`] | ๐ŸŒŸ | [`no-plusplus`][no-plusplus] | -| [`interface-name`] | โœ… | [`@typescript-eslint/interface-name-prefix`] | -| [`interface-over-type-literal`] | โœ… | [`@typescript-eslint/consistent-type-definitions`] | -| [`jsdoc-format`] | ๐ŸŒ“ | [`valid-jsdoc`][valid-jsdoc] or [`eslint-plugin-jsdoc`][plugin:jsdoc] | -| [`match-default-export-name`] | ๐Ÿ›‘ | N/A | -| [`newline-before-return`] | ๐ŸŒŸ | [`padding-line-between-statements`][padding-line-between-statements] [1] | -| [`newline-per-chained-call`] | ๐ŸŒŸ | [`newline-per-chained-call`][newline-per-chained-call] | -| [`new-parens`] | ๐ŸŒŸ | [`new-parens`][new-parens] | -| [`no-angle-bracket-type-assertion`] | โœ… | [`@typescript-eslint/consistent-type-assertions`] | -| [`no-boolean-literal-compare`] | โœ… | [`@typescript-eslint/no-unnecessary-boolean-literal-compare`] | -| [`no-consecutive-blank-lines`] | ๐ŸŒŸ | [`no-multiple-empty-lines`][no-multiple-empty-lines] | -| [`no-irregular-whitespace`] | ๐ŸŒŸ | [`no-irregular-whitespace`][no-irregular-whitespace] with `skipStrings: false` | -| [`no-parameter-properties`] | โœ… | [`@typescript-eslint/parameter-properties`] | -| [`no-redundant-jsdoc`] | ๐Ÿ”Œ | [`jsdoc/no-types`] | -| [`no-reference-import`] | โœ… | [`@typescript-eslint/triple-slash-reference`] | -| [`no-trailing-whitespace`] | ๐ŸŒŸ | [`no-trailing-spaces`][no-trailing-spaces] | -| [`no-unnecessary-callback-wrapper`] | ๐Ÿ›‘ | N/A and this might be unsafe (i.e. with `forEach`) | -| [`no-unnecessary-else`] | ๐ŸŒŸ | [`no-else-return`][no-else-return] [2] | -| [`no-unnecessary-initializer`] | ๐ŸŒŸ | [`no-undef-init`][no-undef-init] | -| [`no-unnecessary-qualifier`] | โœ… | [`@typescript-eslint/no-unnecessary-qualifier`] | -| [`number-literal-format`] | ๐Ÿ›‘ | N/A | -| [`object-literal-key-quotes`] | ๐ŸŒŸ | [`quote-props`][quote-props] | -| [`object-literal-shorthand`] | ๐ŸŒŸ | [`object-shorthand`][object-shorthand] | -| [`one-line`] | ๐ŸŒŸ | [`brace-style`][brace-style] or [Prettier] | -| [`one-variable-per-declaration`] | ๐ŸŒŸ | [`one-var`][one-var] | -| [`ordered-imports`] | ๐ŸŒ“ | [`import/order`] | -| [`prefer-function-over-method`] | ๐ŸŒŸ | [`class-methods-use-this`][class-methods-use-this] | -| [`prefer-method-signature`] | โœ… | [`@typescript-eslint/method-signature-style`] | -| [`prefer-switch`] | ๐Ÿ›‘ | N/A | -| [`prefer-template`] | ๐ŸŒŸ | [`prefer-template`][prefer-template] | -| [`prefer-while`] | ๐Ÿ›‘ | N/A | -| [`quotemark`] | ๐ŸŒŸ | [`quotes`][quotes] | -| [`return-undefined`] | ๐Ÿ›‘ | N/A | -| [`semicolon`] | ๐ŸŒ“ | [`@typescript-eslint/semi`] | -| [`space-before-function-paren`] | ๐ŸŒŸ | [`space-before-function-paren`][space-after-function-paren] | -| [`space-within-parens`] | ๐ŸŒŸ | [`space-in-parens`][space-in-parens] | -| [`switch-final-break`] | ๐Ÿ›‘ | N/A | -| [`type-literal-delimiter`] | โœ… | [`@typescript-eslint/member-delimiter-style`] | -| [`unnecessary-bind`] | ๐ŸŒŸ | [`no-extra-bind`][no-extra-bind] | -| [`variable-name`] | โœ… | [`@typescript-eslint/naming-convention`] | -| [`whitespace`] | ๐Ÿ”Œ | Use [Prettier] | - -[1] Recommended config: `["error", { blankLine: "always", prev: "*", next: "return" }]`
-[2] Doesn't check other control flow statements, such as `break` or `continue`. - -## `tslint-microsoft-contrib` rules - -Rule listing is [here](https://github.com/Microsoft/tslint-microsoft-contrib#supported-rules). -Deprecated rules are excluded (`missing-jsdoc`, `missing-optional-annotation`, `no-duplicate-case`, `no-duplicate-parameter-names`, `no-function-constructor-with-string-args`, `no-increment-decrement`, `no-empty-interfaces`, `no-missing-visibility-modifiers`, `no-multiple-var-decl`, `no-reserved-keywords`, `no-stateless-class`, `no-var-self`, `no-unnecessary-bind`, and `valid-typeof`). See the docs in the link above to find out what to use instead. - -### Testing - -Relevant plugins: [`chai-expect-keywords`](https://github.com/gavinaiken/eslint-plugin-chai-expect-keywords), [`chai-expect`](https://github.com/Turbo87/eslint-plugin-chai-expect), [`chai-friendly`](https://github.com/ihordiachenko/eslint-plugin-chai-friendly), [`mocha`](https://github.com/lo1tuma/eslint-plugin-mocha), and [`jest`](https://github.com/jest-community/eslint-plugin-jest) - -| `tslint-microsoft-contrib` rule | | ESLint rule | -| ---------------------------------- | :-: | ------------------------- | -| `chai-prefer-contains-to-index-of` | ๐Ÿ›‘ | N/A | -| `chai-vague-errors` | ๐Ÿ›‘ | N/A | -| `mocha-avoid-only` | ๐Ÿ”Œ | [`jest/no-focused-tests`] | -| `mocha-unneeded-done` | ๐Ÿ›‘ | N/A | - -### TypeScript - -| `tslint-microsoft-contrib` rule | | ESLint rule | -| ------------------------------- | :-: | ---------------------------------------------------------- | -| `prefer-array-literal` | ๐ŸŒ“ | [`@typescript-eslint/no-array-constructor`] [1] | -| `prefer-type-cast` | ๐Ÿ›‘ | N/A | - -[1] ESLint rule is slightly less strict, allowing `new Array()` and `Array(2)`. - -### Miscellaneous - -| `tslint-microsoft-contrib` rule | | ESLint rule | -| ------------------------------------- | :-: | ---------------------------------------------------------------------- | -| `export-name` | ๐Ÿ›‘ | N/A ([relevant plugin][plugin:import]) | -| `function-name` | ๐Ÿ›‘ | N/A | -| `import-name` | ๐Ÿ›‘ | N/A ([relevant plugin][plugin:import]) | -| `informative-docs` | ๐Ÿ›‘ | N/A | -| `max-func-body-length` | ๐ŸŒŸ | [`max-statements`][max-statements] | -| `no-banned-terms` | ๐ŸŒŸ | [`no-caller`][no-caller] & [`no-eval`][no-eval] | -| `no-constant-condition` | ๐ŸŒŸ | [`no-constant-condition`][no-constant-condition] | -| `no-control-regex` | ๐ŸŒŸ | [`no-control-regex`][no-control-regex] | -| `no-delete-expression` | โœ… | [`@typescript-eslint/no-dynamic-delete`] | -| `no-empty-line-after-opening-brace` | ๐ŸŒŸ | [`padded-blocks`][padded-blocks] [1] or [Prettier] | -| `no-for-in` | ๐ŸŒŸ | [`no-restricted-syntax`][no-restricted-syntax] [2] | -| `no-function-expression` | ๐ŸŒŸ | [`func-style`][func-style] [3] | -| `no-invalid-regexp` | ๐ŸŒŸ | [`no-invalid-regexp`][no-invalid-regexp] | -| `no-multiline-string` | ๐ŸŒŸ | [`no-multi-str`][no-multi-str] | -| `no-octal-literal` | ๐ŸŒŸ | [`no-octal-escape`][no-octal-escape], see also [`no-octal`][no-octal] | -| `no-regex-spaces` | ๐ŸŒŸ | [`no-regex-spaces`][no-regex-spaces] | -| `no-relative-imports` | ๐Ÿ›‘ | N/A, _Not recommended by the maintainers_ | -| `no-single-line-block-comment` | ๐Ÿ›‘ | N/A | -| `no-suspicious-comment` | ๐ŸŒŸ | [`no-warning-comments`][no-warning-comments] [4] | -| `no-typeof-undefined` | ๐Ÿ›‘ | N/A (this actually has a valid use: checking if a variable is defined) | -| `no-unexternalized-strings` | ๐Ÿ›‘ | N/A | -| `no-unnecessary-field-initialization` | ๐ŸŒ“ | [`no-undef-init`][no-undef-init] [5] | -| `no-unnecessary-local-variable` | ๐Ÿ›‘ | N/A | -| `no-unnecessary-override` | ๐Ÿ›‘ | N/A | -| `no-unnecessary-semicolons` | ๐ŸŒŸ | [`no-extra-semi`][no-extra-semi] or [Prettier] | -| `no-useless-files` | ๐Ÿ›‘ | N/A | -| `no-with-statement` | ๐ŸŒŸ | [`no-with`][no-with] | -| `promise-must-complete` | ๐Ÿ›‘ | N/A | -| `underscore-consistent-invocation` | ๐Ÿ”Œ | [`lodash/chaining`] | -| `use-named-parameter` | ๐Ÿ›‘ | N/A | -| `use-simple-attributes` | ๐Ÿ›‘ | N/A | - -[1] Enforces blank lines both at the beginning and end of a block
-[2] Recommended config: `["error", "ForInStatement"]`
-[3] Recommended config: `["error", "declaration", { "allowArrowFunctions": true }]`
-[4] Recommended config: `["error", { "terms": ["BUG", "HACK", "FIXME", "LATER", "LATER2", "TODO"], "location": "anywhere" }]`
-[5] Does not check class fields. - -### Security - -| `tslint-microsoft-contrib` rule | | ESLint rule | -| ------------------------------- | :-: | ------------------------------------------------------------------------------------------- | -| `insecure-random` | ๐Ÿ”Œ | [`desktop/insecure-random`] or [`@microsoft/sdl/no-insecure-random`] | -| `no-disable-auto-sanitization` | ๐Ÿ”Œ | [`@microsoft/sdl/no-msapp-exec-unsafe`] and [`@microsoft/sdl/no-winjs-html-unsafe`] | -| `no-document-domain` | ๐ŸŒ“ | Use [`no-restricted-syntax`][no-restricted-syntax] or [`@microsoft/sdl/no-document-domain`] | -| `no-http-string` | ๐Ÿ”Œ | [`@microsoft/sdl/no-insecure-url`] | -| `no-inner-html` | ๐Ÿ”Œ | [`@microsoft/sdl/no-inner-html`] and [`@microsoft/sdl/no-html-method`] | -| `no-string-based-set-immediate` | ๐ŸŒ“ | [`@typescript-eslint/no-implied-eval`] | -| `no-string-based-set-interval` | ๐ŸŒ“ | [`@typescript-eslint/no-implied-eval`] | -| `no-string-based-set-timeout` | ๐ŸŒ“ | [`@typescript-eslint/no-implied-eval`] | -| `react-anchor-blank-noopener` | ๐Ÿ”Œ | [`react/jsx-no-target-blank`] | -| `react-iframe-missing-sandbox` | ๐Ÿ”Œ | [`@microsoft/sdl/react-iframe-missing-sandbox`] | -| `react-no-dangerous-html` | ๐Ÿ”Œ | [`react/no-danger`] | -| `non-literal-fs-path` | ๐Ÿ”Œ | [`security/detect-non-literal-fs-filename`] | -| `non-literal-require` | ๐Ÿ”Œ | [`security/detect-non-literal-require`] | -| `possible-timing-attack` | ๐Ÿ”Œ | [`security/detect-possible-timing-attacks`] | - -### Browser - -| `tslint-microsoft-contrib` rule | | ESLint rule | -| ----------------------------------- | :-: | -------------------------------------------------------------------------------------------- | -| `jquery-deferred-must-complete` | ๐Ÿ›‘ | N/A | -| `no-backbone-get-set-outside-model` | ๐Ÿ›‘ | N/A | -| `no-cookies` | ๐ŸŒ“ | Use [`no-restricted-syntax`][no-restricted-syntax] or [`@microsoft/sdl/no-cookies`] | -| `no-document-write` | ๐ŸŒ“ | Use [`no-restricted-syntax`][no-restricted-syntax] or [`@microsoft/sdl/no-document-write`] | -| `no-exec-script` | ๐ŸŒ“ | Use [`no-restricted-syntax`][no-restricted-syntax] or [`@typescript-eslint/no-implied-eval`] | -| `no-jquery-raw-elements` | ๐Ÿ›‘ | N/A | -| `no-unsupported-browser-code` | ๐Ÿ›‘ | N/A | -| `react-this-binding-issue` | ๐Ÿ›‘ | N/A | -| `react-tsx-curly-spacing` | ๐Ÿ”Œ | [`react/jsx-curly-spacing`] | -| `react-unused-props-and-state` | ๐ŸŒ“ | [`react/no-unused-state`] | - -### React A11y - -| `tslint-microsoft-contrib` rule | | ESLint rule | -| ----------------------------------------- | :-: | ---------------------------------------------------------- | -| `react-a11y-accessible-headings` | ๐ŸŒ“ | [`jsx-a11y/heading-has-content`] [1] | -| `react-a11y-anchors` | ๐Ÿ”Œ | [`jsx-a11y/anchor-is-valid`] | -| `react-a11y-aria-unsupported-elements` | ๐Ÿ”Œ | [`jsx-a11y/aria-unsupported-elements`] | -| `react-a11y-event-has-role` | ๐ŸŒ“ | [`jsx-a11y/no-static-element-interactions`] [2] | -| `react-a11y-image-button-has-alt` | ๐Ÿ”Œ | [`jsx-a11y/alt-text`] | -| `react-a11y-img-has-alt` | ๐Ÿ”Œ | [`jsx-a11y/alt-text`] | -| `react-a11y-input-elements` | ๐Ÿ›‘ | N/A | -| `react-a11y-lang` | ๐Ÿ”Œ | [`jsx-a11y/lang`] | -| `react-a11y-meta` | ๐Ÿ›‘ | N/A | -| `react-a11y-no-onchange` | ๐Ÿ”Œ | [`jsx-a11y/no-onchange`] | -| `react-a11y-props` | ๐Ÿ”Œ | [`jsx-a11y/aria-props`] | -| `react-a11y-proptypes` | ๐Ÿ”Œ | [`jsx-a11y/aria-proptypes`] | -| `react-a11y-required` | ๐Ÿ›‘ | N/A | -| `react-a11y-role-has-required-aria-props` | ๐Ÿ”Œ | [`jsx-a11y/role-has-required-aria-props`] | -| `react-a11y-role-supports-aria-props` | ๐Ÿ”Œ | [`jsx-a11y/role-supports-aria-props`] | -| `react-a11y-role` | ๐Ÿ”Œ | [`jsx-a11y/aria-role`] | -| `react-a11y-tabindex-no-positive` | ๐Ÿ”Œ | [`jsx-a11y/tabindex-no-positive`] | -| `react-a11y-titles` | ๐Ÿ›‘ | N/A | - -[1] TSLint rule is more strict
-[2] ESLint rule only reports for click handlers - -[prettier]: https://prettier.io - - - -[`adjacent-overload-signatures`]: https://palantir.github.io/tslint/rules/adjacent-overload-signatures -[`ban-ts-ignore`]: https://palantir.github.io/tslint/rules/ban-ts-ignore/ -[`ban-types`]: https://palantir.github.io/tslint/rules/ban-types -[`invalid-void`]: https://palantir.github.io/tslint/rules/invalid-void -[`member-access`]: https://palantir.github.io/tslint/rules/member-access -[`member-ordering`]: https://palantir.github.io/tslint/rules/member-ordering -[`no-any`]: https://palantir.github.io/tslint/rules/no-any -[`no-empty-interface`]: https://palantir.github.io/tslint/rules/no-empty-interface -[`no-import-side-effect`]: https://palantir.github.io/tslint/rules/no-import-side-effect -[`no-inferrable-types`]: https://palantir.github.io/tslint/rules/no-inferrable-types -[`no-internal-module`]: https://palantir.github.io/tslint/rules/no-internal-module -[`no-magic-numbers`]: https://palantir.github.io/tslint/rules/no-magic-numbers -[`no-namespace`]: https://palantir.github.io/tslint/rules/no-namespace -[`no-non-null-assertion`]: https://palantir.github.io/tslint/rules/no-non-null-assertion -[`no-parameter-reassignment`]: https://palantir.github.io/tslint/rules/no-parameter-reassignment -[`no-reference`]: https://palantir.github.io/tslint/rules/no-reference -[`no-unnecessary-type-assertion`]: https://palantir.github.io/tslint/rules/no-unnecessary-type-assertion -[`no-var-requires`]: https://palantir.github.io/tslint/rules/no-var-requires -[`only-arrow-functions`]: https://palantir.github.io/tslint/rules/only-arrow-functions -[`prefer-for-of`]: https://palantir.github.io/tslint/rules/prefer-for-of -[`promise-function-async`]: https://palantir.github.io/tslint/rules/promise-function-async -[`typedef`]: https://palantir.github.io/tslint/rules/typedef -[`typedef-whitespace`]: https://palantir.github.io/tslint/rules/typedef-whitespace -[`unified-signatures`]: https://palantir.github.io/tslint/rules/unified-signatures -[`await-promise`]: https://palantir.github.io/tslint/rules/await-promise -[`ban-comma-operator`]: https://palantir.github.io/tslint/rules/ban-comma-operator -[`ban`]: https://palantir.github.io/tslint/rules/ban -[`curly`]: https://palantir.github.io/tslint/rules/curly -[`forin`]: https://palantir.github.io/tslint/rules/forin -[`function-constructor`]: https://palantir.github.io/tslint/rules/function-constructor -[`import-blacklist`]: https://palantir.github.io/tslint/rules/import-blacklist -[`label-position`]: https://palantir.github.io/tslint/rules/label-position -[`no-arg`]: https://palantir.github.io/tslint/rules/no-arg -[`no-async-without-await`]: https://palantir.github.io/tslint/rules/no-async-without-await -[`no-bitwise`]: https://palantir.github.io/tslint/rules/no-bitwise -[`no-conditional-assignment`]: https://palantir.github.io/tslint/rules/no-conditional-assignment -[`no-console`]: https://palantir.github.io/tslint/rules/no-console -[`no-construct`]: https://palantir.github.io/tslint/rules/no-construct -[`no-debugger`]: https://palantir.github.io/tslint/rules/no-debugger -[`no-duplicate-super`]: https://palantir.github.io/tslint/rules/no-duplicate-super -[`no-duplicate-switch-case`]: https://palantir.github.io/tslint/rules/no-duplicate-switch-case -[`no-duplicate-variable`]: https://palantir.github.io/tslint/rules/no-duplicate-variable -[`no-dynamic-delete`]: https://palantir.github.io/tslint/rules/no-dynamic-delete -[`no-empty`]: https://palantir.github.io/tslint/rules/no-empty -[`no-eval`]: https://palantir.github.io/tslint/rules/no-eval -[`no-floating-promises`]: https://palantir.github.io/tslint/rules/no-floating-promises -[`no-for-in-array`]: https://palantir.github.io/tslint/rules/no-for-in-array -[`no-implicit-dependencies`]: https://palantir.github.io/tslint/rules/no-implicit-dependencies -[`no-inferred-empty-object-type`]: https://palantir.github.io/tslint/rules/no-inferred-empty-object-type -[`no-invalid-template-strings`]: https://palantir.github.io/tslint/rules/no-invalid-template-strings -[`no-invalid-this`]: https://palantir.github.io/tslint/rules/no-invalid-this -[`no-misused-new`]: https://palantir.github.io/tslint/rules/no-misused-new -[`no-null-keyword`]: https://palantir.github.io/tslint/rules/no-null-keyword -[`no-null-undefined-union`]: https://palantir.github.io/tslint/rules/no-null-undefined-union -[`no-object-literal-type-assertion`]: https://palantir.github.io/tslint/rules/no-object-literal-type-assertion -[`no-promise-as-boolean`]: https://palantir.github.io/tslint/rules/no-promise-as-boolean -[`no-restricted-globals`]: https://palantir.github.io/tslint/rules/no-restricted-globals -[`no-return-await`]: https://palantir.github.io/tslint/rules/no-return-await -[`no-shadowed-variable`]: https://palantir.github.io/tslint/rules/no-shadowed-variable -[`no-sparse-arrays`]: https://palantir.github.io/tslint/rules/no-sparse-arrays -[`no-string-literal`]: https://palantir.github.io/tslint/rules/no-string-literal -[`no-string-throw`]: https://palantir.github.io/tslint/rules/no-string-throw -[`no-submodule-imports`]: https://palantir.github.io/tslint/rules/no-submodule-imports -[`no-switch-case-fall-through`]: https://palantir.github.io/tslint/rules/no-switch-case-fall-through -[`no-tautology-expression`]: https://palantir.github.io/tslint/rules/no-tautology-expression -[`no-this-assignment`]: https://palantir.github.io/tslint/rules/no-this-assignment -[`no-unbound-method`]: https://palantir.github.io/tslint/rules/no-unbound-method -[`no-unnecessary-class`]: https://palantir.github.io/tslint/rules/no-unnecessary-class -[`no-unsafe-any`]: https://palantir.github.io/tslint/rules/no-unsafe-any -[`no-unsafe-finally`]: https://palantir.github.io/tslint/rules/no-unsafe-finally -[`no-unused-expression`]: https://palantir.github.io/tslint/rules/no-unused-expression -[`no-unused-variable`]: https://palantir.github.io/tslint/rules/no-unused-variable -[`no-use-before-declare`]: https://palantir.github.io/tslint/rules/no-use-before-declare -[`no-var-keyword`]: https://palantir.github.io/tslint/rules/no-var-keyword -[`no-void-expression`]: https://palantir.github.io/tslint/rules/no-void-expression -[`prefer-conditional-expression`]: https://palantir.github.io/tslint/rules/prefer-conditional-expression -[`prefer-object-spread`]: https://palantir.github.io/tslint/rules/prefer-object-spread -[`radix`]: https://palantir.github.io/tslint/rules/radix -[`restrict-plus-operands`]: https://palantir.github.io/tslint/rules/restrict-plus-operands -[`static-this`]: https://palantir.github.io/tslint/rules/static-this -[`strict-boolean-expressions`]: https://palantir.github.io/tslint/rules/strict-boolean-expressions -[`strict-string-expressions`]: https://palantir.github.io/tslint/rules/strict-string-expressions -[`strict-type-predicates`]: https://palantir.github.io/tslint/rules/strict-type-predicates -[`switch-default`]: https://palantir.github.io/tslint/rules/switch-default -[`triple-equals`]: https://palantir.github.io/tslint/rules/triple-equals -[`typeof-compare`]: https://palantir.github.io/tslint/rules/typeof-compare -[`unnecessary-constructor`]: https://palantir.github.io/tslint/rules/unnecessary-constructor -[`use-default-type-parameter`]: https://palantir.github.io/tslint/rules/use-default-type-parameter -[`use-isnan`]: https://palantir.github.io/tslint/rules/use-isnan -[`cyclomatic-complexity`]: https://palantir.github.io/tslint/rules/cyclomatic-complexity -[`deprecation`]: https://palantir.github.io/tslint/rules/deprecation -[`eofline`]: https://palantir.github.io/tslint/rules/eofline -[`indent`]: https://palantir.github.io/tslint/rules/indent -[`linebreak-style`]: https://palantir.github.io/tslint/rules/linebreak-style -[`max-classes-per-file`]: https://palantir.github.io/tslint/rules/max-classes-per-file -[`max-file-line-count`]: https://palantir.github.io/tslint/rules/max-file-line-count -[`max-line-length`]: https://palantir.github.io/tslint/rules/max-line-length -[`no-default-export`]: https://palantir.github.io/tslint/rules/no-default-export -[`no-default-import`]: https://palantir.github.io/tslint/rules/no-default-import -[`no-duplicate-imports`]: https://palantir.github.io/tslint/rules/no-duplicate-imports -[`no-mergeable-namespace`]: https://palantir.github.io/tslint/rules/no-mergeable-namespace -[`no-require-imports`]: https://palantir.github.io/tslint/rules/no-require-imports -[`object-literal-sort-keys`]: https://palantir.github.io/tslint/rules/object-literal-sort-keys -[`prefer-const`]: https://palantir.github.io/tslint/rules/prefer-const -[`prefer-readonly`]: https://palantir.github.io/tslint/rules/prefer-readonly -[`trailing-comma`]: https://palantir.github.io/tslint/rules/trailing-comma -[`align`]: https://palantir.github.io/tslint/rules/align -[`array-type`]: https://palantir.github.io/tslint/rules/array-type -[`arrow-parens`]: https://palantir.github.io/tslint/rules/arrow-parens -[`arrow-return-shorthand`]: https://palantir.github.io/tslint/rules/arrow-return-shorthand -[`binary-expression-operand-order`]: https://palantir.github.io/tslint/rules/binary-expression-operand-order -[`callable-types`]: https://palantir.github.io/tslint/rules/callable-types -[`class-name`]: https://palantir.github.io/tslint/rules/class-name -[`comment-format`]: https://palantir.github.io/tslint/rules/comment-format -[`comment-type`]: https://palantir.github.io/tslint/rules/comment-type -[`completed-docs`]: https://palantir.github.io/tslint/rules/completed-docs -[`encoding`]: https://palantir.github.io/tslint/rules/encoding -[`file-header`]: https://palantir.github.io/tslint/rules/file-header -[`file-name-casing`]: https://palantir.github.io/tslint/rules/file-name-casing -[`import-spacing`]: https://palantir.github.io/tslint/rules/import-spacing -[`increment-decrement`]: https://palantir.github.io/tslint/rules/increment-decrement -[`interface-name`]: https://palantir.github.io/tslint/rules/interface-name -[`interface-over-type-literal`]: https://palantir.github.io/tslint/rules/interface-over-type-literal -[`jsdoc-format`]: https://palantir.github.io/tslint/rules/jsdoc-format -[`match-default-export-name`]: https://palantir.github.io/tslint/rules/match-default-export-name -[`newline-before-return`]: https://palantir.github.io/tslint/rules/newline-before-return -[`newline-per-chained-call`]: https://palantir.github.io/tslint/rules/newline-per-chained-call -[`new-parens`]: https://palantir.github.io/tslint/rules/new-parens -[`no-angle-bracket-type-assertion`]: https://palantir.github.io/tslint/rules/no-angle-bracket-type-assertion -[`no-boolean-literal-compare`]: https://palantir.github.io/tslint/rules/no-boolean-literal-compare -[`no-consecutive-blank-lines`]: https://palantir.github.io/tslint/rules/no-consecutive-blank-lines -[`no-irregular-whitespace`]: https://palantir.github.io/tslint/rules/no-irregular-whitespace -[`no-parameter-properties`]: https://palantir.github.io/tslint/rules/no-parameter-properties -[`no-redundant-jsdoc`]: https://palantir.github.io/tslint/rules/no-redundant-jsdoc -[`no-reference-import`]: https://palantir.github.io/tslint/rules/no-reference-import -[`no-trailing-whitespace`]: https://palantir.github.io/tslint/rules/no-trailing-whitespace -[`no-unnecessary-callback-wrapper`]: https://palantir.github.io/tslint/rules/no-unnecessary-callback-wrapper -[`no-unnecessary-else`]: https://palantir.github.io/tslint/rules/no-unnecessary-else -[`no-unnecessary-initializer`]: https://palantir.github.io/tslint/rules/no-unnecessary-initializer -[`no-unnecessary-qualifier`]: https://palantir.github.io/tslint/rules/no-unnecessary-qualifier -[`number-literal-format`]: https://palantir.github.io/tslint/rules/number-literal-format -[`object-literal-key-quotes`]: https://palantir.github.io/tslint/rules/object-literal-key-quotes -[`object-literal-shorthand`]: https://palantir.github.io/tslint/rules/object-literal-shorthand -[`one-line`]: https://palantir.github.io/tslint/rules/one-line -[`one-variable-per-declaration`]: https://palantir.github.io/tslint/rules/one-variable-per-declaration -[`ordered-imports`]: https://palantir.github.io/tslint/rules/ordered-imports -[`prefer-function-over-method`]: https://palantir.github.io/tslint/rules/prefer-function-over-method -[`prefer-method-signature`]: https://palantir.github.io/tslint/rules/prefer-method-signature -[`prefer-switch`]: https://palantir.github.io/tslint/rules/prefer-switch -[`prefer-template`]: https://palantir.github.io/tslint/rules/prefer-template -[`prefer-while`]: https://palantir.github.io/tslint/rules/prefer-while -[`quotemark`]: https://palantir.github.io/tslint/rules/quotemark -[`return-undefined`]: https://palantir.github.io/tslint/rules/return-undefined -[`semicolon`]: https://palantir.github.io/tslint/rules/semicolon -[`space-before-function-paren`]: https://palantir.github.io/tslint/rules/space-before-function-paren -[`space-within-parens`]: https://palantir.github.io/tslint/rules/space-within-parens -[`switch-final-break`]: https://palantir.github.io/tslint/rules/switch-final-break -[`type-literal-delimiter`]: https://palantir.github.io/tslint/rules/type-literal-delimiter -[`unnecessary-bind`]: https://palantir.github.io/tslint/rules/unnecessary-bind -[`variable-name`]: https://palantir.github.io/tslint/rules/variable-name -[`whitespace`]: https://palantir.github.io/tslint/rules/whitespace - - - -[no-magic-numbers]: https://eslint.org/docs/rules/no-magic-numbers -[no-param-reassign]: https://eslint.org/docs/rules/no-param-reassign -[no-sequences]: https://eslint.org/docs/rules/no-sequences -[no-restricted-globals]: https://eslint.org/docs/rules/no-restricted-globals -[no-restricted-properties]: https://eslint.org/docs/rules/no-restricted-properties -[no-restricted-syntax]: https://eslint.org/docs/rules/no-restricted-syntax -[curly]: https://eslint.org/docs/rules/curly -[guard-for-in]: https://eslint.org/docs/rules/guard-for-in -[no-new-func]: https://eslint.org/docs/rules/no-new-func -[no-restricted-imports]: https://eslint.org/docs/rules/no-restricted-imports -[no-unused-labels]: https://eslint.org/docs/rules/no-unused-labels -[no-caller]: https://eslint.org/docs/rules/no-caller -[no-bitwise]: https://eslint.org/docs/rules/no-bitwise -[no-cond-assign]: https://eslint.org/docs/rules/no-cond-assign -[no-console]: https://eslint.org/docs/rules/no-console -[no-new-wrappers]: https://eslint.org/docs/rules/no-new-wrappers -[no-debugger]: https://eslint.org/docs/rules/no-debugger -[constructor-super]: https://eslint.org/docs/rules/constructor-super -[no-duplicate-case]: https://eslint.org/docs/rules/no-duplicate-case -[no-redeclare]: https://eslint.org/docs/rules/no-redeclare -[no-empty]: https://eslint.org/docs/rules/no-empty -[no-eval]: https://eslint.org/docs/rules/no-eval -[no-template-curly-in-string]: https://eslint.org/docs/rules/no-template-curly-in-string -[no-invalid-this]: https://eslint.org/docs/rules/no-invalid-this -[no-return-await]: https://eslint.org/docs/rules/no-return-await -[no-shadow]: https://eslint.org/docs/rules/no-shadow -[no-sparse-arrays]: https://eslint.org/docs/rules/no-sparse-arrays -[dot-notation]: https://eslint.org/docs/rules/dot-notation -[no-fallthrough]: https://eslint.org/docs/rules/no-fallthrough -[no-unsafe-finally]: https://eslint.org/docs/rules/no-unsafe-finally -[no-unused-expressions]: https://eslint.org/docs/rules/no-unused-expressions -[no-var]: https://eslint.org/docs/rules/no-var -[prefer-object-spread]: https://eslint.org/docs/rules/prefer-object-spread -[radix]: https://eslint.org/docs/rules/radix -[default-case]: https://eslint.org/docs/rules/default-case -[eqeqeq]: https://eslint.org/docs/rules/eqeqeq -[valid-typeof]: https://eslint.org/docs/rules/valid-typeof -[no-useless-constructor]: https://eslint.org/docs/rules/no-useless-constructor -[use-isnan]: https://eslint.org/docs/rules/use-isnan -[complexity]: https://eslint.org/docs/rules/complexity -[eol-last]: https://eslint.org/docs/rules/eol-last -[linebreak-style]: https://eslint.org/docs/rules/linebreak-style -[max-classes-per-file]: https://eslint.org/docs/rules/max-classes-per-file -[max-lines]: https://eslint.org/docs/rules/max-lines -[max-len]: https://eslint.org/docs/rules/max-len -[sort-keys]: https://eslint.org/docs/rules/sort-keys -[prefer-const]: https://eslint.org/docs/rules/prefer-const -[comma-dangle]: https://eslint.org/docs/rules/comma-dangle -[arrow-parens]: https://eslint.org/docs/rules/arrow-parens -[arrow-body-style]: https://eslint.org/docs/rules/arrow-body-style -[yoda]: https://eslint.org/docs/rules/yoda -[capitalized-comments]: https://eslint.org/docs/rules/capitalized-comments -[spaced-comment]: https://eslint.org/docs/rules/spaced-comment -[no-plusplus]: https://eslint.org/docs/rules/no-plusplus -[valid-jsdoc]: https://eslint.org/docs/rules/valid-jsdoc -[padding-line-between-statements]: https://eslint.org/docs/rules/padding-line-between-statements -[newline-per-chained-call]: https://eslint.org/docs/rules/newline-per-chained-call -[new-parens]: https://eslint.org/docs/rules/new-parens -[no-else-return]: https://eslint.org/docs/rules/no-else-return -[no-multiple-empty-lines]: https://eslint.org/docs/rules/no-multiple-empty-lines -[no-irregular-whitespace]: https://eslint.org/docs/rules/no-irregular-whitespace -[no-trailing-spaces]: https://eslint.org/docs/rules/no-trailing-spaces -[no-undef-init]: https://eslint.org/docs/rules/no-undef-init -[quote-props]: https://eslint.org/docs/rules/quote-props -[object-shorthand]: https://eslint.org/docs/rules/object-shorthand -[brace-style]: https://eslint.org/docs/rules/brace-style -[one-var]: https://eslint.org/docs/rules/one-var -[class-methods-use-this]: https://eslint.org/docs/rules/class-methods-use-this -[prefer-template]: https://eslint.org/docs/rules/prefer-template -[quotes]: https://eslint.org/docs/rules/quotes -[semi]: https://eslint.org/docs/rules/semi -[space-after-function-paren]: https://eslint.org/docs/rules/space-before-function-paren -[space-in-parens]: https://eslint.org/docs/rules/space-in-parens -[no-extra-bind]: https://eslint.org/docs/rules/no-extra-bind -[camelcase]: https://eslint.org/docs/rules/camelcase -[no-underscore-dangle]: https://eslint.org/docs/rules/no-underscore-dangle -[id-blacklist]: https://eslint.org/docs/rules/id-blacklist -[id-match]: https://eslint.org/docs/rules/id-match -[max-statements]: https://eslint.org/docs/rules/max-statements -[no-constant-condition]: https://eslint.org/docs/rules/no-constant-condition -[no-control-regex]: https://eslint.org/docs/rules/no-control-regex -[no-invalid-regexp]: https://eslint.org/docs/rules/no-invalid-regexp -[no-regex-spaces]: https://eslint.org/docs/rules/no-regex-spaces -[no-new-func]: https://eslint.org/docs/rules/no-new-func -[padded-blocks]: https://eslint.org/docs/rules/padded-blocks -[func-style]: https://eslint.org/docs/rules/func-style -[no-multi-str]: https://eslint.org/docs/rules/no-multi-str -[no-octal]: https://eslint.org/docs/rules/no-octal -[no-octal-escape]: https://eslint.org/docs/rules/no-octal-escape -[no-extra-semi]: https://eslint.org/docs/rules/no-extra-semi -[no-with]: https://eslint.org/docs/rules/no-with -[no-warning-comments]: https://eslint.org/docs/rules/no-warning-comments - - - -[`@typescript-eslint/adjacent-overload-signatures`]: https://typescript-eslint.io/rules/adjacent-overload-signatures -[`@typescript-eslint/await-thenable`]: https://typescript-eslint.io/rules/await-thenable -[`@typescript-eslint/ban-types`]: https://typescript-eslint.io/rules/ban-types -[`@typescript-eslint/ban-ts-comment`]: https://typescript-eslint.io/rules/ban-ts-comment -[`@typescript-eslint/consistent-type-assertions`]: https://typescript-eslint.io/rules/consistent-type-assertions -[`@typescript-eslint/consistent-type-definitions`]: https://typescript-eslint.io/rules/consistent-type-definitions -[`@typescript-eslint/explicit-member-accessibility`]: https://typescript-eslint.io/rules/explicit-member-accessibility -[`@typescript-eslint/member-ordering`]: https://typescript-eslint.io/rules/member-ordering -[`@typescript-eslint/method-signature-style`]: https://typescript-eslint.io/rules/method-signature-style -[`@typescript-eslint/no-explicit-any`]: https://typescript-eslint.io/rules/no-explicit-any -[`@typescript-eslint/no-empty-interface`]: https://typescript-eslint.io/rules/no-empty-interface -[`@typescript-eslint/no-implied-eval`]: https://typescript-eslint.io/rules/no-implied-eval -[`@typescript-eslint/no-inferrable-types`]: https://typescript-eslint.io/rules/no-inferrable-types -[`@typescript-eslint/prefer-namespace-keyword`]: https://typescript-eslint.io/rules/prefer-namespace-keyword -[`@typescript-eslint/promise-function-async`]: https://typescript-eslint.io/rules/promise-function-async -[`@typescript-eslint/no-misused-promises`]: https://typescript-eslint.io/rules/no-misused-promises -[`@typescript-eslint/no-namespace`]: https://typescript-eslint.io/rules/no-namespace -[`@typescript-eslint/no-non-null-assertion`]: https://typescript-eslint.io/rules/no-non-null-assertion -[`@typescript-eslint/triple-slash-reference`]: https://typescript-eslint.io/rules/triple-slash-reference -[`@typescript-eslint/unbound-method`]: https://typescript-eslint.io/rules/unbound-method -[`@typescript-eslint/no-unnecessary-type-assertion`]: https://typescript-eslint.io/rules/no-unnecessary-type-assertion -[`@typescript-eslint/no-var-requires`]: https://typescript-eslint.io/rules/no-var-requires -[`@typescript-eslint/type-annotation-spacing`]: https://typescript-eslint.io/rules/type-annotation-spacing -[`@typescript-eslint/typedef`]: https://typescript-eslint.io/rules/typedef -[`@typescript-eslint/unified-signatures`]: https://typescript-eslint.io/rules/unified-signatures -[`@typescript-eslint/no-unnecessary-boolean-literal-compare`]: https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare -[`@typescript-eslint/no-misused-new`]: https://typescript-eslint.io/rules/no-misused-new -[`@typescript-eslint/no-this-alias`]: https://typescript-eslint.io/rules/no-this-alias -[`@typescript-eslint/no-throw-literal`]: https://typescript-eslint.io/rules/no-throw-literal -[`@typescript-eslint/no-extraneous-class`]: https://typescript-eslint.io/rules/no-extraneous-class -[`@typescript-eslint/no-unused-vars`]: https://typescript-eslint.io/rules/no-unused-vars -[`@typescript-eslint/no-use-before-define`]: https://typescript-eslint.io/rules/no-use-before-define -[`@typescript-eslint/restrict-plus-operands`]: https://typescript-eslint.io/rules/restrict-plus-operands -[`@typescript-eslint/strict-boolean-expressions`]: https://typescript-eslint.io/rules/strict-boolean-expressions -[`@typescript-eslint/indent`]: https://typescript-eslint.io/rules/indent -[`@typescript-eslint/no-invalid-void-type`]: https://typescript-eslint.io/rules/no-invalid-void-type -[`@typescript-eslint/no-require-imports`]: https://typescript-eslint.io/rules/no-require-imports -[`@typescript-eslint/array-type`]: https://typescript-eslint.io/rules/array-type -[`@typescript-eslint/naming-convention`]: https://typescript-eslint.io/rules/naming-convention -[`@typescript-eslint/interface-name-prefix`]: https://typescript-eslint.io/rules/interface-name-prefix -[`@typescript-eslint/naming-convention`]: https://typescript-eslint.io/rules/naming-convention -[`@typescript-eslint/parameter-properties`]: https://typescript-eslint.io/rules/parameter-properties -[`@typescript-eslint/member-delimiter-style`]: https://typescript-eslint.io/rules/member-delimiter-style -[`@typescript-eslint/prefer-for-of`]: https://typescript-eslint.io/rules/prefer-for-of -[`@typescript-eslint/no-array-constructor`]: https://typescript-eslint.io/rules/no-array-constructor -[`@typescript-eslint/no-dynamic-delete`]: https://typescript-eslint.io/rules/no-dynamic-delete -[`@typescript-eslint/prefer-function-type`]: https://typescript-eslint.io/rules/prefer-function-type -[`@typescript-eslint/prefer-readonly`]: https://typescript-eslint.io/rules/prefer-readonly -[`@typescript-eslint/require-await`]: https://typescript-eslint.io/rules/require-await -[`@typescript-eslint/no-for-in-array`]: https://typescript-eslint.io/rules/no-for-in-array -[`@typescript-eslint/no-unnecessary-qualifier`]: https://typescript-eslint.io/rules/no-unnecessary-qualifier -[`@typescript-eslint/no-unnecessary-type-arguments`]: https://typescript-eslint.io/rules/no-unnecessary-type-arguments -[`@typescript-eslint/semi`]: https://typescript-eslint.io/rules/semi -[`@typescript-eslint/no-floating-promises`]: https://typescript-eslint.io/rules/no-floating-promises -[`@typescript-eslint/no-magic-numbers`]: https://typescript-eslint.io/rules/no-magic-numbers -[`@typescript-eslint/no-unsafe-member-access`]: https://typescript-eslint.io/rules/no-unsafe-member-access -[`@typescript-eslint/restrict-template-expressions`]: https://typescript-eslint.io/rules/restrict-template-expressions -[`@typescript-eslint/no-confusing-void-expression`]: https://typescript-eslint.io/rules/no-confusing-void-expression - - - -[plugin:import]: https://github.com/benmosher/eslint-plugin-import -[`import/no-unassigned-import`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md -[`import/no-extraneous-dependencies`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md -[`import/no-internal-modules`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md -[`import/no-deprecated`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md -[`import/no-default-export`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-default-export.md -[`import/no-duplicates`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md -[`import/order`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md - - - -[`react/no-danger`]: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md -[`react/jsx-curly-spacing`]: https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-curly-spacing.md -[`react/jsx-no-target-blank`]: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md -[`react/no-unused-state`]: https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/no-unused-state.md - - - -[`jsx-a11y/anchor-is-valid`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md -[`jsx-a11y/aria-unsupported-elements`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md -[`jsx-a11y/no-static-element-interactions`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md -[`jsx-a11y/alt-text`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md -[`jsx-a11y/html-has-lang`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md -[`jsx-a11y/lang`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md -[`jsx-a11y/no-onchange`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md -[`jsx-a11y/aria-props`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md -[`jsx-a11y/aria-proptypes`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md -[`jsx-a11y/role-has-required-aria-props`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md -[`jsx-a11y/role-supports-aria-props`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md -[`jsx-a11y/aria-role`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md -[`jsx-a11y/tabindex-no-positive`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md - - - -[`security/detect-non-literal-fs-filename`]: https://github.com/nodesecurity/eslint-plugin-security#detect-non-literal-fs-filename -[`security/detect-non-literal-require`]: https://github.com/nodesecurity/eslint-plugin-security#detect-non-literal-require -[`security/detect-possible-timing-attacks`]: https://github.com/nodesecurity/eslint-plugin-security#detect-possible-timing-attacks - - - -[plugin:jsdoc]: https://github.com/gajus/eslint-plugin-jsdoc -[`jsdoc/require-jsdoc`]: https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-jsdoc -[`jsdoc/no-types`]: https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-no-types - - - -[`@microsoft/sdl/no-cookies`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-cookies.md -[`@microsoft/sdl/no-document-domain`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-document-domain.md -[`@microsoft/sdl/no-document-write`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-document-write.md -[`@microsoft/sdl/no-html-method`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-html-method.md -[`@microsoft/sdl/no-inner-html`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-inner-html.md -[`@microsoft/sdl/no-insecure-random`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-insecure-random.md -[`@microsoft/sdl/no-insecure-url`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-insecure-url.md -[`@microsoft/sdl/no-msapp-exec-unsafe`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-msapp-exec-unsafe.md -[`@microsoft/sdl/no-winjs-html-unsafe`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-winjs-html-unsafe.md -[`@microsoft/sdl/react-iframe-missing-sandbox`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/react-iframe-missing-sandbox.md - - - -[`prefer-arrow/prefer-arrow-functions`]: https://github.com/TristonJ/eslint-plugin-prefer-arrow -[plugin:promise]: https://github.com/xjamundx/eslint-plugin-promise -[plugin:header]: https://github.com/Stuk/eslint-plugin-header -[plugin:file-header]: https://github.com/Sekhmet/eslint-plugin-file-header -[plugin:compat]: https://github.com/amilajack/eslint-plugin-compat -[`no-null/no-null`]: https://github.com/nene/eslint-plugin-no-null -[`unicorn/filename-case`]: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/filename-case.md -[`jest/no-focused-tests`]: https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-focused-tests.md -[`jsx-a11y/heading-has-content`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md -[`lodash/chaining`]: https://github.com/wix/eslint-plugin-lodash/blob/master/docs/rules/chaining.md -[`deprecation/deprecation`]: https://github.com/gund/eslint-plugin-deprecation -[`desktop/insecure-random`]: https://github.com/desktop/desktop/blob/development/eslint-rules/insecure-random.js +๐Ÿ‘‹ diff --git a/packages/eslint-plugin/TSLINT_RULE_ALTERNATIVES.md b/packages/eslint-plugin/TSLINT_RULE_ALTERNATIVES.md new file mode 100644 index 00000000000..097de893804 --- /dev/null +++ b/packages/eslint-plugin/TSLINT_RULE_ALTERNATIVES.md @@ -0,0 +1,728 @@ +# TSLint Rule Alternatives + +This document serves as a guide to help you migrate from TSLint. +It lists all TSLint rules along side rules from the ESLint ecosystem that are the same or similar. + +> For a tool that migrates a TSLint config to the closest possible ESLint config, see [`tslint-to-eslint-config`](https://github.com/typescript-eslint/tslint-to-eslint-config). + +## TSLint rules + +โœ… = done
+๐ŸŒŸ = in ESLint core
+๐Ÿ”Œ = in another plugin
+๐ŸŒ“ = implementations differ or ESLint version is missing functionality
+๐Ÿ›‘ = unimplemented
+ +### TypeScript-specific + +| TSLint rule | | ESLint rule | +| --------------------------------- | :-: | ---------------------------------------------------- | +| [`adjacent-overload-signatures`] | โœ… | [`@typescript-eslint/adjacent-overload-signatures`] | +| [`ban-ts-ignore`] | โœ… | [`@typescript-eslint/ban-ts-comment`] | +| [`ban-types`] | ๐ŸŒ“ | [`@typescript-eslint/ban-types`][1] | +| [`invalid-void`] | โœ… | [`@typescript-eslint/no-invalid-void-type`] | +| [`member-access`] | โœ… | [`@typescript-eslint/explicit-member-accessibility`] | +| [`member-ordering`] | โœ… | [`@typescript-eslint/member-ordering`] | +| [`no-any`] | โœ… | [`@typescript-eslint/no-explicit-any`] | +| [`no-empty-interface`] | โœ… | [`@typescript-eslint/no-empty-interface`] | +| [`no-import-side-effect`] | ๐Ÿ”Œ | [`import/no-unassigned-import`] | +| [`no-inferrable-types`] | โœ… | [`@typescript-eslint/no-inferrable-types`] | +| [`no-internal-module`] | โœ… | [`@typescript-eslint/prefer-namespace-keyword`] | +| [`no-magic-numbers`] | โœ… | [`@typescript-eslint/no-magic-numbers`] | +| [`no-namespace`] | โœ… | [`@typescript-eslint/no-namespace`] | +| [`no-non-null-assertion`] | โœ… | [`@typescript-eslint/no-non-null-assertion`] | +| [`no-parameter-reassignment`] | โœ… | [`no-param-reassign`][no-param-reassign] | +| [`no-reference`] | โœ… | [`@typescript-eslint/triple-slash-reference`] | +| [`no-unnecessary-type-assertion`] | โœ… | [`@typescript-eslint/no-unnecessary-type-assertion`] | +| [`no-var-requires`] | โœ… | [`@typescript-eslint/no-var-requires`] | +| [`only-arrow-functions`] | ๐Ÿ”Œ | [`prefer-arrow/prefer-arrow-functions`] | +| [`prefer-for-of`] | โœ… | [`@typescript-eslint/prefer-for-of`] | +| [`promise-function-async`] | โœ… | [`@typescript-eslint/promise-function-async`] | +| [`typedef-whitespace`] | โœ… | [`@typescript-eslint/type-annotation-spacing`] | +| [`typedef`] | โœ… | [`@typescript-eslint/typedef`] | +| [`unified-signatures`] | โœ… | [`@typescript-eslint/unified-signatures`] | + +[1] The ESLint rule only supports exact string matching, rather than regular expressions
+ +### Functionality + +| TSLint rule | | ESLint rule | +| ------------------------------------ | :-: | --------------------------------------------------------------------------------------------------------- | +| [`await-promise`] | โœ… | [`@typescript-eslint/await-thenable`] | +| [`ban-comma-operator`] | ๐ŸŒŸ | [`no-sequences`][no-sequences] | +| [`ban`] | ๐ŸŒŸ | [`no-restricted-globals`][no-restricted-globals] & [`no-restricted-properties`][no-restricted-properties] | +| [`curly`] | ๐ŸŒŸ | [`curly`][curly] | +| [`forin`] | ๐ŸŒŸ | [`guard-for-in`][guard-for-in] | +| [`function-constructor`] | ๐ŸŒŸ | [`no-new-func`][no-new-func] | +| [`import-blacklist`] | ๐ŸŒŸ | [`no-restricted-imports`][no-restricted-imports] | +| [`label-position`] | ๐ŸŒŸ | [`no-unused-labels`][no-unused-labels] (similar) | +| [`no-arg`] | ๐ŸŒŸ | [`no-caller`][no-caller] (also blocks `arguments.caller`) | +| [`no-async-without-await`] | โœ… | [`@typescript-eslint/require-await`] | +| [`no-bitwise`] | ๐ŸŒŸ | [`no-bitwise`][no-bitwise] | +| [`no-conditional-assignment`] | ๐ŸŒŸ | [`no-cond-assign`][no-cond-assign][1] | +| [`no-console`] | ๐ŸŒŸ | [`no-console`][no-console] (configuration works slightly differently) | +| [`no-construct`] | ๐ŸŒŸ | [`no-new-wrappers`][no-new-wrappers] | +| [`no-debugger`] | ๐ŸŒŸ | [`no-debugger`][no-debugger] | +| [`no-duplicate-super`] | ๐ŸŒŸ | [`constructor-super`][constructor-super] | +| [`no-duplicate-switch-case`] | ๐ŸŒŸ | [`no-duplicate-case`][no-duplicate-case] | +| [`no-duplicate-variable`] | ๐ŸŒŸ | [`no-redeclare`][no-redeclare] | +| [`no-dynamic-delete`] | โœ… | [`@typescript-eslint/no-dynamic-delete`] | +| [`no-empty`] | ๐ŸŒŸ | [`no-empty`][no-empty] | +| [`no-eval`] | ๐ŸŒŸ | [`no-eval`][no-eval] | +| [`no-floating-promises`] | โœ… | [`@typescript-eslint/no-floating-promises`] | +| [`no-for-in-array`] | โœ… | [`@typescript-eslint/no-for-in-array`] | +| [`no-implicit-dependencies`] | ๐Ÿ”Œ | [`import/no-extraneous-dependencies`] | +| [`no-inferred-empty-object-type`] | ๐Ÿ›‘ | N/A | +| [`no-invalid-template-strings`] | ๐ŸŒŸ | [`no-template-curly-in-string`][no-template-curly-in-string] | +| [`no-invalid-this`] | ๐ŸŒŸ | [`no-invalid-this`][no-invalid-this] | +| [`no-misused-new`] | โœ… | [`@typescript-eslint/no-misused-new`] | +| [`no-null-keyword`] | ๐Ÿ”Œ | [`no-null/no-null`] (doesnโ€™t handle `null` type) | +| [`no-null-undefined-union`] | ๐Ÿ›‘ | N/A | +| [`no-object-literal-type-assertion`] | โœ… | [`@typescript-eslint/consistent-type-assertions`] | +| [`no-promise-as-boolean`] | โœ… | [`@typescript-eslint/no-misused-promises`] | +| [`no-restricted-globals`] | โœ… | [`no-restricted-globals`][no-restricted-globals] | +| [`no-return-await`] | ๐ŸŒŸ | [`no-return-await`][no-return-await] | +| [`no-shadowed-variable`] | ๐ŸŒŸ | [`no-shadow`][no-shadow] | +| [`no-sparse-arrays`] | ๐ŸŒŸ | [`no-sparse-arrays`][no-sparse-arrays] | +| [`no-string-literal`] | ๐ŸŒŸ | [`dot-notation`][dot-notation] | +| [`no-string-throw`] | โœ… | [`@typescript-eslint/no-throw-literal`] | +| [`no-submodule-imports`] | ๐ŸŒ“ | [`import/no-internal-modules`] (slightly different) | +| [`no-switch-case-fall-through`] | ๐ŸŒŸ | [`no-fallthrough`][no-fallthrough] | +| [`no-tautology-expression`] | ๐Ÿ›‘ | N/A | +| [`no-this-assignment`] | โœ… | [`@typescript-eslint/no-this-alias`] | +| [`no-unbound-method`] | โœ… | [`@typescript-eslint/unbound-method`] | +| [`no-unnecessary-class`] | โœ… | [`@typescript-eslint/no-extraneous-class`] | +| [`no-unsafe-any`] | ๐ŸŒ“ | [`@typescript-eslint/no-unsafe-member-access`][2] | +| [`no-unsafe-finally`] | ๐ŸŒŸ | [`no-unsafe-finally`][no-unsafe-finally] | +| [`no-unused-expression`] | ๐ŸŒŸ | [`no-unused-expressions`][no-unused-expressions] | +| [`no-unused-variable`] | ๐ŸŒ“ | [`@typescript-eslint/no-unused-vars`] | +| [`no-use-before-declare`] | โœ… | [`@typescript-eslint/no-use-before-define`] | +| [`no-var-keyword`] | ๐ŸŒŸ | [`no-var`][no-var] | +| [`no-void-expression`] | โœ… | [`@typescript-eslint/no-confusing-void-expression`] | +| [`prefer-conditional-expression`] | ๐Ÿ›‘ | N/A | +| [`prefer-object-spread`] | ๐ŸŒŸ | [`prefer-object-spread`][prefer-object-spread] | +| [`radix`] | ๐ŸŒŸ | [`radix`][radix] | +| [`restrict-plus-operands`] | โœ… | [`@typescript-eslint/restrict-plus-operands`] | +| [`static-this`] | ๐Ÿ›‘ | N/A | +| [`strict-boolean-expressions`] | โœ… | [`@typescript-eslint/strict-boolean-expressions`] | +| [`strict-string-expressions`] | โœ… | [`@typescript-eslint/restrict-plus-operands`] & [`@typescript-eslint/restrict-template-expressions`] | +| [`strict-type-predicates`] | ๐Ÿ›‘ | N/A | +| [`switch-default`] | ๐ŸŒŸ | [`default-case`][default-case] | +| [`triple-equals`] | ๐ŸŒŸ | [`eqeqeq`][eqeqeq] | +| [`typeof-compare`] | ๐ŸŒŸ | [`valid-typeof`][valid-typeof] | +| [`unnecessary-constructor`] | ๐ŸŒŸ | [`no-useless-constructor`][no-useless-constructor] | +| [`use-default-type-parameter`] | โœ… | [`@typescript-eslint/no-unnecessary-type-arguments`] | +| [`use-isnan`] | ๐ŸŒŸ | [`use-isnan`][use-isnan] | + +[1] The ESLint rule also supports silencing with an extra set of parentheses (`if ((foo = bar)) {}`)
+[2] Only checks member expressions + +### Maintainability + +| TSLint rule | | ESLint rule | +| ---------------------------- | :-: | -------------------------------------------------- | +| [`cyclomatic-complexity`] | ๐ŸŒŸ | [`complexity`][complexity] | +| [`deprecation`] | ๐Ÿ”Œ | [`deprecation/deprecation`] | +| [`eofline`] | ๐ŸŒŸ | [`eol-last`][eol-last] | +| [`indent`] | โœ… | [`@typescript-eslint/indent`] or [Prettier] | +| [`linebreak-style`] | ๐ŸŒŸ | [`linebreak-style`][linebreak-style] or [Prettier] | +| [`max-classes-per-file`] | ๐ŸŒŸ | [`max-classes-per-file`][max-classes-per-file] | +| [`max-file-line-count`] | ๐ŸŒŸ | [`max-lines`][max-lines] | +| [`max-line-length`] | ๐ŸŒŸ | [`max-len`][max-len] or [Prettier] | +| [`no-default-export`] | ๐Ÿ”Œ | [`import/no-default-export`] | +| [`no-default-import`] | ๐Ÿ›‘ | N/A | +| [`no-duplicate-imports`] | ๐Ÿ”Œ | [`import/no-duplicates`] | +| [`no-mergeable-namespace`] | ๐Ÿ›‘ | N/A | +| [`no-require-imports`] | โœ… | [`@typescript-eslint/no-require-imports`] | +| [`object-literal-sort-keys`] | ๐ŸŒ“ | [`sort-keys`][sort-keys] [2] | +| [`prefer-const`] | ๐ŸŒŸ | [`prefer-const`][prefer-const] | +| [`prefer-readonly`] | โœ… | [`@typescript-eslint/prefer-readonly`] | +| [`trailing-comma`] | ๐ŸŒ“ | [`comma-dangle`][comma-dangle] or [Prettier] | + +[2] Missing support for blank-line-delimited sections + +### Style + +| TSLint rule | | ESLint rule | +| ----------------------------------- | :-: | ----------------------------------------------------------------------------------- | +| [`align`] | ๐Ÿ›‘ | N/A | +| [`array-type`] | โœ… | [`@typescript-eslint/array-type`] | +| [`arrow-parens`] | ๐ŸŒŸ | [`arrow-parens`][arrow-parens] | +| [`arrow-return-shorthand`] | ๐ŸŒŸ | [`arrow-body-style`][arrow-body-style] | +| [`binary-expression-operand-order`] | ๐ŸŒŸ | [`yoda`][yoda] | +| [`callable-types`] | โœ… | [`@typescript-eslint/prefer-function-type`] | +| [`class-name`] | โœ… | [`@typescript-eslint/naming-convention`] | +| [`comment-format`] | ๐ŸŒŸ | [`capitalized-comments`][capitalized-comments] & [`spaced-comment`][spaced-comment] | +| [`comment-type`] | ๐Ÿ›‘ | N/A | +| [`completed-docs`] | ๐Ÿ”Œ | [`jsdoc/require-jsdoc`] | +| [`encoding`] | ๐Ÿ›‘ | N/A | +| [`file-header`] | ๐Ÿ”Œ | [`eslint-plugin-header`][plugin:header] or [`-file-header`][plugin:file-header] | +| [`file-name-casing`] | ๐Ÿ”Œ | [`unicorn/filename-case`] | +| [`import-spacing`] | ๐Ÿ”Œ | Use [Prettier] | +| [`increment-decrement`] | ๐ŸŒŸ | [`no-plusplus`][no-plusplus] | +| [`interface-name`] | โœ… | [`@typescript-eslint/interface-name-prefix`] | +| [`interface-over-type-literal`] | โœ… | [`@typescript-eslint/consistent-type-definitions`] | +| [`jsdoc-format`] | ๐ŸŒ“ | [`valid-jsdoc`][valid-jsdoc] or [`eslint-plugin-jsdoc`][plugin:jsdoc] | +| [`match-default-export-name`] | ๐Ÿ›‘ | N/A | +| [`newline-before-return`] | ๐ŸŒŸ | [`padding-line-between-statements`][padding-line-between-statements] [1] | +| [`newline-per-chained-call`] | ๐ŸŒŸ | [`newline-per-chained-call`][newline-per-chained-call] | +| [`new-parens`] | ๐ŸŒŸ | [`new-parens`][new-parens] | +| [`no-angle-bracket-type-assertion`] | โœ… | [`@typescript-eslint/consistent-type-assertions`] | +| [`no-boolean-literal-compare`] | โœ… | [`@typescript-eslint/no-unnecessary-boolean-literal-compare`] | +| [`no-consecutive-blank-lines`] | ๐ŸŒŸ | [`no-multiple-empty-lines`][no-multiple-empty-lines] | +| [`no-irregular-whitespace`] | ๐ŸŒŸ | [`no-irregular-whitespace`][no-irregular-whitespace] with `skipStrings: false` | +| [`no-parameter-properties`] | โœ… | [`@typescript-eslint/parameter-properties`] | +| [`no-redundant-jsdoc`] | ๐Ÿ”Œ | [`jsdoc/no-types`] | +| [`no-reference-import`] | โœ… | [`@typescript-eslint/triple-slash-reference`] | +| [`no-trailing-whitespace`] | ๐ŸŒŸ | [`no-trailing-spaces`][no-trailing-spaces] | +| [`no-unnecessary-callback-wrapper`] | ๐Ÿ›‘ | N/A and this might be unsafe (i.e. with `forEach`) | +| [`no-unnecessary-else`] | ๐ŸŒŸ | [`no-else-return`][no-else-return] [2] | +| [`no-unnecessary-initializer`] | ๐ŸŒŸ | [`no-undef-init`][no-undef-init] | +| [`no-unnecessary-qualifier`] | โœ… | [`@typescript-eslint/no-unnecessary-qualifier`] | +| [`number-literal-format`] | ๐Ÿ›‘ | N/A | +| [`object-literal-key-quotes`] | ๐ŸŒŸ | [`quote-props`][quote-props] | +| [`object-literal-shorthand`] | ๐ŸŒŸ | [`object-shorthand`][object-shorthand] | +| [`one-line`] | ๐ŸŒŸ | [`brace-style`][brace-style] or [Prettier] | +| [`one-variable-per-declaration`] | ๐ŸŒŸ | [`one-var`][one-var] | +| [`ordered-imports`] | ๐ŸŒ“ | [`import/order`] | +| [`prefer-function-over-method`] | ๐ŸŒŸ | [`class-methods-use-this`][class-methods-use-this] | +| [`prefer-method-signature`] | โœ… | [`@typescript-eslint/method-signature-style`] | +| [`prefer-switch`] | ๐Ÿ›‘ | N/A | +| [`prefer-template`] | ๐ŸŒŸ | [`prefer-template`][prefer-template] | +| [`prefer-while`] | ๐Ÿ›‘ | N/A | +| [`quotemark`] | ๐ŸŒŸ | [`quotes`][quotes] | +| [`return-undefined`] | ๐Ÿ›‘ | N/A | +| [`semicolon`] | ๐ŸŒ“ | [`@typescript-eslint/semi`] | +| [`space-before-function-paren`] | ๐ŸŒŸ | [`space-before-function-paren`][space-after-function-paren] | +| [`space-within-parens`] | ๐ŸŒŸ | [`space-in-parens`][space-in-parens] | +| [`switch-final-break`] | ๐Ÿ›‘ | N/A | +| [`type-literal-delimiter`] | โœ… | [`@typescript-eslint/member-delimiter-style`] | +| [`unnecessary-bind`] | ๐ŸŒŸ | [`no-extra-bind`][no-extra-bind] | +| [`variable-name`] | โœ… | [`@typescript-eslint/naming-convention`] | +| [`whitespace`] | ๐Ÿ”Œ | Use [Prettier] | + +[1] Recommended config: `["error", { blankLine: "always", prev: "*", next: "return" }]`
+[2] Doesn't check other control flow statements, such as `break` or `continue`. + +## `tslint-microsoft-contrib` rules + +Rule listing is [here](https://github.com/Microsoft/tslint-microsoft-contrib#supported-rules). +Deprecated rules are excluded (`missing-jsdoc`, `missing-optional-annotation`, `no-duplicate-case`, `no-duplicate-parameter-names`, `no-function-constructor-with-string-args`, `no-increment-decrement`, `no-empty-interfaces`, `no-missing-visibility-modifiers`, `no-multiple-var-decl`, `no-reserved-keywords`, `no-stateless-class`, `no-var-self`, `no-unnecessary-bind`, and `valid-typeof`). See the docs in the link above to find out what to use instead. + +### Testing + +Relevant plugins: [`chai-expect-keywords`](https://github.com/gavinaiken/eslint-plugin-chai-expect-keywords), [`chai-expect`](https://github.com/Turbo87/eslint-plugin-chai-expect), [`chai-friendly`](https://github.com/ihordiachenko/eslint-plugin-chai-friendly), [`mocha`](https://github.com/lo1tuma/eslint-plugin-mocha), and [`jest`](https://github.com/jest-community/eslint-plugin-jest) + +| `tslint-microsoft-contrib` rule | | ESLint rule | +| ---------------------------------- | :-: | ------------------------- | +| `chai-prefer-contains-to-index-of` | ๐Ÿ›‘ | N/A | +| `chai-vague-errors` | ๐Ÿ›‘ | N/A | +| `mocha-avoid-only` | ๐Ÿ”Œ | [`jest/no-focused-tests`] | +| `mocha-unneeded-done` | ๐Ÿ›‘ | N/A | + +### TypeScript + +| `tslint-microsoft-contrib` rule | | ESLint rule | +| ------------------------------- | :-: | ---------------------------------------------------------- | +| `prefer-array-literal` | ๐ŸŒ“ | [`@typescript-eslint/no-array-constructor`] [1] | +| `prefer-type-cast` | ๐Ÿ›‘ | N/A | + +[1] ESLint rule is slightly less strict, allowing `new Array()` and `Array(2)`. + +### Miscellaneous + +| `tslint-microsoft-contrib` rule | | ESLint rule | +| ------------------------------------- | :-: | ---------------------------------------------------------------------- | +| `export-name` | ๐Ÿ›‘ | N/A ([relevant plugin][plugin:import]) | +| `function-name` | ๐Ÿ›‘ | N/A | +| `import-name` | ๐Ÿ›‘ | N/A ([relevant plugin][plugin:import]) | +| `informative-docs` | ๐Ÿ›‘ | N/A | +| `max-func-body-length` | ๐ŸŒŸ | [`max-statements`][max-statements] | +| `no-banned-terms` | ๐ŸŒŸ | [`no-caller`][no-caller] & [`no-eval`][no-eval] | +| `no-constant-condition` | ๐ŸŒŸ | [`no-constant-condition`][no-constant-condition] | +| `no-control-regex` | ๐ŸŒŸ | [`no-control-regex`][no-control-regex] | +| `no-delete-expression` | โœ… | [`@typescript-eslint/no-dynamic-delete`] | +| `no-empty-line-after-opening-brace` | ๐ŸŒŸ | [`padded-blocks`][padded-blocks] [1] or [Prettier] | +| `no-for-in` | ๐ŸŒŸ | [`no-restricted-syntax`][no-restricted-syntax] [2] | +| `no-function-expression` | ๐ŸŒŸ | [`func-style`][func-style] [3] | +| `no-invalid-regexp` | ๐ŸŒŸ | [`no-invalid-regexp`][no-invalid-regexp] | +| `no-multiline-string` | ๐ŸŒŸ | [`no-multi-str`][no-multi-str] | +| `no-octal-literal` | ๐ŸŒŸ | [`no-octal-escape`][no-octal-escape], see also [`no-octal`][no-octal] | +| `no-regex-spaces` | ๐ŸŒŸ | [`no-regex-spaces`][no-regex-spaces] | +| `no-relative-imports` | ๐Ÿ›‘ | N/A, _Not recommended by the maintainers_ | +| `no-single-line-block-comment` | ๐Ÿ›‘ | N/A | +| `no-suspicious-comment` | ๐ŸŒŸ | [`no-warning-comments`][no-warning-comments] [4] | +| `no-typeof-undefined` | ๐Ÿ›‘ | N/A (this actually has a valid use: checking if a variable is defined) | +| `no-unexternalized-strings` | ๐Ÿ›‘ | N/A | +| `no-unnecessary-field-initialization` | ๐ŸŒ“ | [`no-undef-init`][no-undef-init] [5] | +| `no-unnecessary-local-variable` | ๐Ÿ›‘ | N/A | +| `no-unnecessary-override` | ๐Ÿ›‘ | N/A | +| `no-unnecessary-semicolons` | ๐ŸŒŸ | [`no-extra-semi`][no-extra-semi] or [Prettier] | +| `no-useless-files` | ๐Ÿ›‘ | N/A | +| `no-with-statement` | ๐ŸŒŸ | [`no-with`][no-with] | +| `promise-must-complete` | ๐Ÿ›‘ | N/A | +| `underscore-consistent-invocation` | ๐Ÿ”Œ | [`lodash/chaining`] | +| `use-named-parameter` | ๐Ÿ›‘ | N/A | +| `use-simple-attributes` | ๐Ÿ›‘ | N/A | + +[1] Enforces blank lines both at the beginning and end of a block
+[2] Recommended config: `["error", "ForInStatement"]`
+[3] Recommended config: `["error", "declaration", { "allowArrowFunctions": true }]`
+[4] Recommended config: `["error", { "terms": ["BUG", "HACK", "FIXME", "LATER", "LATER2", "TODO"], "location": "anywhere" }]`
+[5] Does not check class fields. + +### Security + +| `tslint-microsoft-contrib` rule | | ESLint rule | +| ------------------------------- | :-: | ------------------------------------------------------------------------------------------- | +| `insecure-random` | ๐Ÿ”Œ | [`desktop/insecure-random`] or [`@microsoft/sdl/no-insecure-random`] | +| `no-disable-auto-sanitization` | ๐Ÿ”Œ | [`@microsoft/sdl/no-msapp-exec-unsafe`] and [`@microsoft/sdl/no-winjs-html-unsafe`] | +| `no-document-domain` | ๐ŸŒ“ | Use [`no-restricted-syntax`][no-restricted-syntax] or [`@microsoft/sdl/no-document-domain`] | +| `no-http-string` | ๐Ÿ”Œ | [`@microsoft/sdl/no-insecure-url`] | +| `no-inner-html` | ๐Ÿ”Œ | [`@microsoft/sdl/no-inner-html`] and [`@microsoft/sdl/no-html-method`] | +| `no-string-based-set-immediate` | ๐ŸŒ“ | [`@typescript-eslint/no-implied-eval`] | +| `no-string-based-set-interval` | ๐ŸŒ“ | [`@typescript-eslint/no-implied-eval`] | +| `no-string-based-set-timeout` | ๐ŸŒ“ | [`@typescript-eslint/no-implied-eval`] | +| `react-anchor-blank-noopener` | ๐Ÿ”Œ | [`react/jsx-no-target-blank`] | +| `react-iframe-missing-sandbox` | ๐Ÿ”Œ | [`@microsoft/sdl/react-iframe-missing-sandbox`] | +| `react-no-dangerous-html` | ๐Ÿ”Œ | [`react/no-danger`] | +| `non-literal-fs-path` | ๐Ÿ”Œ | [`security/detect-non-literal-fs-filename`] | +| `non-literal-require` | ๐Ÿ”Œ | [`security/detect-non-literal-require`] | +| `possible-timing-attack` | ๐Ÿ”Œ | [`security/detect-possible-timing-attacks`] | + +### Browser + +| `tslint-microsoft-contrib` rule | | ESLint rule | +| ----------------------------------- | :-: | -------------------------------------------------------------------------------------------- | +| `jquery-deferred-must-complete` | ๐Ÿ›‘ | N/A | +| `no-backbone-get-set-outside-model` | ๐Ÿ›‘ | N/A | +| `no-cookies` | ๐ŸŒ“ | Use [`no-restricted-syntax`][no-restricted-syntax] or [`@microsoft/sdl/no-cookies`] | +| `no-document-write` | ๐ŸŒ“ | Use [`no-restricted-syntax`][no-restricted-syntax] or [`@microsoft/sdl/no-document-write`] | +| `no-exec-script` | ๐ŸŒ“ | Use [`no-restricted-syntax`][no-restricted-syntax] or [`@typescript-eslint/no-implied-eval`] | +| `no-jquery-raw-elements` | ๐Ÿ›‘ | N/A | +| `no-unsupported-browser-code` | ๐Ÿ›‘ | N/A | +| `react-this-binding-issue` | ๐Ÿ›‘ | N/A | +| `react-tsx-curly-spacing` | ๐Ÿ”Œ | [`react/jsx-curly-spacing`] | +| `react-unused-props-and-state` | ๐ŸŒ“ | [`react/no-unused-state`] | + +### React A11y + +| `tslint-microsoft-contrib` rule | | ESLint rule | +| ----------------------------------------- | :-: | ---------------------------------------------------------- | +| `react-a11y-accessible-headings` | ๐ŸŒ“ | [`jsx-a11y/heading-has-content`] [1] | +| `react-a11y-anchors` | ๐Ÿ”Œ | [`jsx-a11y/anchor-is-valid`] | +| `react-a11y-aria-unsupported-elements` | ๐Ÿ”Œ | [`jsx-a11y/aria-unsupported-elements`] | +| `react-a11y-event-has-role` | ๐ŸŒ“ | [`jsx-a11y/no-static-element-interactions`] [2] | +| `react-a11y-image-button-has-alt` | ๐Ÿ”Œ | [`jsx-a11y/alt-text`] | +| `react-a11y-img-has-alt` | ๐Ÿ”Œ | [`jsx-a11y/alt-text`] | +| `react-a11y-input-elements` | ๐Ÿ›‘ | N/A | +| `react-a11y-lang` | ๐Ÿ”Œ | [`jsx-a11y/lang`] | +| `react-a11y-meta` | ๐Ÿ›‘ | N/A | +| `react-a11y-no-onchange` | ๐Ÿ”Œ | [`jsx-a11y/no-onchange`] | +| `react-a11y-props` | ๐Ÿ”Œ | [`jsx-a11y/aria-props`] | +| `react-a11y-proptypes` | ๐Ÿ”Œ | [`jsx-a11y/aria-proptypes`] | +| `react-a11y-required` | ๐Ÿ›‘ | N/A | +| `react-a11y-role-has-required-aria-props` | ๐Ÿ”Œ | [`jsx-a11y/role-has-required-aria-props`] | +| `react-a11y-role-supports-aria-props` | ๐Ÿ”Œ | [`jsx-a11y/role-supports-aria-props`] | +| `react-a11y-role` | ๐Ÿ”Œ | [`jsx-a11y/aria-role`] | +| `react-a11y-tabindex-no-positive` | ๐Ÿ”Œ | [`jsx-a11y/tabindex-no-positive`] | +| `react-a11y-titles` | ๐Ÿ›‘ | N/A | + +[1] TSLint rule is more strict
+[2] ESLint rule only reports for click handlers + +[prettier]: https://prettier.io + + + +[`adjacent-overload-signatures`]: https://palantir.github.io/tslint/rules/adjacent-overload-signatures +[`ban-ts-ignore`]: https://palantir.github.io/tslint/rules/ban-ts-ignore/ +[`ban-types`]: https://palantir.github.io/tslint/rules/ban-types +[`invalid-void`]: https://palantir.github.io/tslint/rules/invalid-void +[`member-access`]: https://palantir.github.io/tslint/rules/member-access +[`member-ordering`]: https://palantir.github.io/tslint/rules/member-ordering +[`no-any`]: https://palantir.github.io/tslint/rules/no-any +[`no-empty-interface`]: https://palantir.github.io/tslint/rules/no-empty-interface +[`no-import-side-effect`]: https://palantir.github.io/tslint/rules/no-import-side-effect +[`no-inferrable-types`]: https://palantir.github.io/tslint/rules/no-inferrable-types +[`no-internal-module`]: https://palantir.github.io/tslint/rules/no-internal-module +[`no-magic-numbers`]: https://palantir.github.io/tslint/rules/no-magic-numbers +[`no-namespace`]: https://palantir.github.io/tslint/rules/no-namespace +[`no-non-null-assertion`]: https://palantir.github.io/tslint/rules/no-non-null-assertion +[`no-parameter-reassignment`]: https://palantir.github.io/tslint/rules/no-parameter-reassignment +[`no-reference`]: https://palantir.github.io/tslint/rules/no-reference +[`no-unnecessary-type-assertion`]: https://palantir.github.io/tslint/rules/no-unnecessary-type-assertion +[`no-var-requires`]: https://palantir.github.io/tslint/rules/no-var-requires +[`only-arrow-functions`]: https://palantir.github.io/tslint/rules/only-arrow-functions +[`prefer-for-of`]: https://palantir.github.io/tslint/rules/prefer-for-of +[`promise-function-async`]: https://palantir.github.io/tslint/rules/promise-function-async +[`typedef`]: https://palantir.github.io/tslint/rules/typedef +[`typedef-whitespace`]: https://palantir.github.io/tslint/rules/typedef-whitespace +[`unified-signatures`]: https://palantir.github.io/tslint/rules/unified-signatures +[`await-promise`]: https://palantir.github.io/tslint/rules/await-promise +[`ban-comma-operator`]: https://palantir.github.io/tslint/rules/ban-comma-operator +[`ban`]: https://palantir.github.io/tslint/rules/ban +[`curly`]: https://palantir.github.io/tslint/rules/curly +[`forin`]: https://palantir.github.io/tslint/rules/forin +[`function-constructor`]: https://palantir.github.io/tslint/rules/function-constructor +[`import-blacklist`]: https://palantir.github.io/tslint/rules/import-blacklist +[`label-position`]: https://palantir.github.io/tslint/rules/label-position +[`no-arg`]: https://palantir.github.io/tslint/rules/no-arg +[`no-async-without-await`]: https://palantir.github.io/tslint/rules/no-async-without-await +[`no-bitwise`]: https://palantir.github.io/tslint/rules/no-bitwise +[`no-conditional-assignment`]: https://palantir.github.io/tslint/rules/no-conditional-assignment +[`no-console`]: https://palantir.github.io/tslint/rules/no-console +[`no-construct`]: https://palantir.github.io/tslint/rules/no-construct +[`no-debugger`]: https://palantir.github.io/tslint/rules/no-debugger +[`no-duplicate-super`]: https://palantir.github.io/tslint/rules/no-duplicate-super +[`no-duplicate-switch-case`]: https://palantir.github.io/tslint/rules/no-duplicate-switch-case +[`no-duplicate-variable`]: https://palantir.github.io/tslint/rules/no-duplicate-variable +[`no-dynamic-delete`]: https://palantir.github.io/tslint/rules/no-dynamic-delete +[`no-empty`]: https://palantir.github.io/tslint/rules/no-empty +[`no-eval`]: https://palantir.github.io/tslint/rules/no-eval +[`no-floating-promises`]: https://palantir.github.io/tslint/rules/no-floating-promises +[`no-for-in-array`]: https://palantir.github.io/tslint/rules/no-for-in-array +[`no-implicit-dependencies`]: https://palantir.github.io/tslint/rules/no-implicit-dependencies +[`no-inferred-empty-object-type`]: https://palantir.github.io/tslint/rules/no-inferred-empty-object-type +[`no-invalid-template-strings`]: https://palantir.github.io/tslint/rules/no-invalid-template-strings +[`no-invalid-this`]: https://palantir.github.io/tslint/rules/no-invalid-this +[`no-misused-new`]: https://palantir.github.io/tslint/rules/no-misused-new +[`no-null-keyword`]: https://palantir.github.io/tslint/rules/no-null-keyword +[`no-null-undefined-union`]: https://palantir.github.io/tslint/rules/no-null-undefined-union +[`no-object-literal-type-assertion`]: https://palantir.github.io/tslint/rules/no-object-literal-type-assertion +[`no-promise-as-boolean`]: https://palantir.github.io/tslint/rules/no-promise-as-boolean +[`no-restricted-globals`]: https://palantir.github.io/tslint/rules/no-restricted-globals +[`no-return-await`]: https://palantir.github.io/tslint/rules/no-return-await +[`no-shadowed-variable`]: https://palantir.github.io/tslint/rules/no-shadowed-variable +[`no-sparse-arrays`]: https://palantir.github.io/tslint/rules/no-sparse-arrays +[`no-string-literal`]: https://palantir.github.io/tslint/rules/no-string-literal +[`no-string-throw`]: https://palantir.github.io/tslint/rules/no-string-throw +[`no-submodule-imports`]: https://palantir.github.io/tslint/rules/no-submodule-imports +[`no-switch-case-fall-through`]: https://palantir.github.io/tslint/rules/no-switch-case-fall-through +[`no-tautology-expression`]: https://palantir.github.io/tslint/rules/no-tautology-expression +[`no-this-assignment`]: https://palantir.github.io/tslint/rules/no-this-assignment +[`no-unbound-method`]: https://palantir.github.io/tslint/rules/no-unbound-method +[`no-unnecessary-class`]: https://palantir.github.io/tslint/rules/no-unnecessary-class +[`no-unsafe-any`]: https://palantir.github.io/tslint/rules/no-unsafe-any +[`no-unsafe-finally`]: https://palantir.github.io/tslint/rules/no-unsafe-finally +[`no-unused-expression`]: https://palantir.github.io/tslint/rules/no-unused-expression +[`no-unused-variable`]: https://palantir.github.io/tslint/rules/no-unused-variable +[`no-use-before-declare`]: https://palantir.github.io/tslint/rules/no-use-before-declare +[`no-var-keyword`]: https://palantir.github.io/tslint/rules/no-var-keyword +[`no-void-expression`]: https://palantir.github.io/tslint/rules/no-void-expression +[`prefer-conditional-expression`]: https://palantir.github.io/tslint/rules/prefer-conditional-expression +[`prefer-object-spread`]: https://palantir.github.io/tslint/rules/prefer-object-spread +[`radix`]: https://palantir.github.io/tslint/rules/radix +[`restrict-plus-operands`]: https://palantir.github.io/tslint/rules/restrict-plus-operands +[`static-this`]: https://palantir.github.io/tslint/rules/static-this +[`strict-boolean-expressions`]: https://palantir.github.io/tslint/rules/strict-boolean-expressions +[`strict-string-expressions`]: https://palantir.github.io/tslint/rules/strict-string-expressions +[`strict-type-predicates`]: https://palantir.github.io/tslint/rules/strict-type-predicates +[`switch-default`]: https://palantir.github.io/tslint/rules/switch-default +[`triple-equals`]: https://palantir.github.io/tslint/rules/triple-equals +[`typeof-compare`]: https://palantir.github.io/tslint/rules/typeof-compare +[`unnecessary-constructor`]: https://palantir.github.io/tslint/rules/unnecessary-constructor +[`use-default-type-parameter`]: https://palantir.github.io/tslint/rules/use-default-type-parameter +[`use-isnan`]: https://palantir.github.io/tslint/rules/use-isnan +[`cyclomatic-complexity`]: https://palantir.github.io/tslint/rules/cyclomatic-complexity +[`deprecation`]: https://palantir.github.io/tslint/rules/deprecation +[`eofline`]: https://palantir.github.io/tslint/rules/eofline +[`indent`]: https://palantir.github.io/tslint/rules/indent +[`linebreak-style`]: https://palantir.github.io/tslint/rules/linebreak-style +[`max-classes-per-file`]: https://palantir.github.io/tslint/rules/max-classes-per-file +[`max-file-line-count`]: https://palantir.github.io/tslint/rules/max-file-line-count +[`max-line-length`]: https://palantir.github.io/tslint/rules/max-line-length +[`no-default-export`]: https://palantir.github.io/tslint/rules/no-default-export +[`no-default-import`]: https://palantir.github.io/tslint/rules/no-default-import +[`no-duplicate-imports`]: https://palantir.github.io/tslint/rules/no-duplicate-imports +[`no-mergeable-namespace`]: https://palantir.github.io/tslint/rules/no-mergeable-namespace +[`no-require-imports`]: https://palantir.github.io/tslint/rules/no-require-imports +[`object-literal-sort-keys`]: https://palantir.github.io/tslint/rules/object-literal-sort-keys +[`prefer-const`]: https://palantir.github.io/tslint/rules/prefer-const +[`prefer-readonly`]: https://palantir.github.io/tslint/rules/prefer-readonly +[`trailing-comma`]: https://palantir.github.io/tslint/rules/trailing-comma +[`align`]: https://palantir.github.io/tslint/rules/align +[`array-type`]: https://palantir.github.io/tslint/rules/array-type +[`arrow-parens`]: https://palantir.github.io/tslint/rules/arrow-parens +[`arrow-return-shorthand`]: https://palantir.github.io/tslint/rules/arrow-return-shorthand +[`binary-expression-operand-order`]: https://palantir.github.io/tslint/rules/binary-expression-operand-order +[`callable-types`]: https://palantir.github.io/tslint/rules/callable-types +[`class-name`]: https://palantir.github.io/tslint/rules/class-name +[`comment-format`]: https://palantir.github.io/tslint/rules/comment-format +[`comment-type`]: https://palantir.github.io/tslint/rules/comment-type +[`completed-docs`]: https://palantir.github.io/tslint/rules/completed-docs +[`encoding`]: https://palantir.github.io/tslint/rules/encoding +[`file-header`]: https://palantir.github.io/tslint/rules/file-header +[`file-name-casing`]: https://palantir.github.io/tslint/rules/file-name-casing +[`import-spacing`]: https://palantir.github.io/tslint/rules/import-spacing +[`increment-decrement`]: https://palantir.github.io/tslint/rules/increment-decrement +[`interface-name`]: https://palantir.github.io/tslint/rules/interface-name +[`interface-over-type-literal`]: https://palantir.github.io/tslint/rules/interface-over-type-literal +[`jsdoc-format`]: https://palantir.github.io/tslint/rules/jsdoc-format +[`match-default-export-name`]: https://palantir.github.io/tslint/rules/match-default-export-name +[`newline-before-return`]: https://palantir.github.io/tslint/rules/newline-before-return +[`newline-per-chained-call`]: https://palantir.github.io/tslint/rules/newline-per-chained-call +[`new-parens`]: https://palantir.github.io/tslint/rules/new-parens +[`no-angle-bracket-type-assertion`]: https://palantir.github.io/tslint/rules/no-angle-bracket-type-assertion +[`no-boolean-literal-compare`]: https://palantir.github.io/tslint/rules/no-boolean-literal-compare +[`no-consecutive-blank-lines`]: https://palantir.github.io/tslint/rules/no-consecutive-blank-lines +[`no-irregular-whitespace`]: https://palantir.github.io/tslint/rules/no-irregular-whitespace +[`no-parameter-properties`]: https://palantir.github.io/tslint/rules/no-parameter-properties +[`no-redundant-jsdoc`]: https://palantir.github.io/tslint/rules/no-redundant-jsdoc +[`no-reference-import`]: https://palantir.github.io/tslint/rules/no-reference-import +[`no-trailing-whitespace`]: https://palantir.github.io/tslint/rules/no-trailing-whitespace +[`no-unnecessary-callback-wrapper`]: https://palantir.github.io/tslint/rules/no-unnecessary-callback-wrapper +[`no-unnecessary-else`]: https://palantir.github.io/tslint/rules/no-unnecessary-else +[`no-unnecessary-initializer`]: https://palantir.github.io/tslint/rules/no-unnecessary-initializer +[`no-unnecessary-qualifier`]: https://palantir.github.io/tslint/rules/no-unnecessary-qualifier +[`number-literal-format`]: https://palantir.github.io/tslint/rules/number-literal-format +[`object-literal-key-quotes`]: https://palantir.github.io/tslint/rules/object-literal-key-quotes +[`object-literal-shorthand`]: https://palantir.github.io/tslint/rules/object-literal-shorthand +[`one-line`]: https://palantir.github.io/tslint/rules/one-line +[`one-variable-per-declaration`]: https://palantir.github.io/tslint/rules/one-variable-per-declaration +[`ordered-imports`]: https://palantir.github.io/tslint/rules/ordered-imports +[`prefer-function-over-method`]: https://palantir.github.io/tslint/rules/prefer-function-over-method +[`prefer-method-signature`]: https://palantir.github.io/tslint/rules/prefer-method-signature +[`prefer-switch`]: https://palantir.github.io/tslint/rules/prefer-switch +[`prefer-template`]: https://palantir.github.io/tslint/rules/prefer-template +[`prefer-while`]: https://palantir.github.io/tslint/rules/prefer-while +[`quotemark`]: https://palantir.github.io/tslint/rules/quotemark +[`return-undefined`]: https://palantir.github.io/tslint/rules/return-undefined +[`semicolon`]: https://palantir.github.io/tslint/rules/semicolon +[`space-before-function-paren`]: https://palantir.github.io/tslint/rules/space-before-function-paren +[`space-within-parens`]: https://palantir.github.io/tslint/rules/space-within-parens +[`switch-final-break`]: https://palantir.github.io/tslint/rules/switch-final-break +[`type-literal-delimiter`]: https://palantir.github.io/tslint/rules/type-literal-delimiter +[`unnecessary-bind`]: https://palantir.github.io/tslint/rules/unnecessary-bind +[`variable-name`]: https://palantir.github.io/tslint/rules/variable-name +[`whitespace`]: https://palantir.github.io/tslint/rules/whitespace + + + +[no-magic-numbers]: https://eslint.org/docs/rules/no-magic-numbers +[no-param-reassign]: https://eslint.org/docs/rules/no-param-reassign +[no-sequences]: https://eslint.org/docs/rules/no-sequences +[no-restricted-globals]: https://eslint.org/docs/rules/no-restricted-globals +[no-restricted-properties]: https://eslint.org/docs/rules/no-restricted-properties +[no-restricted-syntax]: https://eslint.org/docs/rules/no-restricted-syntax +[curly]: https://eslint.org/docs/rules/curly +[guard-for-in]: https://eslint.org/docs/rules/guard-for-in +[no-new-func]: https://eslint.org/docs/rules/no-new-func +[no-restricted-imports]: https://eslint.org/docs/rules/no-restricted-imports +[no-unused-labels]: https://eslint.org/docs/rules/no-unused-labels +[no-caller]: https://eslint.org/docs/rules/no-caller +[no-bitwise]: https://eslint.org/docs/rules/no-bitwise +[no-cond-assign]: https://eslint.org/docs/rules/no-cond-assign +[no-console]: https://eslint.org/docs/rules/no-console +[no-new-wrappers]: https://eslint.org/docs/rules/no-new-wrappers +[no-debugger]: https://eslint.org/docs/rules/no-debugger +[constructor-super]: https://eslint.org/docs/rules/constructor-super +[no-duplicate-case]: https://eslint.org/docs/rules/no-duplicate-case +[no-redeclare]: https://eslint.org/docs/rules/no-redeclare +[no-empty]: https://eslint.org/docs/rules/no-empty +[no-eval]: https://eslint.org/docs/rules/no-eval +[no-template-curly-in-string]: https://eslint.org/docs/rules/no-template-curly-in-string +[no-invalid-this]: https://eslint.org/docs/rules/no-invalid-this +[no-return-await]: https://eslint.org/docs/rules/no-return-await +[no-shadow]: https://eslint.org/docs/rules/no-shadow +[no-sparse-arrays]: https://eslint.org/docs/rules/no-sparse-arrays +[dot-notation]: https://eslint.org/docs/rules/dot-notation +[no-fallthrough]: https://eslint.org/docs/rules/no-fallthrough +[no-unsafe-finally]: https://eslint.org/docs/rules/no-unsafe-finally +[no-unused-expressions]: https://eslint.org/docs/rules/no-unused-expressions +[no-var]: https://eslint.org/docs/rules/no-var +[prefer-object-spread]: https://eslint.org/docs/rules/prefer-object-spread +[radix]: https://eslint.org/docs/rules/radix +[default-case]: https://eslint.org/docs/rules/default-case +[eqeqeq]: https://eslint.org/docs/rules/eqeqeq +[valid-typeof]: https://eslint.org/docs/rules/valid-typeof +[no-useless-constructor]: https://eslint.org/docs/rules/no-useless-constructor +[use-isnan]: https://eslint.org/docs/rules/use-isnan +[complexity]: https://eslint.org/docs/rules/complexity +[eol-last]: https://eslint.org/docs/rules/eol-last +[linebreak-style]: https://eslint.org/docs/rules/linebreak-style +[max-classes-per-file]: https://eslint.org/docs/rules/max-classes-per-file +[max-lines]: https://eslint.org/docs/rules/max-lines +[max-len]: https://eslint.org/docs/rules/max-len +[sort-keys]: https://eslint.org/docs/rules/sort-keys +[prefer-const]: https://eslint.org/docs/rules/prefer-const +[comma-dangle]: https://eslint.org/docs/rules/comma-dangle +[arrow-parens]: https://eslint.org/docs/rules/arrow-parens +[arrow-body-style]: https://eslint.org/docs/rules/arrow-body-style +[yoda]: https://eslint.org/docs/rules/yoda +[capitalized-comments]: https://eslint.org/docs/rules/capitalized-comments +[spaced-comment]: https://eslint.org/docs/rules/spaced-comment +[no-plusplus]: https://eslint.org/docs/rules/no-plusplus +[valid-jsdoc]: https://eslint.org/docs/rules/valid-jsdoc +[padding-line-between-statements]: https://eslint.org/docs/rules/padding-line-between-statements +[newline-per-chained-call]: https://eslint.org/docs/rules/newline-per-chained-call +[new-parens]: https://eslint.org/docs/rules/new-parens +[no-else-return]: https://eslint.org/docs/rules/no-else-return +[no-multiple-empty-lines]: https://eslint.org/docs/rules/no-multiple-empty-lines +[no-irregular-whitespace]: https://eslint.org/docs/rules/no-irregular-whitespace +[no-trailing-spaces]: https://eslint.org/docs/rules/no-trailing-spaces +[no-undef-init]: https://eslint.org/docs/rules/no-undef-init +[quote-props]: https://eslint.org/docs/rules/quote-props +[object-shorthand]: https://eslint.org/docs/rules/object-shorthand +[brace-style]: https://eslint.org/docs/rules/brace-style +[one-var]: https://eslint.org/docs/rules/one-var +[class-methods-use-this]: https://eslint.org/docs/rules/class-methods-use-this +[prefer-template]: https://eslint.org/docs/rules/prefer-template +[quotes]: https://eslint.org/docs/rules/quotes +[semi]: https://eslint.org/docs/rules/semi +[space-after-function-paren]: https://eslint.org/docs/rules/space-before-function-paren +[space-in-parens]: https://eslint.org/docs/rules/space-in-parens +[no-extra-bind]: https://eslint.org/docs/rules/no-extra-bind +[camelcase]: https://eslint.org/docs/rules/camelcase +[no-underscore-dangle]: https://eslint.org/docs/rules/no-underscore-dangle +[id-blacklist]: https://eslint.org/docs/rules/id-blacklist +[id-match]: https://eslint.org/docs/rules/id-match +[max-statements]: https://eslint.org/docs/rules/max-statements +[no-constant-condition]: https://eslint.org/docs/rules/no-constant-condition +[no-control-regex]: https://eslint.org/docs/rules/no-control-regex +[no-invalid-regexp]: https://eslint.org/docs/rules/no-invalid-regexp +[no-regex-spaces]: https://eslint.org/docs/rules/no-regex-spaces +[no-new-func]: https://eslint.org/docs/rules/no-new-func +[padded-blocks]: https://eslint.org/docs/rules/padded-blocks +[func-style]: https://eslint.org/docs/rules/func-style +[no-multi-str]: https://eslint.org/docs/rules/no-multi-str +[no-octal]: https://eslint.org/docs/rules/no-octal +[no-octal-escape]: https://eslint.org/docs/rules/no-octal-escape +[no-extra-semi]: https://eslint.org/docs/rules/no-extra-semi +[no-with]: https://eslint.org/docs/rules/no-with +[no-warning-comments]: https://eslint.org/docs/rules/no-warning-comments + + + +[`@typescript-eslint/adjacent-overload-signatures`]: https://typescript-eslint.io/rules/adjacent-overload-signatures +[`@typescript-eslint/await-thenable`]: https://typescript-eslint.io/rules/await-thenable +[`@typescript-eslint/ban-types`]: https://typescript-eslint.io/rules/ban-types +[`@typescript-eslint/ban-ts-comment`]: https://typescript-eslint.io/rules/ban-ts-comment +[`@typescript-eslint/consistent-type-assertions`]: https://typescript-eslint.io/rules/consistent-type-assertions +[`@typescript-eslint/consistent-type-definitions`]: https://typescript-eslint.io/rules/consistent-type-definitions +[`@typescript-eslint/explicit-member-accessibility`]: https://typescript-eslint.io/rules/explicit-member-accessibility +[`@typescript-eslint/member-ordering`]: https://typescript-eslint.io/rules/member-ordering +[`@typescript-eslint/method-signature-style`]: https://typescript-eslint.io/rules/method-signature-style +[`@typescript-eslint/no-explicit-any`]: https://typescript-eslint.io/rules/no-explicit-any +[`@typescript-eslint/no-empty-interface`]: https://typescript-eslint.io/rules/no-empty-interface +[`@typescript-eslint/no-implied-eval`]: https://typescript-eslint.io/rules/no-implied-eval +[`@typescript-eslint/no-inferrable-types`]: https://typescript-eslint.io/rules/no-inferrable-types +[`@typescript-eslint/prefer-namespace-keyword`]: https://typescript-eslint.io/rules/prefer-namespace-keyword +[`@typescript-eslint/promise-function-async`]: https://typescript-eslint.io/rules/promise-function-async +[`@typescript-eslint/no-misused-promises`]: https://typescript-eslint.io/rules/no-misused-promises +[`@typescript-eslint/no-namespace`]: https://typescript-eslint.io/rules/no-namespace +[`@typescript-eslint/no-non-null-assertion`]: https://typescript-eslint.io/rules/no-non-null-assertion +[`@typescript-eslint/triple-slash-reference`]: https://typescript-eslint.io/rules/triple-slash-reference +[`@typescript-eslint/unbound-method`]: https://typescript-eslint.io/rules/unbound-method +[`@typescript-eslint/no-unnecessary-type-assertion`]: https://typescript-eslint.io/rules/no-unnecessary-type-assertion +[`@typescript-eslint/no-var-requires`]: https://typescript-eslint.io/rules/no-var-requires +[`@typescript-eslint/type-annotation-spacing`]: https://typescript-eslint.io/rules/type-annotation-spacing +[`@typescript-eslint/typedef`]: https://typescript-eslint.io/rules/typedef +[`@typescript-eslint/unified-signatures`]: https://typescript-eslint.io/rules/unified-signatures +[`@typescript-eslint/no-unnecessary-boolean-literal-compare`]: https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare +[`@typescript-eslint/no-misused-new`]: https://typescript-eslint.io/rules/no-misused-new +[`@typescript-eslint/no-this-alias`]: https://typescript-eslint.io/rules/no-this-alias +[`@typescript-eslint/no-throw-literal`]: https://typescript-eslint.io/rules/no-throw-literal +[`@typescript-eslint/no-extraneous-class`]: https://typescript-eslint.io/rules/no-extraneous-class +[`@typescript-eslint/no-unused-vars`]: https://typescript-eslint.io/rules/no-unused-vars +[`@typescript-eslint/no-use-before-define`]: https://typescript-eslint.io/rules/no-use-before-define +[`@typescript-eslint/restrict-plus-operands`]: https://typescript-eslint.io/rules/restrict-plus-operands +[`@typescript-eslint/strict-boolean-expressions`]: https://typescript-eslint.io/rules/strict-boolean-expressions +[`@typescript-eslint/indent`]: https://typescript-eslint.io/rules/indent +[`@typescript-eslint/no-invalid-void-type`]: https://typescript-eslint.io/rules/no-invalid-void-type +[`@typescript-eslint/no-require-imports`]: https://typescript-eslint.io/rules/no-require-imports +[`@typescript-eslint/array-type`]: https://typescript-eslint.io/rules/array-type +[`@typescript-eslint/naming-convention`]: https://typescript-eslint.io/rules/naming-convention +[`@typescript-eslint/interface-name-prefix`]: https://typescript-eslint.io/rules/interface-name-prefix +[`@typescript-eslint/naming-convention`]: https://typescript-eslint.io/rules/naming-convention +[`@typescript-eslint/parameter-properties`]: https://typescript-eslint.io/rules/parameter-properties +[`@typescript-eslint/member-delimiter-style`]: https://typescript-eslint.io/rules/member-delimiter-style +[`@typescript-eslint/prefer-for-of`]: https://typescript-eslint.io/rules/prefer-for-of +[`@typescript-eslint/no-array-constructor`]: https://typescript-eslint.io/rules/no-array-constructor +[`@typescript-eslint/no-dynamic-delete`]: https://typescript-eslint.io/rules/no-dynamic-delete +[`@typescript-eslint/prefer-function-type`]: https://typescript-eslint.io/rules/prefer-function-type +[`@typescript-eslint/prefer-readonly`]: https://typescript-eslint.io/rules/prefer-readonly +[`@typescript-eslint/require-await`]: https://typescript-eslint.io/rules/require-await +[`@typescript-eslint/no-for-in-array`]: https://typescript-eslint.io/rules/no-for-in-array +[`@typescript-eslint/no-unnecessary-qualifier`]: https://typescript-eslint.io/rules/no-unnecessary-qualifier +[`@typescript-eslint/no-unnecessary-type-arguments`]: https://typescript-eslint.io/rules/no-unnecessary-type-arguments +[`@typescript-eslint/semi`]: https://typescript-eslint.io/rules/semi +[`@typescript-eslint/no-floating-promises`]: https://typescript-eslint.io/rules/no-floating-promises +[`@typescript-eslint/no-magic-numbers`]: https://typescript-eslint.io/rules/no-magic-numbers +[`@typescript-eslint/no-unsafe-member-access`]: https://typescript-eslint.io/rules/no-unsafe-member-access +[`@typescript-eslint/restrict-template-expressions`]: https://typescript-eslint.io/rules/restrict-template-expressions +[`@typescript-eslint/no-confusing-void-expression`]: https://typescript-eslint.io/rules/no-confusing-void-expression + + + +[plugin:import]: https://github.com/benmosher/eslint-plugin-import +[`import/no-unassigned-import`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-unassigned-import.md +[`import/no-extraneous-dependencies`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-extraneous-dependencies.md +[`import/no-internal-modules`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-internal-modules.md +[`import/no-deprecated`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-deprecated.md +[`import/no-default-export`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-default-export.md +[`import/no-duplicates`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/no-duplicates.md +[`import/order`]: https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/order.md + + + +[`react/no-danger`]: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-danger.md +[`react/jsx-curly-spacing`]: https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/jsx-curly-spacing.md +[`react/jsx-no-target-blank`]: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-no-target-blank.md +[`react/no-unused-state`]: https://github.com/yannickcr/eslint-plugin-react/blob/HEAD/docs/rules/no-unused-state.md + + + +[`jsx-a11y/anchor-is-valid`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/anchor-is-valid.md +[`jsx-a11y/aria-unsupported-elements`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-unsupported-elements.md +[`jsx-a11y/no-static-element-interactions`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-static-element-interactions.md +[`jsx-a11y/alt-text`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/alt-text.md +[`jsx-a11y/html-has-lang`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/html-has-lang.md +[`jsx-a11y/lang`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/lang.md +[`jsx-a11y/no-onchange`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/no-onchange.md +[`jsx-a11y/aria-props`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-props.md +[`jsx-a11y/aria-proptypes`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-proptypes.md +[`jsx-a11y/role-has-required-aria-props`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-has-required-aria-props.md +[`jsx-a11y/role-supports-aria-props`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/role-supports-aria-props.md +[`jsx-a11y/aria-role`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/aria-role.md +[`jsx-a11y/tabindex-no-positive`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/tabindex-no-positive.md + + + +[`security/detect-non-literal-fs-filename`]: https://github.com/nodesecurity/eslint-plugin-security#detect-non-literal-fs-filename +[`security/detect-non-literal-require`]: https://github.com/nodesecurity/eslint-plugin-security#detect-non-literal-require +[`security/detect-possible-timing-attacks`]: https://github.com/nodesecurity/eslint-plugin-security#detect-possible-timing-attacks + + + +[plugin:jsdoc]: https://github.com/gajus/eslint-plugin-jsdoc +[`jsdoc/require-jsdoc`]: https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-require-jsdoc +[`jsdoc/no-types`]: https://github.com/gajus/eslint-plugin-jsdoc#eslint-plugin-jsdoc-rules-no-types + + + +[`@microsoft/sdl/no-cookies`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-cookies.md +[`@microsoft/sdl/no-document-domain`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-document-domain.md +[`@microsoft/sdl/no-document-write`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-document-write.md +[`@microsoft/sdl/no-html-method`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-html-method.md +[`@microsoft/sdl/no-inner-html`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-inner-html.md +[`@microsoft/sdl/no-insecure-random`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-insecure-random.md +[`@microsoft/sdl/no-insecure-url`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-insecure-url.md +[`@microsoft/sdl/no-msapp-exec-unsafe`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-msapp-exec-unsafe.md +[`@microsoft/sdl/no-winjs-html-unsafe`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/no-winjs-html-unsafe.md +[`@microsoft/sdl/react-iframe-missing-sandbox`]: https://github.com/microsoft/eslint-plugin-sdl/blob/main/docs/rules/react-iframe-missing-sandbox.md + + + +[`prefer-arrow/prefer-arrow-functions`]: https://github.com/TristonJ/eslint-plugin-prefer-arrow +[plugin:promise]: https://github.com/xjamundx/eslint-plugin-promise +[plugin:header]: https://github.com/Stuk/eslint-plugin-header +[plugin:file-header]: https://github.com/Sekhmet/eslint-plugin-file-header +[plugin:compat]: https://github.com/amilajack/eslint-plugin-compat +[`no-null/no-null`]: https://github.com/nene/eslint-plugin-no-null +[`unicorn/filename-case`]: https://github.com/sindresorhus/eslint-plugin-unicorn/blob/master/docs/rules/filename-case.md +[`jest/no-focused-tests`]: https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/no-focused-tests.md +[`jsx-a11y/heading-has-content`]: https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/docs/rules/heading-has-content.md +[`lodash/chaining`]: https://github.com/wix/eslint-plugin-lodash/blob/master/docs/rules/chaining.md +[`deprecation/deprecation`]: https://github.com/gund/eslint-plugin-deprecation +[`desktop/insecure-random`]: https://github.com/desktop/desktop/blob/development/eslint-rules/insecure-random.js diff --git a/packages/eslint-plugin/docs/rules/TEMPLATE.md b/packages/eslint-plugin/docs/rules/TEMPLATE.md index 7528ad501a3..a49ed54ac02 100644 --- a/packages/eslint-plugin/docs/rules/TEMPLATE.md +++ b/packages/eslint-plugin/docs/rules/TEMPLATE.md @@ -1,6 +1,6 @@ -# `your-rule-name` - -Your rule description here. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/your-rule-name** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md b/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md index a30dfe06142..27fc807e555 100644 --- a/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md +++ b/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md @@ -1,6 +1,10 @@ -# `adjacent-overload-signatures` +--- +description: 'Require that member overloads be consecutive.' +--- -Requires that member overloads be consecutive. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/adjacent-overload-signatures** for documentation. Grouping overloaded members together can improve readability of the code. diff --git a/packages/eslint-plugin/docs/rules/array-type.md b/packages/eslint-plugin/docs/rules/array-type.md index 1e0ea89327d..e72266ff31c 100644 --- a/packages/eslint-plugin/docs/rules/array-type.md +++ b/packages/eslint-plugin/docs/rules/array-type.md @@ -1,6 +1,10 @@ -# `array-type` +--- +description: 'Require using either `T[]` or `Array` for arrays.' +--- -Requires using either `T[]` or `Array` for arrays. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/array-type** for documentation. Using the same style for array definitions across your codebase makes it easier for your developers to read and understand the types. diff --git a/packages/eslint-plugin/docs/rules/await-thenable.md b/packages/eslint-plugin/docs/rules/await-thenable.md index 4a239871927..b47107e48df 100644 --- a/packages/eslint-plugin/docs/rules/await-thenable.md +++ b/packages/eslint-plugin/docs/rules/await-thenable.md @@ -1,6 +1,10 @@ -# `await-thenable` +--- +description: 'Disallow awaiting a value that is not a Thenable.' +--- -Disallows awaiting a value that is not a Thenable. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/await-thenable** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/ban-ts-comment.md b/packages/eslint-plugin/docs/rules/ban-ts-comment.md index 2e62bfcd4a8..d658b599a00 100644 --- a/packages/eslint-plugin/docs/rules/ban-ts-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-ts-comment.md @@ -1,6 +1,10 @@ -# `ban-ts-comment` +--- +description: 'Disallow `@ts-` comments or require descriptions after directive.' +--- -Disallows `@ts-` comments or requires descriptions after directive. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/ban-ts-comment** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md index b89e9929167..9b37077d74b 100644 --- a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md @@ -1,6 +1,10 @@ -# `ban-tslint-comment` +--- +description: 'Disallow `// tslint:` comments.' +--- -Disallows `// tslint:` comments. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/ban-tslint-comment** for documentation. Useful when migrating from TSLint to ESLint. Once TSLint has been removed, this rule helps locate TSLint annotations (e.g. `// tslint:disable`). diff --git a/packages/eslint-plugin/docs/rules/ban-types.md b/packages/eslint-plugin/docs/rules/ban-types.md index b5dc1b0e33c..ca557b88dab 100644 --- a/packages/eslint-plugin/docs/rules/ban-types.md +++ b/packages/eslint-plugin/docs/rules/ban-types.md @@ -1,6 +1,10 @@ -# `ban-types` +--- +description: 'Disallow certain types.' +--- -Disallows certain types. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/ban-types** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/brace-style.md b/packages/eslint-plugin/docs/rules/brace-style.md index a2188418460..3487df67fb3 100644 --- a/packages/eslint-plugin/docs/rules/brace-style.md +++ b/packages/eslint-plugin/docs/rules/brace-style.md @@ -1,6 +1,10 @@ -# `brace-style` +--- +description: 'Enforce consistent brace style for blocks.' +--- -Enforces consistent brace style for blocks. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/brace-style** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/class-literal-property-style.md b/packages/eslint-plugin/docs/rules/class-literal-property-style.md index afbdc96fc18..787a496eb64 100644 --- a/packages/eslint-plugin/docs/rules/class-literal-property-style.md +++ b/packages/eslint-plugin/docs/rules/class-literal-property-style.md @@ -1,6 +1,10 @@ -# `class-literal-property-style` +--- +description: 'Enforce that literals on classes are exposed in a consistent style.' +--- -Enforces that literals on classes are exposed in a consistent style. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/class-literal-property-style** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/comma-dangle.md b/packages/eslint-plugin/docs/rules/comma-dangle.md index f18992fff77..839347cb7d2 100644 --- a/packages/eslint-plugin/docs/rules/comma-dangle.md +++ b/packages/eslint-plugin/docs/rules/comma-dangle.md @@ -1,6 +1,10 @@ -# `comma-dangle` +--- +description: 'Require or disallow trailing commas.' +--- -Requires or disallows trailing commas. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/comma-dangle** for documentation. ## Rule Details @@ -9,7 +13,7 @@ It adds support for TypeScript syntax. See the [ESLint documentation](https://eslint.org/docs/rules/comma-dangle) for more details on the `comma-dangle` rule. -## Rule Changes +## How to Use ```jsonc { diff --git a/packages/eslint-plugin/docs/rules/comma-spacing.md b/packages/eslint-plugin/docs/rules/comma-spacing.md index 7fa6056759d..0ff484dac16 100644 --- a/packages/eslint-plugin/docs/rules/comma-spacing.md +++ b/packages/eslint-plugin/docs/rules/comma-spacing.md @@ -1,6 +1,10 @@ -# `comma-spacing` +--- +description: 'Enforce consistent spacing before and after commas.' +--- -Enforces consistent spacing before and after commas. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/comma-spacing** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md b/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md index db717dbcbd3..b16e411121c 100644 --- a/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md +++ b/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md @@ -1,6 +1,10 @@ -# `consistent-generic-constructors` +--- +description: 'Enforce specifying generic type arguments on type annotation or constructor name of a constructor call.' +--- -Enforces specifying generic type arguments on type annotation or constructor name of a constructor call. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/consistent-generic-constructors** for documentation. When constructing a generic class, you can specify the type arguments on either the left-hand side (as a type annotation) or the right-hand side (as part of the constructor call): diff --git a/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md b/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md index f61a4f68fdd..474d7352632 100644 --- a/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md +++ b/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md @@ -1,6 +1,10 @@ -# `consistent-indexed-object-style` +--- +description: 'Require or disallow the `Record` type.' +--- -Requires or disallows the `Record` type. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/consistent-indexed-object-style** for documentation. TypeScript supports defining object show keys can be flexible using an index signature. TypeScript also has a builtin type named `Record` to create an empty object defining only an index signature. For example, the following types are equal: diff --git a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md index 7e1d4d0487c..c8c19225917 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md @@ -1,6 +1,10 @@ -# `consistent-type-assertions` +--- +description: 'Enforce consistent usage of type assertions.' +--- -Enforces consistent usage of type assertions. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/consistent-type-assertions** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md index 1df12bcde43..f662841bfd5 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md @@ -1,6 +1,10 @@ -# `consistent-type-definitions` +--- +description: 'Enforce type definitions to consistently use either `interface` or `type`.' +--- -Enforces type definitions to consistently use either `interface` or `type`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/consistent-type-definitions** for documentation. There are two ways to define a type. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-exports.md b/packages/eslint-plugin/docs/rules/consistent-type-exports.md index bd10a616261..2f5f7280251 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-exports.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-exports.md @@ -1,6 +1,10 @@ -# `consistent-type-exports` +--- +description: 'Enforce consistent usage of type exports.' +--- -Enforces consistent usage of type exports. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/consistent-type-exports** for documentation. TypeScript 3.8 added support for type-only exports. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-imports.md b/packages/eslint-plugin/docs/rules/consistent-type-imports.md index 47022b04ec5..192454f13e7 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-imports.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-imports.md @@ -1,6 +1,10 @@ -# `consistent-type-imports` +--- +description: 'Enforce consistent usage of type imports.' +--- -Enforces consistent usage of type imports. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/consistent-type-imports** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/default-param-last.md b/packages/eslint-plugin/docs/rules/default-param-last.md index 5db33411d1d..ff5ad9facc3 100644 --- a/packages/eslint-plugin/docs/rules/default-param-last.md +++ b/packages/eslint-plugin/docs/rules/default-param-last.md @@ -1,6 +1,10 @@ -# `default-param-last` +--- +description: 'Enforce default parameters to be last.' +--- -Enforces default parameters to be last. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/default-param-last** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/dot-notation.md b/packages/eslint-plugin/docs/rules/dot-notation.md index 41417041684..6051e369c79 100644 --- a/packages/eslint-plugin/docs/rules/dot-notation.md +++ b/packages/eslint-plugin/docs/rules/dot-notation.md @@ -1,6 +1,10 @@ -# `dot-notation` +--- +description: 'Enforce dot notation whenever possible.' +--- -Enforces dot notation whenever possible. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/dot-notation** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md index 9e3ff78a366..e0b96592eda 100644 --- a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md +++ b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md @@ -1,6 +1,10 @@ -# `explicit-function-return-type` +--- +description: 'Require explicit return types on functions and class methods.' +--- -Requires explicit return types on functions and class methods. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/explicit-function-return-type** for documentation. 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 diff --git a/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md b/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md index 4b41a1327ed..d32100f534e 100644 --- a/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md +++ b/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md @@ -1,6 +1,10 @@ -# `explicit-member-accessibility` +--- +description: 'Require explicit accessibility modifiers on class properties and methods.' +--- -Requires explicit accessibility modifiers on class properties and methods. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/explicit-member-accessibility** for documentation. Leaving off accessibility modifier and making everything public can make your interface hard to use by others. diff --git a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md index b25350b60b9..6c0525688c0 100644 --- a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md +++ b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md @@ -1,6 +1,10 @@ -# `explicit-module-boundary-types` +--- +description: "Require explicit return and argument types on exported functions' and classes' public class methods." +--- -Requires explicit return and argument types on exported functions' and classes' public class methods. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/explicit-module-boundary-types** for documentation. Explicit types for function return values and arguments makes it clear to any calling code what is the module boundary's input and output. diff --git a/packages/eslint-plugin/docs/rules/func-call-spacing.md b/packages/eslint-plugin/docs/rules/func-call-spacing.md index 88b73e2eda2..772c86e7c70 100644 --- a/packages/eslint-plugin/docs/rules/func-call-spacing.md +++ b/packages/eslint-plugin/docs/rules/func-call-spacing.md @@ -1,6 +1,10 @@ -# `func-call-spacing` +--- +description: 'Require or disallow spacing between function identifiers and their invocations.' +--- -Requires or disallows spacing between function identifiers and their invocations. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/func-call-spacing** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/indent.md b/packages/eslint-plugin/docs/rules/indent.md index 5d732a305bf..7f937d3747c 100644 --- a/packages/eslint-plugin/docs/rules/indent.md +++ b/packages/eslint-plugin/docs/rules/indent.md @@ -1,6 +1,10 @@ -# `indent` +--- +description: 'Enforce consistent indentation.' +--- -Enforces consistent indentation. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/indent** for documentation. ## Warning diff --git a/packages/eslint-plugin/docs/rules/init-declarations.md b/packages/eslint-plugin/docs/rules/init-declarations.md index 6a4ce478651..b03db42de89 100644 --- a/packages/eslint-plugin/docs/rules/init-declarations.md +++ b/packages/eslint-plugin/docs/rules/init-declarations.md @@ -1,6 +1,10 @@ -# `init-declarations` +--- +description: 'Require or disallow initialization in variable declarations.' +--- -Requires or disallows initialization in variable declarations. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/init-declarations** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/keyword-spacing.md b/packages/eslint-plugin/docs/rules/keyword-spacing.md index 4b9b386b940..062da325307 100644 --- a/packages/eslint-plugin/docs/rules/keyword-spacing.md +++ b/packages/eslint-plugin/docs/rules/keyword-spacing.md @@ -1,6 +1,10 @@ -# `keyword-spacing` +--- +description: 'Enforce consistent spacing before and after keywords.' +--- -Enforces consistent spacing before and after keywords. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/keyword-spacing** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/lines-between-class-members.md b/packages/eslint-plugin/docs/rules/lines-between-class-members.md index 8a68abe9cda..c1e3f773455 100644 --- a/packages/eslint-plugin/docs/rules/lines-between-class-members.md +++ b/packages/eslint-plugin/docs/rules/lines-between-class-members.md @@ -1,6 +1,10 @@ -# `lines-between-class-members` +--- +description: 'Require or disallow an empty line between class members.' +--- -Requires or disallows an empty line between class members. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/lines-between-class-members** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/member-delimiter-style.md b/packages/eslint-plugin/docs/rules/member-delimiter-style.md index 858d3777d06..1437e97ba60 100644 --- a/packages/eslint-plugin/docs/rules/member-delimiter-style.md +++ b/packages/eslint-plugin/docs/rules/member-delimiter-style.md @@ -1,6 +1,10 @@ -# `member-delimiter-style` +--- +description: 'Require a specific member delimiter style for interfaces and type literals.' +--- -Requires a specific member delimiter style for interfaces and type literals. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/member-delimiter-style** for documentation. Enforces a consistent member delimiter style in interfaces and type literals. There are three member delimiter styles primarily used in TypeScript: diff --git a/packages/eslint-plugin/docs/rules/member-ordering.md b/packages/eslint-plugin/docs/rules/member-ordering.md index aacc062008f..2765aeb5dd6 100644 --- a/packages/eslint-plugin/docs/rules/member-ordering.md +++ b/packages/eslint-plugin/docs/rules/member-ordering.md @@ -1,6 +1,10 @@ -# `member-ordering` +--- +description: 'Require a consistent member declaration order.' +--- -Requires a consistent member declaration order. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/member-ordering** for documentation. A consistent ordering of fields, methods and constructors can make interfaces, type literals, classes and class expressions easier to read, navigate, and edit. @@ -40,7 +44,7 @@ You can configure `OrderConfig` options for: The `OrderConfig` settings for each kind of construct may configure sorting on one or both two levels: -- **`memberType`**: organizing on member type groups such as methods vs. properties +- **`memberTypes`**: organizing on member type groups such as methods vs. properties - **`order`**: organizing based on member names, such as alphabetically ### Groups @@ -94,6 +98,9 @@ The default configuration looks as follows: "field", + // Static initialization + "static-initialization", + // Constructors "public-constructor", "protected-constructor", @@ -908,6 +915,9 @@ The most explicit and granular form is the following: "protected-abstract-field", "private-abstract-field", + // Static initialization + "static-initialization", + // Constructors "public-constructor", "protected-constructor", @@ -1006,6 +1016,9 @@ It is also possible to group member types by their accessibility (`static`, `ins "protected-field", // = ["protected-static-field", "protected-instance-field"] "private-field", // = ["private-static-field", "private-instance-field"] + // Static initialization + // No accessibility for static initialization. + // Constructors // Only the accessibility of constructors is configurable. See below. @@ -1043,6 +1056,9 @@ their accessibility. "decorated-field", // = ["public-decorated-field", "protected-decorated-field", "private-decorated-field"] + // Static initialization + // No decorators for static initialization. + // Constructors // There are no decorators for constructors. @@ -1051,14 +1067,14 @@ their accessibility. "protected-decorated-get", "private-decorated-get", - "decorated-get" // = ["public-decorated-get", "protected-decorated-get", "private-decorated-get"] + "decorated-get", // = ["public-decorated-get", "protected-decorated-get", "private-decorated-get"] // Setters "public-decorated-set", "protected-decorated-set", "private-decorated-set", - "decorated-set" // = ["public-decorated-set", "protected-decorated-set", "private-decorated-set"] + "decorated-set", // = ["public-decorated-set", "protected-decorated-set", "private-decorated-set"] // Methods "public-decorated-method", @@ -1083,18 +1099,21 @@ Another option is to group the member types by their scope (`public`, `protected "instance-field", // = ["public-instance-field", "protected-instance-field", "private-instance-field"] "abstract-field", // = ["public-abstract-field", "protected-abstract-field", "private-abstract-field"] + // Static initialization + // No scope for static initialization. + // Constructors "constructor", // = ["public-constructor", "protected-constructor", "private-constructor"] // Getters "static-get", // = ["public-static-get", "protected-static-get", "private-static-get"] "instance-get", // = ["public-instance-get", "protected-instance-get", "private-instance-get"] - "abstract-get" // = ["public-abstract-get", "protected-abstract-get", "private-abstract-get"] + "abstract-get", // = ["public-abstract-get", "protected-abstract-get", "private-abstract-get"] // Setters "static-set", // = ["public-static-set", "protected-static-set", "private-static-set"] "instance-set", // = ["public-instance-set", "protected-instance-set", "private-instance-set"] - "abstract-set" // = ["public-abstract-set", "protected-abstract-set", "private-abstract-set"] + "abstract-set", // = ["public-abstract-set", "protected-abstract-set", "private-abstract-set"] // Methods "static-method", // = ["public-static-method", "protected-static-method", "private-static-method"] @@ -1116,15 +1135,18 @@ The third grouping option is to ignore both scope and accessibility. "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"] + // Static initialization + // No grouping for static initialization. + // Constructors // Only the accessibility of constructors is configurable. // Getters - "get" // = ["public-static-get", "protected-static-get", "private-static-get", "public-instance-get", "protected-instance-get", "private-instance-get", + "get", // = ["public-static-get", "protected-static-get", "private-static-get", "public-instance-get", "protected-instance-get", "private-instance-get", // "public-abstract-get", "protected-abstract-get", "private-abstract-get"] // Setters - "set" // = ["public-static-set", "protected-static-set", "private-static-set", "public-instance-set", "protected-instance-set", "private-instance-set", + "set", // = ["public-static-set", "protected-static-set", "private-static-set", "public-instance-set", "protected-instance-set", "private-instance-set", // "public-abstract-set", "protected-abstract-set", "private-abstract-set"] // Methods @@ -1145,6 +1167,9 @@ It is also possible to group different member types at the same rank. // Fields "field", + // Static initialization + "static-initialization", + // Constructors "constructor", diff --git a/packages/eslint-plugin/docs/rules/method-signature-style.md b/packages/eslint-plugin/docs/rules/method-signature-style.md index 53a6d3e17a0..4d6bea7ebdf 100644 --- a/packages/eslint-plugin/docs/rules/method-signature-style.md +++ b/packages/eslint-plugin/docs/rules/method-signature-style.md @@ -1,6 +1,10 @@ -# `method-signature-style` +--- +description: 'Enforce using a particular method signature syntax.' +--- -Enforces using a particular method signature syntax. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/method-signature-style** for documentation. There are two ways to define an object/interface function property. diff --git a/packages/eslint-plugin/docs/rules/naming-convention.md b/packages/eslint-plugin/docs/rules/naming-convention.md index 9032119ca40..ef6d82e8302 100644 --- a/packages/eslint-plugin/docs/rules/naming-convention.md +++ b/packages/eslint-plugin/docs/rules/naming-convention.md @@ -1,6 +1,10 @@ -# `naming-convention` +--- +description: 'Enforce naming conventions for everything across a codebase.' +--- -Enforces naming conventions for everything across a codebase. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/naming-convention** for documentation. 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`. diff --git a/packages/eslint-plugin/docs/rules/no-array-constructor.md b/packages/eslint-plugin/docs/rules/no-array-constructor.md index 01fd843caf1..6d301cca2bd 100644 --- a/packages/eslint-plugin/docs/rules/no-array-constructor.md +++ b/packages/eslint-plugin/docs/rules/no-array-constructor.md @@ -1,6 +1,10 @@ -# `no-array-constructor` +--- +description: 'Disallow generic `Array` constructors.' +--- -Disallows generic `Array` constructors. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-array-constructor** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-base-to-string.md b/packages/eslint-plugin/docs/rules/no-base-to-string.md index 1e5cd41c94a..cfc9007ca12 100644 --- a/packages/eslint-plugin/docs/rules/no-base-to-string.md +++ b/packages/eslint-plugin/docs/rules/no-base-to-string.md @@ -1,4 +1,10 @@ -# `no-base-to-string` +--- +description: 'Require `.toString()` to only be called on objects which provide useful information when stringified.' +--- + +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-base-to-string** for documentation. Requires `.toString()` to only be called on objects which provide useful information when stringified. diff --git a/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md b/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md index 77d11f68d21..43f2a34558e 100644 --- a/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-confusing-non-null-assertion.md @@ -1,6 +1,10 @@ -# `no-confusing-non-null-assertion` +--- +description: 'Disallow non-null assertion in locations that may be confusing.' +--- -Disallows non-null assertion in locations that may be confusing. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-confusing-non-null-assertion** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md b/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md index 8589e65d4c1..7e5d8458468 100644 --- a/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md +++ b/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md @@ -1,6 +1,10 @@ -# `no-confusing-void-expression` +--- +description: 'Require expressions of type void to appear in statement position.' +--- -Requires expressions of type void to appear in statement position. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-confusing-void-expression** for documentation. Returning the results of an expression whose type is void can be misleading. Attempting to do so is likely a symptom of expecting a different return type from a function. diff --git a/packages/eslint-plugin/docs/rules/no-dupe-class-members.md b/packages/eslint-plugin/docs/rules/no-dupe-class-members.md index e31b8548c66..0e099a252cf 100644 --- a/packages/eslint-plugin/docs/rules/no-dupe-class-members.md +++ b/packages/eslint-plugin/docs/rules/no-dupe-class-members.md @@ -1,6 +1,10 @@ -# `no-dupe-class-members` +--- +description: 'Disallow duplicate class members.' +--- -Disallows duplicate class members. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-dupe-class-members** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md b/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md index 6b69d540c55..31f8928b8cb 100644 --- a/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md +++ b/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md @@ -1,6 +1,10 @@ -# `no-duplicate-enum-values` +--- +description: 'Disallow duplicate enum member values.' +--- -Disallows duplicate enum member values. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-duplicate-enum-values** for documentation. Although TypeScript supports duplicate enum member values, people usually expect members to have unique values within the same enum. Duplicate values can lead to bugs that are hard to track down. @@ -21,8 +25,8 @@ enum E { ```ts enum E { - A = 'A' - B = 'A' + A = 'A', + B = 'A', } ``` @@ -37,8 +41,8 @@ enum E { ```ts enum E { - A = 'A' - B = 'B' + A = 'A', + B = 'B', } ``` diff --git a/packages/eslint-plugin/docs/rules/no-duplicate-imports.md b/packages/eslint-plugin/docs/rules/no-duplicate-imports.md index 90ab3da4123..d6ac06cac78 100644 --- a/packages/eslint-plugin/docs/rules/no-duplicate-imports.md +++ b/packages/eslint-plugin/docs/rules/no-duplicate-imports.md @@ -1,6 +1,10 @@ -# `no-duplicate-imports` +--- +description: 'Disallow duplicate imports.' +--- -Disallows duplicate imports. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-duplicate-imports** for documentation. ## DEPRECATED diff --git a/packages/eslint-plugin/docs/rules/no-dynamic-delete.md b/packages/eslint-plugin/docs/rules/no-dynamic-delete.md index e0c590a9de9..2ba81ffd88a 100644 --- a/packages/eslint-plugin/docs/rules/no-dynamic-delete.md +++ b/packages/eslint-plugin/docs/rules/no-dynamic-delete.md @@ -1,6 +1,10 @@ -# `no-dynamic-delete` +--- +description: 'Disallow using the `delete` operator on computed key expressions.' +--- -Disallows using the `delete` operator on computed key expressions. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-dynamic-delete** for documentation. Deleting dynamically computed keys can be dangerous and in some cases not well optimized. diff --git a/packages/eslint-plugin/docs/rules/no-empty-function.md b/packages/eslint-plugin/docs/rules/no-empty-function.md index e23cc10bdd4..91335c1cb87 100644 --- a/packages/eslint-plugin/docs/rules/no-empty-function.md +++ b/packages/eslint-plugin/docs/rules/no-empty-function.md @@ -1,6 +1,10 @@ -# `no-empty-function` +--- +description: 'Disallow empty functions.' +--- -Disallows empty functions. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-empty-function** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-empty-interface.md b/packages/eslint-plugin/docs/rules/no-empty-interface.md index c9e36a528b1..17bebea168f 100644 --- a/packages/eslint-plugin/docs/rules/no-empty-interface.md +++ b/packages/eslint-plugin/docs/rules/no-empty-interface.md @@ -1,6 +1,10 @@ -# `no-empty-interface` +--- +description: 'Disallow the declaration of empty interfaces.' +--- -Disallows the declaration of empty interfaces. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-empty-interface** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/no-explicit-any.md b/packages/eslint-plugin/docs/rules/no-explicit-any.md index ebf04310498..1f9723aedba 100644 --- a/packages/eslint-plugin/docs/rules/no-explicit-any.md +++ b/packages/eslint-plugin/docs/rules/no-explicit-any.md @@ -1,6 +1,10 @@ -# `no-explicit-any` +--- +description: 'Disallow the `any` type.' +--- -Disallows the `any` type. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-explicit-any** for documentation. Using the `any` type defeats the purpose of using TypeScript. When `any` is used, all compiler type checks around that value are ignored. diff --git a/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md b/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md index 43cfacf756f..1a54ecc8c8d 100644 --- a/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-extra-non-null-assertion.md @@ -1,6 +1,10 @@ -# `no-extra-non-null-assertion` +--- +description: 'Disallow extra non-null assertion.' +--- -Disallows extra non-null assertion. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-extra-non-null-assertion** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-extra-parens.md b/packages/eslint-plugin/docs/rules/no-extra-parens.md index f123b70d141..8707c381047 100644 --- a/packages/eslint-plugin/docs/rules/no-extra-parens.md +++ b/packages/eslint-plugin/docs/rules/no-extra-parens.md @@ -1,6 +1,10 @@ -# `no-extra-parens` +--- +description: 'Disallow unnecessary parentheses.' +--- -Disallows unnecessary parentheses. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-extra-parens** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-extra-semi.md b/packages/eslint-plugin/docs/rules/no-extra-semi.md index b0649081b5c..4cf29eaaee3 100644 --- a/packages/eslint-plugin/docs/rules/no-extra-semi.md +++ b/packages/eslint-plugin/docs/rules/no-extra-semi.md @@ -1,6 +1,10 @@ -# `no-extra-semi` +--- +description: 'Disallow unnecessary semicolons.' +--- -Disallows unnecessary semicolons. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-extra-semi** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-extraneous-class.md b/packages/eslint-plugin/docs/rules/no-extraneous-class.md index e1697254ef9..ecc01b9db50 100644 --- a/packages/eslint-plugin/docs/rules/no-extraneous-class.md +++ b/packages/eslint-plugin/docs/rules/no-extraneous-class.md @@ -1,6 +1,10 @@ -# `no-extraneous-class` +--- +description: 'Disallow classes used as namespaces.' +--- -Disallows classes used as namespaces. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-extraneous-class** for documentation. This rule warns when a class has no non-static members, such as for a class used exclusively as a static namespace. diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.md b/packages/eslint-plugin/docs/rules/no-floating-promises.md index 1df8ea23c72..597ebcd7b50 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.md +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.md @@ -1,6 +1,10 @@ -# `no-floating-promises` +--- +description: 'Require Promise-like statements to be handled appropriately.' +--- -Requires Promise-like statements to be handled appropriately. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-floating-promises** for documentation. A "floating" Promise is one that is created without any code set up to handle any errors it might throw. diff --git a/packages/eslint-plugin/docs/rules/no-for-in-array.md b/packages/eslint-plugin/docs/rules/no-for-in-array.md index bcc51aa1660..2f4a5c699cc 100644 --- a/packages/eslint-plugin/docs/rules/no-for-in-array.md +++ b/packages/eslint-plugin/docs/rules/no-for-in-array.md @@ -1,6 +1,10 @@ -# `no-for-in-array` +--- +description: 'Disallow iterating over an array with a for-in loop.' +--- -Disallows iterating over an array with a for-in loop. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-for-in-array** for documentation. This rule prohibits iterating over an array with a for-in loop. diff --git a/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md b/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md index 40530896835..6b3d00db3ce 100644 --- a/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md +++ b/packages/eslint-plugin/docs/rules/no-implicit-any-catch.md @@ -1,6 +1,10 @@ -# `no-implicit-any-catch` +--- +description: 'Disallow usage of the implicit `any` type in catch clauses.' +--- -Disallows usage of the implicit `any` type in catch clauses. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-implicit-any-catch** for documentation. TypeScript 4.0 added support for adding an explicit `any` or `unknown` type annotation on a catch clause variable. diff --git a/packages/eslint-plugin/docs/rules/no-implied-eval.md b/packages/eslint-plugin/docs/rules/no-implied-eval.md index d39a6f70609..4bc269775c0 100644 --- a/packages/eslint-plugin/docs/rules/no-implied-eval.md +++ b/packages/eslint-plugin/docs/rules/no-implied-eval.md @@ -1,6 +1,10 @@ -# `no-implied-eval` +--- +description: 'Disallow the use of `eval()`-like methods.' +--- -Disallows the use of `eval()`-like methods. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-implied-eval** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/no-inferrable-types.md b/packages/eslint-plugin/docs/rules/no-inferrable-types.md index 137d6c558be..743efe03515 100644 --- a/packages/eslint-plugin/docs/rules/no-inferrable-types.md +++ b/packages/eslint-plugin/docs/rules/no-inferrable-types.md @@ -1,6 +1,10 @@ -# `no-inferrable-types` +--- +description: 'Disallow explicit type declarations for variables or parameters initialized to a number, string, or boolean.' +--- -Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-inferrable-types** for documentation. Explicit types where they can be easily inferred may add unnecessary verbosity. diff --git a/packages/eslint-plugin/docs/rules/no-invalid-this.md b/packages/eslint-plugin/docs/rules/no-invalid-this.md index 5061e60559d..17cff6a0af4 100644 --- a/packages/eslint-plugin/docs/rules/no-invalid-this.md +++ b/packages/eslint-plugin/docs/rules/no-invalid-this.md @@ -1,6 +1,10 @@ -# `no-invalid-this` +--- +description: 'Disallow `this` keywords outside of classes or class-like objects.' +--- -Disallows `this` keywords outside of classes or class-like objects. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-invalid-this** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-invalid-void-type.md b/packages/eslint-plugin/docs/rules/no-invalid-void-type.md index 928fc615297..c39e932a778 100644 --- a/packages/eslint-plugin/docs/rules/no-invalid-void-type.md +++ b/packages/eslint-plugin/docs/rules/no-invalid-void-type.md @@ -1,6 +1,10 @@ -# `no-invalid-void-type` +--- +description: 'Disallow `void` type outside of generic or return types.' +--- -Disallows `void` type outside of generic or return types. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-invalid-void-type** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/no-loop-func.md b/packages/eslint-plugin/docs/rules/no-loop-func.md index 890bd80ecc0..7a63fd52c7c 100644 --- a/packages/eslint-plugin/docs/rules/no-loop-func.md +++ b/packages/eslint-plugin/docs/rules/no-loop-func.md @@ -1,6 +1,10 @@ -# `no-loop-func` +--- +description: 'Disallow function declarations that contain unsafe references inside loop statements.' +--- -Disallows function declarations that contain unsafe references inside loop statements. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-loop-func** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-loss-of-precision.md b/packages/eslint-plugin/docs/rules/no-loss-of-precision.md index a27701afdfb..21ac3c6abb5 100644 --- a/packages/eslint-plugin/docs/rules/no-loss-of-precision.md +++ b/packages/eslint-plugin/docs/rules/no-loss-of-precision.md @@ -1,6 +1,10 @@ -# `no-loss-of-precision` +--- +description: 'Disallow literal numbers that lose precision.' +--- -Disallows literal numbers that lose precision. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-loss-of-precision** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-magic-numbers.md b/packages/eslint-plugin/docs/rules/no-magic-numbers.md index e5edc2e280d..1690ea371a7 100644 --- a/packages/eslint-plugin/docs/rules/no-magic-numbers.md +++ b/packages/eslint-plugin/docs/rules/no-magic-numbers.md @@ -1,6 +1,10 @@ -# `no-magic-numbers` +--- +description: 'Disallow magic numbers.' +--- -Disallows magic numbers. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-magic-numbers** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md b/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md index fa348f30808..d99347a7514 100644 --- a/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md +++ b/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md @@ -1,6 +1,10 @@ -# `no-meaningless-void-operator` +--- +description: 'Disallow the `void` operator except when used to discard a value.' +--- -Disallows the `void` operator except when used to discard a value. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-meaningless-void-operator** for documentation. Disallows the `void` operator when its argument is already of type `void` or `undefined`. diff --git a/packages/eslint-plugin/docs/rules/no-misused-new.md b/packages/eslint-plugin/docs/rules/no-misused-new.md index 10d0470f67b..bc602bcc6e8 100644 --- a/packages/eslint-plugin/docs/rules/no-misused-new.md +++ b/packages/eslint-plugin/docs/rules/no-misused-new.md @@ -1,6 +1,10 @@ -# `no-misused-new` +--- +description: 'Enforce valid definition of `new` and `constructor`.' +--- -Enforces valid definition of `new` and `constructor`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-misused-new** for documentation. Warns on apparent attempts to define constructors for interfaces or `new` for classes. diff --git a/packages/eslint-plugin/docs/rules/no-misused-promises.md b/packages/eslint-plugin/docs/rules/no-misused-promises.md index f3e67234c6f..6e75b5db103 100644 --- a/packages/eslint-plugin/docs/rules/no-misused-promises.md +++ b/packages/eslint-plugin/docs/rules/no-misused-promises.md @@ -1,6 +1,10 @@ -# `no-misused-promises` +--- +description: 'Disallow Promises in places not designed to handle them.' +--- -Disallows Promises in places not designed to handle them. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-misused-promises** for documentation. This rule forbids providing Promises to logical locations such as if statements 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 diff --git a/packages/eslint-plugin/docs/rules/no-namespace.md b/packages/eslint-plugin/docs/rules/no-namespace.md index e1e83fd1c7e..665bf273d26 100644 --- a/packages/eslint-plugin/docs/rules/no-namespace.md +++ b/packages/eslint-plugin/docs/rules/no-namespace.md @@ -1,6 +1,10 @@ -# `no-namespace` +--- +description: 'Disallow custom TypeScript modules and namespaces.' +--- -Disallows custom TypeScript modules and namespaces. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-namespace** for documentation. 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`). diff --git a/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md index 29eac71f2f4..68a33404263 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-asserted-nullish-coalescing.md @@ -1,6 +1,10 @@ -# `no-non-null-asserted-nullish-coalescing` +--- +description: 'Disallow non-null assertions in the left operand of a nullish coalescing operator.' +--- -Disallows non-null assertions in the left operand of a nullish coalescing operator. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-non-null-asserted-nullish-coalescing** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md b/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md index 0913824ef8b..b68e55a8256 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-asserted-optional-chain.md @@ -1,6 +1,10 @@ -# `no-non-null-asserted-optional-chain` +--- +description: 'Disallow non-null assertions after an optional chain expression.' +--- -Disallows non-null assertions after an optional chain expression. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-non-null-asserted-optional-chain** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-non-null-assertion.md b/packages/eslint-plugin/docs/rules/no-non-null-assertion.md index a28c07112a5..3b23982fd28 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-assertion.md @@ -1,6 +1,10 @@ -# `no-non-null-assertion` +--- +description: 'Disallow non-null assertions using the `!` postfix operator.' +--- -Disallows non-null assertions using the `!` postfix operator. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-non-null-assertion** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-parameter-properties.md b/packages/eslint-plugin/docs/rules/no-parameter-properties.md index 3ff367fb2e2..329ecbb732e 100644 --- a/packages/eslint-plugin/docs/rules/no-parameter-properties.md +++ b/packages/eslint-plugin/docs/rules/no-parameter-properties.md @@ -1,6 +1,10 @@ -# `no-parameter-properties` +--- +description: 'Disallow the use of parameter properties in class constructors.' +--- -Disallows the use of parameter properties in class constructors. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-parameter-properties** for documentation. Parameter properties can be confusing to those new to TypeScript as they are less explicit than other ways of declaring and initializing class members. diff --git a/packages/eslint-plugin/docs/rules/no-redeclare.md b/packages/eslint-plugin/docs/rules/no-redeclare.md index 6ddb0d6d730..1ba99ea379c 100644 --- a/packages/eslint-plugin/docs/rules/no-redeclare.md +++ b/packages/eslint-plugin/docs/rules/no-redeclare.md @@ -1,6 +1,10 @@ -# `no-redeclare` +--- +description: 'Disallow variable redeclaration.' +--- -Disallows variable redeclaration. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-redeclare** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md b/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md index fc393d5c0d4..be06806c681 100644 --- a/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md +++ b/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md @@ -1,6 +1,10 @@ -# `no-redundant-type-constituents` +--- +description: 'Disallow members of unions and intersections that do nothing or override type information.' +--- -Disallows members of unions and intersections that do nothing or override type information. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-redundant-type-constituents** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-require-imports.md b/packages/eslint-plugin/docs/rules/no-require-imports.md index 9e45c8bd433..b5bd6f136c4 100644 --- a/packages/eslint-plugin/docs/rules/no-require-imports.md +++ b/packages/eslint-plugin/docs/rules/no-require-imports.md @@ -1,6 +1,10 @@ -# `no-require-imports` +--- +description: 'Disallow invocation of `require()`.' +--- -Disallows invocation of `require()`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-require-imports** for documentation. Prefer the newer ES6-style imports over `require()`. diff --git a/packages/eslint-plugin/docs/rules/no-restricted-imports.md b/packages/eslint-plugin/docs/rules/no-restricted-imports.md index 2e741490d09..3329ca58842 100644 --- a/packages/eslint-plugin/docs/rules/no-restricted-imports.md +++ b/packages/eslint-plugin/docs/rules/no-restricted-imports.md @@ -1,6 +1,10 @@ -# `no-restricted-imports` +--- +description: 'Disallow specified modules when loaded by `import`.' +--- -Disallows specified modules when loaded by `import`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-restricted-imports** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-shadow.md b/packages/eslint-plugin/docs/rules/no-shadow.md index 4ed7f199c2c..4487ecccc0a 100644 --- a/packages/eslint-plugin/docs/rules/no-shadow.md +++ b/packages/eslint-plugin/docs/rules/no-shadow.md @@ -1,6 +1,10 @@ -# `no-shadow` +--- +description: 'Disallow variable declarations from shadowing variables declared in the outer scope.' +--- -Disallows variable declarations from shadowing variables declared in the outer scope. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-shadow** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-this-alias.md b/packages/eslint-plugin/docs/rules/no-this-alias.md index 8485ef88c07..5cd741ac3ac 100644 --- a/packages/eslint-plugin/docs/rules/no-this-alias.md +++ b/packages/eslint-plugin/docs/rules/no-this-alias.md @@ -1,6 +1,10 @@ -# `no-this-alias` +--- +description: 'Disallow aliasing `this`.' +--- -Disallows aliasing `this`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-this-alias** for documentation. This rule prohibits assigning variables to `this`. diff --git a/packages/eslint-plugin/docs/rules/no-throw-literal.md b/packages/eslint-plugin/docs/rules/no-throw-literal.md index 4bb8bbcc58c..9cefca0cee9 100644 --- a/packages/eslint-plugin/docs/rules/no-throw-literal.md +++ b/packages/eslint-plugin/docs/rules/no-throw-literal.md @@ -1,6 +1,10 @@ -# `no-throw-literal` +--- +description: 'Disallow throwing literals as exceptions.' +--- -Disallows throwing literals as exceptions. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-throw-literal** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/no-type-alias.md b/packages/eslint-plugin/docs/rules/no-type-alias.md index 3a02c4b9760..cb6c76ee9ec 100644 --- a/packages/eslint-plugin/docs/rules/no-type-alias.md +++ b/packages/eslint-plugin/docs/rules/no-type-alias.md @@ -1,6 +1,10 @@ -# `no-type-alias` +--- +description: 'Disallow type aliases.' +--- -Disallows type aliases. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-type-alias** for documentation. In TypeScript, type aliases serve three purposes: diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md index 73f5ac0c06a..84843a245fe 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-boolean-literal-compare.md @@ -1,6 +1,10 @@ -# `no-unnecessary-boolean-literal-compare` +--- +description: 'Disallow unnecessary equality comparisons against boolean literals.' +--- -Disallows unnecessary equality comparisons against boolean literals. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unnecessary-boolean-literal-compare** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md b/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md index 3c03a565521..9ae1eb01107 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md @@ -1,6 +1,10 @@ -# `no-unnecessary-condition` +--- +description: 'Disallow conditionals where the type is always truthy or always falsy.' +--- -Disallows conditionals where the type is always truthy or always falsy. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unnecessary-condition** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md b/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md index db73814ee78..e0a62705047 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md @@ -1,6 +1,10 @@ -# `no-unnecessary-qualifier` +--- +description: 'Disallow unnecessary namespace qualifiers.' +--- -Disallows unnecessary namespace qualifiers. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unnecessary-qualifier** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md index 26e5c5a01cb..63364396c55 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md @@ -1,6 +1,10 @@ -# `no-unnecessary-type-arguments` +--- +description: 'Disallow type arguments that are equal to the default.' +--- -Disallows type arguments that are equal to the default. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unnecessary-type-arguments** for documentation. Warns if an explicitly specified type argument is the default for that type parameter. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md index e801c73f0ca..5479988a502 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-assertion.md @@ -1,6 +1,10 @@ -# `no-unnecessary-type-assertion` +--- +description: 'Disallow type assertions that do not change the type of an expression.' +--- -Disallows type assertions that do not change the type of an expression. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unnecessary-type-assertion** for documentation. This rule prohibits using a type assertion that does not change the type of an expression. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md b/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md index b2fb9c6b2b9..02a1df88dda 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-constraint.md @@ -1,6 +1,10 @@ -# `no-unnecessary-type-constraint` +--- +description: 'Disallow unnecessary constraints on generic types.' +--- -Disallows unnecessary constraints on generic types. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unnecessary-type-constraint** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md index 30d7e441e66..db1612f5a4f 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md @@ -1,6 +1,10 @@ -# `no-unsafe-argument` +--- +description: 'Disallow calling a function with a value with type `any`.' +--- -Disallows calling a function with a value with type `any`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unsafe-argument** for documentation. Despite your best intentions, the `any` type can sometimes leak into your codebase. Call a function with `any` typed argument are not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md b/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md index 98bb047e786..e0b7c5ec9e2 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md @@ -1,6 +1,10 @@ -# `no-unsafe-assignment` +--- +description: 'Disallow assigning a value with type `any` to variables and properties.' +--- -Disallows assigning a value with type `any` to variables and properties. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unsafe-assignment** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-call.md b/packages/eslint-plugin/docs/rules/no-unsafe-call.md index 68c5ba8b81c..d4f21f6cc4d 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-call.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-call.md @@ -1,6 +1,10 @@ -# `no-unsafe-call` +--- +description: 'Disallow calling a value with type `any`.' +--- -Disallows calling a value with type `any`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unsafe-call** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md b/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md index a79a8c648c5..3c3416e3dd6 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md @@ -1,6 +1,10 @@ -# `no-unsafe-member-access` +--- +description: 'Disallow member access on a value with type `any`.' +--- -Disallows member access on a value with type `any`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unsafe-member-access** for documentation. 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. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-return.md b/packages/eslint-plugin/docs/rules/no-unsafe-return.md index a3401b3b94e..430b4be2ca3 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-return.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-return.md @@ -1,6 +1,10 @@ -# `no-unsafe-return` +--- +description: 'Disallow returning a value with type `any` from a function.' +--- -Disallows returning a value with type `any` from a function. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unsafe-return** for documentation. Despite your best intentions, the `any` type can sometimes leak into your codebase. Returned `any` typed values are not checked at all by TypeScript, so it creates a potential safety hole, and source of bugs in your codebase. diff --git a/packages/eslint-plugin/docs/rules/no-unused-expressions.md b/packages/eslint-plugin/docs/rules/no-unused-expressions.md index f89aa6349e7..a851db4d473 100644 --- a/packages/eslint-plugin/docs/rules/no-unused-expressions.md +++ b/packages/eslint-plugin/docs/rules/no-unused-expressions.md @@ -1,6 +1,10 @@ -# `no-unused-expressions` +--- +description: 'Disallow unused expressions.' +--- -Disallows unused expressions. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unused-expressions** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-unused-vars.md b/packages/eslint-plugin/docs/rules/no-unused-vars.md index 7b46ad3f59c..4ad1f19d7ef 100644 --- a/packages/eslint-plugin/docs/rules/no-unused-vars.md +++ b/packages/eslint-plugin/docs/rules/no-unused-vars.md @@ -1,6 +1,10 @@ -# `no-unused-vars` +--- +description: 'Disallow unused variables.' +--- -Disallows unused variables. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-unused-vars** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-use-before-define.md b/packages/eslint-plugin/docs/rules/no-use-before-define.md index ec29f33c821..fec9e8dbf76 100644 --- a/packages/eslint-plugin/docs/rules/no-use-before-define.md +++ b/packages/eslint-plugin/docs/rules/no-use-before-define.md @@ -1,6 +1,10 @@ -# `no-use-before-define` +--- +description: 'Disallow the use of variables before they are defined.' +--- -Disallows the use of variables before they are defined. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-use-before-define** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-useless-constructor.md b/packages/eslint-plugin/docs/rules/no-useless-constructor.md index 221a0aaad20..a5acf42b7b9 100644 --- a/packages/eslint-plugin/docs/rules/no-useless-constructor.md +++ b/packages/eslint-plugin/docs/rules/no-useless-constructor.md @@ -1,6 +1,10 @@ -# `no-useless-constructor` +--- +description: 'Disallow unnecessary constructors.' +--- -Disallows unnecessary constructors. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-useless-constructor** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-useless-empty-export.md b/packages/eslint-plugin/docs/rules/no-useless-empty-export.md index 94d8dc8a08c..ca02d12c8cd 100644 --- a/packages/eslint-plugin/docs/rules/no-useless-empty-export.md +++ b/packages/eslint-plugin/docs/rules/no-useless-empty-export.md @@ -1,6 +1,10 @@ -# `no-useless-empty-export` +--- +description: "Disallow empty exports that don't change anything in a module file." +--- -Disallows empty exports that don't change anything in a module file. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-useless-empty-export** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/no-var-requires.md b/packages/eslint-plugin/docs/rules/no-var-requires.md index 1ec377b2ba1..0b6a7a2454b 100644 --- a/packages/eslint-plugin/docs/rules/no-var-requires.md +++ b/packages/eslint-plugin/docs/rules/no-var-requires.md @@ -1,6 +1,10 @@ -# `no-var-requires` +--- +description: 'Disallow `require` statements except in import statements.' +--- -Disallows `require` statements except in import statements. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/no-var-requires** for documentation. In other words, the use of forms such as `var foo = require("foo")` are banned. Instead use ES6 style imports or `import foo = require("foo")` imports. diff --git a/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md b/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md index ffb0d7b4e70..dbd38cdb866 100644 --- a/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md +++ b/packages/eslint-plugin/docs/rules/non-nullable-type-assertion-style.md @@ -1,6 +1,10 @@ -# `non-nullable-type-assertion-style` +--- +description: 'Enforce non-null assertions over explicit type casts.' +--- -Enforces non-null assertions over explicit type casts. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/non-nullable-type-assertion-style** for documentation. This rule detects when an `as` cast is doing the same job as a `!` would, and suggests fixing the code to be an `!`. diff --git a/packages/eslint-plugin/docs/rules/object-curly-spacing.md b/packages/eslint-plugin/docs/rules/object-curly-spacing.md index 4789df3e14e..f6780dbef80 100644 --- a/packages/eslint-plugin/docs/rules/object-curly-spacing.md +++ b/packages/eslint-plugin/docs/rules/object-curly-spacing.md @@ -1,6 +1,10 @@ -# `object-curly-spacing` +--- +description: 'Enforce consistent spacing inside braces.' +--- -Enforces consistent spacing inside braces. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/object-curly-spacing** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/padding-line-between-statements.md b/packages/eslint-plugin/docs/rules/padding-line-between-statements.md index 82f98043d4b..2849230d341 100644 --- a/packages/eslint-plugin/docs/rules/padding-line-between-statements.md +++ b/packages/eslint-plugin/docs/rules/padding-line-between-statements.md @@ -1,6 +1,10 @@ -# `padding-line-between-statements` +--- +description: 'Require or disallow padding lines between statements.' +--- -Requires or disallows padding lines between statements. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/padding-line-between-statements** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/parameter-properties.md b/packages/eslint-plugin/docs/rules/parameter-properties.md index e4ff9a4ea8a..e41e1bbd5df 100644 --- a/packages/eslint-plugin/docs/rules/parameter-properties.md +++ b/packages/eslint-plugin/docs/rules/parameter-properties.md @@ -1,6 +1,10 @@ -# `parameter-properties` +--- +description: 'Require or disallow parameter properties in class constructors.' +--- -Requires or disallows parameter properties in class constructors. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/parameter-properties** for documentation. Parameter properties can be confusing to those new to TypeScript as they are less explicit than other ways of declaring and initializing class members. diff --git a/packages/eslint-plugin/docs/rules/prefer-as-const.md b/packages/eslint-plugin/docs/rules/prefer-as-const.md index 76d3dede547..0670268bfab 100644 --- a/packages/eslint-plugin/docs/rules/prefer-as-const.md +++ b/packages/eslint-plugin/docs/rules/prefer-as-const.md @@ -1,6 +1,10 @@ -# `prefer-as-const` +--- +description: 'Enforce the use of `as const` over literal type.' +--- -Enforces the use of `as const` over literal type. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-as-const** for documentation. This rule recommends usage of `const` assertion when type primitive value is equal to type. diff --git a/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md b/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md index fb3a24494d4..8e2c0512520 100644 --- a/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md +++ b/packages/eslint-plugin/docs/rules/prefer-enum-initializers.md @@ -1,6 +1,10 @@ -# `prefer-enum-initializers` +--- +description: 'Require each enum member value to be explicitly initialized.' +--- -Requires each enum member value to be explicitly initialized. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-enum-initializers** for documentation. This rule recommends having each `enum`s member value explicitly initialized. diff --git a/packages/eslint-plugin/docs/rules/prefer-for-of.md b/packages/eslint-plugin/docs/rules/prefer-for-of.md index f4a4f207e78..fed26d5af26 100644 --- a/packages/eslint-plugin/docs/rules/prefer-for-of.md +++ b/packages/eslint-plugin/docs/rules/prefer-for-of.md @@ -1,6 +1,10 @@ -# `prefer-for-of` +--- +description: 'Enforce the use of `for-of` loop over the standard `for` loop where possible.' +--- -Enforces the use of `for-of` loop over the standard `for` loop where possible. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-for-of** for documentation. This rule recommends a for-of loop when the loop index is only used to read from an array that is being iterated. diff --git a/packages/eslint-plugin/docs/rules/prefer-function-type.md b/packages/eslint-plugin/docs/rules/prefer-function-type.md index 22b579798fc..7e8c1f73817 100644 --- a/packages/eslint-plugin/docs/rules/prefer-function-type.md +++ b/packages/eslint-plugin/docs/rules/prefer-function-type.md @@ -1,6 +1,10 @@ -# `prefer-function-type` +--- +description: 'Enforce using function types instead of interfaces with call signatures.' +--- -Enforces using function types instead of interfaces with call signatures. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-function-type** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/prefer-includes.md b/packages/eslint-plugin/docs/rules/prefer-includes.md index 448d6bef4a3..e0d05b6662f 100644 --- a/packages/eslint-plugin/docs/rules/prefer-includes.md +++ b/packages/eslint-plugin/docs/rules/prefer-includes.md @@ -1,6 +1,10 @@ -# `prefer-includes` +--- +description: 'Enforce `includes` method over `indexOf` method.' +--- -Enforces `includes` method over `indexOf` method. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-includes** for documentation. Until ES5, we were using `String#indexOf` method to check whether a string contains an arbitrary substring or not. Until ES2015, we were using `Array#indexOf` method to check whether an array contains an arbitrary value or not. diff --git a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md index 4f4db49cb62..1bb4d23cc08 100644 --- a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md +++ b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md @@ -1,6 +1,10 @@ -# `prefer-literal-enum-member` +--- +description: 'Require all enum members to be literal values.' +--- -Requires all enum members to be literal values. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-literal-enum-member** for documentation. TypeScript allows the value of an enum member to be many different kinds of valid JavaScript expressions. However, because enums create their own scope whereby each enum member becomes a variable in that scope, unexpected values could be used at runtime. Example: diff --git a/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md b/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md index 01bd2377a0f..b7320e72851 100644 --- a/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md +++ b/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md @@ -1,6 +1,10 @@ -# `prefer-namespace-keyword` +--- +description: 'Require using `namespace` keyword over `module` keyword to declare custom TypeScript modules.' +--- -Requires using `namespace` keyword over `module` keyword to declare custom TypeScript modules. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-namespace-keyword** for documentation. In an effort to prevent further confusion between custom TypeScript modules and the new ES2015 modules, starting with TypeScript `v1.5` the keyword `namespace` is now the preferred way to declare custom TypeScript modules. diff --git a/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md b/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md index 9b1dfe98820..272240b4d48 100644 --- a/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md +++ b/packages/eslint-plugin/docs/rules/prefer-nullish-coalescing.md @@ -1,6 +1,10 @@ -# `prefer-nullish-coalescing` +--- +description: 'Enforce using the nullish coalescing operator instead of logical chaining.' +--- -Enforces using the nullish coalescing operator instead of logical chaining. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-nullish-coalescing** for documentation. TypeScript 3.7 added support for the nullish coalescing operator. This operator allows you to safely cascade a value when dealing with `null` or `undefined`. @@ -46,6 +50,7 @@ This rule aims enforce the usage of the safer operator. ```ts type Options = [ { + ignoreTernaryTests?: boolean; ignoreConditionalTests?: boolean; ignoreMixedLogicalExpressions?: boolean; }, @@ -53,12 +58,53 @@ type Options = [ const defaultOptions = [ { + ignoreTernaryTests: true; ignoreConditionalTests: true, ignoreMixedLogicalExpressions: true, }, ]; ``` +### `ignoreTernaryTests` + +Setting this option to `true` (the default) will cause the rule to ignore any ternary expressions that could be simplified by using the nullish coalescing operator. + +Incorrect code for `ignoreTernaryTests: false`, and correct code for `ignoreTernaryTests: true`: + +```ts +const foo: any = 'bar'; +foo !== undefined && foo !== null ? foo : 'a string'; +foo === undefined || foo === null ? 'a string' : foo; +foo == undefined ? 'a string' : foo; +foo == null ? 'a string' : foo; + +const foo: string | undefined = 'bar'; +foo !== undefined ? foo : 'a string'; +foo === undefined ? 'a string' : foo; + +const foo: string | null = 'bar'; +foo !== null ? foo : 'a string'; +foo === null ? 'a string' : foo; +``` + +Correct code for `ignoreTernaryTests: false`: + +```ts +const foo: any = 'bar'; +foo ?? 'a string'; +foo ?? 'a string'; +foo ?? 'a string'; +foo ?? 'a string'; + +const foo: string | undefined = 'bar'; +foo ?? 'a string'; +foo ?? 'a string'; + +const foo: string | null = 'bar'; +foo ?? 'a string'; +foo ?? 'a string'; +``` + ### `ignoreConditionalTests` Setting this option to `true` (the default) will cause the rule to ignore any cases that are located within a conditional test. diff --git a/packages/eslint-plugin/docs/rules/prefer-optional-chain.md b/packages/eslint-plugin/docs/rules/prefer-optional-chain.md index c2b196a04a4..d2f252bb878 100644 --- a/packages/eslint-plugin/docs/rules/prefer-optional-chain.md +++ b/packages/eslint-plugin/docs/rules/prefer-optional-chain.md @@ -1,6 +1,10 @@ -# `prefer-optional-chain` +--- +description: 'Enforce using concise optional chain expressions instead of chained logical ands.' +--- -Enforces using concise optional chain expressions instead of chained logical ands. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-optional-chain** for documentation. TypeScript 3.7 added support for the optional chain operator. This operator allows you to safely access properties and methods on objects when they are potentially `null` or `undefined`. diff --git a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md index 5ac98d6f043..3a1f34d9413 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md @@ -1,6 +1,10 @@ -# `prefer-readonly-parameter-types` +--- +description: 'Require function parameters to be typed as `readonly` to prevent accidental mutation of inputs.' +--- -Requires function parameters to be typed as `readonly` to prevent accidental mutation of inputs. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-readonly-parameter-types** for documentation. Mutating function arguments can lead to confusing, hard to debug behavior. Whilst it's easy to implicitly remember to not modify function arguments, explicitly typing arguments as readonly provides clear contract to consumers. diff --git a/packages/eslint-plugin/docs/rules/prefer-readonly.md b/packages/eslint-plugin/docs/rules/prefer-readonly.md index bfc297ae8fc..16d7d2f4f67 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly.md @@ -1,6 +1,10 @@ -# `prefer-readonly` +--- +description: "Require private members to be marked as `readonly` if they're never modified outside of the constructor." +--- -Requires private members to be marked as `readonly` if they're never modified outside of the constructor. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-readonly** for documentation. This rule enforces that private members are marked as `readonly` if they're never modified outside of the constructor. diff --git a/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md b/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md index 16a1046a24d..4e8cdde8527 100644 --- a/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +++ b/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md @@ -1,6 +1,10 @@ -# `prefer-reduce-type-parameter` +--- +description: 'Enforce using type parameter when calling `Array#reduce` instead of casting.' +--- -Enforces using type parameter when calling `Array#reduce` instead of casting. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-reduce-type-parameter** for documentation. It's common to call `Array#reduce` with a generic type, such as an array or object, as the initial value. Since these values are empty, their types are not usable: diff --git a/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md b/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md index 7c7756646b9..74a3649de76 100644 --- a/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md +++ b/packages/eslint-plugin/docs/rules/prefer-regexp-exec.md @@ -1,6 +1,10 @@ -# `prefer-regexp-exec` +--- +description: 'Enforce `RegExp#exec` over `String#match` if no global flag is provided.' +--- -Enforces `RegExp#exec` over `String#match` if no global flag is provided. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-regexp-exec** for documentation. As `String#match` is defined to be the same as `RegExp#exec` when the regular expression does not include the `g` flag, prefer a consistent usage. diff --git a/packages/eslint-plugin/docs/rules/prefer-return-this-type.md b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md index 2ec74834012..535ec053e23 100644 --- a/packages/eslint-plugin/docs/rules/prefer-return-this-type.md +++ b/packages/eslint-plugin/docs/rules/prefer-return-this-type.md @@ -1,6 +1,10 @@ -# `prefer-return-this-type` +--- +description: 'Enforce that `this` is used when only `this` type is returned.' +--- -Enforces that `this` is used when only `this` type is returned. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-return-this-type** for documentation. [Method chaining](https://en.wikipedia.org/wiki/Method_chaining) is a common pattern in OOP languages and TypeScript provides a special [polymorphic this type](https://www.typescriptlang.org/docs/handbook/2/classes.html#this-types). If any type other than `this` is specified as the return type of these chaining methods, TypeScript will fail to cast it when invoking in subclass. diff --git a/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md b/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md index c103769e1ef..de5233ec0b8 100644 --- a/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md +++ b/packages/eslint-plugin/docs/rules/prefer-string-starts-ends-with.md @@ -1,9 +1,12 @@ -# `prefer-string-starts-ends-with` +--- +description: 'Enforce using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings.' +--- -Enforces using `String#startsWith` and `String#endsWith` over other equivalent methods of checking substrings. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-string-starts-ends-with** for documentation. There are multiple ways to verify if a string starts or ends with a specific string, such as `foo.indexOf('bar') === 0`. - Since ES2015 has added `String#startsWith` and `String#endsWith`, this rule reports other ways to be consistent. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md b/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md index bf96eb8fa9a..255e30e7ea5 100644 --- a/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md +++ b/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md @@ -1,6 +1,10 @@ -# `prefer-ts-expect-error` +--- +description: 'Enforce using `@ts-expect-error` over `@ts-ignore`.' +--- -Enforces using `@ts-expect-error` over `@ts-ignore`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/prefer-ts-expect-error** for documentation. TypeScript allows you to suppress all errors on a line by placing a single-line comment or a comment block line starting with `@ts-ignore` immediately before the erroring line. While powerful, there is no way to know if a `@ts-ignore` is actually suppressing an error without manually investigating what happens when the `@ts-ignore` is removed. diff --git a/packages/eslint-plugin/docs/rules/promise-function-async.md b/packages/eslint-plugin/docs/rules/promise-function-async.md index 7316e02f1b3..137dd051ab5 100644 --- a/packages/eslint-plugin/docs/rules/promise-function-async.md +++ b/packages/eslint-plugin/docs/rules/promise-function-async.md @@ -1,6 +1,10 @@ -# `promise-function-async` +--- +description: 'Require any function or method that returns a Promise to be marked async.' +--- -Requires any function or method that returns a Promise to be marked async. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/promise-function-async** for documentation. Ensures that each function is only capable of: diff --git a/packages/eslint-plugin/docs/rules/quotes.md b/packages/eslint-plugin/docs/rules/quotes.md index 1e3f6d32363..8cbf3e58b7f 100644 --- a/packages/eslint-plugin/docs/rules/quotes.md +++ b/packages/eslint-plugin/docs/rules/quotes.md @@ -1,6 +1,10 @@ -# `quotes` +--- +description: 'Enforce the consistent use of either backticks, double, or single quotes.' +--- -Enforces the consistent use of either backticks, double, or single quotes. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/quotes** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/require-array-sort-compare.md b/packages/eslint-plugin/docs/rules/require-array-sort-compare.md index 23694f06d6a..7b44dfa38dd 100644 --- a/packages/eslint-plugin/docs/rules/require-array-sort-compare.md +++ b/packages/eslint-plugin/docs/rules/require-array-sort-compare.md @@ -1,9 +1,12 @@ -# `require-array-sort-compare` +--- +description: 'Require `Array#sort` calls to always provide a `compareFunction`.' +--- -Requires `Array#sort` calls to always provide a `compareFunction`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/require-array-sort-compare** for documentation. This rule prevents invoking the `Array#sort()` method without providing a `compare` argument. - When called without a compare function, `Array#sort()` converts all non-undefined array elements into strings and then compares said strings based off their UTF-16 code units. The result is that elements are sorted alphabetically, regardless of their type. diff --git a/packages/eslint-plugin/docs/rules/require-await.md b/packages/eslint-plugin/docs/rules/require-await.md index f4ac8cf5676..58936c41479 100644 --- a/packages/eslint-plugin/docs/rules/require-await.md +++ b/packages/eslint-plugin/docs/rules/require-await.md @@ -1,6 +1,10 @@ -# `require-await` +--- +description: 'Disallow async functions which have no `await` expression.' +--- -Disallows async functions which have no `await` expression. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/require-await** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/restrict-plus-operands.md b/packages/eslint-plugin/docs/rules/restrict-plus-operands.md index a8b4a83f288..32b19602ccb 100644 --- a/packages/eslint-plugin/docs/rules/restrict-plus-operands.md +++ b/packages/eslint-plugin/docs/rules/restrict-plus-operands.md @@ -1,6 +1,10 @@ -# `restrict-plus-operands` +--- +description: 'Require both operands of addition to have type `number` or `string`.' +--- -Requires both operands of addition to have type `number` or `string`. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/restrict-plus-operands** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md index 59c507f167e..88bac9de873 100644 --- a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md +++ b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md @@ -1,6 +1,10 @@ -# `restrict-template-expressions` +--- +description: 'Enforce template literal expressions to be of `string` type.' +--- -Enforces template literal expressions to be of `string` type. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/restrict-template-expressions** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/return-await.md b/packages/eslint-plugin/docs/rules/return-await.md index 20e99158dff..89f8e6276d8 100644 --- a/packages/eslint-plugin/docs/rules/return-await.md +++ b/packages/eslint-plugin/docs/rules/return-await.md @@ -1,6 +1,10 @@ -# `return-await` +--- +description: 'Enforce consistent returning of awaited values.' +--- -Enforces consistent returning of awaited values. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/return-await** for documentation. Returning an awaited promise can make sense for better stack trace information as well as for consistent error handling (returned promises will not be caught in an async function try/catch). diff --git a/packages/eslint-plugin/docs/rules/semi.md b/packages/eslint-plugin/docs/rules/semi.md index 307637c7168..23b9852dc71 100644 --- a/packages/eslint-plugin/docs/rules/semi.md +++ b/packages/eslint-plugin/docs/rules/semi.md @@ -1,6 +1,10 @@ -# `semi` +--- +description: 'Require or disallow semicolons instead of ASI.' +--- -Requires or disallows semicolons instead of ASI. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/semi** for documentation. This rule enforces consistent use of semicolons after statements. diff --git a/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md b/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md index a7444659ee3..2ddfd8a88de 100644 --- a/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md +++ b/packages/eslint-plugin/docs/rules/sort-type-union-intersection-members.md @@ -1,6 +1,10 @@ -# `sort-type-union-intersection-members` +--- +description: 'Enforce members of a type union/intersection to be sorted alphabetically.' +--- -Enforces members of a type union/intersection to be sorted alphabetically. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/sort-type-union-intersection-members** for documentation. Sorting union (`|`) and intersection (`&`) types can help: diff --git a/packages/eslint-plugin/docs/rules/space-before-blocks.md b/packages/eslint-plugin/docs/rules/space-before-blocks.md index 5ff10537795..b6dbb740962 100644 --- a/packages/eslint-plugin/docs/rules/space-before-blocks.md +++ b/packages/eslint-plugin/docs/rules/space-before-blocks.md @@ -1,6 +1,10 @@ -# `space-before-blocks` +--- +description: 'Enforce consistent spacing before blocks.' +--- -Enforces consistent spacing before blocks. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/space-before-blocks** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/space-before-function-paren.md b/packages/eslint-plugin/docs/rules/space-before-function-paren.md index 4664dd4c6a5..962f8f674de 100644 --- a/packages/eslint-plugin/docs/rules/space-before-function-paren.md +++ b/packages/eslint-plugin/docs/rules/space-before-function-paren.md @@ -1,6 +1,10 @@ -# `space-before-function-paren` +--- +description: 'Enforce consistent spacing before function parenthesis.' +--- -Enforces consistent spacing before function parenthesis. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/space-before-function-paren** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/docs/rules/space-infix-ops.md b/packages/eslint-plugin/docs/rules/space-infix-ops.md index afcb5de8e78..4e322bb9837 100644 --- a/packages/eslint-plugin/docs/rules/space-infix-ops.md +++ b/packages/eslint-plugin/docs/rules/space-infix-ops.md @@ -1,6 +1,10 @@ -# `space-infix-ops` +--- +description: 'Require spacing around infix operators.' +--- -Requires spacing around infix operators. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/space-infix-ops** for documentation. This rule extends the base [`eslint/space-infix-ops`](https://eslint.org/docs/rules/space-infix-ops) rule. diff --git a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md index 16ceb26aa8f..a1bead76670 100644 --- a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md +++ b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md @@ -1,6 +1,10 @@ -# `strict-boolean-expressions` +--- +description: 'Disallow certain types in boolean expressions.' +--- -Disallows certain types in boolean expressions. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/strict-boolean-expressions** for documentation. Forbids usage of non-boolean types in expressions where a boolean is expected. `boolean` and `never` types are always allowed. diff --git a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md index 7e6126830d4..5a726f73844 100644 --- a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +++ b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md @@ -1,6 +1,10 @@ -# `switch-exhaustiveness-check` +--- +description: 'Require switch-case statements to be exhaustive with union type.' +--- -Requires switch-case statements to be exhaustive with union type. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/switch-exhaustiveness-check** for documentation. Union type may have a lot of parts. It's easy to forget to consider all cases in switch. This rule reminds which parts are missing. If domain of the problem requires to have only a partial switch, developer may _explicitly_ add a default clause. diff --git a/packages/eslint-plugin/docs/rules/triple-slash-reference.md b/packages/eslint-plugin/docs/rules/triple-slash-reference.md index 97f4fb77dab..df7b0901e6c 100644 --- a/packages/eslint-plugin/docs/rules/triple-slash-reference.md +++ b/packages/eslint-plugin/docs/rules/triple-slash-reference.md @@ -1,6 +1,10 @@ -# `triple-slash-reference` +--- +description: 'Disallow certain triple slash directives in favor of ES6-style import declarations.' +--- -Disallows certain triple slash directives in favor of ES6-style import declarations. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/triple-slash-reference** for documentation. Use of triple-slash reference type directives is discouraged in favor of the newer `import` style. This rule allows you to ban use of `/// `, `/// `, or `/// ` directives. diff --git a/packages/eslint-plugin/docs/rules/type-annotation-spacing.md b/packages/eslint-plugin/docs/rules/type-annotation-spacing.md index 475ad29ca4d..78f16a92713 100644 --- a/packages/eslint-plugin/docs/rules/type-annotation-spacing.md +++ b/packages/eslint-plugin/docs/rules/type-annotation-spacing.md @@ -1,6 +1,10 @@ -# `type-annotation-spacing` +--- +description: 'Require consistent spacing around type annotations.' +--- -Requires consistent spacing around type annotations. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/type-annotation-spacing** for documentation. Spacing around type annotations improves readability of the code. Although the most commonly used style guideline for type annotations in TypeScript prescribes adding a space after the colon, but not before it, it is subjective to the preferences of a project. For example: diff --git a/packages/eslint-plugin/docs/rules/typedef.md b/packages/eslint-plugin/docs/rules/typedef.md index 5356cdd7a2d..74152a49f87 100644 --- a/packages/eslint-plugin/docs/rules/typedef.md +++ b/packages/eslint-plugin/docs/rules/typedef.md @@ -1,6 +1,10 @@ -# `typedef` +--- +description: 'Require type annotations in certain places.' +--- -Requires type annotations in certain places. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/typedef** for documentation. TypeScript cannot always infer types for all places in code. Some locations require type annotations for their types to be inferred. diff --git a/packages/eslint-plugin/docs/rules/unbound-method.md b/packages/eslint-plugin/docs/rules/unbound-method.md index 9f71738f5a9..6a74e898a9b 100644 --- a/packages/eslint-plugin/docs/rules/unbound-method.md +++ b/packages/eslint-plugin/docs/rules/unbound-method.md @@ -1,11 +1,12 @@ -# `unbound-method` +--- +description: 'Enforce unbound methods are called with their expected scope.' +--- -Enforces unbound methods are called with their expected scope. - -Warns when a method is used outside of a method call. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/unbound-method** for documentation. Class functions don't preserve the class scope when passed as standalone variables. - If your function does not access `this`, [you can annotate it with `this: void`](https://www.typescriptlang.org/docs/handbook/2/functions.html#declaring-this-in-a-function), or consider using an arrow function instead. If you're working with `jest`, you can use [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md) to lint your test files, which knows when it's ok to pass an unbound method to `expect` calls. diff --git a/packages/eslint-plugin/docs/rules/unified-signatures.md b/packages/eslint-plugin/docs/rules/unified-signatures.md index 7cb47574a14..cb03bc45b73 100644 --- a/packages/eslint-plugin/docs/rules/unified-signatures.md +++ b/packages/eslint-plugin/docs/rules/unified-signatures.md @@ -1,6 +1,10 @@ -# `unified-signatures` +--- +description: 'Disallow two overloads that could be unified into one with a union or an optional/rest parameter.' +--- -Disallows two overloads that could be unified into one with a union or an optional/rest parameter. +> ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘ +> +> See **https://typescript-eslint.io/rules/unified-signatures** for documentation. ## Rule Details diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index bded3533843..2e378ef4a2f 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "5.30.6", + "version": "5.33.1", "description": "TypeScript plugin for ESLint", "keywords": [ "eslint", @@ -44,9 +44,9 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.6", - "@typescript-eslint/type-utils": "5.30.6", - "@typescript-eslint/utils": "5.30.6", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/type-utils": "5.33.1", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", diff --git a/packages/eslint-plugin/src/configs/README.md b/packages/eslint-plugin/src/configs/README.md deleted file mode 100644 index c440d3d61c5..00000000000 --- a/packages/eslint-plugin/src/configs/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Premade Configs - -This page has moved to [docs/linting/CONFIGS.md](../../../../docs/linting/CONFIGS.md). diff --git a/packages/eslint-plugin/src/rules/consistent-generic-constructors.ts b/packages/eslint-plugin/src/rules/consistent-generic-constructors.ts index 0df1412bd7b..db95efa9a57 100644 --- a/packages/eslint-plugin/src/rules/consistent-generic-constructors.ts +++ b/packages/eslint-plugin/src/rules/consistent-generic-constructors.ts @@ -1,4 +1,4 @@ -import { AST_NODE_TYPES } from '@typescript-eslint/utils'; +import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils'; import { createRule } from '../util'; type MessageIds = 'preferTypeAnnotation' | 'preferConstructor'; @@ -30,9 +30,16 @@ export default createRule({ create(context, [mode]) { const sourceCode = context.getSourceCode(); return { - VariableDeclarator(node): void { - const lhs = node.id.typeAnnotation?.typeAnnotation; - const rhs = node.init; + 'VariableDeclarator,PropertyDefinition'( + node: TSESTree.VariableDeclarator | TSESTree.PropertyDefinition, + ): void { + const lhs = ( + node.type === AST_NODE_TYPES.VariableDeclarator ? node.id : node + ).typeAnnotation?.typeAnnotation; + const rhs = + node.type === AST_NODE_TYPES.VariableDeclarator + ? node.init + : node.value; if ( !rhs || rhs.type !== AST_NODE_TYPES.NewExpression || @@ -57,9 +64,25 @@ export default createRule({ node, messageId: 'preferTypeAnnotation', fix(fixer) { + function getIDToAttachAnnotation(): + | TSESTree.Token + | TSESTree.Node { + if (node.type === AST_NODE_TYPES.VariableDeclarator) { + return node.id; + } + if (!node.computed) { + return node.key; + } + // If the property's computed, we have to attach the + // annotation after the square bracket, not the enclosed expression + return sourceCode.getTokenAfter(node.key)!; + } return [ fixer.remove(typeParameters), - fixer.insertTextAfter(node.id, ': ' + typeAnnotation), + fixer.insertTextAfter( + getIDToAttachAnnotation(), + ': ' + typeAnnotation, + ), ]; }, }); diff --git a/packages/eslint-plugin/src/rules/member-ordering.ts b/packages/eslint-plugin/src/rules/member-ordering.ts index 4ddb4954593..72784463da2 100644 --- a/packages/eslint-plugin/src/rules/member-ordering.ts +++ b/packages/eslint-plugin/src/rules/member-ordering.ts @@ -15,7 +15,8 @@ type MemberKind = | 'get' | 'method' | 'set' - | 'signature'; + | 'signature' + | 'static-initialization'; type DecoratedMemberKind = 'field' | 'method' | 'get' | 'set'; @@ -25,7 +26,10 @@ type MemberScope = 'static' | 'instance' | 'abstract'; type BaseMemberType = | MemberKind - | `${TSESTree.Accessibility}-${Exclude}` + | `${TSESTree.Accessibility}-${Exclude< + MemberKind, + 'signature' | 'static-initialization' + >}` | `${TSESTree.Accessibility}-decorated-${DecoratedMemberKind}` | `decorated-${DecoratedMemberKind}` | `${TSESTree.Accessibility}-${MemberScope}-${NonCallableMemberKind}` @@ -126,6 +130,9 @@ export const defaultOrder: MemberType[] = [ 'field', + // Static initialization + 'static-initialization', + // Constructors 'public-constructor', 'protected-constructor', @@ -231,12 +238,13 @@ const allMemberTypes = Array.from( 'constructor', 'get', 'set', + 'static-initialization', ] as const ).reduce>((all, type) => { all.add(type); (['public', 'protected', 'private'] as const).forEach(accessibility => { - if (type !== 'signature') { + if (type !== 'signature' && type !== 'static-initialization') { all.add(`${accessibility}-${type}`); // e.g. `public-field` } @@ -295,6 +303,8 @@ function getNodeType(node: Member): MemberKind | null { return 'field'; case AST_NODE_TYPES.TSIndexSignature: return 'signature'; + case AST_NODE_TYPES.StaticBlock: + return 'static-initialization'; default: return null; } @@ -352,6 +362,8 @@ function getMemberName( return 'call'; case AST_NODE_TYPES.TSIndexSignature: return util.getNameFromIndexSignature(node); + case AST_NODE_TYPES.StaticBlock: + return 'static block'; default: return null; } @@ -438,7 +450,7 @@ function getRank( memberGroups.push(`decorated-${type}`); } - if (type !== 'signature') { + if (type !== 'signature' && type !== 'static-initialization') { if (type !== 'constructor') { // Constructors have no scope memberGroups.push(`${accessibility}-${scope}-${type}`); diff --git a/packages/eslint-plugin/src/rules/no-duplicate-enum-values.ts b/packages/eslint-plugin/src/rules/no-duplicate-enum-values.ts index dcd0f6be36f..814da92664e 100644 --- a/packages/eslint-plugin/src/rules/no-duplicate-enum-values.ts +++ b/packages/eslint-plugin/src/rules/no-duplicate-enum-values.ts @@ -9,7 +9,7 @@ export default util.createRule({ description: 'Disallow duplicate enum member values', recommended: 'strict', }, - hasSuggestions: true, + hasSuggestions: false, messages: { duplicateValue: 'Duplicate enum member value {{value}}.', }, diff --git a/packages/eslint-plugin/src/rules/no-empty-interface.ts b/packages/eslint-plugin/src/rules/no-empty-interface.ts index e8985919091..a16d9cdb6df 100644 --- a/packages/eslint-plugin/src/rules/no-empty-interface.ts +++ b/packages/eslint-plugin/src/rules/no-empty-interface.ts @@ -15,7 +15,6 @@ export default util.createRule({ docs: { description: 'Disallow the declaration of empty interfaces', recommended: 'error', - suggestion: true, }, fixable: 'code', hasSuggestions: true, diff --git a/packages/eslint-plugin/src/rules/no-explicit-any.ts b/packages/eslint-plugin/src/rules/no-explicit-any.ts index e0e8bfd2b9c..8ab4d033ba8 100644 --- a/packages/eslint-plugin/src/rules/no-explicit-any.ts +++ b/packages/eslint-plugin/src/rules/no-explicit-any.ts @@ -16,7 +16,6 @@ export default util.createRule({ docs: { description: 'Disallow the `any` type', recommended: 'warn', - suggestion: true, }, fixable: 'code', hasSuggestions: true, diff --git a/packages/eslint-plugin/src/rules/no-extra-parens.ts b/packages/eslint-plugin/src/rules/no-extra-parens.ts index 24659aedfe4..71bfc4f10dc 100644 --- a/packages/eslint-plugin/src/rules/no-extra-parens.ts +++ b/packages/eslint-plugin/src/rules/no-extra-parens.ts @@ -122,7 +122,19 @@ export default util.createRule({ } }, // AssignmentExpression - // AwaitExpression + AwaitExpression(node) { + if (util.isTypeAssertion(node.argument)) { + // reduces the precedence of the node so the rule thinks it needs to be wrapped + return rules.AwaitExpression({ + ...node, + argument: { + ...node.argument, + type: AST_NODE_TYPES.SequenceExpression as any, + }, + }); + } + return rules.AwaitExpression(node); + }, BinaryExpression: binaryExp, CallExpression: callExp, // ClassDeclaration @@ -148,7 +160,7 @@ export default util.createRule({ }); } if (util.isTypeAssertion(node.alternate)) { - // reduces the precedence of the node so the rule thinks it needs to be rapped + // reduces the precedence of the node so the rule thinks it needs to be wrapped return rules.ConditionalExpression({ ...node, alternate: { diff --git a/packages/eslint-plugin/src/rules/no-floating-promises.ts b/packages/eslint-plugin/src/rules/no-floating-promises.ts index c59d0f08a6e..168cd3c5523 100644 --- a/packages/eslint-plugin/src/rules/no-floating-promises.ts +++ b/packages/eslint-plugin/src/rules/no-floating-promises.ts @@ -20,7 +20,6 @@ export default util.createRule({ description: 'Require Promise-like statements to be handled appropriately', recommended: 'error', - suggestion: true, requiresTypeChecking: true, }, hasSuggestions: true, diff --git a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts index b48d68fde45..d020e81522f 100644 --- a/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts +++ b/packages/eslint-plugin/src/rules/no-implicit-any-catch.ts @@ -19,7 +19,6 @@ export default util.createRule({ docs: { description: 'Disallow usage of the implicit `any` type in catch clauses', recommended: false, - suggestion: true, }, fixable: 'code', hasSuggestions: true, diff --git a/packages/eslint-plugin/src/rules/no-inferrable-types.ts b/packages/eslint-plugin/src/rules/no-inferrable-types.ts index 9adb4bca9ec..e77b694cc70 100644 --- a/packages/eslint-plugin/src/rules/no-inferrable-types.ts +++ b/packages/eslint-plugin/src/rules/no-inferrable-types.ts @@ -46,6 +46,8 @@ export default util.createRule({ }, ], create(context, [{ ignoreParameters, ignoreProperties }]) { + const sourceCode = context.getSourceCode(); + function isFunctionCall( init: TSESTree.Expression, callName: string, @@ -215,7 +217,16 @@ export default util.createRule({ data: { type, }, - fix: fixer => fixer.remove(typeNode), + *fix(fixer) { + if ( + (node.type === AST_NODE_TYPES.AssignmentPattern && + node.left.optional) || + (node.type === AST_NODE_TYPES.PropertyDefinition && node.definite) + ) { + yield fixer.remove(sourceCode.getTokenBefore(typeNode)!); + } + yield fixer.remove(typeNode); + }, }); } diff --git a/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts index e509b186dc8..093988623b3 100644 --- a/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts +++ b/packages/eslint-plugin/src/rules/no-meaningless-void-operator.ts @@ -20,7 +20,6 @@ export default util.createRule< description: 'Disallow the `void` operator except when used to discard a value', recommended: 'strict', - suggestion: true, requiresTypeChecking: true, }, fixable: 'code', diff --git a/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts b/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts index 9e1b3c94656..dcd1e07c90e 100644 --- a/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts +++ b/packages/eslint-plugin/src/rules/no-non-null-asserted-optional-chain.ts @@ -19,7 +19,6 @@ export default util.createRule({ description: 'Disallow non-null assertions after an optional chain expression', recommended: 'error', - suggestion: true, }, hasSuggestions: true, messages: { diff --git a/packages/eslint-plugin/src/rules/no-non-null-assertion.ts b/packages/eslint-plugin/src/rules/no-non-null-assertion.ts index c92c31e517a..46f03b2e135 100644 --- a/packages/eslint-plugin/src/rules/no-non-null-assertion.ts +++ b/packages/eslint-plugin/src/rules/no-non-null-assertion.ts @@ -11,7 +11,6 @@ export default util.createRule<[], MessageIds>({ description: 'Disallow non-null assertions using the `!` postfix operator', recommended: 'warn', - suggestion: true, }, hasSuggestions: true, messages: { diff --git a/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts b/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts index bb1c9333c9b..e08fb312abb 100644 --- a/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts +++ b/packages/eslint-plugin/src/rules/no-unnecessary-type-constraint.ts @@ -31,7 +31,6 @@ export default util.createRule({ docs: { description: 'Disallow unnecessary constraints on generic types', recommended: 'error', - suggestion: true, }, hasSuggestions: true, messages: { @@ -89,6 +88,9 @@ export default util.createRule({ suggest: [ { messageId: 'removeUnnecessaryConstraint', + data: { + constraint, + }, fix(fixer): TSESLint.RuleFix | null { return fixer.replaceTextRange( [node.name.range[1], node.constraint.range[1]], diff --git a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts index 867b9c94627..826c88da341 100644 --- a/packages/eslint-plugin/src/rules/no-unsafe-argument.ts +++ b/packages/eslint-plugin/src/rules/no-unsafe-argument.ts @@ -142,7 +142,7 @@ export default util.createRule<[], MessageIds>({ unsafeArgument: 'Unsafe argument of type `{{sender}}` assigned to a parameter of type `{{receiver}}`.', unsafeTupleSpread: - 'Unsafe spread of a tuple type. The {{index}} element is of type `{{sender}}` and is assigned to a parameter of type `{{reciever}}`.', + 'Unsafe spread of a tuple type. The argument is of type `{{sender}}` and is assigned to a parameter of type `{{receiver}}`.', unsafeArraySpread: 'Unsafe spread of an `any` array type.', unsafeSpread: 'Unsafe spread of an `any` type.', }, diff --git a/packages/eslint-plugin/src/rules/no-unused-vars.ts b/packages/eslint-plugin/src/rules/no-unused-vars.ts index 00956e9daf9..fb16cf5786e 100644 --- a/packages/eslint-plugin/src/rules/no-unused-vars.ts +++ b/packages/eslint-plugin/src/rules/no-unused-vars.ts @@ -422,10 +422,15 @@ export default util.createRule({ for (const unusedVar of unusedVars) { // Report the first declaration. if (unusedVar.defs.length > 0) { + const writeReferences = unusedVar.references.filter( + ref => + ref.isWrite() && + ref.from.variableScope === unusedVar.scope.variableScope, + ); + context.report({ - node: unusedVar.references.length - ? unusedVar.references[unusedVar.references.length - 1] - .identifier + node: writeReferences.length + ? writeReferences[writeReferences.length - 1].identifier : unusedVar.identifiers[0], messageId: 'unusedVar', data: unusedVar.references.some(ref => ref.isWrite()) diff --git a/packages/eslint-plugin/src/rules/no-use-before-define.ts b/packages/eslint-plugin/src/rules/no-use-before-define.ts index 3a5b51938b7..f9e397283ce 100644 --- a/packages/eslint-plugin/src/rules/no-use-before-define.ts +++ b/packages/eslint-plugin/src/rules/no-use-before-define.ts @@ -15,6 +15,7 @@ function parseOptions(options: string | Config | null): Required { let variables = true; let typedefs = true; let ignoreTypeReferences = true; + let allowNamedExports = false; if (typeof options === 'string') { functions = options !== 'nofunc'; @@ -25,6 +26,7 @@ function parseOptions(options: string | Config | null): Required { variables = options.variables !== false; typedefs = options.typedefs !== false; ignoreTypeReferences = options.ignoreTypeReferences !== false; + allowNamedExports = options.allowNamedExports !== false; } return { @@ -34,6 +36,7 @@ function parseOptions(options: string | Config | null): Required { variables, typedefs, ignoreTypeReferences, + allowNamedExports, }; } @@ -90,6 +93,17 @@ function isOuterVariable( ); } +/** + * Checks whether or not a given reference is a export reference. + */ +function isNamedExports(reference: TSESLint.Scope.Reference): boolean { + const { identifier } = reference; + return ( + identifier.parent?.type === AST_NODE_TYPES.ExportSpecifier && + identifier.parent.local === identifier + ); +} + /** * Recursively checks whether or not a given reference has a type query declaration among it's parents */ @@ -218,6 +232,7 @@ interface Config { variables?: boolean; typedefs?: boolean; ignoreTypeReferences?: boolean; + allowNamedExports?: boolean; } type Options = ['nofunc' | Config]; type MessageIds = 'noUseBeforeDefine'; @@ -249,6 +264,7 @@ export default util.createRule({ variables: { type: 'boolean' }, typedefs: { type: 'boolean' }, ignoreTypeReferences: { type: 'boolean' }, + allowNamedExports: { type: 'boolean' }, }, additionalProperties: false, }, @@ -264,6 +280,7 @@ export default util.createRule({ variables: true, typedefs: true, ignoreTypeReferences: true, + allowNamedExports: false, }, ], create(context, optionsWithDefault) { @@ -300,6 +317,16 @@ export default util.createRule({ return true; } + function isDefinedBeforeUse( + variable: TSESLint.Scope.Variable, + reference: TSESLint.Scope.Reference, + ): boolean { + return ( + variable.identifiers[0].range[1] <= reference.identifier.range[1] && + !isInInitializer(variable, reference) + ); + } + /** * Finds and validates all variables in a given scope. */ @@ -307,18 +334,40 @@ export default util.createRule({ scope.references.forEach(reference => { const variable = reference.resolved; + function report(): void { + context.report({ + node: reference.identifier, + messageId: 'noUseBeforeDefine', + data: { + name: reference.identifier.name, + }, + }); + } + // 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) { + return; + } + + if (!options.allowNamedExports && isNamedExports(reference)) { + if (!variable || !isDefinedBeforeUse(variable, reference)) { + report(); + } + return; + } + + if (!variable) { + return; + } + if ( - reference.init || - !variable || variable.identifiers.length === 0 || - (variable.identifiers[0].range[1] <= reference.identifier.range[1] && - !isInInitializer(variable, reference)) || + isDefinedBeforeUse(variable, reference) || !isForbidden(variable, reference) || isClassRefInClassDecorator(variable, reference) || reference.from.type === TSESLint.Scope.ScopeType.functionType @@ -327,13 +376,7 @@ export default util.createRule({ } // Reports. - context.report({ - node: reference.identifier, - messageId: 'noUseBeforeDefine', - data: { - name: reference.identifier.name, - }, - }); + report(); }); scope.childScopes.forEach(findVariablesInScope); diff --git a/packages/eslint-plugin/src/rules/no-useless-constructor.ts b/packages/eslint-plugin/src/rules/no-useless-constructor.ts index 10e55cfbe0e..3f0b15c9efd 100644 --- a/packages/eslint-plugin/src/rules/no-useless-constructor.ts +++ b/packages/eslint-plugin/src/rules/no-useless-constructor.ts @@ -31,13 +31,15 @@ function checkAccessibility(node: TSESTree.MethodDefinition): boolean { } /** - * Check if method is not unless due to typescript parameter properties + * Check if method is not useless due to typescript parameter properties and decorators */ function checkParams(node: TSESTree.MethodDefinition): boolean { return ( !node.value.params || !node.value.params.some( - param => param.type === AST_NODE_TYPES.TSParameterProperty, + param => + param.type === AST_NODE_TYPES.TSParameterProperty || + param.decorators?.length, ) ); } diff --git a/packages/eslint-plugin/src/rules/no-useless-empty-export.ts b/packages/eslint-plugin/src/rules/no-useless-empty-export.ts index c06c47b8f8e..d3c40518812 100644 --- a/packages/eslint-plugin/src/rules/no-useless-empty-export.ts +++ b/packages/eslint-plugin/src/rules/no-useless-empty-export.ts @@ -28,10 +28,9 @@ export default util.createRule({ description: "Disallow empty exports that don't change anything in a module file", recommended: false, - suggestion: true, }, fixable: 'code', - hasSuggestions: true, + hasSuggestions: false, messages: { uselessExport: 'Empty export does nothing and can be removed.', }, diff --git a/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts index ce160c66e07..6bddf89acf8 100644 --- a/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts +++ b/packages/eslint-plugin/src/rules/non-nullable-type-assertion-style.ts @@ -11,7 +11,6 @@ export default util.createRule({ description: 'Enforce non-null assertions over explicit type casts', recommended: 'strict', requiresTypeChecking: true, - suggestion: true, }, fixable: 'code', messages: { diff --git a/packages/eslint-plugin/src/rules/object-curly-spacing.ts b/packages/eslint-plugin/src/rules/object-curly-spacing.ts index c64ca54ba17..83cb543b7ef 100644 --- a/packages/eslint-plugin/src/rules/object-curly-spacing.ts +++ b/packages/eslint-plugin/src/rules/object-curly-spacing.ts @@ -20,6 +20,7 @@ export type MessageIds = InferMessageIdsTypeFromRule; export default createRule({ name: 'object-curly-spacing', + // eslint-disable-next-line eslint-plugin/prefer-message-ids,eslint-plugin/require-meta-type,eslint-plugin/require-meta-schema,eslint-plugin/require-meta-fixable -- all in base rule - https://github.com/not-an-aardvark/eslint-plugin-eslint-plugin/issues/274 meta: { ...baseRule.meta, docs: { diff --git a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts index e9d62632c82..938ba9524aa 100644 --- a/packages/eslint-plugin/src/rules/padding-line-between-statements.ts +++ b/packages/eslint-plugin/src/rules/padding-line-between-statements.ts @@ -592,7 +592,7 @@ export default util.createRule({ extendsBaseRule: true, }, fixable: 'whitespace', - hasSuggestions: true, + hasSuggestions: false, schema: { definitions: { paddingType: { diff --git a/packages/eslint-plugin/src/rules/prefer-as-const.ts b/packages/eslint-plugin/src/rules/prefer-as-const.ts index ca6b9921656..352ec3b4542 100644 --- a/packages/eslint-plugin/src/rules/prefer-as-const.ts +++ b/packages/eslint-plugin/src/rules/prefer-as-const.ts @@ -8,7 +8,6 @@ export default util.createRule({ docs: { description: 'Enforce the use of `as const` over literal type', recommended: 'error', - suggestion: true, }, fixable: 'code', hasSuggestions: true, @@ -65,6 +64,11 @@ export default util.createRule({ TSTypeAssertion(node): void { compareTypes(node.expression, node.typeAnnotation, true); }, + PropertyDefinition(node): void { + if (node.value && node.typeAnnotation) { + compareTypes(node.value, node.typeAnnotation.typeAnnotation, false); + } + }, VariableDeclarator(node): void { if (node.init && node.id.typeAnnotation) { compareTypes(node.init, node.id.typeAnnotation.typeAnnotation, false); diff --git a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts index bad327a5be2..d282d758abe 100644 --- a/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts +++ b/packages/eslint-plugin/src/rules/prefer-enum-initializers.ts @@ -11,7 +11,6 @@ export default util.createRule<[], MessageIds>({ description: 'Require each enum member value to be explicitly initialized', recommended: false, - suggestion: true, }, hasSuggestions: true, messages: { diff --git a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts index c1676d3fd32..7008dbfbc12 100644 --- a/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts +++ b/packages/eslint-plugin/src/rules/prefer-nullish-coalescing.ts @@ -5,14 +5,20 @@ import { TSESTree, } from '@typescript-eslint/utils'; import * as util from '../util'; +import * as ts from 'typescript'; export type Options = [ { ignoreConditionalTests?: boolean; + ignoreTernaryTests?: boolean; ignoreMixedLogicalExpressions?: boolean; }, ]; -export type MessageIds = 'preferNullish' | 'suggestNullish'; + +export type MessageIds = + | 'preferNullishOverOr' + | 'preferNullishOverTernary' + | 'suggestNullish'; export default util.createRule({ name: 'prefer-nullish-coalescing', @@ -22,13 +28,14 @@ export default util.createRule({ description: 'Enforce using the nullish coalescing operator instead of logical chaining', recommended: 'strict', - suggestion: true, requiresTypeChecking: true, }, hasSuggestions: true, messages: { - preferNullish: + preferNullishOverOr: 'Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.', + preferNullishOverTernary: + 'Prefer using nullish coalescing operator (`??`) instead of a ternary expression, as it is simpler to read.', suggestNullish: 'Fix to nullish coalescing operator (`??`).', }, schema: [ @@ -38,6 +45,9 @@ export default util.createRule({ ignoreConditionalTests: { type: 'boolean', }, + ignoreTernaryTests: { + type: 'boolean', + }, ignoreMixedLogicalExpressions: { type: 'boolean', }, @@ -52,15 +62,182 @@ export default util.createRule({ defaultOptions: [ { ignoreConditionalTests: true, + ignoreTernaryTests: true, ignoreMixedLogicalExpressions: true, }, ], - create(context, [{ ignoreConditionalTests, ignoreMixedLogicalExpressions }]) { + create( + context, + [ + { + ignoreConditionalTests, + ignoreTernaryTests, + ignoreMixedLogicalExpressions, + }, + ], + ) { const parserServices = util.getParserServices(context); const sourceCode = context.getSourceCode(); const checker = parserServices.program.getTypeChecker(); return { + ConditionalExpression(node: TSESTree.ConditionalExpression): void { + if (ignoreTernaryTests) { + return; + } + + let operator: '==' | '!=' | '===' | '!==' | undefined; + let nodesInsideTestExpression: TSESTree.Node[] = []; + if (node.test.type === AST_NODE_TYPES.BinaryExpression) { + nodesInsideTestExpression = [node.test.left, node.test.right]; + if ( + node.test.operator === '==' || + node.test.operator === '!=' || + node.test.operator === '===' || + node.test.operator === '!==' + ) { + operator = node.test.operator; + } + } else if ( + node.test.type === AST_NODE_TYPES.LogicalExpression && + node.test.left.type === AST_NODE_TYPES.BinaryExpression && + node.test.right.type === AST_NODE_TYPES.BinaryExpression + ) { + nodesInsideTestExpression = [ + node.test.left.left, + node.test.left.right, + node.test.right.left, + node.test.right.right, + ]; + if (node.test.operator === '||') { + if ( + node.test.left.operator === '===' && + node.test.right.operator === '===' + ) { + operator = '==='; + } else if ( + ((node.test.left.operator === '===' || + node.test.right.operator === '===') && + (node.test.left.operator === '==' || + node.test.right.operator === '==')) || + (node.test.left.operator === '==' && + node.test.right.operator === '==') + ) { + operator = '=='; + } + } else if (node.test.operator === '&&') { + if ( + node.test.left.operator === '!==' && + node.test.right.operator === '!==' + ) { + operator = '!=='; + } else if ( + ((node.test.left.operator === '!==' || + node.test.right.operator === '!==') && + (node.test.left.operator === '!=' || + node.test.right.operator === '!=')) || + (node.test.left.operator === '!=' && + node.test.right.operator === '!=') + ) { + operator = '!='; + } + } + } + + if (!operator) { + return; + } + + let identifier: TSESTree.Node | undefined; + let hasUndefinedCheck = false; + let hasNullCheck = false; + + // we check that the test only contains null, undefined and the identifier + for (const testNode of nodesInsideTestExpression) { + if (util.isNullLiteral(testNode)) { + hasNullCheck = true; + } else if (util.isUndefinedIdentifier(testNode)) { + hasUndefinedCheck = true; + } else if ( + (operator === '!==' || operator === '!=') && + util.isNodeEqual(testNode, node.consequent) + ) { + identifier = testNode; + } else if ( + (operator === '===' || operator === '==') && + util.isNodeEqual(testNode, node.alternate) + ) { + identifier = testNode; + } else { + return; + } + } + + if (!identifier) { + return; + } + + const isFixable = ((): boolean => { + // it is fixable if we check for both null and undefined, or not if neither + if (hasUndefinedCheck === hasNullCheck) { + return hasUndefinedCheck; + } + + // it is fixable if we loosely check for either null or undefined + if (operator === '==' || operator === '!=') { + return true; + } + + const tsNode = parserServices.esTreeNodeToTSNodeMap.get(identifier); + const type = checker.getTypeAtLocation(tsNode); + const flags = util.getTypeFlags(type); + + if (flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) { + return false; + } + + const hasNullType = (flags & ts.TypeFlags.Null) !== 0; + + // it is fixable if we check for undefined and the type is not nullable + if (hasUndefinedCheck && !hasNullType) { + return true; + } + + const hasUndefinedType = (flags & ts.TypeFlags.Undefined) !== 0; + + // it is fixable if we check for null and the type can't be undefined + return hasNullCheck && !hasUndefinedType; + })(); + + if (isFixable) { + context.report({ + node, + messageId: 'preferNullishOverTernary', + suggest: [ + { + messageId: 'suggestNullish', + fix(fixer: TSESLint.RuleFixer): TSESLint.RuleFix { + const [left, right] = + operator === '===' || operator === '==' + ? [node.alternate, node.consequent] + : [node.consequent, node.alternate]; + return fixer.replaceText( + node, + `${sourceCode.text.slice( + left.range[0], + left.range[1], + )} ?? ${sourceCode.text.slice( + right.range[0], + right.range[1], + )}`, + ); + }, + }, + ], + }); + } + }, + 'LogicalExpression[operator = "||"]'( node: TSESTree.LogicalExpression, ): void { @@ -110,7 +287,7 @@ export default util.createRule({ context.report({ node: barBarOperator, - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', suggest: [ { messageId: 'suggestNullish', diff --git a/packages/eslint-plugin/src/rules/prefer-optional-chain.ts b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts index 04cd7e64993..654624faaf7 100644 --- a/packages/eslint-plugin/src/rules/prefer-optional-chain.ts +++ b/packages/eslint-plugin/src/rules/prefer-optional-chain.ts @@ -36,7 +36,6 @@ export default util.createRule({ description: 'Enforce using concise optional chain expressions instead of chained logical ands', recommended: 'strict', - suggestion: true, }, hasSuggestions: true, messages: { @@ -437,24 +436,10 @@ function isValidChainTarget( - foo !== undefined - foo != undefined */ - if ( + return ( node.type === AST_NODE_TYPES.BinaryExpression && ['!==', '!='].includes(node.operator) && - isValidChainTarget(node.left, allowIdentifier) - ) { - if ( - node.right.type === AST_NODE_TYPES.Identifier && - node.right.name === 'undefined' - ) { - return true; - } - if ( - node.right.type === AST_NODE_TYPES.Literal && - node.right.value === null - ) { - return true; - } - } - - return false; + isValidChainTarget(node.left, allowIdentifier) && + (util.isUndefinedIdentifier(node.right) || util.isNullLiteral(node.right)) + ); } diff --git a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts index bb11c245722..4847e8efbb0 100644 --- a/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts +++ b/packages/eslint-plugin/src/rules/switch-exhaustiveness-check.ts @@ -18,7 +18,6 @@ export default createRule({ description: 'Require switch-case statements to be exhaustive with union type', recommended: false, - suggestion: true, requiresTypeChecking: true, }, hasSuggestions: true, diff --git a/packages/eslint-plugin/src/rules/typedef.ts b/packages/eslint-plugin/src/rules/typedef.ts index a995fe41b37..4f5fe6eae65 100644 --- a/packages/eslint-plugin/src/rules/typedef.ts +++ b/packages/eslint-plugin/src/rules/typedef.ts @@ -150,13 +150,14 @@ export default util.createRule<[Options], MessageIds>({ } function isAncestorHasTypeAnnotation( - node: TSESTree.ObjectPattern, + node: TSESTree.ObjectPattern | TSESTree.ArrayPattern, ): boolean { let ancestor = node.parent; while (ancestor) { if ( - ancestor.type === AST_NODE_TYPES.ObjectPattern && + (ancestor.type === AST_NODE_TYPES.ObjectPattern || + ancestor.type === AST_NODE_TYPES.ArrayPattern) && ancestor.typeAnnotation ) { return true; @@ -181,6 +182,7 @@ export default util.createRule<[Options], MessageIds>({ if ( !node.typeAnnotation && !isForOfStatementContext(node) && + !isAncestorHasTypeAnnotation(node) && node.parent?.type !== AST_NODE_TYPES.AssignmentExpression ) { report(node); diff --git a/packages/eslint-plugin/src/util/index.ts b/packages/eslint-plugin/src/util/index.ts index b2932466388..98ef1cf8707 100644 --- a/packages/eslint-plugin/src/util/index.ts +++ b/packages/eslint-plugin/src/util/index.ts @@ -9,6 +9,9 @@ export * from './getThisExpression'; export * from './getWrappingFixer'; export * from './misc'; export * from './objectIterators'; +export * from './isNullLiteral'; +export * from './isUndefinedIdentifier'; +export * from './isNodeEqual'; // this is done for convenience - saves migrating all of the old rules export * from '@typescript-eslint/type-utils'; diff --git a/packages/eslint-plugin/src/util/isNodeEqual.ts b/packages/eslint-plugin/src/util/isNodeEqual.ts new file mode 100644 index 00000000000..ef879163ee4 --- /dev/null +++ b/packages/eslint-plugin/src/util/isNodeEqual.ts @@ -0,0 +1,31 @@ +import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils'; + +export function isNodeEqual(a: TSESTree.Node, b: TSESTree.Node): boolean { + if (a.type !== b.type) { + return false; + } + if ( + a.type === AST_NODE_TYPES.ThisExpression && + b.type === AST_NODE_TYPES.ThisExpression + ) { + return true; + } + if (a.type === AST_NODE_TYPES.Literal && b.type === AST_NODE_TYPES.Literal) { + return a.value === b.value; + } + if ( + a.type === AST_NODE_TYPES.Identifier && + b.type === AST_NODE_TYPES.Identifier + ) { + return a.name === b.name; + } + if ( + a.type === AST_NODE_TYPES.MemberExpression && + b.type === AST_NODE_TYPES.MemberExpression + ) { + return ( + isNodeEqual(a.property, b.property) && isNodeEqual(a.object, b.object) + ); + } + return false; +} diff --git a/packages/eslint-plugin/src/util/isNullLiteral.ts b/packages/eslint-plugin/src/util/isNullLiteral.ts new file mode 100644 index 00000000000..e700e415f63 --- /dev/null +++ b/packages/eslint-plugin/src/util/isNullLiteral.ts @@ -0,0 +1,5 @@ +import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils'; + +export function isNullLiteral(i: TSESTree.Node): boolean { + return i.type === AST_NODE_TYPES.Literal && i.value === null; +} diff --git a/packages/eslint-plugin/src/util/isUndefinedIdentifier.ts b/packages/eslint-plugin/src/util/isUndefinedIdentifier.ts new file mode 100644 index 00000000000..91cae07aa81 --- /dev/null +++ b/packages/eslint-plugin/src/util/isUndefinedIdentifier.ts @@ -0,0 +1,5 @@ +import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils'; + +export function isUndefinedIdentifier(i: TSESTree.Node): boolean { + return i.type === AST_NODE_TYPES.Identifier && i.name === 'undefined'; +} diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index 13262e4ce73..7fc703255d8 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -41,12 +41,12 @@ function tokenIs( return token.type === type; } -function tokenIsH1(token: marked.Token): token is marked.Tokens.Heading { - return tokenIs(token, 'heading') && token.depth === 1; -} - function tokenIsH2(token: marked.Token): token is marked.Tokens.Heading { - return tokenIs(token, 'heading') && token.depth === 2; + return ( + tokenIs(token, 'heading') && + token.depth === 2 && + !/[a-z]+: /.test(token.text) + ); } describe('Validating rule docs', () => { @@ -68,35 +68,39 @@ describe('Validating rule docs', () => { }); for (const [ruleName, rule] of rulesData) { - describe(ruleName, () => { - const filePath = path.join(docsRoot, `${ruleName}.md`); - - it(`First header in ${ruleName}.md must be the name of the rule`, () => { - const tokens = parseMarkdownFile(filePath); - - const header = tokens.find(tokenIsH1)!; - - expect(header.text).toBe(`\`${ruleName}\``); - }); + const { description } = rule.meta.docs!; - it(`Description of ${ruleName}.md must match`, () => { - // validate if description of rule is same as in docs - const tokens = parseMarkdownFile(filePath); + describe(`${ruleName}.md`, () => { + const filePath = path.join(docsRoot, `${ruleName}.md`); + const tokens = parseMarkdownFile(filePath); - // Rule title not found. - // Rule title does not match the rule metadata. + test(`${ruleName}.md must start with frontmatter description`, () => { + expect(tokens[0]).toMatchObject({ + raw: '---\n', + type: 'hr', + }); expect(tokens[1]).toMatchObject({ - type: 'paragraph', - text: `${rule.meta.docs?.description.replace( - /(? { - const tokens = parseMarkdownFile(filePath); + test(`${ruleName}.md must next have a blockquote directing to website`, () => { + expect(tokens[2]).toMatchObject({ + text: [ + `๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘`, + ``, + `See **https://typescript-eslint.io/rules/${ruleName}** for documentation.`, + ``, + ].join('\n'), + type: 'blockquote', + }); + }); + test(`headers must be title-cased`, () => { // Get all H2 headers objects as the other levels are variable by design. const headers = tokens.filter(tokenIsH2); @@ -105,7 +109,7 @@ describe('Validating rule docs', () => { ); }); - it(`Options in ${ruleName}.md must match the rule meta`, () => { + test(`options must match the rule meta`, () => { // TODO(#4365): We don't yet enforce formatting for all rules. if ( !isEmptySchema(rule.meta.schema) || @@ -115,8 +119,6 @@ describe('Validating rule docs', () => { return; } - const tokens = parseMarkdownFile(filePath); - const optionsIndex = tokens.findIndex( token => tokenIsH2(token) && token.text === 'Options', ); diff --git a/packages/eslint-plugin/tests/rules/ban-types.test.ts b/packages/eslint-plugin/tests/rules/ban-types.test.ts index a200336e0aa..0b05bfa23f0 100644 --- a/packages/eslint-plugin/tests/rules/ban-types.test.ts +++ b/packages/eslint-plugin/tests/rules/ban-types.test.ts @@ -469,7 +469,7 @@ let baz: object = {}; }, { code: noFormat`let a: Foo< F >;`, - output: noFormat`let a: Foo< T >;`, + output: `let a: Foo< T >;`, errors: [ { messageId: 'bannedTypeMessage', diff --git a/packages/eslint-plugin/tests/rules/class-literal-property-style.test.ts b/packages/eslint-plugin/tests/rules/class-literal-property-style.test.ts index 19d5fb183b5..af0aa203df7 100644 --- a/packages/eslint-plugin/tests/rules/class-literal-property-style.test.ts +++ b/packages/eslint-plugin/tests/rules/class-literal-property-style.test.ts @@ -1,5 +1,5 @@ import rule from '../../src/rules/class-literal-property-style'; -import { RuleTester, noFormat } from '../RuleTester'; +import { RuleTester } from '../RuleTester'; const ruleTester = new RuleTester({ parser: '@typescript-eslint/parser', @@ -311,7 +311,7 @@ class Mx { public readonly [myValue] = 'a literal value'; } `, - output: noFormat` + output: ` class Mx { public get [myValue]() { return 'a literal value'; } } @@ -331,7 +331,7 @@ class Mx { readonly p1 = 'hello world'; } `, - output: noFormat` + output: ` class Mx { get p1() { return 'hello world'; } } @@ -351,7 +351,7 @@ class Mx { readonly p1 = \`hello world\`; } `, - output: noFormat` + output: ` class Mx { get p1() { return \`hello world\`; } } @@ -371,7 +371,7 @@ class Mx { static readonly p1 = 'hello world'; } `, - output: noFormat` + output: ` class Mx { static get p1() { return 'hello world'; } } @@ -413,7 +413,7 @@ class Mx { protected readonly p1 = 'hello world'; } `, - output: noFormat` + output: ` class Mx { protected get p1() { return 'hello world'; } } @@ -454,7 +454,7 @@ class Mx { public static readonly p1 = 'hello world'; } `, - output: noFormat` + output: ` class Mx { public static get p1() { return 'hello world'; } } @@ -483,7 +483,7 @@ class Mx { } } `, - output: noFormat` + output: ` class Mx { public readonly myValue = gql\` { @@ -516,7 +516,7 @@ class Mx { \`; } `, - output: noFormat` + output: ` class Mx { public get myValue() { return gql\` { diff --git a/packages/eslint-plugin/tests/rules/consistent-generic-constructors.test.ts b/packages/eslint-plugin/tests/rules/consistent-generic-constructors.test.ts index 0fe3bcae7fb..67f9628dff6 100644 --- a/packages/eslint-plugin/tests/rules/consistent-generic-constructors.test.ts +++ b/packages/eslint-plugin/tests/rules/consistent-generic-constructors.test.ts @@ -19,6 +19,11 @@ ruleTester.run('consistent-generic-constructors', rule, { 'const a: Foo = Foo();', 'const a: Foo = Foo();', 'const a: Foo = Foo();', + ` +class Foo { + a = new Foo(); +} + `, // type-annotation { code: 'const a = new Foo();', @@ -60,6 +65,14 @@ ruleTester.run('consistent-generic-constructors', rule, { code: 'const a = new (class C {})();', options: ['type-annotation'], }, + { + code: ` +class Foo { + a: Foo = new Foo(); +} + `, + options: ['type-annotation'], + }, ], invalid: [ { @@ -87,7 +100,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferConstructor', }, ], - output: noFormat`const a = new Map();`, + output: `const a = new Map();`, }, { code: noFormat`const a: Map< string, number > = new Map();`, @@ -96,7 +109,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferConstructor', }, ], - output: noFormat`const a = new Map< string, number >();`, + output: `const a = new Map< string, number >();`, }, { code: noFormat`const a: Map = new Map ();`, @@ -105,7 +118,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferConstructor', }, ], - output: noFormat`const a = new Map ();`, + output: `const a = new Map ();`, }, { code: noFormat`const a: Foo = new Foo;`, @@ -114,7 +127,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferConstructor', }, ], - output: noFormat`const a = new Foo();`, + output: `const a = new Foo();`, }, { code: 'const a: /* comment */ Foo/* another */ = new Foo();', @@ -123,7 +136,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferConstructor', }, ], - output: noFormat`const a = new Foo/* comment *//* another */();`, + output: `const a = new Foo/* comment *//* another */();`, }, { code: 'const a: Foo/* comment */ = new Foo /* another */();', @@ -132,7 +145,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferConstructor', }, ], - output: noFormat`const a = new Foo/* comment */ /* another */();`, + output: `const a = new Foo/* comment */ /* another */();`, }, { code: noFormat`const a: Foo = new \n Foo \n ();`, @@ -141,7 +154,41 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferConstructor', }, ], - output: noFormat`const a = new \n Foo \n ();`, + output: `const a = new \n Foo \n ();`, + }, + { + code: ` +class Foo { + a: Foo = new Foo(); +} + `, + errors: [ + { + messageId: 'preferConstructor', + }, + ], + output: ` +class Foo { + a = new Foo(); +} + `, + }, + { + code: ` +class Foo { + [a]: Foo = new Foo(); +} + `, + errors: [ + { + messageId: 'preferConstructor', + }, + ], + output: ` +class Foo { + [a] = new Foo(); +} + `, }, { code: 'const a = new Foo();', @@ -171,7 +218,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferTypeAnnotation', }, ], - output: noFormat`const a: Map = new Map ();`, + output: `const a: Map = new Map ();`, }, { code: noFormat`const a = new Map< string, number >();`, @@ -181,7 +228,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferTypeAnnotation', }, ], - output: noFormat`const a: Map< string, number > = new Map();`, + output: `const a: Map< string, number > = new Map();`, }, { code: noFormat`const a = new \n Foo \n ();`, @@ -191,7 +238,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferTypeAnnotation', }, ], - output: noFormat`const a: Foo = new \n Foo \n ();`, + output: `const a: Foo = new \n Foo \n ();`, }, { code: 'const a = new Foo/* comment */ /* another */();', @@ -201,7 +248,7 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferTypeAnnotation', }, ], - output: noFormat`const a: Foo = new Foo/* comment */ /* another */();`, + output: `const a: Foo = new Foo/* comment */ /* another */();`, }, { code: 'const a = new Foo();', @@ -211,7 +258,61 @@ ruleTester.run('consistent-generic-constructors', rule, { messageId: 'preferTypeAnnotation', }, ], - output: noFormat`const a: Foo = new Foo();`, + output: `const a: Foo = new Foo();`, + }, + { + code: ` +class Foo { + a = new Foo(); +} + `, + options: ['type-annotation'], + errors: [ + { + messageId: 'preferTypeAnnotation', + }, + ], + output: ` +class Foo { + a: Foo = new Foo(); +} + `, + }, + { + code: ` +class Foo { + [a] = new Foo(); +} + `, + options: ['type-annotation'], + errors: [ + { + messageId: 'preferTypeAnnotation', + }, + ], + output: ` +class Foo { + [a]: Foo = new Foo(); +} + `, + }, + { + code: ` +class Foo { + [a + b] = new Foo(); +} + `, + options: ['type-annotation'], + errors: [ + { + messageId: 'preferTypeAnnotation', + }, + ], + output: ` +class Foo { + [a + b]: Foo = new Foo(); +} + `, }, ], }); diff --git a/packages/eslint-plugin/tests/rules/consistent-indexed-object-style.test.ts b/packages/eslint-plugin/tests/rules/consistent-indexed-object-style.test.ts index b02fd3dfa2d..5c59f92b92d 100644 --- a/packages/eslint-plugin/tests/rules/consistent-indexed-object-style.test.ts +++ b/packages/eslint-plugin/tests/rules/consistent-indexed-object-style.test.ts @@ -194,11 +194,7 @@ interface B extends A { [index: number]: unknown; } `, - output: ` -interface B extends A { - [index: number]: unknown; -} - `, + output: null, errors: [{ messageId: 'preferRecord', line: 2, column: 1 }], }, // Readonly interface with generic parameter diff --git a/packages/eslint-plugin/tests/rules/consistent-type-definitions.test.ts b/packages/eslint-plugin/tests/rules/consistent-type-definitions.test.ts index 9bcd9574986..356162dcb6f 100644 --- a/packages/eslint-plugin/tests/rules/consistent-type-definitions.test.ts +++ b/packages/eslint-plugin/tests/rules/consistent-type-definitions.test.ts @@ -63,7 +63,7 @@ export type W = { invalid: [ { code: noFormat`type T = { x: number; };`, - output: noFormat`interface T { x: number; }`, + output: `interface T { x: number; }`, options: ['interface'], errors: [ { @@ -75,7 +75,7 @@ export type W = { }, { code: noFormat`type T={ x: number; };`, - output: noFormat`interface T { x: number; }`, + output: `interface T { x: number; }`, options: ['interface'], errors: [ { @@ -87,7 +87,7 @@ export type W = { }, { code: noFormat`type T= { x: number; };`, - output: noFormat`interface T { x: number; }`, + output: `interface T { x: number; }`, options: ['interface'], errors: [ { @@ -119,7 +119,7 @@ export interface W { }, { code: noFormat`interface T { x: number; }`, - output: noFormat`type T = { x: number; }`, + output: `type T = { x: number; }`, options: ['type'], errors: [ { @@ -131,7 +131,7 @@ export interface W { }, { code: noFormat`interface T{ x: number; }`, - output: noFormat`type T = { x: number; }`, + output: `type T = { x: number; }`, options: ['type'], errors: [ { @@ -143,7 +143,7 @@ export interface W { }, { code: noFormat`interface T { x: number; }`, - output: noFormat`type T = { x: number; }`, + output: `type T = { x: number; }`, options: ['type'], errors: [ { @@ -155,7 +155,7 @@ export interface W { }, { code: noFormat`interface A extends B, C { x: number; };`, - output: noFormat`type A = { x: number; } & B & C;`, + output: `type A = { x: number; } & B & C;`, options: ['type'], errors: [ { @@ -167,7 +167,7 @@ export interface W { }, { code: noFormat`interface A extends B, C { x: number; };`, - output: noFormat`type A = { x: number; } & B & C;`, + output: `type A = { x: number; } & B & C;`, options: ['type'], errors: [ { @@ -183,7 +183,7 @@ export interface W { x: T; } `, - output: noFormat` + output: ` export type W = { x: T; } @@ -205,7 +205,7 @@ namespace JSX { } } `, - output: noFormat` + output: ` namespace JSX { type Array = { foo(x: (x: number) => T): T[]; @@ -229,7 +229,7 @@ global { } } `, - output: noFormat` + output: ` global { type Array = { foo(x: (x: number) => T): T[]; @@ -289,7 +289,7 @@ export default interface Test { foo(): number; } `, - output: noFormat` + output: ` type Test = { bar(): string; foo(): number; @@ -336,7 +336,7 @@ export declare interface Test { bar: string; } `, - output: noFormat` + output: ` export declare type Test = { foo: string; bar: string; diff --git a/packages/eslint-plugin/tests/rules/consistent-type-exports.test.ts b/packages/eslint-plugin/tests/rules/consistent-type-exports.test.ts index da5068753ca..b698406f9a4 100644 --- a/packages/eslint-plugin/tests/rules/consistent-type-exports.test.ts +++ b/packages/eslint-plugin/tests/rules/consistent-type-exports.test.ts @@ -106,7 +106,7 @@ export { CatchScope, } from '@typescript-eslint/scope-manager'; `, - output: noFormat` + output: ` export type { AnalyzeOptions, Definition } from '@typescript-eslint/scope-manager'; export { BlockScope, CatchScope } from '@typescript-eslint/scope-manager'; `, @@ -157,7 +157,7 @@ export { CatchScope as CScope, } from '@typescript-eslint/scope-manager'; `, - output: noFormat` + output: ` export type { Definition as Foo } from '@typescript-eslint/scope-manager'; export { BlockScope as BScope, CatchScope as CScope } from '@typescript-eslint/scope-manager'; `, @@ -279,7 +279,7 @@ export type { T, T }; type T = 1; export { type/* */T, type /* */T, T }; `, - output: noFormat` + output: ` type T = 1; export type { /* */T, /* */T, T }; `, @@ -358,7 +358,7 @@ export { CatchScope as CScope, } from '@typescript-eslint/scope-manager'; `, - output: noFormat` + output: ` export type { AnalyzeOptions, Definition as Foo, BlockScope as BScope } from '@typescript-eslint/scope-manager'; export { CatchScope as CScope } from '@typescript-eslint/scope-manager'; `, @@ -380,7 +380,7 @@ export { CatchScope as CScope, } from '@typescript-eslint/scope-manager'; `, - output: noFormat` + output: ` export { type AnalyzeOptions, type Definition as Foo, diff --git a/packages/eslint-plugin/tests/rules/consistent-type-imports.test.ts b/packages/eslint-plugin/tests/rules/consistent-type-imports.test.ts index ec78a1afd50..54138ef3e1a 100644 --- a/packages/eslint-plugin/tests/rules/consistent-type-imports.test.ts +++ b/packages/eslint-plugin/tests/rules/consistent-type-imports.test.ts @@ -661,7 +661,7 @@ let bar: B; import { A, B } from 'foo'; const foo: A = B(); `, - output: noFormat` + output: ` import type { A} from 'foo'; import { B } from 'foo'; const foo: A = B(); @@ -769,7 +769,7 @@ type T = A; import type { Already2 } from 'bar'; type T = { b: B; c: C; d: D }; `, - output: noFormat` + output: ` import type Already1Def from 'foo'; import type { Already1 , B } from 'foo'; import A from 'foo'; @@ -817,7 +817,7 @@ import { A, B, C } from 'foo'; import { D, E, F, } from 'bar'; type T = A | D; `, - output: noFormat` + output: ` import type { A} from 'foo'; import { B, C } from 'foo'; import type { D} from 'bar'; @@ -845,7 +845,7 @@ import { A, B, C } from 'foo'; import { D, E, F, } from 'bar'; type T = B | E; `, - output: noFormat` + output: ` import type { B} from 'foo'; import { A, C } from 'foo'; import type { E} from 'bar'; @@ -873,7 +873,7 @@ import { A, B, C } from 'foo'; import { D, E, F, } from 'bar'; type T = C | F; `, - output: noFormat` + output: ` import type { C } from 'foo'; import { A, B } from 'foo'; import type { F} from 'bar'; @@ -944,7 +944,7 @@ import Value3, { Type3 } from 'default_import2'; import Type4, { Type5, Value4 } from 'default_and_named_import'; type T = Type1 | Type2 | Type3 | Type4 | Type5; `, - output: noFormat` + output: ` import type { Type1 } from 'named_import'; import { Value1 } from 'named_import'; import type Type2 from 'default_import'; @@ -1324,7 +1324,7 @@ import type /*comment*/ { Type } from 'foo'; type T = { a: AllType; b: DefType; c: Type }; `, options: [{ prefer: 'no-type-imports' }], - output: noFormat` + output: ` import /*comment*/ * as AllType from 'foo'; import // comment DefType from 'foo'; @@ -1437,7 +1437,7 @@ import Default /*comment1*/, /*comment2*/ { Data } from 'module'; const a: Default = ''; `, options: [{ prefer: 'type-imports' }], - output: noFormat` + output: ` import type Default /*comment1*/ from 'module'; import /*comment2*/ { Data } from 'module'; const a: Default = ''; @@ -1481,7 +1481,7 @@ const a: Default = ''; constructor(foo: Foo) {} } `, - output: noFormat` + output: ` import Foo from 'foo'; @deco class A { @@ -1506,7 +1506,7 @@ const a: Default = ''; constructor(foo: Foo) {} } `, - output: noFormat` + output: ` import { Foo } from 'foo'; @deco class A { @@ -1533,7 +1533,7 @@ const a: Default = ''; } type T = Bar; `, - output: noFormat` + output: ` import type { Type , Bar } from 'foo'; import { Foo } from 'foo'; @deco @@ -1562,7 +1562,7 @@ const a: Default = ''; foo(@deco bar: Bar) {} } `, - output: noFormat` + output: ` import { V , Foo, Bar} from 'foo'; import type { T } from 'foo'; @deco @@ -1590,7 +1590,7 @@ const a: Default = ''; constructor(foo: Foo) {} } `, - output: noFormat` + output: ` import type { T } from 'foo'; import { V , Foo} from 'foo'; @deco @@ -1616,7 +1616,7 @@ const a: Default = ''; constructor(foo: Type.Foo) {} } `, - output: noFormat` + output: ` import * as Type from 'foo'; @deco class A { @@ -1641,7 +1641,7 @@ const a: Default = ''; constructor(foo: Foo) {} } `, - output: noFormat` + output: ` import Foo from 'foo'; @deco class A { @@ -1666,7 +1666,7 @@ const a: Default = ''; constructor(foo: Foo) {} } `, - output: noFormat` + output: ` import { Foo } from 'foo'; @deco class A { @@ -1693,7 +1693,7 @@ const a: Default = ''; } type T = Bar; `, - output: noFormat` + output: ` import type { Type , Bar } from 'foo'; import { Foo } from 'foo'; @deco @@ -1722,7 +1722,7 @@ const a: Default = ''; foo(@deco bar: Bar) {} } `, - output: noFormat` + output: ` import { V , Foo, Bar} from 'foo'; import type { T } from 'foo'; @deco @@ -1750,7 +1750,7 @@ const a: Default = ''; constructor(foo: Foo) {} } `, - output: noFormat` + output: ` import type { T } from 'foo'; import { V , Foo} from 'foo'; @deco @@ -1776,7 +1776,7 @@ const a: Default = ''; constructor(foo: Type.Foo) {} } `, - output: noFormat` + output: ` import * as Type from 'foo'; @deco class A { @@ -1818,7 +1818,7 @@ import { A, B, type C } from 'foo'; type T = A | C; const b = B; `, - output: noFormat` + output: ` import type { A} from 'foo'; import { B, type C } from 'foo'; type T = A | C; diff --git a/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts b/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts index 2c3a5a86eb7..cf387053c29 100644 --- a/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts +++ b/packages/eslint-plugin/tests/rules/explicit-member-accessibility.test.ts @@ -368,11 +368,7 @@ export class XXXX { line: 3, }, ], - output: ` -export class XXXX { - public constructor(readonly value: string) {} -} - `, + output: null, }, { filename: 'test.ts', @@ -383,11 +379,7 @@ export class WithParameterProperty { `, options: [{ accessibility: 'explicit' }], errors: [{ messageId: 'missingAccessibility' }], - output: ` -export class WithParameterProperty { - public constructor(readonly value: string) {} -} - `, + output: null, }, { filename: 'test.ts', @@ -406,11 +398,7 @@ export class XXXX { }, ], errors: [{ messageId: 'missingAccessibility' }], - output: ` -export class XXXX { - public constructor(readonly samosa: string) {} -} - `, + output: null, }, { filename: 'test.ts', @@ -426,11 +414,7 @@ class Test { }, ], errors: [{ messageId: 'missingAccessibility' }], - output: ` -class Test { - public constructor(readonly foo: string) {} -} - `, + output: null, }, { filename: 'test.ts', @@ -453,14 +437,7 @@ class Test { column: 3, }, ], - output: ` -class Test { - x: number; - public getX() { - return this.x; - } -} - `, + output: null, }, { filename: 'test.ts', @@ -483,14 +460,7 @@ class Test { column: 3, }, ], - output: ` -class Test { - private x: number; - getX() { - return this.x; - } -} - `, + output: null, }, { filename: 'test.ts', @@ -522,14 +492,7 @@ class Test { column: 3, }, ], - output: ` -class Test { - x?: number; - getX?() { - return this.x; - } -} - `, + output: null, }, { filename: 'test.ts', @@ -658,20 +621,7 @@ class Test { }, ], options: [{ overrides: { constructors: 'no-public' } }], - output: ` -class Test { - private x: number; - constructor(x: number) { - this.x = x; - } - get internalValue() { - return this.x; - } - set internalValue(value: number) { - this.x = value; - } -} - `, + output: null, }, { filename: 'test.ts', @@ -706,20 +656,7 @@ class Test { column: 3, }, ], - output: ` -class Test { - private x: number; - constructor(x: number) { - this.x = x; - } - get internalValue() { - return this.x; - } - set internalValue(value: number) { - this.x = value; - } -} - `, + output: null, }, { filename: 'test.ts', @@ -743,14 +680,7 @@ class Test { overrides: { parameterProperties: 'no-public' }, }, ], - output: ` -class Test { - constructor(public x: number) {} - public foo(): string { - return 'foo'; - } -} - `, + output: null, }, { filename: 'test.ts', @@ -766,11 +696,7 @@ class Test { column: 3, }, ], - output: ` -class Test { - constructor(public x: number) {} -} - `, + output: null, }, { filename: 'test.ts', @@ -818,11 +744,7 @@ class Test { column: 3, }, ], - output: ` -class Test { - x = 2; -} - `, + output: null, }, { filename: 'test.ts', @@ -866,11 +788,7 @@ class Test { column: 3, }, ], - output: ` -class Test { - constructor(public ...x: any[]) {} -} - `, + output: null, }, { filename: 'test.ts', @@ -892,7 +810,7 @@ class Test { column: 3, }, ], - output: noFormat` + output: ` class Test { @public /*public*/constructor(private foo: string) {} @@ -1132,7 +1050,7 @@ class Test { column: 3, }, ], - output: noFormat` + output: ` class Test { 'foo' = 1; 'foo foo' = 2; diff --git a/packages/eslint-plugin/tests/rules/member-ordering-alphabetically-case-insensitive-order.test.ts b/packages/eslint-plugin/tests/rules/member-ordering-alphabetically-case-insensitive-order.test.ts index 24907a8d8f4..fe3425ba95c 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering-alphabetically-case-insensitive-order.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering-alphabetically-case-insensitive-order.test.ts @@ -493,6 +493,24 @@ const foo = class Foo { }, ], }, + + // default option + static blocks; should always be valid + { + code: ` +class Foo { + static {} + static {} +} + `, + options: [ + { + default: { + memberTypes: 'never', + order: 'alphabetically-case-insensitive', + }, + }, + ], + }, ], invalid: [ // default option + interface + wrong order within group and wrong group order + alphabetically diff --git a/packages/eslint-plugin/tests/rules/member-ordering-alphabetically-order.test.ts b/packages/eslint-plugin/tests/rules/member-ordering-alphabetically-order.test.ts index dfd5f0de83c..cc02785efc4 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering-alphabetically-order.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering-alphabetically-order.test.ts @@ -1701,6 +1701,24 @@ const foo = class Foo { }, ], }, + + // default option + static blocks; should always be valid + { + code: ` +class Foo { + static {} + static {} +} + `, + options: [ + { + default: { + memberTypes: 'never', + order: 'alphabetically', + }, + }, + ], + }, ], invalid: [ // default option + class + wrong order within group and wrong group order + alphabetically diff --git a/packages/eslint-plugin/tests/rules/member-ordering.test.ts b/packages/eslint-plugin/tests/rules/member-ordering.test.ts index c21272ca510..32cf004cf7a 100644 --- a/packages/eslint-plugin/tests/rules/member-ordering.test.ts +++ b/packages/eslint-plugin/tests/rules/member-ordering.test.ts @@ -1244,6 +1244,36 @@ class Foo { `, options: [{ default: ['method', 'constructor', 'signature', 'field'] }], }, + { + code: ` +class Foo { + static {} + m() {} + f = 1; +} + `, + options: [{ default: ['static-initialization', 'method', 'field'] }], + }, + { + code: ` +class Foo { + m() {} + f = 1; + static {} +} + `, + options: [{ default: ['method', 'field', 'static-initialization'] }], + }, + { + code: ` +class Foo { + f = 1; + static {} + m() {} +} + `, + options: [{ default: ['field', 'static-initialization', 'method'] }], + }, ` interface Foo { [Z: string]: any; @@ -3979,6 +4009,133 @@ class Foo { }, ], }, + { + code: ` +class Foo { + static {} + m() {} + f = 1; +} + `, + options: [{ default: ['method', 'field', 'static-initialization'] }], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'm', + rank: 'static initialization', + }, + line: 4, + column: 3, + }, + { + messageId: 'incorrectGroupOrder', + data: { + name: 'f', + rank: 'static initialization', + }, + line: 5, + column: 3, + }, + ], + }, + { + code: ` +class Foo { + m() {} + f = 1; + static {} +} + `, + options: [{ default: ['static-initialization', 'method', 'field'] }], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'static block', + rank: 'method', + }, + line: 5, + column: 3, + }, + ], + }, + { + code: ` +class Foo { + f = 1; + static {} + m() {} +} + `, + options: [{ default: ['static-initialization', 'field', 'method'] }], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'static block', + rank: 'field', + }, + line: 4, + column: 3, + }, + ], + }, + { + code: ` +class Foo { + static {} + f = 1; + m() {} +} + `, + options: [{ default: ['field', 'static-initialization', 'method'] }], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'f', + rank: 'static initialization', + }, + line: 4, + column: 3, + }, + ], + }, + { + code: ` +class Foo { + private mp() {} + static {} + public m() {} + @dec + md() {} +} + `, + options: [ + { default: ['decorated-method', 'static-initialization', 'method'] }, + ], + errors: [ + { + messageId: 'incorrectGroupOrder', + data: { + name: 'static block', + rank: 'method', + }, + line: 4, + column: 3, + }, + { + messageId: 'incorrectGroupOrder', + data: { + name: 'md', + rank: 'method', + }, + line: 6, + column: 3, + }, + ], + }, ], }; diff --git a/packages/eslint-plugin/tests/rules/method-signature-style.test.ts b/packages/eslint-plugin/tests/rules/method-signature-style.test.ts index 065d15c6180..d2a88e9c02b 100644 --- a/packages/eslint-plugin/tests/rules/method-signature-style.test.ts +++ b/packages/eslint-plugin/tests/rules/method-signature-style.test.ts @@ -91,7 +91,7 @@ interface Test { { messageId: 'errorMethod', line: 9 }, { messageId: 'errorMethod', line: 10 }, ], - output: noFormat` + output: ` interface Test { f: (a: string) => number } interface Test { ['f']: (a: boolean) => void } interface Test { f: (a: T) => T } @@ -127,7 +127,7 @@ interface Test { { messageId: 'errorProperty', line: 9 }, { messageId: 'errorProperty', line: 10 }, ], - output: noFormat` + output: ` interface Test { f(a: string): number } interface Test { ['f'](a: boolean): void } interface Test { f(a: T): T } @@ -147,7 +147,7 @@ interface Foo { none(arg: string): void } `, - output: noFormat` + output: ` interface Foo { semi: (arg: string) => void; comma: (arg: string) => void, @@ -177,7 +177,7 @@ interface Foo { none: (arg: string) => void } `, - output: noFormat` + output: ` interface Foo { semi(arg: string): void; comma(arg: string): void, @@ -216,7 +216,7 @@ interface Foo { ): void; } `, - output: noFormat` + output: ` interface Foo { x: ( args: Pick< @@ -249,7 +249,7 @@ interface Foo { foo(): three; } `, - output: noFormat` + output: ` interface Foo { foo: (() => one) & (() => two) & (() => three); } @@ -277,7 +277,7 @@ interface Foo { foo(): three; } `, - output: noFormat` + output: ` interface Foo { foo: ((bar: string) => one) & ((bar: number, baz: string) => two) & (() => three); } @@ -305,7 +305,7 @@ interface Foo { [foo](): three; } `, - output: noFormat` + output: ` interface Foo { [foo]: ((bar: string) => one) & ((bar: number, baz: string) => two) & (() => three); } @@ -335,7 +335,7 @@ interface Foo { bar(baz: number): Foo; } `, - output: noFormat` + output: ` interface Foo { [foo]: ((bar: string) => one) & ((bar: number, baz: string) => two) & (() => three); bar: ((arg: string) => void) & ((baz: number) => Foo); @@ -395,7 +395,7 @@ type Foo = { foo(): three; } `, - output: noFormat` + output: ` type Foo = { foo: (() => one) & (() => two) & (() => three); } @@ -423,7 +423,7 @@ declare const Foo: { foo(): three; } `, - output: noFormat` + output: ` declare const Foo: { foo: (() => one) & (() => two) & (() => three); } diff --git a/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts b/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts index e0bdd183a0e..62578778fbf 100644 --- a/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts +++ b/packages/eslint-plugin/tests/rules/no-confusing-void-expression.test.ts @@ -89,17 +89,17 @@ ruleTester.run('no-confusing-void-expression', rule, { { code: "() => console.log('foo');", errors: [{ line: 1, column: 7, messageId: 'invalidVoidExprArrow' }], - output: noFormat`() => { console.log('foo'); };`, + output: `() => { console.log('foo'); };`, }, { code: 'foo => foo && console.log(foo);', errors: [{ line: 1, column: 15, messageId: 'invalidVoidExprArrow' }], - output: noFormat`foo => { foo && console.log(foo); };`, + output: `foo => { foo && console.log(foo); };`, }, { code: 'foo => foo || console.log(foo);', errors: [{ line: 1, column: 15, messageId: 'invalidVoidExprArrow' }], - output: noFormat`foo => { foo || console.log(foo); };`, + output: `foo => { foo || console.log(foo); };`, }, { code: 'foo => (foo ? console.log(true) : console.log(false));', @@ -107,7 +107,7 @@ ruleTester.run('no-confusing-void-expression', rule, { { line: 1, column: 15, messageId: 'invalidVoidExprArrow' }, { line: 1, column: 35, messageId: 'invalidVoidExprArrow' }, ], - output: noFormat`foo => { foo ? console.log(true) : console.log(false); };`, + output: `foo => { foo ? console.log(true) : console.log(false); };`, }, { code: ` @@ -117,7 +117,7 @@ ruleTester.run('no-confusing-void-expression', rule, { } `, errors: [{ line: 3, column: 18, messageId: 'invalidVoidExprReturn' }], - output: noFormat` + output: ` function f() { console.log('foo'); return; console.log('bar'); @@ -133,7 +133,7 @@ ruleTester.run('no-confusing-void-expression', rule, { } `, errors: [{ line: 4, column: 18, messageId: 'invalidVoidExprReturn' }], - output: noFormat` + output: ` function f() { console.log('foo') ;['bar', 'baz'].forEach(console.log); return; @@ -164,7 +164,7 @@ ruleTester.run('no-confusing-void-expression', rule, { } `, errors: [{ line: 4, column: 18, messageId: 'invalidVoidExprReturnLast' }], - output: noFormat` + output: ` function f() { console.log('foo') ;['bar', 'baz'].forEach(console.log); @@ -181,7 +181,7 @@ ruleTester.run('no-confusing-void-expression', rule, { }; `, errors: [{ line: 4, column: 20, messageId: 'invalidVoidExprReturn' }], - output: noFormat` + output: ` const f = () => { if (cond) { console.error('foo'); return; @@ -198,7 +198,7 @@ ruleTester.run('no-confusing-void-expression', rule, { }; `, errors: [{ line: 3, column: 28, messageId: 'invalidVoidExprReturn' }], - output: noFormat` + output: ` const f = function () { if (cond) { console.error('foo'); return; } console.log('bar'); diff --git a/packages/eslint-plugin/tests/rules/no-dynamic-delete.test.ts b/packages/eslint-plugin/tests/rules/no-dynamic-delete.test.ts index 798971e90f1..782bc3fec57 100644 --- a/packages/eslint-plugin/tests/rules/no-dynamic-delete.test.ts +++ b/packages/eslint-plugin/tests/rules/no-dynamic-delete.test.ts @@ -68,10 +68,7 @@ const container: { [i: string]: 0 } = {}; delete container['aa' + 'b']; `, errors: [{ messageId: 'dynamicDelete' }], - output: ` -const container: { [i: string]: 0 } = {}; -delete container['aa' + 'b']; - `, + output: null, }, { code: ` @@ -90,10 +87,7 @@ const container: { [i: string]: 0 } = {}; delete container[-Infinity]; `, errors: [{ messageId: 'dynamicDelete' }], - output: ` -const container: { [i: string]: 0 } = {}; -delete container[-Infinity]; - `, + output: null, }, { code: ` @@ -101,10 +95,7 @@ const container: { [i: string]: 0 } = {}; delete container[+Infinity]; `, errors: [{ messageId: 'dynamicDelete' }], - output: ` -const container: { [i: string]: 0 } = {}; -delete container[+Infinity]; - `, + output: null, }, { code: ` @@ -112,10 +103,7 @@ const container: { [i: string]: 0 } = {}; delete container[NaN]; `, errors: [{ messageId: 'dynamicDelete' }], - output: ` -const container: { [i: string]: 0 } = {}; -delete container[NaN]; - `, + output: null, }, { code: ` @@ -135,11 +123,7 @@ const name = 'name'; delete container[name]; `, errors: [{ messageId: 'dynamicDelete' }], - output: ` -const container: { [i: string]: 0 } = {}; -const name = 'name'; -delete container[name]; - `, + output: null, }, { code: ` @@ -147,11 +131,7 @@ const container: { [i: string]: 0 } = {}; const getName = () => 'aaa'; delete container[getName()]; `, - output: ` -const container: { [i: string]: 0 } = {}; -const getName = () => 'aaa'; -delete container[getName()]; - `, + output: null, errors: [{ messageId: 'dynamicDelete' }], }, { @@ -160,11 +140,7 @@ const container: { [i: string]: 0 } = {}; const name = { foo: { bar: 'bar' } }; delete container[name.foo.bar]; `, - output: ` -const container: { [i: string]: 0 } = {}; -const name = { foo: { bar: 'bar' } }; -delete container[name.foo.bar]; - `, + output: null, errors: [{ messageId: 'dynamicDelete' }], }, ], diff --git a/packages/eslint-plugin/tests/rules/no-empty-interface.test.ts b/packages/eslint-plugin/tests/rules/no-empty-interface.test.ts index f974af09c18..c3c510e23ce 100644 --- a/packages/eslint-plugin/tests/rules/no-empty-interface.test.ts +++ b/packages/eslint-plugin/tests/rules/no-empty-interface.test.ts @@ -64,7 +64,7 @@ interface Foo { interface Bar extends Foo {} `, - output: noFormat` + output: ` interface Foo { name: string; } @@ -82,7 +82,7 @@ type Bar = Foo }, { code: 'interface Foo extends Array {}', - output: noFormat`type Foo = Array`, + output: `type Foo = Array`, errors: [ { messageId: 'noEmptyWithSuper', @@ -93,7 +93,7 @@ type Bar = Foo }, { code: 'interface Foo extends Array {}', - output: noFormat`type Foo = Array`, + output: `type Foo = Array`, errors: [ { messageId: 'noEmptyWithSuper', @@ -109,7 +109,7 @@ interface Bar { } interface Foo extends Array {} `, - output: noFormat` + output: ` interface Bar { bar: string; } @@ -128,7 +128,7 @@ type Foo = Array type R = Record; interface Foo extends R {} `, - output: noFormat` + output: ` type R = Record; type Foo = R `, @@ -144,7 +144,7 @@ type Foo = R code: ` interface Foo extends Bar {} `, - output: noFormat` + output: ` type Foo = Bar `, errors: [ @@ -162,7 +162,7 @@ declare module FooBar { type Baz = typeof baz; export interface Bar extends Baz {} } - `.trimRight(), + `, errors: [ { messageId: 'noEmptyWithSuper', @@ -173,23 +173,18 @@ declare module FooBar { suggestions: [ { messageId: 'noEmptyWithSuper', - output: noFormat` + output: ` declare module FooBar { type Baz = typeof baz; export type Bar = Baz } - `.trimRight(), + `, }, ], }, ], // output matches input because a suggestion was made - output: ` -declare module FooBar { - type Baz = typeof baz; - export interface Bar extends Baz {} -} - `.trimRight(), + output: null, }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-explicit-any.test.ts b/packages/eslint-plugin/tests/rules/no-explicit-any.test.ts index 37d6b99b29f..479c3c63b53 100644 --- a/packages/eslint-plugin/tests/rules/no-explicit-any.test.ts +++ b/packages/eslint-plugin/tests/rules/no-explicit-any.test.ts @@ -1001,7 +1001,7 @@ type obj = { code: ` function test>() {} const test = >() => {}; - `.trimRight(), + `, errors: [ { messageId: 'unexpectedAny', @@ -1013,14 +1013,14 @@ const test = >() => {}; output: ` function test>() {} const test = >() => {}; - `.trimRight(), + `, }, { messageId: 'suggestNever', output: ` function test>() {} const test = >() => {}; - `.trimRight(), + `, }, ], }, @@ -1034,14 +1034,14 @@ const test = >() => {}; output: ` function test>() {} const test = >() => {}; - `.trimRight(), + `, }, { messageId: 'suggestNever', output: ` function test>() {} const test = >() => {}; - `.trimRight(), + `, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/no-extra-non-null-assertion.test.ts b/packages/eslint-plugin/tests/rules/no-extra-non-null-assertion.test.ts index 39ad4da3ebf..c657c7d99d7 100644 --- a/packages/eslint-plugin/tests/rules/no-extra-non-null-assertion.test.ts +++ b/packages/eslint-plugin/tests/rules/no-extra-non-null-assertion.test.ts @@ -128,7 +128,7 @@ function foo(bar?: { n: number }) { const foo: { bar: number } | null = null; const bar = (foo!)!.bar; `, - output: noFormat` + output: ` const foo: { bar: number } | null = null; const bar = (foo)!.bar; `, @@ -147,7 +147,7 @@ function foo(bar?: { n: number }) { return (bar!)?.n; } `, - output: noFormat` + output: ` function foo(bar?: { n: number }) { return (bar)?.n; } @@ -167,7 +167,7 @@ function foo(bar?: { n: number }) { return (bar)!?.n; } `, - output: noFormat` + output: ` function foo(bar?: { n: number }) { return (bar)?.n; } @@ -187,7 +187,7 @@ function foo(bar?: { n: number }) { return (bar!)?.(); } `, - output: noFormat` + output: ` function foo(bar?: { n: number }) { return (bar)?.(); } diff --git a/packages/eslint-plugin/tests/rules/no-extra-parens.test.ts b/packages/eslint-plugin/tests/rules/no-extra-parens.test.ts index 5f5dc37896f..5a72b6015a2 100644 --- a/packages/eslint-plugin/tests/rules/no-extra-parens.test.ts +++ b/packages/eslint-plugin/tests/rules/no-extra-parens.test.ts @@ -19,6 +19,8 @@ ruleTester.run('no-extra-parens', rule, { valid: [ ...batchedSingleLineTests({ code: ` +async function f(arg: any) { await (arg as Promise); } +async function f(arg: Promise) { await arg; } (0).toString(); (function(){}) ? a() : b(); (/^a$/).test(x); @@ -238,6 +240,9 @@ for (a of (b)); typeof (a); a((1)); new a((1)); +a<(A)>((1)); +async function f(arg: Promise) { await (arg); } +async function f(arg: any) { await ((arg as Promise)); } `, output: ` a = b * c; @@ -248,7 +253,9 @@ for (a of b); typeof a; a(1); new a(1); -a<(A)>((1)); +a<(A)>(1); +async function f(arg: Promise) { await arg; } +async function f(arg: any) { await (arg as Promise); } `, errors: [ { @@ -296,6 +303,16 @@ a<(A)>((1)); line: 10, column: 8, }, + { + messageId: 'unexpected', + line: 11, + column: 45, + }, + { + messageId: 'unexpected', + line: 12, + column: 37, + }, ], }), ...batchedSingleLineTests({ diff --git a/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts b/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts index e9a63df2b5d..e69d4e6d7bd 100644 --- a/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts +++ b/packages/eslint-plugin/tests/rules/no-floating-promises.test.ts @@ -500,7 +500,7 @@ doSomething(); async function test() { Promise.resolve('value'); } - `.trimRight(), + `, errors: [ { line: 3, @@ -512,7 +512,7 @@ async function test() { async function test() { void Promise.resolve('value'); } - `.trimRight(), + `, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/no-implicit-any-catch.test.ts b/packages/eslint-plugin/tests/rules/no-implicit-any-catch.test.ts index f8113555086..e04b03889ca 100644 --- a/packages/eslint-plugin/tests/rules/no-implicit-any-catch.test.ts +++ b/packages/eslint-plugin/tests/rules/no-implicit-any-catch.test.ts @@ -29,13 +29,13 @@ try { code: ` try { } catch (e3) {} - `.trim(), + `, errors: [ { - line: 2, + line: 3, column: 3, messageId: 'implicitAnyInCatch', - endLine: 2, + endLine: 3, endColumn: 16, suggestions: [ { @@ -43,7 +43,7 @@ try { output: ` try { } catch (e3: unknown) {} - `.trim(), + `, }, ], }, @@ -53,14 +53,14 @@ try { code: ` try { } catch (e4: any) {} - `.trim(), + `, options: [{ allowExplicitAny: false }], errors: [ { - line: 2, + line: 3, column: 3, messageId: 'explicitAnyInCatch', - endLine: 2, + endLine: 3, endColumn: 21, suggestions: [ { @@ -68,7 +68,7 @@ try { output: ` try { } catch (e4: unknown) {} - `.trim(), + `, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/no-inferrable-types.test.ts b/packages/eslint-plugin/tests/rules/no-inferrable-types.test.ts index d85806b69c4..cfea578b9f6 100644 --- a/packages/eslint-plugin/tests/rules/no-inferrable-types.test.ts +++ b/packages/eslint-plugin/tests/rules/no-inferrable-types.test.ts @@ -156,7 +156,54 @@ class Foo { invalid: [ ...invalidTestCases, - + { + // This is invalid TS semantic, but it's trivial to make valid anyway + code: 'const fn = (a?: number = 5) => {};', + output: 'const fn = (a = 5) => {};', + options: [ + { + ignoreParameters: false, + }, + ], + errors: [ + { + messageId: 'noInferrableType', + data: { + type: 'number', + }, + line: 1, + column: 13, + }, + ], + }, + { + // This is invalid TS semantic, but it's trivial to make valid anyway + code: ` +class A { + a!: number = 1; +} + `, + output: ` +class A { + a = 1; +} + `, + options: [ + { + ignoreProperties: false, + }, + ], + errors: [ + { + messageId: 'noInferrableType', + data: { + type: 'number', + }, + line: 3, + column: 3, + }, + ], + }, { code: "const fn = (a: number = 5, b: boolean = true, c: string = 'foo') => {};", output: "const fn = (a = 5, b = true, c = 'foo') => {};", diff --git a/packages/eslint-plugin/tests/rules/no-meaningless-void-operator.test.ts b/packages/eslint-plugin/tests/rules/no-meaningless-void-operator.test.ts index 5e034f2904b..c9ba59f93f9 100644 --- a/packages/eslint-plugin/tests/rules/no-meaningless-void-operator.test.ts +++ b/packages/eslint-plugin/tests/rules/no-meaningless-void-operator.test.ts @@ -67,7 +67,7 @@ foo(); function bar(x: never) { void x; } - `.trimRight(), + `, errors: [ { messageId: 'meaninglessVoidOperator', @@ -80,7 +80,7 @@ function bar(x: never) { function bar(x: never) { x; } - `.trimRight(), + `, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/no-non-null-asserted-nullish-coalescing.test.ts b/packages/eslint-plugin/tests/rules/no-non-null-asserted-nullish-coalescing.test.ts index 3b47a3c2bf0..4671ee2641a 100644 --- a/packages/eslint-plugin/tests/rules/no-non-null-asserted-nullish-coalescing.test.ts +++ b/packages/eslint-plugin/tests/rules/no-non-null-asserted-nullish-coalescing.test.ts @@ -178,7 +178,7 @@ ruleTester.run('no-non-null-asserted-nullish-coalescing', rule, { code: ` let x!: string; x! ?? ''; - `.trimRight(), + `, errors: [ { messageId: 'noNonNullAssertedNullishCoalescing', @@ -188,7 +188,7 @@ x! ?? ''; output: ` let x!: string; x ?? ''; - `.trimRight(), + `, }, ], }, @@ -199,7 +199,7 @@ x ?? ''; let x: string; x = foo(); x! ?? ''; - `.trimRight(), + `, errors: [ { messageId: 'noNonNullAssertedNullishCoalescing', @@ -210,7 +210,7 @@ x! ?? ''; let x: string; x = foo(); x ?? ''; - `.trimRight(), + `, }, ], }, @@ -222,7 +222,7 @@ let x: string; x = foo(); x! ?? ''; x = foo(); - `.trimRight(), + `, errors: [ { messageId: 'noNonNullAssertedNullishCoalescing', @@ -234,7 +234,7 @@ let x: string; x = foo(); x ?? ''; x = foo(); - `.trimRight(), + `, }, ], }, @@ -244,7 +244,7 @@ x = foo(); code: ` let x = foo(); x! ?? ''; - `.trimRight(), + `, errors: [ { messageId: 'noNonNullAssertedNullishCoalescing', @@ -254,7 +254,7 @@ x! ?? ''; output: ` let x = foo(); x ?? ''; - `.trimRight(), + `, }, ], }, @@ -266,7 +266,7 @@ function foo() { let x!: string; return x! ?? ''; } - `.trimRight(), + `, errors: [ { messageId: 'noNonNullAssertedNullishCoalescing', @@ -278,7 +278,7 @@ function foo() { let x!: string; return x ?? ''; } - `.trimRight(), + `, }, ], }, @@ -290,7 +290,7 @@ let x!: string; function foo() { return x! ?? ''; } - `.trimRight(), + `, errors: [ { messageId: 'noNonNullAssertedNullishCoalescing', @@ -302,7 +302,7 @@ let x!: string; function foo() { return x ?? ''; } - `.trimRight(), + `, }, ], }, @@ -312,17 +312,17 @@ function foo() { code: noFormat` let x = foo(); x ! ?? ''; - `.trimRight(), + `, errors: [ { messageId: 'noNonNullAssertedNullishCoalescing', suggestions: [ { messageId: 'suggestRemovingNonNull', - output: noFormat` + output: ` let x = foo(); x ?? ''; - `.trimRight(), + `, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/no-non-null-asserted-optional-chain.test.ts b/packages/eslint-plugin/tests/rules/no-non-null-asserted-optional-chain.test.ts index 12406d1dc41..0df809c934e 100644 --- a/packages/eslint-plugin/tests/rules/no-non-null-asserted-optional-chain.test.ts +++ b/packages/eslint-plugin/tests/rules/no-non-null-asserted-optional-chain.test.ts @@ -87,7 +87,7 @@ ruleTester.run('no-non-null-asserted-optional-chain', rule, { suggestions: [ { messageId: 'suggestRemovingNonNull', - output: noFormat`(foo?.bar).baz`, + output: `(foo?.bar).baz`, }, ], }, @@ -101,7 +101,7 @@ ruleTester.run('no-non-null-asserted-optional-chain', rule, { suggestions: [ { messageId: 'suggestRemovingNonNull', - output: noFormat`(foo?.bar)().baz`, + output: `(foo?.bar)().baz`, }, ], }, @@ -115,7 +115,7 @@ ruleTester.run('no-non-null-asserted-optional-chain', rule, { suggestions: [ { messageId: 'suggestRemovingNonNull', - output: noFormat`(foo?.bar)`, + output: `(foo?.bar)`, }, ], }, @@ -129,7 +129,7 @@ ruleTester.run('no-non-null-asserted-optional-chain', rule, { suggestions: [ { messageId: 'suggestRemovingNonNull', - output: noFormat`(foo?.bar)()`, + output: `(foo?.bar)()`, }, ], }, @@ -143,7 +143,7 @@ ruleTester.run('no-non-null-asserted-optional-chain', rule, { suggestions: [ { messageId: 'suggestRemovingNonNull', - output: noFormat`(foo?.bar)`, + output: `(foo?.bar)`, }, ], }, @@ -157,7 +157,7 @@ ruleTester.run('no-non-null-asserted-optional-chain', rule, { suggestions: [ { messageId: 'suggestRemovingNonNull', - output: noFormat`(foo?.bar)()`, + output: `(foo?.bar)()`, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts index 3e86749956c..4ba9f861e35 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-condition.test.ts @@ -914,7 +914,7 @@ foo ?. foo ?. bar; `, - output: noFormat` + output: ` let foo = { bar: true }; foo.bar; foo . bar; diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts index 3b6c8168ce8..9dfbce81bef 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-assertion.test.ts @@ -1,6 +1,6 @@ import path from 'path'; import rule from '../../src/rules/no-unnecessary-type-assertion'; -import { RuleTester, noFormat } from '../RuleTester'; +import { RuleTester } from '../RuleTester'; const rootDir = path.resolve(__dirname, '../fixtures/'); const ruleTester = new RuleTester({ @@ -232,7 +232,7 @@ const bar = foo; code: ` const foo = (3 + 5) as number; `, - output: noFormat` + output: ` const foo = (3 + 5); `, errors: [ @@ -247,7 +247,7 @@ const foo = (3 + 5); code: ` const foo = (3 + 5); `, - output: noFormat` + output: ` const foo = (3 + 5); `, errors: [ @@ -263,7 +263,7 @@ const foo = (3 + 5); type Foo = number; const foo = (3 + 5) as Foo; `, - output: noFormat` + output: ` type Foo = number; const foo = (3 + 5); `, @@ -280,7 +280,7 @@ const foo = (3 + 5); type Foo = number; const foo = (3 + 5); `, - output: noFormat` + output: ` type Foo = number; const foo = (3 + 5); `, diff --git a/packages/eslint-plugin/tests/rules/no-unnecessary-type-constraint.test.ts b/packages/eslint-plugin/tests/rules/no-unnecessary-type-constraint.test.ts index 91798c8b059..a48bf235a11 100644 --- a/packages/eslint-plugin/tests/rules/no-unnecessary-type-constraint.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unnecessary-type-constraint.test.ts @@ -39,6 +39,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'any' }, output: 'function data() {}', }, ], @@ -57,6 +58,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'any' }, output: 'function data() {}', }, ], @@ -75,6 +77,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'any' }, output: 'function data() {}', }, ], @@ -93,6 +96,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'any' }, output: 'function data() {}', }, ], @@ -111,7 +115,8 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', - output: noFormat`const data = () => {};`, + data: { constraint: 'any' }, + output: `const data = () => {};`, }, ], }, @@ -130,7 +135,8 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', - output: noFormat`const data = () => {};`, + data: { constraint: 'any' }, + output: `const data = () => {};`, }, ], }, @@ -149,7 +155,8 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', - output: noFormat`const data = () => {};`, + data: { constraint: 'any' }, + output: `const data = () => {};`, }, ], }, @@ -168,7 +175,8 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', - output: noFormat`const data = () => {};`, + data: { constraint: 'any' }, + output: `const data = () => {};`, }, ], }, @@ -187,7 +195,8 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', - output: noFormat`const data = () => {};`, + data: { constraint: 'any' }, + output: `const data = () => {};`, }, ], }, @@ -206,6 +215,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'any' }, output: 'const data = () => {};', }, ], @@ -225,7 +235,8 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', - output: noFormat`const data = () => {};`, + data: { constraint: 'any' }, + output: `const data = () => {};`, }, ], }, @@ -238,7 +249,8 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', - output: noFormat`const data = () => {};`, + data: { constraint: 'any' }, + output: `const data = () => {};`, }, ], }, @@ -257,6 +269,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'unknown' }, output: 'function data() {}', }, ], @@ -275,6 +288,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'any' }, output: 'const data = () => {};', }, ], @@ -293,6 +307,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'unknown' }, output: 'const data = () => {};', }, ], @@ -311,6 +326,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'unknown' }, output: 'class Data {}', }, ], @@ -329,6 +345,7 @@ function data() {} suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'unknown' }, output: 'const Data = class {};', }, ], @@ -340,7 +357,7 @@ function data() {} class Data { member() {} } - `.trimEnd(), + `, errors: [ { data: { constraint: 'unknown', name: 'T' }, @@ -351,11 +368,12 @@ class Data { suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'unknown' }, output: ` class Data { member() {} } - `.trimEnd(), + `, }, ], }, @@ -366,7 +384,7 @@ class Data { const Data = class { member() {} }; - `.trimEnd(), + `, errors: [ { data: { constraint: 'unknown', name: 'T' }, @@ -377,11 +395,12 @@ const Data = class { suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'unknown' }, output: ` const Data = class { member() {} }; - `.trimEnd(), + `, }, ], }, @@ -399,6 +418,7 @@ const Data = class { suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'unknown' }, output: 'interface Data {}', }, ], @@ -417,6 +437,7 @@ const Data = class { suggestions: [ { messageId: 'removeUnnecessaryConstraint', + data: { constraint: 'unknown' }, output: 'type Data = {};', }, ], diff --git a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts index 78ef7e78b38..d28a2b4e513 100644 --- a/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unsafe-assignment.test.ts @@ -112,7 +112,7 @@ class Foo { 'const x = new Set();', 'const x = { y: 1 };', 'const x = { y = 1 };', - 'const x = { y(); };', + noFormat`const x = { y(); };`, 'const x: { y: number } = { y: 1 };', 'const x = [...[1, 2, 3]];', 'const [{ [`x${1}`]: x }] = [{ [`x`]: 1 }] as [{ [`x`]: any }];', diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars-eslint.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars-eslint.test.ts index 14cfff7e0b9..44ffd089377 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars-eslint.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars-eslint.test.ts @@ -1753,8 +1753,8 @@ foo.forEach(item => { }, { ...assignedError('b'), - line: 4, - column: 7, + line: 2, + column: 9, }, ], }, @@ -2601,7 +2601,7 @@ myArray = myArray.filter(x => x == 1); { ...assignedError('myArray'), line: 3, - column: 11, + column: 1, }, ], }, @@ -2628,8 +2628,8 @@ var a = function () { errors: [ { ...assignedError('a'), - line: 3, - column: 3, + line: 2, + column: 5, }, ], }, @@ -2644,7 +2644,7 @@ var a = function () { errors: [ { ...assignedError('a'), - line: 4, + line: 2, column: 5, }, ], @@ -2659,8 +2659,8 @@ const a = () => { errors: [ { ...assignedError('a'), - line: 3, - column: 3, + line: 2, + column: 7, }, ], }, @@ -2674,11 +2674,18 @@ const a = () => () => { errors: [ { ...assignedError('a'), - line: 3, - column: 3, + line: 2, + column: 7, }, ], }, + + // https://github.com/eslint/eslint/issues/14324 + { + code: 'let x = [];\nx = x.concat(x);', + parserOptions: { ecmaVersion: 2015 }, + errors: [{ ...assignedError('x'), line: 2, column: 1 }], + }, { code: ` let a = 'a'; @@ -2692,20 +2699,42 @@ function foo() { `, parserOptions: { ecmaVersion: 2020 }, errors: [ + { + ...assignedError('a'), + line: 3, + column: 1, + }, { ...definedError('foo'), line: 4, column: 10, }, - { - ...assignedError('a'), - line: 7, - column: 5, - }, ], }, { code: ` +let foo; +init(); +foo = foo + 2; +function init() { + foo = 1; +} + `, + parserOptions: { ecmaVersion: 2020 }, + errors: [{ ...assignedError('foo'), line: 4, column: 1 }], + }, + { + code: ` +function foo(n) { + if (n < 2) return 1; + return n * foo(n - 1); +} + `, + parserOptions: { ecmaVersion: 2020 }, + errors: [{ ...definedError('foo'), line: 2, column: 10 }], + }, + { + code: ` let c = 'c'; c = 10; function foo1() { diff --git a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts index cca98d2a952..5fac3eeed71 100644 --- a/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts +++ b/packages/eslint-plugin/tests/rules/no-unused-vars/no-unused-vars.test.ts @@ -921,6 +921,15 @@ export declare namespace Foo { } } } + `, + noFormat` +class Foo { + value: T; +} +class Bar { + foo = Foo; +} +new Bar(); `, { code: ` @@ -1458,8 +1467,8 @@ namespace Foo { action: 'defined', additional: '', }, - line: 4, - column: 15, + line: 2, + column: 11, }, ], }, @@ -1490,8 +1499,8 @@ namespace Foo { action: 'defined', additional: '', }, - line: 5, - column: 17, + line: 3, + column: 13, }, ], }, @@ -1506,7 +1515,8 @@ interface Foo { errors: [ { messageId: 'unusedVar', - line: 4, + line: 2, + column: 11, data: { varName: 'Foo', action: 'defined', @@ -1523,6 +1533,7 @@ type Foo = Array; { messageId: 'unusedVar', line: 2, + column: 6, data: { varName: 'Foo', action: 'defined', @@ -1550,6 +1561,7 @@ export const ComponentFoo = () => { { messageId: 'unusedVar', line: 3, + column: 10, data: { varName: 'Fragment', action: 'defined', @@ -1577,6 +1589,7 @@ export const ComponentFoo = () => { { messageId: 'unusedVar', line: 2, + column: 8, data: { varName: 'React', action: 'defined', @@ -1604,6 +1617,7 @@ export const ComponentFoo = () => { { messageId: 'unusedVar', line: 2, + column: 8, data: { varName: 'React', action: 'defined', @@ -1624,6 +1638,7 @@ declare module 'foo' { { messageId: 'unusedVar', line: 3, + column: 8, data: { varName: 'Test', action: 'defined', @@ -1649,6 +1664,7 @@ export namespace Foo { { messageId: 'unusedVar', line: 4, + column: 13, data: { varName: 'Bar', action: 'defined', @@ -1658,6 +1674,7 @@ export namespace Foo { { messageId: 'unusedVar', line: 5, + column: 15, data: { varName: 'Baz', action: 'defined', @@ -1667,6 +1684,7 @@ export namespace Foo { { messageId: 'unusedVar', line: 6, + column: 17, data: { varName: 'Bam', action: 'defined', @@ -1676,6 +1694,7 @@ export namespace Foo { { messageId: 'unusedVar', line: 7, + column: 15, data: { varName: 'x', action: 'assigned a value', @@ -1696,7 +1715,8 @@ interface Foo { errors: [ { messageId: 'unusedVar', - line: 6, + line: 2, + column: 11, data: { varName: 'Foo', action: 'defined', @@ -1705,5 +1725,23 @@ interface Foo { }, ], }, + { + code: ` +let x = null; +x = foo(x); + `, + errors: [ + { + messageId: 'unusedVar', + line: 3, + column: 1, + data: { + varName: 'x', + action: 'assigned a value', + additional: '', + }, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/no-use-before-define.test.ts b/packages/eslint-plugin/tests/rules/no-use-before-define.test.ts index 32924973a5c..676704fb279 100644 --- a/packages/eslint-plugin/tests/rules/no-use-before-define.test.ts +++ b/packages/eslint-plugin/tests/rules/no-use-before-define.test.ts @@ -326,6 +326,92 @@ enum Foo { `, options: [{ enums: false }], }, + + // "allowNamedExports" option + { + code: ` +export { a }; +const a = 1; + `, + options: [{ allowNamedExports: true }], + parserOptions, + }, + { + code: ` +export { a as b }; +const a = 1; + `, + options: [{ allowNamedExports: true }], + parserOptions, + }, + { + code: ` +export { a, b }; +let a, b; + `, + options: [{ allowNamedExports: true }], + parserOptions, + }, + { + code: ` +export { a }; +var a; + `, + options: [{ allowNamedExports: true }], + parserOptions, + }, + { + code: ` +export { f }; +function f() {} + `, + options: [{ allowNamedExports: true }], + parserOptions, + }, + { + code: ` +export { C }; +class C {} + `, + options: [{ allowNamedExports: true }], + parserOptions, + }, + { + code: ` +export { Foo }; + +enum Foo { + BAR, +} + `, + options: [{ allowNamedExports: true }], + parserOptions, + }, + { + code: ` +export { Foo }; + +namespace Foo { + export let bar = () => console.log('bar'); +} + `, + options: [{ allowNamedExports: true }], + parserOptions, + }, + { + code: ` +export { Foo, baz }; + +enum Foo { + BAR, +} + +let baz: Enum; +enum Enum {} + `, + options: [{ allowNamedExports: true }], + parserOptions, + }, // https://github.com/typescript-eslint/typescript-eslint/issues/2502 { code: ` @@ -1094,6 +1180,237 @@ enum Foo { }, ], }, + // "allowNamedExports" option + { + code: ` +export { a }; +const a = 1; + `, + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + ], + }, + { + code: ` +export { a }; +const a = 1; + `, + options: [{}], + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + ], + }, + { + code: ` +export { a }; +const a = 1; + `, + options: [{ allowNamedExports: false }], + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + ], + }, + { + code: ` +export { a }; +const a = 1; + `, + options: ['nofunc'], + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + ], + }, + { + code: ` +export { a as b }; +const a = 1; + `, + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + ], + }, + { + code: ` +export { a, b }; +let a, b; + `, + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + { + messageId: 'noUseBeforeDefine', + data: { name: 'b' }, + }, + ], + }, + { + code: ` +export { a }; +var a; + `, + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + ], + }, + { + code: ` +export { f }; +function f() {} + `, + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'f' }, + }, + ], + }, + { + code: ` +export { C }; +class C {} + `, + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'C' }, + }, + ], + }, + { + code: ` +export const foo = a; +const a = 1; + `, + options: [{ allowNamedExports: true }], + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + ], + }, + { + code: ` +export function foo() { + return a; +} +const a = 1; + `, + options: [{ allowNamedExports: true }], + parserOptions, + + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + ], + }, + { + code: ` +export class C { + foo() { + return a; + } +} +const a = 1; + `, + options: [{ allowNamedExports: true }], + parserOptions, + + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'a' }, + }, + ], + }, + { + code: ` +export { Foo }; + +enum Foo { + BAR, +} + `, + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'Foo' }, + }, + ], + }, + { + code: ` +export { Foo }; + +namespace Foo { + export let bar = () => console.log('bar'); +} + `, + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'Foo' }, + }, + ], + }, + { + code: ` +export { Foo, baz }; + +enum Foo { + BAR, +} + +let baz: Enum; +enum Enum {} + `, + options: [{ ignoreTypeReferences: true, allowNamedExports: false }], + parserOptions, + errors: [ + { + messageId: 'noUseBeforeDefine', + data: { name: 'Foo' }, + }, + { + messageId: 'noUseBeforeDefine', + data: { name: 'baz' }, + }, + ], + }, { code: ` f(); diff --git a/packages/eslint-plugin/tests/rules/no-useless-constructor.test.ts b/packages/eslint-plugin/tests/rules/no-useless-constructor.test.ts index 7cedb9151e3..ea27557d3db 100644 --- a/packages/eslint-plugin/tests/rules/no-useless-constructor.test.ts +++ b/packages/eslint-plugin/tests/rules/no-useless-constructor.test.ts @@ -206,6 +206,20 @@ class A extends B { ` class A { constructor(foo); +} + `, + ` +class A extends Object { + constructor(@Foo foo: string) { + super(foo); + } +} + `, + ` +class A extends Object { + constructor(foo: string, @Bar() bar) { + super(foo, bar); + } } `, ], diff --git a/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts b/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts index 9bfa209168d..2f89ae7efec 100644 --- a/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts +++ b/packages/eslint-plugin/tests/rules/non-nullable-type-assertion-style.test.ts @@ -241,8 +241,6 @@ function first(array: ArrayLike): T | null { messageId: 'preferNonNullAssertion', }, ], - // Output is not expected to match required formatting due to excess parentheses - // eslint-disable-next-line @typescript-eslint/internal/plugin-test-formatting output: ` function first(array: ArrayLike): T | null { return array.length > 0 ? (array[0]!) : null; diff --git a/packages/eslint-plugin/tests/rules/prefer-as-const.test.ts b/packages/eslint-plugin/tests/rules/prefer-as-const.test.ts index d5c15474f69..7cfdc209411 100644 --- a/packages/eslint-plugin/tests/rules/prefer-as-const.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-as-const.test.ts @@ -23,19 +23,71 @@ ruleTester.run('prefer-as-const', rule, { 'let foo: number = 1;', "let foo: 'bar' = baz;", "let foo = 'bar';", + "let foo: 'bar';", + 'let foo = { bar };', + "let foo: 'baz' = 'baz' as const;", ` class foo { - bar: 'baz' = 'baz'; + bar = 'baz'; } `, ` class foo { - bar = 'baz'; + bar: 'baz'; + } + `, + ` + class foo { + bar; + } + `, + ` + class foo { + bar = 'baz'; + } + `, + ` + class foo { + bar: string = 'baz'; + } + `, + ` + class foo { + bar: number = 1; + } + `, + ` + class foo { + bar = 'baz' as const; + } + `, + ` + class foo { + bar = 2 as const; + } + `, + ` + class foo { + get bar(): 'bar' {} + set bar(bar: 'bar') {} + } + `, + ` + class foo { + bar = () => 'bar' as const; + } + `, + ` + type BazFunction = () => 'baz'; + class foo { + bar: BazFunction = () => 'bar'; + } + `, + ` + class foo { + bar(): void {} } `, - "let foo: 'bar';", - 'let foo = { bar };', - "let foo: 'baz' = 'baz' as const;", ], invalid: [ { @@ -62,7 +114,7 @@ ruleTester.run('prefer-as-const', rule, { }, { code: "let []: 'bar' = 'bar';", - output: "let []: 'bar' = 'bar';", + output: null, errors: [ { messageId: 'variableConstAssertion', @@ -73,7 +125,7 @@ ruleTester.run('prefer-as-const', rule, { }, { code: "let foo: 'bar' = 'bar';", - output: "let foo: 'bar' = 'bar';", + output: null, errors: [ { messageId: 'variableConstAssertion', @@ -90,7 +142,7 @@ ruleTester.run('prefer-as-const', rule, { }, { code: 'let foo: 2 = 2;', - output: 'let foo: 2 = 2;', + output: null, errors: [ { messageId: 'variableConstAssertion', @@ -160,5 +212,112 @@ ruleTester.run('prefer-as-const', rule, { }, ], }, + { + code: ` +class foo { + bar: 'baz' = 'baz'; +} + `.trimRight(), + output: null, + errors: [ + { + messageId: 'variableConstAssertion', + line: 3, + column: 8, + suggestions: [ + { + messageId: 'variableSuggest', + output: ` +class foo { + bar = 'baz' as const; +} + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +class foo { + bar: 2 = 2; +} + `.trimRight(), + output: null, + errors: [ + { + messageId: 'variableConstAssertion', + line: 3, + column: 8, + suggestions: [ + { + messageId: 'variableSuggest', + output: ` +class foo { + bar = 2 as const; +} + `.trimRight(), + }, + ], + }, + ], + }, + { + code: ` +class foo { + foo = <'bar'>'bar'; +} + `.trimRight(), + output: ` +class foo { + foo = 'bar'; +} + `.trimRight(), + errors: [ + { + messageId: 'preferConstAssertion', + line: 3, + column: 10, + }, + ], + }, + { + code: ` +class foo { + foo = 'bar' as 'bar'; +} + `.trimRight(), + output: ` +class foo { + foo = 'bar' as const; +} + `.trimRight(), + errors: [ + { + messageId: 'preferConstAssertion', + line: 3, + column: 18, + }, + ], + }, + { + code: ` +class foo { + foo = 5 as 5; +} + `.trimRight(), + output: ` +class foo { + foo = 5 as const; +} + `.trimRight(), + errors: [ + { + messageId: 'preferConstAssertion', + line: 3, + column: 14, + }, + ], + }, ], }); diff --git a/packages/eslint-plugin/tests/rules/prefer-enum-initializers.test.ts b/packages/eslint-plugin/tests/rules/prefer-enum-initializers.test.ts index 0a49c52d945..adfdd065bb8 100644 --- a/packages/eslint-plugin/tests/rules/prefer-enum-initializers.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-enum-initializers.test.ts @@ -36,7 +36,7 @@ enum Direction { enum Direction { Up, } - `.trimRight(), + `, errors: [ { messageId: 'defineInitializer', @@ -49,7 +49,7 @@ enum Direction { enum Direction { Up = 0, } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -57,7 +57,7 @@ enum Direction { enum Direction { Up = 1, } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -65,7 +65,7 @@ enum Direction { enum Direction { Up = 'Up', } - `.trimRight(), + `, }, ], }, @@ -77,7 +77,7 @@ enum Direction { Up, Down, } - `.trimRight(), + `, errors: [ { messageId: 'defineInitializer', @@ -91,7 +91,7 @@ enum Direction { Up = 0, Down, } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -100,7 +100,7 @@ enum Direction { Up = 1, Down, } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -109,7 +109,7 @@ enum Direction { Up = 'Up', Down, } - `.trimRight(), + `, }, ], }, @@ -125,7 +125,7 @@ enum Direction { Up, Down = 1, } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -134,7 +134,7 @@ enum Direction { Up, Down = 2, } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -143,7 +143,7 @@ enum Direction { Up, Down = 'Down', } - `.trimRight(), + `, }, ], }, @@ -155,7 +155,7 @@ enum Direction { Up = 'Up', Down, } - `.trimRight(), + `, errors: [ { messageId: 'defineInitializer', @@ -169,7 +169,7 @@ enum Direction { Up = 'Up', Down = 1, } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -178,7 +178,7 @@ enum Direction { Up = 'Up', Down = 2, } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -187,7 +187,7 @@ enum Direction { Up = 'Up', Down = 'Down', } - `.trimRight(), + `, }, ], }, @@ -199,7 +199,7 @@ enum Direction { Up, Down = 'Down', } - `.trimRight(), + `, errors: [ { messageId: 'defineInitializer', @@ -213,7 +213,7 @@ enum Direction { Up = 0, Down = 'Down', } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -222,7 +222,7 @@ enum Direction { Up = 1, Down = 'Down', } - `.trimRight(), + `, }, { messageId: 'defineInitializerSuggestion', @@ -231,7 +231,7 @@ enum Direction { Up = 'Up', Down = 'Down', } - `.trimRight(), + `, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/prefer-function-type.test.ts b/packages/eslint-plugin/tests/rules/prefer-function-type.test.ts index 50fb8370b18..f4a002b1947 100644 --- a/packages/eslint-plugin/tests/rules/prefer-function-type.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-function-type.test.ts @@ -82,12 +82,7 @@ export default interface Foo { }, }, ], - output: ` -export default interface Foo { - /** comment */ - (): string; -} - `, + output: null, }, { code: ` @@ -364,7 +359,7 @@ interface Foo { }, }, ], - output: noFormat` + output: ` // isn't actually valid ts but want to not give message saying it refers to Foo. type Foo = () => { a: { @@ -390,7 +385,7 @@ type X = {} | { (): void; } }, }, ], - output: noFormat` + output: ` type X = {} | (() => void) `, }, @@ -407,7 +402,7 @@ type X = {} & { (): void; }; }, }, ], - output: noFormat` + output: ` type X = {} & (() => void); `, }, diff --git a/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts b/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts index 8096df94c32..fd97aebdc79 100644 --- a/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-nullish-coalescing.test.ts @@ -71,6 +71,71 @@ x ?? 'foo'; `, ), + { + code: 'x !== undefined && x !== null ? x : y;', + options: [{ ignoreTernaryTests: true }], + }, + + ...[ + 'x !== undefined && x !== null ? "foo" : "bar";', + 'x !== null && x !== undefined && x !== 5 ? x : y', + 'x === null || x === undefined || x === 5 ? x : y', + 'x === undefined && x !== null ? x : y;', + 'x === undefined && x === null ? x : y;', + 'x !== undefined && x === null ? x : y;', + 'x === undefined || x !== null ? x : y;', + 'x === undefined || x === null ? x : y;', + 'x !== undefined || x === null ? x : y;', + 'x !== undefined || x === null ? y : x;', + 'x === null || x === null ? y : x;', + 'x === undefined || x === undefined ? y : x;', + 'x == null ? x : y;', + 'undefined == null ? x : y;', + 'undefined != z ? x : y;', + 'x == undefined ? x : y;', + 'x != null ? y : x;', + 'x != undefined ? y : x;', + 'null == x ? x : y;', + 'undefined == x ? x : y;', + 'null != x ? y : x;', + 'undefined != x ? y : x;', + ` +declare const x: string; +x === null ? x : y; + `, + ` +declare const x: string | undefined; +x === null ? x : y; + `, + ` +declare const x: string | null; +x === undefined ? x : y; + `, + ` +declare const x: string | undefined | null; +x !== undefined ? x : y; + `, + ` +declare const x: string | undefined | null; +x !== null ? x : y; + `, + ` +declare const x: string | null | any; +x === null ? x : y; + `, + ` +declare const x: string | null | unknown; +x === null ? x : y; + `, + ` +declare const x: string | undefined; +x === null ? x : y; + `, + ].map(code => ({ + code, + options: [{ ignoreTernaryTests: false }] as const, + })), + // ignoreConditionalTests ...nullishTypeValidTest((nullish, type) => ({ code: ` @@ -144,11 +209,11 @@ a && b || c || d; code: ` declare const x: ${type} | ${nullish}; x || 'foo'; - `.trimRight(), + `, output: null, errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 3, column: 3, endLine: 3, @@ -159,7 +224,159 @@ x || 'foo'; output: ` declare const x: ${type} | ${nullish}; x ?? 'foo'; - `.trimRight(), + `, + }, + ], + }, + ], + })), + + ...[ + 'x !== undefined && x !== null ? x : y;', + 'x !== null && x !== undefined ? x : y;', + 'x === undefined || x === null ? y : x;', + 'x === null || x === undefined ? y : x;', + 'undefined !== x && x !== null ? x : y;', + 'null !== x && x !== undefined ? x : y;', + 'undefined === x || x === null ? y : x;', + 'null === x || x === undefined ? y : x;', + 'x !== undefined && null !== x ? x : y;', + 'x !== null && undefined !== x ? x : y;', + 'x === undefined || null === x ? y : x;', + 'x === null || undefined === x ? y : x;', + 'undefined !== x && null !== x ? x : y;', + 'null !== x && undefined !== x ? x : y;', + 'undefined === x || null === x ? y : x;', + 'null === x || undefined === x ? y : x;', + 'x != undefined && x != null ? x : y;', + 'x == undefined || x == null ? y : x;', + 'x != undefined && x !== null ? x : y;', + 'x == undefined || x === null ? y : x;', + 'x !== undefined && x != null ? x : y;', + 'undefined != x ? x : y;', + 'null != x ? x : y;', + 'undefined == x ? y : x;', + 'null == x ? y : x;', + 'x != undefined ? x : y;', + 'x != null ? x : y;', + 'x == undefined ? y : x;', + 'x == null ? y : x;', + ].flatMap(code => [ + { + code, + output: null, + options: [{ ignoreTernaryTests: false }] as const, + errors: [ + { + messageId: 'preferNullishOverTernary' as const, + line: 1, + column: 1, + endLine: 1, + endColumn: code.length, + suggestions: [ + { + messageId: 'suggestNullish' as const, + output: 'x ?? y;', + }, + ], + }, + ], + }, + { + code: code.replace(/x/g, 'x.z[1][this[this.o]]["3"][a.b.c]'), + output: null, + options: [{ ignoreTernaryTests: false }] as const, + errors: [ + { + messageId: 'preferNullishOverTernary' as const, + line: 1, + column: 1, + endLine: 1, + endColumn: code.replace(/x/g, 'x.z[1][this[this.o]]["3"][a.b.c]') + .length, + suggestions: [ + { + messageId: 'suggestNullish' as const, + output: 'x.z[1][this[this.o]]["3"][a.b.c] ?? y;', + }, + ], + }, + ], + }, + ]), + + { + code: 'this != undefined ? this : y;', + output: null, + options: [{ ignoreTernaryTests: false }] as const, + errors: [ + { + messageId: 'preferNullishOverTernary' as const, + line: 1, + column: 1, + endLine: 1, + endColumn: 29, + suggestions: [ + { + messageId: 'suggestNullish' as const, + output: 'this ?? y;', + }, + ], + }, + ], + }, + + ...[ + ` +declare const x: string | undefined; +x !== undefined ? x : y; + `, + ` +declare const x: string | undefined; +undefined !== x ? x : y; + `, + ` +declare const x: string | undefined; +undefined === x ? y : x; + `, + ` +declare const x: string | undefined; +undefined === x ? y : x; + `, + ` +declare const x: string | null; +x !== null ? x : y; + `, + ` +declare const x: string | null; +null !== x ? x : y; + `, + ` +declare const x: string | null; +null === x ? y : x; + `, + ` +declare const x: string | null; +null === x ? y : x; + `, + ].map(code => ({ + code, + output: null, + options: [{ ignoreTernaryTests: false }] as const, + errors: [ + { + messageId: 'preferNullishOverTernary' as const, + line: 3, + column: 1, + endLine: 3, + endColumn: code.split('\n')[2].length, + suggestions: [ + { + messageId: 'suggestNullish' as const, + output: ` +${code.split('\n')[1]} +x ?? y; + `, }, ], }, @@ -171,12 +388,12 @@ x ?? 'foo'; code: ` declare const x: ${type} | ${nullish}; x || 'foo' ? null : null; - `.trimRight(), + `, output: null, options: [{ ignoreConditionalTests: false }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 3, column: 3, endLine: 3, @@ -187,7 +404,7 @@ x || 'foo' ? null : null; output: ` declare const x: ${type} | ${nullish}; x ?? 'foo' ? null : null; - `.trimRight(), + `, }, ], }, @@ -197,12 +414,12 @@ x ?? 'foo' ? null : null; code: ` declare const x: ${type} | ${nullish}; if (x || 'foo') {} - `.trimRight(), + `, output: null, options: [{ ignoreConditionalTests: false }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 3, column: 7, endLine: 3, @@ -213,7 +430,7 @@ if (x || 'foo') {} output: ` declare const x: ${type} | ${nullish}; if (x ?? 'foo') {} - `.trimRight(), + `, }, ], }, @@ -223,12 +440,12 @@ if (x ?? 'foo') {} code: ` declare const x: ${type} | ${nullish}; do {} while (x || 'foo') - `.trimRight(), + `, output: null, options: [{ ignoreConditionalTests: false }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 3, column: 16, endLine: 3, @@ -239,7 +456,7 @@ do {} while (x || 'foo') output: ` declare const x: ${type} | ${nullish}; do {} while (x ?? 'foo') - `.trimRight(), + `, }, ], }, @@ -249,12 +466,12 @@ do {} while (x ?? 'foo') code: ` declare const x: ${type} | ${nullish}; for (;x || 'foo';) {} - `.trimRight(), + `, output: null, options: [{ ignoreConditionalTests: false }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 3, column: 9, endLine: 3, @@ -265,7 +482,7 @@ for (;x || 'foo';) {} output: ` declare const x: ${type} | ${nullish}; for (;x ?? 'foo';) {} - `.trimRight(), + `, }, ], }, @@ -275,12 +492,12 @@ for (;x ?? 'foo';) {} code: ` declare const x: ${type} | ${nullish}; while (x || 'foo') {} - `.trimRight(), + `, output: null, options: [{ ignoreConditionalTests: false }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 3, column: 10, endLine: 3, @@ -291,7 +508,7 @@ while (x || 'foo') {} output: ` declare const x: ${type} | ${nullish}; while (x ?? 'foo') {} - `.trimRight(), + `, }, ], }, @@ -305,11 +522,11 @@ declare const a: ${type} | ${nullish}; declare const b: ${type} | ${nullish}; declare const c: ${type} | ${nullish}; a || b && c; - `.trimRight(), + `, options: [{ ignoreMixedLogicalExpressions: false }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 5, column: 3, endLine: 5, @@ -322,7 +539,7 @@ declare const a: ${type} | ${nullish}; declare const b: ${type} | ${nullish}; declare const c: ${type} | ${nullish}; a ?? b && c; - `.trimRight(), + `, }, ], }, @@ -335,11 +552,11 @@ declare const b: ${type} | ${nullish}; declare const c: ${type} | ${nullish}; declare const d: ${type} | ${nullish}; a || b || c && d; - `.trimRight(), + `, options: [{ ignoreMixedLogicalExpressions: false }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 6, column: 3, endLine: 6, @@ -353,12 +570,12 @@ declare const b: ${type} | ${nullish}; declare const c: ${type} | ${nullish}; declare const d: ${type} | ${nullish}; (a ?? b) || c && d; - `.trimRight(), + `, }, ], }, { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 6, column: 8, endLine: 6, @@ -372,7 +589,7 @@ declare const b: ${type} | ${nullish}; declare const c: ${type} | ${nullish}; declare const d: ${type} | ${nullish}; a || b ?? c && d; - `.trimRight(), + `, }, ], }, @@ -385,11 +602,11 @@ declare const b: ${type} | ${nullish}; declare const c: ${type} | ${nullish}; declare const d: ${type} | ${nullish}; a && b || c || d; - `.trimRight(), + `, options: [{ ignoreMixedLogicalExpressions: false }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 6, column: 8, endLine: 6, @@ -403,12 +620,12 @@ declare const b: ${type} | ${nullish}; declare const c: ${type} | ${nullish}; declare const d: ${type} | ${nullish}; a && (b ?? c) || d; - `.trimRight(), + `, }, ], }, { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 6, column: 13, endLine: 6, @@ -422,7 +639,7 @@ declare const b: ${type} | ${nullish}; declare const c: ${type} | ${nullish}; declare const d: ${type} | ${nullish}; a && b || c ?? d; - `.trimRight(), + `, }, ], }, @@ -434,12 +651,12 @@ a && b || c ?? d; code: ` declare const x: ${type} | ${nullish}; if (() => x || 'foo') {} - `.trimRight(), + `, output: null, options: [{ ignoreConditionalTests: true }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 3, column: 13, endLine: 3, @@ -450,7 +667,7 @@ if (() => x || 'foo') {} output: ` declare const x: ${type} | ${nullish}; if (() => x ?? 'foo') {} - `.trimRight(), + `, }, ], }, @@ -460,12 +677,12 @@ if (() => x ?? 'foo') {} code: ` declare const x: ${type} | ${nullish}; if (function werid() { return x || 'foo' }) {} - `.trimRight(), + `, output: null, options: [{ ignoreConditionalTests: true }], errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 3, column: 33, endLine: 3, @@ -476,13 +693,12 @@ if (function werid() { return x || 'foo' }) {} output: ` declare const x: ${type} | ${nullish}; if (function werid() { return x ?? 'foo' }) {} - `.trimRight(), + `, }, ], }, ], })), - // https://github.com/typescript-eslint/typescript-eslint/issues/1290 ...nullishTypeInvalidTest((nullish, type) => ({ code: ` @@ -490,11 +706,11 @@ declare const a: ${type} | ${nullish}; declare const b: ${type}; declare const c: ${type}; a || b || c; - `.trimRight(), + `, output: null, errors: [ { - messageId: 'preferNullish', + messageId: 'preferNullishOverOr', line: 5, column: 3, endLine: 5, @@ -507,7 +723,7 @@ declare const a: ${type} | ${nullish}; declare const b: ${type}; declare const c: ${type}; (a ?? b) || c; - `.trimRight(), + `, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts b/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts index 2b004e9d7a9..289e2c83fa5 100644 --- a/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-optional-chain.test.ts @@ -249,7 +249,7 @@ ruleTester.run('prefer-optional-chain', rule, { suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat`foo?.bar?.baz || baz && baz.bar && baz.bar.foo`, + output: `foo?.bar?.baz || baz && baz.bar && baz.bar.foo`, }, ], }, @@ -258,7 +258,7 @@ ruleTester.run('prefer-optional-chain', rule, { suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat`foo && foo.bar && foo.bar.baz || baz?.bar?.foo`, + output: `foo && foo.bar && foo.bar.baz || baz?.bar?.foo`, }, ], }, @@ -340,7 +340,7 @@ ruleTester.run('prefer-optional-chain', rule, { suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat`foo?.["some long string"]?.baz`, + output: `foo?.["some long string"]?.baz`, }, ], }, @@ -355,7 +355,7 @@ ruleTester.run('prefer-optional-chain', rule, { suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat`foo?.[\`some long string\`]?.baz`, + output: `foo?.[\`some long string\`]?.baz`, }, ], }, @@ -382,7 +382,7 @@ ruleTester.run('prefer-optional-chain', rule, { foo && foo.bar(/* comment */a, // comment2 b, ); - `.trimRight(), + `, output: null, errors: [ { @@ -390,11 +390,11 @@ foo && foo.bar(/* comment */a, suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat` + output: ` foo?.bar(/* comment */a, // comment2 b, ); - `.trimRight(), + `, }, ], }, @@ -712,7 +712,7 @@ foo?.bar(/* comment */a, suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat`if (foo) { foo?.bar; }`, + output: `if (foo) { foo?.bar; }`, }, ], }, @@ -728,7 +728,7 @@ foo?.bar(/* comment */a, suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat`if (foo?.bar) { foo.bar; }`, + output: `if (foo?.bar) { foo.bar; }`, }, ], }, @@ -945,7 +945,7 @@ foo?.bar(/* comment */a, suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat`if (foo) { foo?.bar; }`, + output: `if (foo) { foo?.bar; }`, }, ], }, @@ -961,7 +961,7 @@ foo?.bar(/* comment */a, suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat`if (foo?.bar) { foo.bar; }`, + output: `if (foo?.bar) { foo.bar; }`, }, ], }, @@ -1009,7 +1009,7 @@ foo?.bar(/* comment */a, suggestions: [ { messageId: 'optionalChainSuggest', - output: noFormat`((typeof x) as string)?.bar;`, + output: `((typeof x) as string)?.bar;`, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts b/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts index eadd526ca09..3f9b40b1eeb 100644 --- a/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts +++ b/packages/eslint-plugin/tests/rules/prefer-readonly-parameter-types.test.ts @@ -1,5 +1,5 @@ import { TSESLint } from '@typescript-eslint/utils'; -import { RuleTester, getFixturesRootDir } from '../RuleTester'; +import { RuleTester, getFixturesRootDir, noFormat } from '../RuleTester'; import rule from '../../src/rules/prefer-readonly-parameter-types'; import { InferMessageIdsTypeFromRule, @@ -288,7 +288,7 @@ ruleTester.run('prefer-readonly-parameter-types', rule, { new (arg: readonly string[]): void; } `, // TSConstructSignatureDeclaration - 'const x = { foo(arg: readonly string[]): void; };', // TSEmptyBodyFunctionExpression + noFormat`const x = { foo(arg: readonly string[]): void; };`, // TSEmptyBodyFunctionExpression 'function foo(arg: readonly string[]);', // TSDeclareFunction 'type Foo = (arg: readonly string[]) => void;', // TSFunctionType ` @@ -627,7 +627,7 @@ ruleTester.run('prefer-readonly-parameter-types', rule, { }, { // TSEmptyBodyFunctionExpression - code: 'const x = { foo(arg: string[]): void; };', + code: noFormat`const x = { foo(arg: string[]): void; };`, errors: [ { messageId: 'shouldBeReadonly', diff --git a/packages/eslint-plugin/tests/rules/promise-function-async.test.ts b/packages/eslint-plugin/tests/rules/promise-function-async.test.ts index 53ba5cb81a0..e1e570ce691 100644 --- a/packages/eslint-plugin/tests/rules/promise-function-async.test.ts +++ b/packages/eslint-plugin/tests/rules/promise-function-async.test.ts @@ -654,7 +654,7 @@ class Test { { line: 7, column: 3, messageId }, { line: 10, column: 3, messageId }, ], - output: noFormat` + output: ` class Test { @decorator(async () => {}) static protected async [(1)]() { diff --git a/packages/eslint-plugin/tests/rules/return-await.test.ts b/packages/eslint-plugin/tests/rules/return-await.test.ts index 43db87ef819..fd568272fe9 100644 --- a/packages/eslint-plugin/tests/rules/return-await.test.ts +++ b/packages/eslint-plugin/tests/rules/return-await.test.ts @@ -333,7 +333,7 @@ const fn = (): any => null; async function test() { return await fn(); } - `.trimRight(), + `, errors: [ { line: 4, @@ -346,7 +346,7 @@ const fn = (): any => null; async function test() { return fn(); } - `.trimRight(), + `, }, ], }, @@ -358,7 +358,7 @@ const fn = (): unknown => null; async function test() { return await fn(); } - `.trimRight(), + `, errors: [ { line: 4, @@ -371,7 +371,7 @@ const fn = (): unknown => null; async function test() { return fn(); } - `.trimRight(), + `, }, ], }, @@ -702,7 +702,7 @@ async function buzz() { return (await foo()) ? bar() : baz(); } `, - output: noFormat` + output: ` async function foo() {} async function bar() {} async function baz() {} @@ -736,7 +736,7 @@ async function buzz() { ) : baz ? baz() : bar(); } `, - output: noFormat` + output: ` async function foo() {} async function bar() {} async function baz() {} diff --git a/packages/eslint-plugin/tests/rules/sort-type-union-intersection-members.test.ts b/packages/eslint-plugin/tests/rules/sort-type-union-intersection-members.test.ts index 1d29a45ce61..83b23880d5e 100644 --- a/packages/eslint-plugin/tests/rules/sort-type-union-intersection-members.test.ts +++ b/packages/eslint-plugin/tests/rules/sort-type-union-intersection-members.test.ts @@ -127,7 +127,7 @@ const invalid = ( }, { code: noFormat`type T = (B) ${operator} (A);`, - output: noFormat`type T = A ${operator} B;`, + output: `type T = A ${operator} B;`, errors: [ { messageId: 'notSortedNamed', @@ -225,7 +225,7 @@ type T = ${operator} string ${operator} any; `, - output: noFormat` + output: ` type T = A ${operator} B ${operator} number[] ${operator} string[] ${operator} any ${operator} string ${operator} readonly number[] ${operator} readonly string[] ${operator} 'a' ${operator} 'b' ${operator} "a" ${operator} "b" ${operator} (() => string) ${operator} (() => void) ${operator} { a: string } ${operator} { b: string } ${operator} [1, 2, 3] ${operator} [1, 2, 4] ${operator} null ${operator} undefined; `, diff --git a/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts b/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts index 335c2c71346..b6da08b5965 100644 --- a/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts +++ b/packages/eslint-plugin/tests/rules/strict-boolean-expressions.test.ts @@ -268,15 +268,15 @@ if (y) { suggestions: [ { messageId: 'conditionFixCompareStringLength', - output: noFormat`if (((''.length > 0) && {}) || (0 && void 0)) { }`, + output: `if (((''.length > 0) && {}) || (0 && void 0)) { }`, }, { messageId: 'conditionFixCompareEmptyString', - output: noFormat`if ((('' !== "") && {}) || (0 && void 0)) { }`, + output: `if ((('' !== "") && {}) || (0 && void 0)) { }`, }, { messageId: 'conditionFixCastBoolean', - output: noFormat`if (((Boolean('')) && {}) || (0 && void 0)) { }`, + output: `if (((Boolean('')) && {}) || (0 && void 0)) { }`, }, ], }, @@ -288,15 +288,15 @@ if (y) { suggestions: [ { messageId: 'conditionFixCompareZero', - output: noFormat`if (('' && {}) || ((0 !== 0) && void 0)) { }`, + output: `if (('' && {}) || ((0 !== 0) && void 0)) { }`, }, { messageId: 'conditionFixCompareNaN', - output: noFormat`if (('' && {}) || ((!Number.isNaN(0)) && void 0)) { }`, + output: `if (('' && {}) || ((!Number.isNaN(0)) && void 0)) { }`, }, { messageId: 'conditionFixCastBoolean', - output: noFormat`if (('' && {}) || ((Boolean(0)) && void 0)) { }`, + output: `if (('' && {}) || ((Boolean(0)) && void 0)) { }`, }, ], }, @@ -625,7 +625,7 @@ if (y) { { messageId: 'conditionErrorNumber', line: 3, column: 26 }, { messageId: 'conditionErrorNumber', line: 4, column: 43 }, ], - output: noFormat` + output: ` if ([].length === 0) {} (a: number[]) => (a.length > 0) && "..." (...a: T) => (a.length > 0) || "empty"; @@ -717,7 +717,7 @@ if (y) { { messageId: 'conditionErrorNullableObject', line: 3, column: 33 }, { messageId: 'conditionErrorNullableObject', line: 4, column: 52 }, ], - output: noFormat` + output: ` declare const x: object | null; if (x != null) {} (x?: { a: number }) => x == null; (x: T) => (x != null) ? 1 : 0; @@ -962,7 +962,7 @@ if (x) { { messageId: 'conditionErrorNullableObject', line: 5, column: 9 }, { messageId: 'conditionErrorNullableObject', line: 6, column: 9 }, ], - output: noFormat` + output: ` declare const obj: { x: number } | null; (obj == null) ? 1 : 0 obj == null diff --git a/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts b/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts index 415afc20fc1..07a963716a0 100644 --- a/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts +++ b/packages/eslint-plugin/tests/rules/switch-exhaustiveness-check.test.ts @@ -1,6 +1,6 @@ import path from 'path'; import switchExhaustivenessCheck from '../../src/rules/switch-exhaustiveness-check'; -import { RuleTester, noFormat } from '../RuleTester'; +import { RuleTester } from '../RuleTester'; const rootPath = path.join(process.cwd(), 'tests/fixtures/'); @@ -436,14 +436,14 @@ function test(value: T): number { return 1; } } - `.trimRight(), + `, errors: [ { messageId: 'switchIsNotExhaustive', suggestions: [ { messageId: 'addMissingCases', - output: noFormat` + output: ` type T = 1 | 2; function test(value: T): number { @@ -453,7 +453,7 @@ function test(value: T): number { case 2: { throw new Error('Not implemented yet: 2 case') } } } - `.trimRight(), + `, }, ], }, @@ -468,14 +468,14 @@ function test(value: T): number { switch (value) { } } - `.trimRight(), + `, errors: [ { messageId: 'switchIsNotExhaustive', suggestions: [ { messageId: 'addMissingCases', - output: noFormat` + output: ` type T = 1 | 2; function test(value: T): number { @@ -484,7 +484,7 @@ function test(value: T): number { case 2: { throw new Error('Not implemented yet: 2 case') } } } - `.trimRight(), + `, }, ], }, @@ -502,14 +502,14 @@ function test(arg: Enum): string { switch (arg) { } } - `.trimRight(), + `, errors: [ { messageId: 'switchIsNotExhaustive', suggestions: [ { messageId: 'addMissingCases', - output: noFormat` + output: ` export enum Enum { 'test-test' = 'test-test', 'test' = 'test', @@ -521,7 +521,7 @@ function test(arg: Enum): string { case Enum.test: { throw new Error('Not implemented yet: Enum.test case') } } } - `.trimRight(), + `, }, ], }, @@ -539,14 +539,14 @@ function test(arg: Enum): string { switch (arg) { } } - `.trimRight(), + `, errors: [ { messageId: 'switchIsNotExhaustive', suggestions: [ { messageId: 'addMissingCases', - output: noFormat` + output: ` export enum Enum { '' = 'test-test', 'test' = 'test', @@ -558,7 +558,7 @@ function test(arg: Enum): string { case Enum.test: { throw new Error('Not implemented yet: Enum.test case') } } } - `.trimRight(), + `, }, ], }, @@ -576,14 +576,14 @@ function test(arg: Enum): string { switch (arg) { } } - `.trimRight(), + `, errors: [ { messageId: 'switchIsNotExhaustive', suggestions: [ { messageId: 'addMissingCases', - output: noFormat` + output: ` export enum Enum { '9test' = 'test-test', 'test' = 'test', @@ -595,7 +595,7 @@ function test(arg: Enum): string { case Enum.test: { throw new Error('Not implemented yet: Enum.test case') } } } - `.trimRight(), + `, }, ], }, diff --git a/packages/eslint-plugin/tests/rules/typedef.test.ts b/packages/eslint-plugin/tests/rules/typedef.test.ts index 19b6ff5a543..d6f724bfd0b 100644 --- a/packages/eslint-plugin/tests/rules/typedef.test.ts +++ b/packages/eslint-plugin/tests/rules/typedef.test.ts @@ -70,6 +70,32 @@ ruleTester.run('typedef', rule, { }, ], }, + { + code: 'const [[a]]: number[][] = [[1]];', + options: [ + { + arrayDestructuring: true, + }, + ], + }, + { + code: 'const foo = ([{ bar }]: { bar: string }[]) => {};', + options: [ + { + arrayDestructuring: true, + objectDestructuring: true, + }, + ], + }, + { + code: 'const foo = ([{ bar }]: [{ bar: string }]) => {};', + options: [ + { + arrayDestructuring: true, + objectDestructuring: true, + }, + ], + }, { code: 'const [a] = [1];', options: [ diff --git a/packages/eslint-plugin/tests/util/isNodeEqual.test.ts b/packages/eslint-plugin/tests/util/isNodeEqual.test.ts new file mode 100644 index 00000000000..76da9eabdb4 --- /dev/null +++ b/packages/eslint-plugin/tests/util/isNodeEqual.test.ts @@ -0,0 +1,106 @@ +import { TSESTree, TSESLint } from '@typescript-eslint/utils'; +import { getFixturesRootDir, RuleTester } from '../RuleTester'; +import { createRule, isNodeEqual } from '../../src/util'; + +const rule = createRule({ + name: 'no-useless-expression', + defaultOptions: [], + meta: { + type: 'suggestion', + fixable: 'code', + docs: { + description: 'Remove useless expressions.', + recommended: false, + }, + messages: { + removeExpression: 'Remove useless expression', + }, + schema: [], + }, + + create(context) { + const sourceCode = context.getSourceCode(); + + return { + LogicalExpression: (node: TSESTree.LogicalExpression): void => { + if ( + (node.operator === '??' || + node.operator === '||' || + node.operator === '&&') && + isNodeEqual(node.left, node.right) + ) { + context.report({ + node, + messageId: 'removeExpression', + fix(fixer: TSESLint.RuleFixer): TSESLint.RuleFix { + return fixer.replaceText( + node, + sourceCode.text.slice(node.left.range[0], node.left.range[1]), + ); + }, + }); + } + }, + }; + }, +}); + +const rootPath = getFixturesRootDir(); +const ruleTester = new RuleTester({ + parser: '@typescript-eslint/parser', + parserOptions: { + tsconfigRootDir: rootPath, + project: './tsconfig.json', + }, +}); + +ruleTester.run('isNodeEqual', rule, { + valid: [ + { code: 'a || b' }, + { code: '!true || true' }, + { code: 'a() || a()' }, + { code: 'foo.bar || foo.bar.foo' }, + ], + invalid: [ + { + code: 'undefined || undefined', + errors: [{ messageId: 'removeExpression' }], + output: 'undefined', + }, + { + code: 'true && true', + errors: [{ messageId: 'removeExpression' }], + output: 'true', + }, + { + code: 'a || a', + errors: [{ messageId: 'removeExpression' }], + output: 'a', + }, + { + code: 'a && a', + errors: [{ messageId: 'removeExpression' }], + output: 'a', + }, + { + code: 'a ?? a', + errors: [{ messageId: 'removeExpression' }], + output: 'a', + }, + { + code: 'foo.bar || foo.bar', + errors: [{ messageId: 'removeExpression' }], + output: 'foo.bar', + }, + { + code: 'this.foo.bar || this.foo.bar', + errors: [{ messageId: 'removeExpression' }], + output: 'this.foo.bar', + }, + { + code: 'x.z[1][this[this.o]]["3"][a.b.c] || x.z[1][this[this.o]]["3"][a.b.c]', + errors: [{ messageId: 'removeExpression' }], + output: 'x.z[1][this[this.o]]["3"][a.b.c]', + }, + ], +}); diff --git a/packages/experimental-utils/CHANGELOG.md b/packages/experimental-utils/CHANGELOG.md index 82ac5a97f45..eaa51a7465b 100644 --- a/packages/experimental-utils/CHANGELOG.md +++ b/packages/experimental-utils/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + +**Note:** Version bump only for package @typescript-eslint/experimental-utils + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/experimental-utils diff --git a/packages/experimental-utils/package.json b/packages/experimental-utils/package.json index 6c5d8d7137d..9f993c3e80c 100644 --- a/packages/experimental-utils/package.json +++ b/packages/experimental-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/experimental-utils", - "version": "5.30.6", + "version": "5.33.1", "description": "(Experimental) Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -38,7 +38,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "5.30.6" + "@typescript-eslint/utils": "5.33.1" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 42e7989b268..fe2606d9a42 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,49 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/parser + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + + +### Bug Fixes + +* expose types supporting old versions of typescript ([#5339](https://github.com/typescript-eslint/typescript-eslint/issues/5339)) ([4ba9bdb](https://github.com/typescript-eslint/typescript-eslint/commit/4ba9bdb93f87e6bc370f13aa1de48f435abe3f88)) + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/README.md b/packages/parser/README.md index 018935b2ca9..3488cd5e505 100644 --- a/packages/parser/README.md +++ b/packages/parser/README.md @@ -256,7 +256,7 @@ Note that if you pass custom programs via `options.programs` this option will no Default `undefined`. -This option allow you to tell parser to act as if `emitDecoratorMetadata: true` is set in `tsconfig.json`, but without [type-aware linting](https://typescript-eslint.io/docs/linting/type-linting). In other words, you don't have to specify `parserOptions.project` in this case, making the linting process faster. +This option allow you to tell parser to act as if `emitDecoratorMetadata: true` is set in `tsconfig.json`, but without [type-aware linting](https://typescript-eslint.io/docs/linting/typed-linting). In other words, you don't have to specify `parserOptions.project` in this case, making the linting process faster. ## Utilities diff --git a/packages/parser/package.json b/packages/parser/package.json index e12172132f1..7e62fdf78ee 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,11 +1,12 @@ { "name": "@typescript-eslint/parser", - "version": "5.30.6", + "version": "5.33.1", "description": "An ESLint custom parser which leverages TypeScript ESTree", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist", + "_ts3.4", "README.md", "LICENSE" ], @@ -44,9 +45,9 @@ "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.6", - "@typescript-eslint/types": "5.30.6", - "@typescript-eslint/typescript-estree": "5.30.6", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index d90cece2a7e..06fdd568c37 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,52 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + + +### Bug Fixes + +* **scope-manager:** handle typeParameters of TSInstantiationExpression ([#5355](https://github.com/typescript-eslint/typescript-eslint/issues/5355)) ([2595ccf](https://github.com/typescript-eslint/typescript-eslint/commit/2595ccf67cd5158edbd6bebd9ac2dbd8bbd8b99c)) + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + + +### Bug Fixes + +* **scope-manager:** allow visiting of constraint in infer type ([#5331](https://github.com/typescript-eslint/typescript-eslint/issues/5331)) ([b2846a1](https://github.com/typescript-eslint/typescript-eslint/commit/b2846a16777a3aea7b1e6ac9d81b9b6dce0bb874)) + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/scope-manager diff --git a/packages/scope-manager/package.json b/packages/scope-manager/package.json index 99e2cd9bf28..daa9ed576ab 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "5.30.6", + "version": "5.33.1", "description": "TypeScript scope analyser for ESLint", "keywords": [ "eslint", @@ -38,12 +38,12 @@ "typecheck": "cd ../../ && nx typecheck @typescript-eslint/scope-manager" }, "dependencies": { - "@typescript-eslint/types": "5.30.6", - "@typescript-eslint/visitor-keys": "5.30.6" + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1" }, "devDependencies": { "@types/glob": "*", - "@typescript-eslint/typescript-estree": "5.30.6", + "@typescript-eslint/typescript-estree": "5.33.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/scope-manager/src/referencer/ClassVisitor.ts b/packages/scope-manager/src/referencer/ClassVisitor.ts index 92dab53ca90..47e0bdef41c 100644 --- a/packages/scope-manager/src/referencer/ClassVisitor.ts +++ b/packages/scope-manager/src/referencer/ClassVisitor.ts @@ -322,6 +322,10 @@ class ClassVisitor extends Visitor { this.visitType(node); } + protected visitStaticBlock(node: TSESTree.StaticBlock): void { + this.#referencer.scopeManager.nestClassStaticBlockScope(node); + } + ///////////////////// // Visit selectors // ///////////////////// @@ -359,6 +363,10 @@ class ClassVisitor extends Visitor { protected PrivateIdentifier(): void { // intentionally skip } + + protected StaticBlock(node: TSESTree.StaticBlock): void { + this.visitStaticBlock(node); + } } /** diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index 3190af3a56c..84b0d96a255 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -692,6 +692,13 @@ class Referencer extends Visitor { this.close(node); } + protected TSInstantiationExpression( + node: TSESTree.TSInstantiationExpression, + ): void { + this.visitChildren(node, ['typeParameters']); + this.visitType(node.typeParameters); + } + protected TSInterfaceDeclaration( node: TSESTree.TSInterfaceDeclaration, ): void { diff --git a/packages/scope-manager/src/referencer/TypeVisitor.ts b/packages/scope-manager/src/referencer/TypeVisitor.ts index 4b39676850d..ca80683538f 100644 --- a/packages/scope-manager/src/referencer/TypeVisitor.ts +++ b/packages/scope-manager/src/referencer/TypeVisitor.ts @@ -167,6 +167,8 @@ class TypeVisitor extends Visitor { typeParameter.name, new TypeDefinition(typeParameter.name, typeParameter), ); + + this.visit(typeParameter.constraint); } protected TSInterfaceDeclaration( diff --git a/packages/scope-manager/src/scope/ClassStaticBlockScope.ts b/packages/scope-manager/src/scope/ClassStaticBlockScope.ts index 40a5d54b37c..2bb3915e966 100644 --- a/packages/scope-manager/src/scope/ClassStaticBlockScope.ts +++ b/packages/scope-manager/src/scope/ClassStaticBlockScope.ts @@ -6,7 +6,7 @@ import { ScopeManager } from '../ScopeManager'; class ClassStaticBlockScope extends ScopeBase< ScopeType.classStaticBlock, - TSESTree.Expression, + TSESTree.StaticBlock, Scope > { constructor( diff --git a/packages/scope-manager/tests/fixtures/class/declaration/static-block.ts b/packages/scope-manager/tests/fixtures/class/declaration/static-block.ts new file mode 100644 index 00000000000..93b92f6cf1f --- /dev/null +++ b/packages/scope-manager/tests/fixtures/class/declaration/static-block.ts @@ -0,0 +1,3 @@ +class A { + static {} +} diff --git a/packages/scope-manager/tests/fixtures/class/declaration/static-block.ts.shot b/packages/scope-manager/tests/fixtures/class/declaration/static-block.ts.shot new file mode 100644 index 00000000000..b49013a5575 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/class/declaration/static-block.ts.shot @@ -0,0 +1,72 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`class declaration static-block 1`] = ` +ScopeManager { + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2 { + defs: Array [ + ClassNameDefinition$1 { + name: Identifier<"A">, + node: ClassDeclaration$1, + }, + ], + name: "A", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$3 { + defs: Array [ + ClassNameDefinition$2 { + name: Identifier<"A">, + node: ClassDeclaration$1, + }, + ], + name: "A", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + ], + scopes: Array [ + GlobalScope$1 { + block: Program$2, + isStrict: false, + references: Array [], + set: Map { + "const" => ImplicitGlobalConstTypeVariable, + "A" => Variable$2, + }, + type: "global", + upper: null, + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2, + ], + }, + ClassScope$2 { + block: ClassDeclaration$1, + isStrict: true, + references: Array [], + set: Map { + "A" => Variable$3, + }, + type: "class", + upper: GlobalScope$1, + variables: Array [ + Variable$3, + ], + }, + ClassStaticBlockScope$3 { + block: StaticBlock$3, + isStrict: true, + references: Array [], + set: Map {}, + type: "class-static-block", + upper: ClassScope$2, + variables: Array [], + }, + ], +} +`; diff --git a/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts new file mode 100644 index 00000000000..243db1b4aa8 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts @@ -0,0 +1,9 @@ +class Foo { + value: T; +} + +class Bar { + foo = Foo; +} + +new Bar(); diff --git a/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts.shot b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts.shot new file mode 100644 index 00000000000..4b22bb095c8 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments1.ts.shot @@ -0,0 +1,182 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`instantiation-expressions type-arguments1 1`] = ` +ScopeManager { + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2 { + defs: Array [ + ClassNameDefinition$1 { + name: Identifier<"Foo">, + node: ClassDeclaration$1, + }, + ], + name: "Foo", + references: Array [ + Reference$2 { + identifier: Identifier<"Foo">, + isRead: true, + isTypeReference: false, + isValueReference: true, + isWrite: false, + resolved: Variable$2, + }, + ], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$3 { + defs: Array [ + ClassNameDefinition$2 { + name: Identifier<"Foo">, + node: ClassDeclaration$1, + }, + ], + name: "Foo", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$4 { + defs: Array [ + TypeDefinition$3 { + name: Identifier<"T">, + node: TSTypeParameter$2, + }, + ], + name: "T", + references: Array [ + Reference$1 { + identifier: Identifier<"T">, + isRead: true, + isTypeReference: true, + isValueReference: false, + isWrite: false, + resolved: Variable$4, + }, + ], + isValueVariable: false, + isTypeVariable: true, + }, + Variable$5 { + defs: Array [ + ClassNameDefinition$4 { + name: Identifier<"Bar">, + node: ClassDeclaration$3, + }, + ], + name: "Bar", + references: Array [ + Reference$4 { + identifier: Identifier<"Bar">, + isRead: true, + isTypeReference: false, + isValueReference: true, + isWrite: false, + resolved: Variable$5, + }, + ], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$6 { + defs: Array [ + ClassNameDefinition$5 { + name: Identifier<"Bar">, + node: ClassDeclaration$3, + }, + ], + name: "Bar", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$7 { + defs: Array [ + TypeDefinition$6 { + name: Identifier<"T">, + node: TSTypeParameter$4, + }, + ], + name: "T", + references: Array [ + Reference$3 { + identifier: Identifier<"T">, + isRead: true, + isTypeReference: true, + isValueReference: false, + isWrite: false, + resolved: Variable$7, + }, + ], + isValueVariable: false, + isTypeVariable: true, + }, + ], + scopes: Array [ + GlobalScope$1 { + block: Program$5, + isStrict: false, + references: Array [ + Reference$4, + ], + set: Map { + "const" => ImplicitGlobalConstTypeVariable, + "Foo" => Variable$2, + "Bar" => Variable$5, + }, + type: "global", + upper: null, + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2, + Variable$5, + ], + }, + ClassScope$2 { + block: ClassDeclaration$1, + isStrict: true, + references: Array [ + Reference$1, + ], + set: Map { + "Foo" => Variable$3, + "T" => Variable$4, + }, + type: "class", + upper: GlobalScope$1, + variables: Array [ + Variable$3, + Variable$4, + ], + }, + ClassScope$3 { + block: ClassDeclaration$3, + isStrict: true, + references: Array [], + set: Map { + "Bar" => Variable$6, + "T" => Variable$7, + }, + type: "class", + upper: GlobalScope$1, + variables: Array [ + Variable$6, + Variable$7, + ], + }, + ClassFieldInitializerScope$4 { + block: TSInstantiationExpression$6, + isStrict: true, + references: Array [ + Reference$2, + Reference$3, + ], + set: Map {}, + type: "class-field-initializer", + upper: ClassScope$3, + variables: Array [], + }, + ], +} +`; diff --git a/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments2.ts b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments2.ts new file mode 100644 index 00000000000..a2f0d23446c --- /dev/null +++ b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments2.ts @@ -0,0 +1,6 @@ +function makeBox(value: T) { + return { value }; +} + +type BoxFunc = typeof makeBox; +const makeStringBox = makeBox; diff --git a/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments2.ts.shot b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments2.ts.shot new file mode 100644 index 00000000000..e2f0a03503c --- /dev/null +++ b/packages/scope-manager/tests/fixtures/instantiation-expressions/type-arguments2.ts.shot @@ -0,0 +1,203 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`instantiation-expressions type-arguments2 1`] = ` +ScopeManager { + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2 { + defs: Array [ + FunctionNameDefinition$1 { + name: Identifier<"makeBox">, + node: FunctionDeclaration$1, + }, + ], + name: "makeBox", + references: Array [ + Reference$3 { + identifier: Identifier<"makeBox">, + isRead: true, + isTypeReference: false, + isValueReference: true, + isWrite: false, + resolved: Variable$2, + }, + Reference$6 { + identifier: Identifier<"makeBox">, + isRead: true, + isTypeReference: false, + isValueReference: true, + isWrite: false, + resolved: Variable$2, + }, + ], + isValueVariable: true, + isTypeVariable: false, + }, + Variable$3 { + defs: Array [], + name: "arguments", + references: Array [], + isValueVariable: true, + isTypeVariable: true, + }, + Variable$4 { + defs: Array [ + ParameterDefinition$2 { + name: Identifier<"value">, + node: FunctionDeclaration$1, + }, + ], + name: "value", + references: Array [ + Reference$2 { + identifier: Identifier<"value">, + isRead: true, + isTypeReference: false, + isValueReference: true, + isWrite: false, + resolved: Variable$4, + }, + ], + isValueVariable: true, + isTypeVariable: false, + }, + Variable$5 { + defs: Array [ + TypeDefinition$3 { + name: Identifier<"T">, + node: TSTypeParameter$2, + }, + ], + name: "T", + references: Array [ + Reference$1 { + identifier: Identifier<"T">, + isRead: true, + isTypeReference: true, + isValueReference: false, + isWrite: false, + resolved: Variable$5, + }, + ], + isValueVariable: false, + isTypeVariable: true, + }, + Variable$6 { + defs: Array [ + TypeDefinition$4 { + name: Identifier<"BoxFunc">, + node: TSTypeAliasDeclaration$3, + }, + ], + name: "BoxFunc", + references: Array [], + isValueVariable: false, + isTypeVariable: true, + }, + Variable$7 { + defs: Array [ + TypeDefinition$5 { + name: Identifier<"T">, + node: TSTypeParameter$4, + }, + ], + name: "T", + references: Array [ + Reference$4 { + identifier: Identifier<"T">, + isRead: true, + isTypeReference: true, + isValueReference: false, + isWrite: false, + resolved: Variable$7, + }, + ], + isValueVariable: false, + isTypeVariable: true, + }, + Variable$8 { + defs: Array [ + VariableDefinition$6 { + name: Identifier<"makeStringBox">, + node: VariableDeclarator$5, + }, + ], + name: "makeStringBox", + references: Array [ + Reference$5 { + identifier: Identifier<"makeStringBox">, + init: true, + isRead: false, + isTypeReference: false, + isValueReference: true, + isWrite: true, + resolved: Variable$8, + writeExpr: TSInstantiationExpression$6, + }, + ], + isValueVariable: true, + isTypeVariable: false, + }, + ], + scopes: Array [ + GlobalScope$1 { + block: Program$7, + isStrict: false, + references: Array [ + Reference$5, + Reference$6, + ], + set: Map { + "const" => ImplicitGlobalConstTypeVariable, + "makeBox" => Variable$2, + "BoxFunc" => Variable$6, + "makeStringBox" => Variable$8, + }, + type: "global", + upper: null, + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2, + Variable$6, + Variable$8, + ], + }, + FunctionScope$2 { + block: FunctionDeclaration$1, + isStrict: false, + references: Array [ + Reference$1, + Reference$2, + ], + set: Map { + "arguments" => Variable$3, + "value" => Variable$4, + "T" => Variable$5, + }, + type: "function", + upper: GlobalScope$1, + variables: Array [ + Variable$3, + Variable$4, + Variable$5, + ], + }, + TypeScope$3 { + block: TSTypeAliasDeclaration$3, + isStrict: true, + references: Array [ + Reference$3, + Reference$4, + ], + set: Map { + "T" => Variable$7, + }, + type: "type", + upper: GlobalScope$1, + variables: Array [ + Variable$7, + ], + }, + ], +} +`; diff --git a/packages/scope-manager/tests/fixtures/type-declaration/infer-type-constraint.ts b/packages/scope-manager/tests/fixtures/type-declaration/infer-type-constraint.ts new file mode 100644 index 00000000000..1fb19d20251 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/type-declaration/infer-type-constraint.ts @@ -0,0 +1,2 @@ +type X = string | number; +type Id = T extends { id: infer Id extends X } ? Id : never; diff --git a/packages/scope-manager/tests/fixtures/type-declaration/infer-type-constraint.ts.shot b/packages/scope-manager/tests/fixtures/type-declaration/infer-type-constraint.ts.shot new file mode 100644 index 00000000000..d26d25584a2 --- /dev/null +++ b/packages/scope-manager/tests/fixtures/type-declaration/infer-type-constraint.ts.shot @@ -0,0 +1,133 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`type-declaration infer-type-constraint 1`] = ` +ScopeManager { + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2 { + defs: Array [ + TypeDefinition$1 { + name: Identifier<"X">, + node: TSTypeAliasDeclaration$1, + }, + ], + name: "X", + references: Array [ + Reference$2 { + identifier: Identifier<"X">, + isRead: true, + isTypeReference: true, + isValueReference: false, + isWrite: false, + resolved: Variable$2, + }, + ], + isValueVariable: false, + isTypeVariable: true, + }, + Variable$3 { + defs: Array [ + TypeDefinition$2 { + name: Identifier<"Id">, + node: TSTypeAliasDeclaration$2, + }, + ], + name: "Id", + references: Array [], + isValueVariable: false, + isTypeVariable: true, + }, + Variable$4 { + defs: Array [ + TypeDefinition$3 { + name: Identifier<"T">, + node: TSTypeParameter$3, + }, + ], + name: "T", + references: Array [ + Reference$1 { + identifier: Identifier<"T">, + isRead: true, + isTypeReference: true, + isValueReference: false, + isWrite: false, + resolved: Variable$4, + }, + ], + isValueVariable: false, + isTypeVariable: true, + }, + Variable$5 { + defs: Array [ + TypeDefinition$4 { + name: Identifier<"Id">, + node: TSTypeParameter$4, + }, + ], + name: "Id", + references: Array [ + Reference$3 { + identifier: Identifier<"Id">, + isRead: true, + isTypeReference: true, + isValueReference: false, + isWrite: false, + resolved: Variable$5, + }, + ], + isValueVariable: false, + isTypeVariable: true, + }, + ], + scopes: Array [ + GlobalScope$1 { + block: Program$5, + isStrict: false, + references: Array [], + set: Map { + "const" => ImplicitGlobalConstTypeVariable, + "X" => Variable$2, + "Id" => Variable$3, + }, + type: "global", + upper: null, + variables: Array [ + ImplicitGlobalConstTypeVariable, + Variable$2, + Variable$3, + ], + }, + TypeScope$2 { + block: TSTypeAliasDeclaration$2, + isStrict: true, + references: Array [], + set: Map { + "T" => Variable$4, + }, + type: "type", + upper: GlobalScope$1, + variables: Array [ + Variable$4, + ], + }, + ConditionalTypeScope$3 { + block: TSConditionalType$6, + isStrict: true, + references: Array [ + Reference$1, + Reference$2, + Reference$3, + ], + set: Map { + "Id" => Variable$5, + }, + type: "conditionalType", + upper: TypeScope$2, + variables: Array [ + Variable$5, + ], + }, + ], +} +`; diff --git a/packages/shared-fixtures/CHANGELOG.md b/packages/shared-fixtures/CHANGELOG.md index 2c0df6861b4..afed76b2d5a 100644 --- a/packages/shared-fixtures/CHANGELOG.md +++ b/packages/shared-fixtures/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + +**Note:** Version bump only for package @typescript-eslint/shared-fixtures + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/shared-fixtures diff --git a/packages/shared-fixtures/package.json b/packages/shared-fixtures/package.json index b37dacb15ee..8e607694618 100644 --- a/packages/shared-fixtures/package.json +++ b/packages/shared-fixtures/package.json @@ -1,5 +1,5 @@ { "name": "@typescript-eslint/shared-fixtures", - "version": "5.30.6", + "version": "5.33.1", "private": true } diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 1b9ae98ff76..8e8c18736e8 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/type-utils + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/type-utils + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/type-utils + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/type-utils + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + +**Note:** Version bump only for package @typescript-eslint/type-utils + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/type-utils diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 5e96fde9e29..ea6dda64e27 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "5.30.6", + "version": "5.33.1", "description": "Type utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -39,12 +39,12 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "5.30.6", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, "devDependencies": { - "@typescript-eslint/parser": "5.30.6", + "@typescript-eslint/parser": "5.33.1", "typescript": "*" }, "peerDependencies": { diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 490e42d29d8..0f3476fdcb9 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,49 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/types + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + + +### Bug Fixes + +* expose types supporting old versions of typescript ([#5339](https://github.com/typescript-eslint/typescript-eslint/issues/5339)) ([4ba9bdb](https://github.com/typescript-eslint/typescript-eslint/commit/4ba9bdb93f87e6bc370f13aa1de48f435abe3f88)) + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/types diff --git a/packages/types/package.json b/packages/types/package.json index ef24916891a..76221b810ea 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "5.30.6", + "version": "5.33.1", "description": "Types for the TypeScript-ESTree AST spec", "keywords": [ "eslint", @@ -12,6 +12,7 @@ }, "files": [ "dist", + "_ts3.4", "package.json", "README.md", "LICENSE" diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 4a765b15335..e77f48f699d 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,49 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + + +### Bug Fixes + +* expose types supporting old versions of typescript ([#5339](https://github.com/typescript-eslint/typescript-eslint/issues/5339)) ([4ba9bdb](https://github.com/typescript-eslint/typescript-eslint/commit/4ba9bdb93f87e6bc370f13aa1de48f435abe3f88)) + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/typescript-estree diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index ae04d878112..d4d8ec9cbb3 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,11 +1,12 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "5.30.6", + "version": "5.33.1", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "main": "dist/index.js", "types": "dist/index.d.ts", "files": [ "dist", + "_ts3.4", "README.md", "LICENSE" ], @@ -41,8 +42,8 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "5.30.6", - "@typescript-eslint/visitor-keys": "5.30.6", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -58,7 +59,7 @@ "@types/is-glob": "*", "@types/semver": "*", "@types/tmp": "*", - "@typescript-eslint/shared-fixtures": "5.30.6", + "@typescript-eslint/shared-fixtures": "5.33.1", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index c80f314e26e..d1d293a1d6b 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/utils + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/utils + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/utils + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/utils + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + +**Note:** Version bump only for package @typescript-eslint/utils + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/utils diff --git a/packages/utils/package.json b/packages/utils/package.json index 06302a94153..ea37f5d9759 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "5.30.6", + "version": "5.33.1", "description": "Utilities for working with TypeScript + ESLint together", "keywords": [ "eslint", @@ -40,9 +40,9 @@ }, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.6", - "@typescript-eslint/types": "5.30.6", - "@typescript-eslint/typescript-estree": "5.30.6", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index 5ccff7534a2..754368e0fdf 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,49 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + + +### Bug Fixes + +* expose types supporting old versions of typescript ([#5339](https://github.com/typescript-eslint/typescript-eslint/issues/5339)) ([4ba9bdb](https://github.com/typescript-eslint/typescript-eslint/commit/4ba9bdb93f87e6bc370f13aa1de48f435abe3f88)) + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/visitor-keys diff --git a/packages/visitor-keys/package.json b/packages/visitor-keys/package.json index 0c650a1482a..a7037b89738 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "5.30.6", + "version": "5.33.1", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "keywords": [ "eslint", @@ -12,6 +12,7 @@ }, "files": [ "dist", + "_ts3.4", "package.json", "README.md", "LICENSE" @@ -38,7 +39,7 @@ "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "5.30.6", + "@typescript-eslint/types": "5.33.1", "eslint-visitor-keys": "^3.3.0" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index afd101b650d..77e76ec083f 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package @typescript-eslint/website-eslint diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index fdd48ca1a87..a20c8ac438f 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "5.30.6", + "version": "5.33.1", "private": true, "description": "ESLint which works in browsers.", "engines": { @@ -16,19 +16,19 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore" }, "dependencies": { - "@typescript-eslint/types": "5.30.6", - "@typescript-eslint/utils": "5.30.6" + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/utils": "5.33.1" }, "devDependencies": { "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.3.0", "@rollup/pluginutils": "^4.2.1", - "@typescript-eslint/eslint-plugin": "5.30.6", - "@typescript-eslint/parser": "5.30.6", - "@typescript-eslint/scope-manager": "5.30.6", - "@typescript-eslint/typescript-estree": "5.30.6", - "@typescript-eslint/visitor-keys": "5.30.6", + "@typescript-eslint/eslint-plugin": "5.33.1", + "@typescript-eslint/parser": "5.33.1", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1", "eslint": "*", "rollup": "^2.75.4", "rollup-plugin-terser": "^7.0.2", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index 7663d520bf0..ca602456dff 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -3,6 +3,46 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [5.33.1](https://github.com/typescript-eslint/typescript-eslint/compare/v5.33.0...v5.33.1) (2022-08-15) + +**Note:** Version bump only for package website + + + + + +# [5.33.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.32.0...v5.33.0) (2022-08-08) + +**Note:** Version bump only for package website + + + + + +# [5.32.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.31.0...v5.32.0) (2022-08-01) + +**Note:** Version bump only for package website + + + + + +# [5.31.0](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.7...v5.31.0) (2022-07-25) + +**Note:** Version bump only for package website + + + + + +## [5.30.7](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.6...v5.30.7) (2022-07-18) + +**Note:** Version bump only for package website + + + + + ## [5.30.6](https://github.com/typescript-eslint/typescript-eslint/compare/v5.30.5...v5.30.6) (2022-07-11) **Note:** Version bump only for package website diff --git a/packages/website/data/sponsors.json b/packages/website/data/sponsors.json index 30bdac33d5d..a416ca02959 100644 --- a/packages/website/data/sponsors.json +++ b/packages/website/data/sponsors.json @@ -12,7 +12,7 @@ "image": "https://images.opencollective.com/nx/0efbe42/logo.png", "name": "Nx (by Nrwl)", "tier": "sponsor", - "totalDonations": 450000, + "totalDonations": 475000, "website": "https://nx.dev" }, { @@ -20,7 +20,7 @@ "image": "https://images.opencollective.com/eslint/96b09dc/logo.png", "name": "ESLint", "tier": "sponsor", - "totalDonations": 155000, + "totalDonations": 170000, "website": "https://eslint.org/" }, { @@ -28,7 +28,7 @@ "image": "https://images.opencollective.com/airbnb/d327d66/logo.png", "name": "Airbnb", "tier": "sponsor", - "totalDonations": 120800, + "totalDonations": 125800, "website": "https://www.airbnb.com/" }, { @@ -44,14 +44,14 @@ "image": "https://images.opencollective.com/n8n/dca2f0c/logo.png", "name": "n8n.io - n8n GmbH", "tier": "sponsor", - "totalDonations": 95000, + "totalDonations": 100000, "website": "https://n8n.io" }, { "id": "EY Doberman", "image": "https://images.opencollective.com/ey-doberman/b269462/logo.png", "name": "EY Doberman", - "tier": "sponsor", + "tier": "supporter", "totalDonations": 80400, "website": "https://doberman.co" }, @@ -59,24 +59,17 @@ "id": "GitBook", "image": "https://images.opencollective.com/gitbook/d35a8e7/logo.png", "name": "GitBook", - "tier": "sponsor", - "totalDonations": 70000, + "tier": "supporter", + "totalDonations": 80000, "website": "https://www.gitbook.com" }, { "id": "Codecademy", "image": "https://images.opencollective.com/codecademy/d56a48d/logo.png", "name": "Codecademy", - "tier": "sponsor", - "totalDonations": 60000, - "website": "https://codecademy.com" - }, - { - "id": "GitHub", - "image": "https://images.opencollective.com/guest-f9980024/avatar.png", - "name": "GitHub", "tier": "supporter", - "totalDonations": 56674 + "totalDonations": 70000, + "website": "https://codecademy.com" }, { "id": "Future Processing", @@ -98,7 +91,7 @@ "id": "Whitebox", "image": "https://images.opencollective.com/whiteboxinc/ef0d11d/logo.png", "name": "Whitebox", - "tier": "supporter", + "tier": "contributor", "totalDonations": 40000, "website": "https://whitebox.com" }, @@ -106,7 +99,7 @@ "id": "Monito", "image": "https://images.opencollective.com/monito/50fc878/logo.png", "name": "Monito", - "tier": "supporter", + "tier": "contributor", "totalDonations": 30000, "website": "https://www.monito.com" }, @@ -114,32 +107,33 @@ "id": "revo.js", "image": "https://images.opencollective.com/revojsro/82623a7/logo.png", "name": "revo.js", - "tier": "supporter", + "tier": "contributor", "totalDonations": 23000, "website": "https://revojs.ro" }, + { + "id": "STORIS", + "image": "https://images.opencollective.com/storis/dfb0e13/logo.png", + "name": "STORIS", + "tier": "contributor", + "totalDonations": 22500, + "website": "https://www.storis.com/" + }, { "id": "Ian MacLeod", "image": "https://images.opencollective.com/nevir/35c52ef/avatar.png", "name": "Ian MacLeod", - "tier": "supporter", + "tier": "contributor", "totalDonations": 22000, "website": "https://twitter.com/nevir" }, { - "id": "STORIS", - "image": "https://images.opencollective.com/storis/dfb0e13/logo.png", - "name": "STORIS", - "tier": "supporter", - "totalDonations": 21000, - "website": "https://www.storis.com/" - }, - { - "id": "Michael Ranciglio", - "image": "https://images.opencollective.com/michael-ranciglio/avatar.png", - "name": "Michael Ranciglio", - "tier": "supporter", - "totalDonations": 16500 + "id": "Sourcegraph", + "image": "https://images.opencollective.com/sourcegraph/8587b83/logo.png", + "name": "Sourcegraph", + "tier": "contributor", + "totalDonations": 20000, + "website": "https://about.sourcegraph.com" }, { "id": "Joe Alden", @@ -154,7 +148,7 @@ "image": "https://images.opencollective.com/blacksheepcode/976d69a/avatar.png", "name": "David Johnston", "tier": "contributor", - "totalDonations": 13000, + "totalDonations": 13500, "website": "https://blacksheepcode.com" }, { @@ -173,21 +167,6 @@ "totalDonations": 10000, "website": "https://www.theguardian.com/" }, - { - "id": "Yuta Fukazawa", - "image": "https://images.opencollective.com/yuta-fukazawa/a337601/avatar.png", - "name": "Yuta Fukazawa", - "tier": "contributor", - "totalDonations": 10000 - }, - { - "id": "Sourcegraph", - "image": "https://images.opencollective.com/sourcegraph/8587b83/logo.png", - "name": "Sourcegraph", - "tier": "sponsor", - "totalDonations": 10000, - "website": "https://about.sourcegraph.com" - }, { "id": "Laserhub", "image": "https://images.opencollective.com/laserhub/bae6275/logo.png", @@ -195,68 +174,5 @@ "tier": "contributor", "totalDonations": 10000, "website": "https://laserhub.com/" - }, - { - "id": "Tripwire, Inc.", - "image": "https://images.opencollective.com/tripwire/7599e30/logo.png", - "name": "Tripwire, Inc.", - "tier": "contributor", - "totalDonations": 8500, - "website": "https://tripwire.com" - }, - { - "id": "Evil Martians", - "image": "https://images.opencollective.com/evilmartians/707ab4d/logo.png", - "name": "Evil Martians", - "tier": "contributor", - "totalDonations": 8000, - "website": "https://evilmartians.com/" - }, - { - "id": "Balsa", - "image": "https://images.opencollective.com/balsa/77de498/logo.png", - "name": "Balsa", - "tier": "contributor", - "totalDonations": 8000, - "website": "https://balsa.com" - }, - { - "id": "Jeffrey Rennie", - "image": "https://images.opencollective.com/jeffrey-rennie/avatar.png", - "name": "Jeffrey Rennie", - "tier": "contributor", - "totalDonations": 7500 - }, - { - "id": "Pete Gonzalez", - "image": "https://images.opencollective.com/octogonz/513f01a/avatar.png", - "name": "Pete Gonzalez", - "tier": "contributor", - "totalDonations": 5000, - "website": "https://github.com/octogonz" - }, - { - "id": "Niklas Fiekas", - "image": "https://images.opencollective.com/niklas-fiekas/ffec4a8/avatar.png", - "name": "Niklas Fiekas", - "tier": "contributor", - "totalDonations": 5000, - "website": "https://backscattering.de" - }, - { - "id": "Corellium", - "image": "https://images.opencollective.com/corellium/aa8c228/logo.png", - "name": "Corellium", - "tier": "contributor", - "totalDonations": 4800, - "website": "https://www.corellium.com" - }, - { - "id": "Alexey Berezin", - "image": "https://images.opencollective.com/beraliv/034d971/avatar.png", - "name": "Alexey Berezin", - "tier": "contributor", - "totalDonations": 1500, - "website": "https://beraliv.dev" } ] diff --git a/packages/website/docusaurusConfig.ts b/packages/website/docusaurusConfig.ts index ac050430f53..89a97f1c81e 100644 --- a/packages/website/docusaurusConfig.ts +++ b/packages/website/docusaurusConfig.ts @@ -8,7 +8,7 @@ import type { Config } from '@docusaurus/types'; import { rulesMeta } from './rulesMeta'; import npm2yarnPlugin from '@docusaurus/remark-plugin-npm2yarn'; import tabsPlugin from 'remark-docusaurus-tabs'; -import { addRuleAttributesList } from './plugins/add-rule-attributes-list'; +import { generatedRuleDocs } from './plugins/generated-rule-docs'; const remarkPlugins: MDXPlugin[] = [[npm2yarnPlugin, { sync: true }]]; @@ -24,7 +24,7 @@ const presetClassicOptions: PresetClassicOptions = { routeBasePath: 'rules', editUrl: `${githubUrl}/edit/main/packages/website/`, beforeDefaultRemarkPlugins, - remarkPlugins: [...remarkPlugins, [addRuleAttributesList, {}]], + remarkPlugins: [...remarkPlugins, [generatedRuleDocs, {}]], exclude: ['TEMPLATE.md'], breadcrumbs: false, }, @@ -172,7 +172,7 @@ const config: Config = { url: 'https://typescript-eslint.io', baseUrl: '/', onBrokenLinks: 'throw', - onBrokenMarkdownLinks: 'warn', // If Markdown link resolution fails, it will result in a broken link anyways + onBrokenMarkdownLinks: 'throw', favicon: 'img/favicon.ico', organizationName: 'typescript-eslint', projectName: 'typescript-eslint', diff --git a/packages/website/package.json b/packages/website/package.json index 8218bad5760..1b7aa4f25b9 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "5.30.6", + "version": "5.33.1", "private": true, "scripts": { "build": "docusaurus build", @@ -20,7 +20,7 @@ "@docusaurus/remark-plugin-npm2yarn": "2.0.0-beta.21", "@docusaurus/theme-common": "2.0.0-beta.21", "@mdx-js/react": "1.6.22", - "@typescript-eslint/website-eslint": "5.30.6", + "@typescript-eslint/website-eslint": "5.33.1", "clsx": "^1.1.1", "eslint": "*", "json5": "^2.2.1", @@ -37,7 +37,7 @@ "@types/react": "^18.0.9", "@types/react-helmet": "^6.1.5", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "5.30.6", + "@typescript-eslint/eslint-plugin": "5.33.1", "copy-webpack-plugin": "^11.0.0", "cypress": "8.3.0", "cypress-axe": "^0.14.0", diff --git a/packages/website/plugins/add-rule-attributes-list.ts b/packages/website/plugins/add-rule-attributes-list.ts deleted file mode 100644 index febbfc35557..00000000000 --- a/packages/website/plugins/add-rule-attributes-list.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type * as unist from 'unist'; -import type * as mdast from 'mdast'; -import type { Plugin } from 'unified'; - -import * as eslintPlugin from '@typescript-eslint/eslint-plugin'; - -const addRuleAttributesList: Plugin = () => { - return (root, file) => { - if (file.stem == null) { - return; - } - - const rule = eslintPlugin.rules[file.stem]; - if (rule == null) { - return; - } - - const parent = root as unist.Parent; - const h2Idx = parent.children.findIndex( - child => child.type === 'heading' && (child as mdast.Heading).depth === 2, - ); - // The actual content will be injected on client side. - const attrNode = { - type: 'jsx', - value: ``, - }; - if (h2Idx != null) { - // insert it just before the first h2 in the doc - // this should be just after the rule's description - parent.children.splice(h2Idx, 0, attrNode); - } else { - // failing that, add it to the end - parent.children.push(attrNode); - } - }; -}; - -export { addRuleAttributesList }; diff --git a/packages/website/plugins/generated-rule-docs.ts b/packages/website/plugins/generated-rule-docs.ts new file mode 100644 index 00000000000..f074db04355 --- /dev/null +++ b/packages/website/plugins/generated-rule-docs.ts @@ -0,0 +1,61 @@ +import type * as unist from 'unist'; +import type * as mdast from 'mdast'; +import type { Plugin } from 'unified'; + +import * as eslintPlugin from '@typescript-eslint/eslint-plugin'; + +const generatedRuleDocs: Plugin = () => { + return (root, file) => { + if (file.stem == null) { + return; + } + + const docs = eslintPlugin.rules[file.stem]?.meta.docs; + if (!docs) { + return; + } + + const parent = root as unist.Parent; + + // 1. Remove the " ๐Ÿ›‘ This file is source code, not the primary documentation location! ๐Ÿ›‘" + parent.children.splice( + parent.children.findIndex(v => v.type === 'blockquote'), + 1, + ); + + // 2. Add a description of the rule at the top of the file + parent.children.unshift({ + children: [ + { + children: docs.description + .split(/`(.+?)`/) + .map((value, index, array) => ({ + type: index % 2 === 0 ? 'text' : 'inlineCode', + value: index === array.length - 1 ? `${value}.` : value, + })), + type: 'paragraph', + }, + ], + type: 'blockquote', + } as mdast.Blockquote); + + // 3. Add a rule attributes list... + const h2Idx = + // ...before the first h2, if it exists... + parent.children.findIndex( + child => + child.type === 'heading' && (child as mdast.Heading).depth === 2, + ) ?? + // ...or at the very end, if not. + parent.children.length; + + // The actual content will be injected on client side. + const attrNode = { + type: 'jsx', + value: ``, + }; + parent.children.splice(h2Idx, 0, attrNode); + }; +}; + +export { generatedRuleDocs }; diff --git a/packages/website/sidebars/sidebar.base.js b/packages/website/sidebars/sidebar.base.js index 8fbf27e2dc9..5b16af7f5f9 100644 --- a/packages/website/sidebars/sidebar.base.js +++ b/packages/website/sidebars/sidebar.base.js @@ -1,18 +1,37 @@ module.exports = { docs: [ - 'README', { - type: 'category', - label: 'Linting', collapsed: false, items: [ - 'linting/linting', - 'linting/type-linting', + { + label: 'Linting with Type Information', + items: ['linting/typed-linting/monorepos'], + link: { + id: 'linting/typed-linting', + type: 'doc', + }, + type: 'category', + }, 'linting/configs', - 'linting/monorepo', - 'linting/troubleshooting', - 'linting/tslint', + { + label: 'Troubleshooting & FAQs', + link: { + id: 'linting/troubleshooting', + type: 'doc', + }, + type: 'category', + items: [ + 'linting/troubleshooting/formatting', + 'linting/troubleshooting/tslint', + ], + }, ], + link: { + id: 'getting-started', + type: 'doc', + }, + label: 'Getting Started', + type: 'category', }, { type: 'category', diff --git a/packages/website/sidebars/sidebar.rules.js b/packages/website/sidebars/sidebar.rules.js index 4399d2da65f..b429359d13b 100644 --- a/packages/website/sidebars/sidebar.rules.js +++ b/packages/website/sidebars/sidebar.rules.js @@ -10,9 +10,20 @@ const rules = Object.entries(plugin.rules).map(([name, rule]) => { }; }); -const notDeprecatedRules = rules.filter(rule => !rule.meta.deprecated); +const deprecatedRules = new Set(rules.filter(rule => rule.meta.deprecated)); -const deprecatedRules = rules.filter(rule => rule.meta.deprecated); +const formattingRules = new Set( + rules.filter( + rule => !rule.meta.deprecated && rule.meta.fixable === 'whitespace', + ), +); + +const emphasizedRules = rules.filter( + rule => + !rule.meta.deprecated && + !deprecatedRules.has(rule) && + !formattingRules.has(rule), +); const paths = globby .sync('*.md', { @@ -31,34 +42,35 @@ const paths = globby ); }); -module.exports = { - someSidebar: [ - 'README', - { - type: 'category', - label: 'Rules', - collapsible: true, - collapsed: false, - items: notDeprecatedRules.map(item => { - return { - type: 'doc', - id: item.name, - label: item.name, - }; - }), - }, - { - type: 'category', - label: 'Deprecated', - collapsible: true, - collapsed: false, - items: [...deprecatedRules, ...paths].map(item => { +function createCategory(label, rules, additionalItems = []) { + const collapsed = !additionalItems.length; + return { + collapsed, + collapsible: collapsed, + items: [ + ...rules.map(rule => { return { type: 'doc', - id: item.name, - label: item.name, + id: rule.name, + label: rule.name, }; }), - }, + ...additionalItems, + ], + label, + type: 'category', + }; +} + +module.exports = { + someSidebar: [ + 'README', + createCategory('Rules', emphasizedRules, [ + createCategory('Formatting Rules', Array.from(formattingRules)), + createCategory('Deprecated Rules', [ + ...Array.from(deprecatedRules), + ...paths, + ]), + ]), ], }; diff --git a/packages/website/src/components/ErrorsViewer.tsx b/packages/website/src/components/ErrorsViewer.tsx index 6d7621d096a..10a19922fdb 100644 --- a/packages/website/src/components/ErrorsViewer.tsx +++ b/packages/website/src/components/ErrorsViewer.tsx @@ -7,7 +7,7 @@ import IconExternalLink from '@theme/IconExternalLink'; import styles from './ErrorsViewer.module.css'; export interface ErrorsViewerProps { - readonly value?: ErrorGroup[]; + readonly value?: ErrorGroup[] | Error; } export interface ErrorBlockProps { @@ -100,6 +100,17 @@ export default function ErrorsViewer({ setIsLocked(false); }, [value]); + if (value && !Array.isArray(value)) { + return ( +
+
+

ESLint internal error

+ {value?.stack} +
+
+ ); + } + return (
{value?.map(({ group, uri, items }) => { diff --git a/packages/website/src/components/FinancialContributors/Sponsor.tsx b/packages/website/src/components/FinancialContributors/Sponsor.tsx index f43b0d3d81e..4872233a6c9 100644 --- a/packages/website/src/components/FinancialContributors/Sponsor.tsx +++ b/packages/website/src/components/FinancialContributors/Sponsor.tsx @@ -1,18 +1,14 @@ import React from 'react'; import { SponsorData, SponsorIncludeOptions } from './types'; +import styles from './styles.module.css'; interface SponsorProps { - className?: string; include?: SponsorIncludeOptions; sponsor: SponsorData; } -export function Sponsor({ - className, - include = {}, - sponsor, -}: SponsorProps): JSX.Element { +export function Sponsor({ include = {}, sponsor }: SponsorProps): JSX.Element { let children = {`${sponsor.name}; if (include.name) { @@ -27,7 +23,7 @@ export function Sponsor({ if (include.link) { children = (

{title}

-

{description}

    {sponsors .filter(sponsor => sponsor.tier === tier) diff --git a/packages/website/src/components/FinancialContributors/Sponsors/styles.module.css b/packages/website/src/components/FinancialContributors/Sponsors/styles.module.css index 9c337f1ead6..e740c76f8bd 100644 --- a/packages/website/src/components/FinancialContributors/Sponsors/styles.module.css +++ b/packages/website/src/components/FinancialContributors/Sponsors/styles.module.css @@ -9,7 +9,6 @@ justify-content: center; align-items: flex-end; max-width: 800px; - margin: 10px auto; padding: 0; } @@ -20,6 +19,7 @@ } .sponsorsTier img { + display: block; margin: auto; } @@ -30,29 +30,42 @@ } .tier-sponsor { - gap: 16px; + gap: 32px 16px; } .tier-sponsor img { display: inline-block; max-height: 120px; + max-width: 120px; width: 120px; } .tier-supporter, .tier-contributor { align-items: center; - gap: 4px 16px; +} + +.tier-supporter { + font-size: 0.95rem; + line-height: 1; + gap: 24px; + padding-top: 16px; } .tier-supporter img { - max-height: 60px; - width: 60px; + max-height: 75px; + max-width: 75px; + width: 75px; +} + +.tier-contributor { + gap: 4px 24px; } .tier-contributor img { - max-height: 30px; - width: 30px; + max-height: 45px; + max-width: 45px; + width: 45px; } @media screen and (min-width: 700px) { diff --git a/packages/website/src/components/FinancialContributors/index.tsx b/packages/website/src/components/FinancialContributors/index.tsx index 9665632df41..9942fac27bf 100644 --- a/packages/website/src/components/FinancialContributors/index.tsx +++ b/packages/website/src/components/FinancialContributors/index.tsx @@ -15,32 +15,38 @@ export function FinancialContributors(): JSX.Element {
    - - Become a financial contributor - +
    + + Become a financial contributor + + + See all financial contributors + +
    ); } diff --git a/packages/website/src/components/FinancialContributors/styles.module.css b/packages/website/src/components/FinancialContributors/styles.module.css index b4de958b902..b1c348155aa 100644 --- a/packages/website/src/components/FinancialContributors/styles.module.css +++ b/packages/website/src/components/FinancialContributors/styles.module.css @@ -4,15 +4,22 @@ gap: 8px; } +.linksArea { + display: flex; + gap: 16px; + align-items: center; + flex-direction: column; + margin: 48px 24px 24px; +} + .become { - margin: 8px 0 24px; - font-size: 1rem; + font-size: 1.25rem; } @media screen and (min-width: 1150px) { .sponsorsContainer { display: grid; - grid-template-columns: 55% 45%; + grid-template-columns: 50% 50%; margin: auto; max-width: 100%; } @@ -34,4 +41,12 @@ .tierOtherArea { grid-area: 2 / 2 / 3 / 3; } + + .sponsorLink { + display: flex; + } + + .linksArea { + margin: 24px; + } } diff --git a/packages/website/src/components/OptionsSelector.tsx b/packages/website/src/components/OptionsSelector.tsx index f57f2600f49..b9b78edfad0 100644 --- a/packages/website/src/components/OptionsSelector.tsx +++ b/packages/website/src/components/OptionsSelector.tsx @@ -90,10 +90,9 @@ function OptionsSelectorContent({ name="ts" className="text--right" value={state.ts} + disabled={!tsVersions.length} onChange={updateTS} - options={((tsVersions.length && tsVersions) || [state.ts]).filter( - item => parseFloat(item) >= 3.3, - )} + options={(tsVersions.length && tsVersions) || [state.ts]} />
diff --git a/tests/integration/fixtures/vue-sfc/Hello.vue b/tests/integration/fixtures/vue-sfc/Hello.vue index 1ee0282919b..7855ce53597 100644 --- a/tests/integration/fixtures/vue-sfc/Hello.vue +++ b/tests/integration/fixtures/vue-sfc/Hello.vue @@ -3,7 +3,7 @@
- Hello {{ (name as any) }}{{ exclamationMarks }} + Hello {{ name as any }}{{ exclamationMarks }}
diff --git a/tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap b/tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap index c019630df43..513c225c023 100644 --- a/tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap +++ b/tests/integration/tests/__snapshots__/vue-sfc.test.ts.snap @@ -21,7 +21,7 @@ Array [
- Hello {{ (name as any) }}{{ exclamationMarks }} + Hello {{ name as any }}{{ exclamationMarks }}
diff --git a/tools/generate-sponsors.ts b/tools/generate-sponsors.ts index 2893bbcb1e3..eadeb1bb450 100644 --- a/tools/generate-sponsors.ts +++ b/tools/generate-sponsors.ts @@ -99,15 +99,6 @@ interface MemberAccountAndTier extends MemberAccount { const excludedNames = new Set([ 'Guest', // Apparent anonymous donor equivalent without an avatar 'Josh Goldberg', // Team member ๐Ÿ’– - - // These names *seem* to be spam websites, but we're not sure. - // If your name is mistakenly on this list, we're sorry; please let us know! - '420HUBS.COM', - 'Deal Empire', - 'Florian Studio', - 'java', - 'Loyalty Leo', - 'Penalty.com', ]); async function requestGraphql(key: keyof typeof queries): Promise { @@ -159,16 +150,16 @@ async function main(): Promise { ...accountsById[name], }; const totalDonations = totalDonationsById[name]; - const slug = fromAccount.tier?.slug ?? 'contributor'; + const website = fromAccount.website; return { id: name, image: fromAccount.imageUrl, name: fromAccount.name, - tier: getReportedTierSlug(slug, totalDonations), + tier: getReportedTierSlug(totalDonations, website), totalDonations, twitterHandle: fromAccount.twitterHandle, - website: fromAccount.website, + website, }; }) .filter(({ id, tier }) => { @@ -205,30 +196,22 @@ async function stringifyObject( }); } -function getReportedTierSlug(slug: string, totalDonations: number): string { - // Sponsors: Donors of $750 and/or a monthly amount of $100 or more - if ( - totalDonations >= 750_00 || - (slug === 'sponsor' && totalDonations >= 100_00) - ) { - return 'sponsor'; +function getReportedTierSlug( + totalDonations: number, + website: string, +): string | undefined { + if (!website) { + return undefined; } - // Gold Supporters: Donors of $150 and/or a monthly amount of $10 or more. - // We also only show gold supporters who have donated at least twice. - if ( - totalDonations >= 150_00 || - (slug === 'gold-supporter' && totalDonations >= 20_00) - ) { + if (totalDonations >= 1_000_00) { + return 'sponsor'; + } + if (totalDonations >= 500_00) { return 'supporter'; } - // Supporters: Donors of $50 and/or a monthly amount of $3 or more. - // We also only show supporters who have donated at least twice. - if ( - totalDonations >= 50_00 || - (slug === 'supporter' && totalDonations >= 6_00) - ) { + if (totalDonations >= 100_00) { return 'contributor'; } diff --git a/yarn.lock b/yarn.lock index 342a6a57eed..2af309cfae8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -186,9 +186,9 @@ source-map "^0.5.0" "@babel/eslint-parser@*", "@babel/eslint-parser@^7.18.2": - version "7.18.2" - resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.18.2.tgz#e14dee36c010edfb0153cf900c2b0815e82e3245" - integrity sha512-oFQYkE8SuH14+uR51JVAmdqwKYXGRjEXx7s+WiagVjqQ+HPE+nnwyF2qlVG8evUsUHmPcA+6YXMEDbIhEyQc5A== + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.18.9.tgz#255a63796819a97b7578751bb08ab9f2a375a031" + integrity sha512-KzSGpMBggz4fKbRbWLNyPVTuQr6cmCcBhOyXTw/fieOVaw5oYAwcAj4a7UKcDYCPxQq+CG1NCDZH9e2JTXquiQ== dependencies: eslint-scope "^5.1.1" eslint-visitor-keys "^2.1.0" @@ -376,6 +376,11 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-string-parser@^7.18.10": + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56" + integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw== + "@babel/helper-validator-identifier@^7.16.7", "@babel/helper-validator-identifier@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" @@ -1146,10 +1151,10 @@ core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.8.4": - version "7.18.6" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.6.tgz#6a1ef59f838debd670421f8c7f2cbb8da9751580" - integrity sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ== +"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.3", "@babel/runtime@^7.18.9", "@babel/runtime@^7.8.4": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.18.9.tgz#b4fcfce55db3d2e5e080d2490f608a3b9f407f4a" + integrity sha512-lkqXDcvlFT5rvEjiu6+QYO+1GXrEHRo2LOtS7E4GtX5ESIZOgepqsZBVIj6Pv+a6zqsya9VCgiK1KAK4BvJDAw== dependencies: regenerator-runtime "^0.13.4" @@ -1179,10 +1184,11 @@ globals "^11.1.0" "@babel/types@^7.0.0", "@babel/types@^7.12.7", "@babel/types@^7.15.6", "@babel/types@^7.16.0", "@babel/types@^7.16.7", "@babel/types@^7.16.8", "@babel/types@^7.17.0", "@babel/types@^7.17.12", "@babel/types@^7.18.0", "@babel/types@^7.18.2", "@babel/types@^7.18.4", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4": - version "7.18.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.7.tgz#a4a2c910c15040ea52cdd1ddb1614a65c8041726" - integrity sha512-QG3yxTcTIBoAcQmkCs+wAPYZhu7Dk9rXKacINfNbdJDNERTbLQbHGyVG8q/YGMPeCJRIhSY0+fTc5+xuh6WPSQ== + version "7.18.10" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.10.tgz#4908e81b6b339ca7c6b7a555a5fc29446f26dde6" + integrity sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ== dependencies: + "@babel/helper-string-parser" "^7.18.10" "@babel/helper-validator-identifier" "^7.18.6" to-fast-properties "^2.0.0" @@ -1911,7 +1917,7 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@gar/promisify@^1.0.1", "@gar/promisify@^1.1.3": +"@gar/promisify@^1.1.3": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== @@ -1980,6 +1986,18 @@ jest-util "^28.1.1" slash "^3.0.0" +"@jest/console@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/console/-/console-28.1.3.tgz#2030606ec03a18c31803b8a36382762e447655df" + integrity sha512-QPAkP5EwKdK/bxIr6C1I4Vs0rm2nHiANzj/Z5X2JQkrZo6IqvC4ldZ9K95tF0HdidhA8Bo6egxSzUFPYKcEXLw== + dependencies: + "@jest/types" "^28.1.3" + "@types/node" "*" + chalk "^4.0.0" + jest-message-util "^28.1.3" + jest-util "^28.1.3" + slash "^3.0.0" + "@jest/core@^28.1.1": version "28.1.1" resolved "https://registry.yarnpkg.com/@jest/core/-/core-28.1.1.tgz#086830bec6267accf9af5ca76f794858e9f9f092" @@ -2016,11 +2034,11 @@ strip-ansi "^6.0.0" "@jest/create-cache-key-function@^27.4.2", "@jest/create-cache-key-function@^28": - version "28.1.1" - resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-28.1.1.tgz#35fe6afe57c70302979050f97a6c044eabab22fb" - integrity sha512-1nmZPX4u+3fDDcmfANU9P7NqCcPL08cUKj3BLEUCcSTl6OYBeMnggOuRH2b4rT+3lT5RxdF9bjPSfgLFvXi6tQ== + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/create-cache-key-function/-/create-cache-key-function-28.1.3.tgz#bdf51e40379eaf88e8dbc6b60af52e662101dcb4" + integrity sha512-Q2wyDISMLjffYu6vom582MfVDwYjeD8TayLsp/DqNgdVklVgIZT7hG2NUvtdj+KheqIGbbXMXiupEAB6qDqayg== dependencies: - "@jest/types" "^28.1.1" + "@jest/types" "^28.1.3" "@jest/environment@^28.1.1": version "28.1.1" @@ -2032,15 +2050,15 @@ "@types/node" "*" jest-mock "^28.1.1" -"@jest/environment@^28.1.2": - version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.2.tgz#94a052c0c5f9f8c8e6d13ea6da78dbc5d7d9b85b" - integrity sha512-I0CR1RUMmOzd0tRpz10oUfaChBWs+/Hrvn5xYhMEF/ZqrDaaeHwS8yDBqEWCrEnkH2g+WE/6g90oBv3nKpcm8Q== +"@jest/environment@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-28.1.3.tgz#abed43a6b040a4c24fdcb69eab1f97589b2d663e" + integrity sha512-1bf40cMFTEkKyEf585R9Iz1WayDjHoHqvts0XFYEqyKM3cFWDpeMoqKKTAF9LSYQModPUlh8FKptoM2YcMWAXA== dependencies: - "@jest/fake-timers" "^28.1.2" - "@jest/types" "^28.1.1" + "@jest/fake-timers" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" - jest-mock "^28.1.1" + jest-mock "^28.1.3" "@jest/expect-utils@^28.1.1": version "28.1.1" @@ -2049,6 +2067,13 @@ dependencies: jest-get-type "^28.0.2" +"@jest/expect-utils@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/expect-utils/-/expect-utils-28.1.3.tgz#58561ce5db7cd253a7edddbc051fb39dda50f525" + integrity sha512-wvbi9LUrHJLn3NlDW6wF2hvIMtd4JUl2QNVrjq+IBSHirgfrR3o9RnVtxzdEGO2n9JyIWwHnLfby5KzqBGg2YA== + dependencies: + jest-get-type "^28.0.2" + "@jest/expect@^28.1.1": version "28.1.1" resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.1.tgz#ea4fcc8504b45835029221c0dc357c622a761326" @@ -2057,13 +2082,13 @@ expect "^28.1.1" jest-snapshot "^28.1.1" -"@jest/expect@^28.1.2": - version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.2.tgz#0b25acedff46e1e1e5606285306c8a399c12534f" - integrity sha512-HBzyZBeFBiOelNbBKN0pilWbbrGvwDUwAqMC46NVJmWm8AVkuE58NbG1s7DR4cxFt4U5cVLxofAoHxgvC5MyOw== +"@jest/expect@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/expect/-/expect-28.1.3.tgz#9ac57e1d4491baca550f6bdbd232487177ad6a72" + integrity sha512-lzc8CpUbSoE4dqT0U+g1qODQjBRHPpCPXissXD4mS9+sWQdmmpeJ9zSH1rS1HEkrsMN0fb7nKrJ9giAR1d3wBw== dependencies: - expect "^28.1.1" - jest-snapshot "^28.1.2" + expect "^28.1.3" + jest-snapshot "^28.1.3" "@jest/fake-timers@^28.1.1": version "28.1.1" @@ -2077,17 +2102,17 @@ jest-mock "^28.1.1" jest-util "^28.1.1" -"@jest/fake-timers@^28.1.2": - version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.2.tgz#d49e8ee4e02ba85a6e844a52a5e7c59c23e3b76f" - integrity sha512-xSYEI7Y0D5FbZN2LsCUj/EKRR1zfQYmGuAUVh6xTqhx7V5JhjgMcK5Pa0iR6WIk0GXiHDe0Ke4A+yERKE9saqg== +"@jest/fake-timers@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-28.1.3.tgz#230255b3ad0a3d4978f1d06f70685baea91c640e" + integrity sha512-D/wOkL2POHv52h+ok5Oj/1gOG9HSywdoPtFsRCUmlCILXNn5eIWmcnd3DIiWlJnpGvQtmajqBP95Ei0EimxfLw== dependencies: - "@jest/types" "^28.1.1" + "@jest/types" "^28.1.3" "@sinonjs/fake-timers" "^9.1.2" "@types/node" "*" - jest-message-util "^28.1.1" - jest-mock "^28.1.1" - jest-util "^28.1.1" + jest-message-util "^28.1.3" + jest-mock "^28.1.3" + jest-util "^28.1.3" "@jest/globals@^28.1.1": version "28.1.1" @@ -2098,25 +2123,25 @@ "@jest/expect" "^28.1.1" "@jest/types" "^28.1.1" -"@jest/globals@^28.1.2": - version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.2.tgz#92fab296e337c7309c25e4202fb724f62249d83f" - integrity sha512-cz0lkJVDOtDaYhvT3Fv2U1B6FtBnV+OpEyJCzTHM1fdoTsU4QNLAt/H4RkiwEUU+dL4g/MFsoTuHeT2pvbo4Hg== +"@jest/globals@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-28.1.3.tgz#a601d78ddc5fdef542728309894895b4a42dc333" + integrity sha512-XFU4P4phyryCXu1pbcqMO0GSQcYe1IsalYCDzRNyhetyeyxMcIxa11qPNDpVNLeretItNqEmYYQn1UYz/5x1NA== dependencies: - "@jest/environment" "^28.1.2" - "@jest/expect" "^28.1.2" - "@jest/types" "^28.1.1" + "@jest/environment" "^28.1.3" + "@jest/expect" "^28.1.3" + "@jest/types" "^28.1.3" "@jest/reporters@27.5.1", "@jest/reporters@^28", "@jest/reporters@^28.1.1": - version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.2.tgz#0327be4ce4d0d9ae49e7908656f89669d0c2a260" - integrity sha512-/whGLhiwAqeCTmQEouSigUZJPVl7sW8V26EiboImL+UyXznnr1a03/YZ2BX8OlFw0n+Zlwu+EZAITZtaeRTxyA== + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-28.1.3.tgz#9adf6d265edafc5fc4a434cfb31e2df5a67a369a" + integrity sha512-JuAy7wkxQZVNU/V6g9xKzCGC5LVXx9FDcABKsSXp5MiKPEE2144a/vXTEDoyzjUpZKfVwp08Wqg5A4WfTMAzjg== dependencies: "@bcoe/v8-coverage" "^0.2.3" - "@jest/console" "^28.1.1" - "@jest/test-result" "^28.1.1" - "@jest/transform" "^28.1.2" - "@jest/types" "^28.1.1" + "@jest/console" "^28.1.3" + "@jest/test-result" "^28.1.3" + "@jest/transform" "^28.1.3" + "@jest/types" "^28.1.3" "@jridgewell/trace-mapping" "^0.3.13" "@types/node" "*" chalk "^4.0.0" @@ -2129,9 +2154,9 @@ istanbul-lib-report "^3.0.0" istanbul-lib-source-maps "^4.0.0" istanbul-reports "^3.1.3" - jest-message-util "^28.1.1" - jest-util "^28.1.1" - jest-worker "^28.1.1" + jest-message-util "^28.1.3" + jest-util "^28.1.3" + jest-worker "^28.1.3" slash "^3.0.0" string-length "^4.0.1" strip-ansi "^6.0.0" @@ -2145,6 +2170,13 @@ dependencies: "@sinclair/typebox" "^0.23.3" +"@jest/schemas@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/schemas/-/schemas-28.1.3.tgz#ad8b86a66f11f33619e3d7e1dcddd7f2d40ff905" + integrity sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg== + dependencies: + "@sinclair/typebox" "^0.24.1" + "@jest/source-map@^28.0.2": version "28.0.2" resolved "https://registry.yarnpkg.com/@jest/source-map/-/source-map-28.0.2.tgz#914546f4410b67b1d42c262a1da7e0406b52dc90" @@ -2163,24 +2195,24 @@ callsites "^3.0.0" graceful-fs "^4.2.9" -"@jest/test-result@27.5.1", "@jest/test-result@^28", "@jest/test-result@^28.1.1": - version "28.1.1" - resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.1.tgz#c6f18d1bbb01aa88925dd687872a75f8414b317a" - integrity sha512-hPmkugBktqL6rRzwWAtp1JtYT4VHwv8OQ+9lE5Gymj6dHzubI/oJHMUpPOt8NrdVWSrz9S7bHjJUmv2ggFoUNQ== +"@jest/test-result@27.5.1", "@jest/test-result@^28", "@jest/test-result@^28.1.1", "@jest/test-result@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/test-result/-/test-result-28.1.3.tgz#5eae945fd9f4b8fcfce74d239e6f725b6bf076c5" + integrity sha512-kZAkxnSE+FqE8YjW8gNuoVkkC9I7S1qmenl8sGcDOLropASP+BkcGKwhXoyqQuGOGeYY0y/ixjrd/iERpEXHNg== dependencies: - "@jest/console" "^28.1.1" - "@jest/types" "^28.1.1" + "@jest/console" "^28.1.3" + "@jest/types" "^28.1.3" "@types/istanbul-lib-coverage" "^2.0.0" collect-v8-coverage "^1.0.0" -"@jest/test-sequencer@^28.1.1": - version "28.1.1" - resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-28.1.1.tgz#f594ee2331df75000afe0d1ae3237630ecec732e" - integrity sha512-nuL+dNSVMcWB7OOtgb0EGH5AjO4UBCt68SLP08rwmC+iRhyuJWS9MtZ/MpipxFwKAlHFftbMsydXqWre8B0+XA== +"@jest/test-sequencer@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/test-sequencer/-/test-sequencer-28.1.3.tgz#9d0c283d906ac599c74bde464bc0d7e6a82886c3" + integrity sha512-NIMPEqqa59MWnDi1kvXXpYbqsfQmSJsIbnd85mdVGkiDfQ9WQQTXOLsvISUfonmnBT+w85WEgneCigEEdHDFxw== dependencies: - "@jest/test-result" "^28.1.1" + "@jest/test-result" "^28.1.3" graceful-fs "^4.2.9" - jest-haste-map "^28.1.1" + jest-haste-map "^28.1.3" slash "^3.0.0" "@jest/transform@^28.1.1": @@ -2204,22 +2236,22 @@ slash "^3.0.0" write-file-atomic "^4.0.1" -"@jest/transform@^28.1.2": - version "28.1.2" - resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.2.tgz#b367962c53fd53821269bde050ce373e111327c1" - integrity sha512-3o+lKF6iweLeJFHBlMJysdaPbpoMmtbHEFsjzSv37HIq/wWt5ijTeO2Yf7MO5yyczCopD507cNwNLeX8Y/CuIg== +"@jest/transform@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/transform/-/transform-28.1.3.tgz#59d8098e50ab07950e0f2fc0fc7ec462371281b0" + integrity sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA== dependencies: "@babel/core" "^7.11.6" - "@jest/types" "^28.1.1" + "@jest/types" "^28.1.3" "@jridgewell/trace-mapping" "^0.3.13" babel-plugin-istanbul "^6.1.1" chalk "^4.0.0" convert-source-map "^1.4.0" fast-json-stable-stringify "^2.0.0" graceful-fs "^4.2.9" - jest-haste-map "^28.1.1" + jest-haste-map "^28.1.3" jest-regex-util "^28.0.2" - jest-util "^28.1.1" + jest-util "^28.1.3" micromatch "^4.0.4" pirates "^4.0.4" slash "^3.0.0" @@ -2237,24 +2269,36 @@ "@types/yargs" "^17.0.8" chalk "^4.0.0" +"@jest/types@^28.1.3": + version "28.1.3" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-28.1.3.tgz#b05de80996ff12512bc5ceb1d208285a7d11748b" + integrity sha512-RyjiyMUZrKz/c+zlMFO1pm70DcIlST8AeWTkoUdZevew44wcNZQHsEVOiCVtgVnlFFD82FPaXycys58cf2muVQ== + dependencies: + "@jest/schemas" "^28.1.3" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" + "@jridgewell/gen-mapping@^0.3.0": - version "0.3.1" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9" - integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg== + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== dependencies: - "@jridgewell/set-array" "^1.0.0" + "@jridgewell/set-array" "^1.0.1" "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" "@jridgewell/resolve-uri@^3.0.3": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz#68eb521368db76d040a6315cdb24bf2483037b9c" - integrity sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew== + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== -"@jridgewell/set-array@^1.0.0": - version "1.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.1.tgz#36a6acc93987adcf0ba50c66908bd0b70de8afea" - integrity sha512-Ct5MqZkLGEXTVmQYbGtx9SVqD2fqwvdubdps5D3djjAkgkKwT918VNOz65pEHFaYTeWcukmJmH5SwsA9Tn2ObQ== +"@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== "@jridgewell/source-map@^0.3.2": version "0.3.2" @@ -2265,11 +2309,11 @@ "@jridgewell/trace-mapping" "^0.3.9" "@jridgewell/sourcemap-codec@^1.4.10": - version "1.4.11" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.11.tgz#771a1d8d744eeb71b6adb35808e1a6c7b9b8c8ec" - integrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg== + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/trace-mapping@^0.3.0", "@jridgewell/trace-mapping@^0.3.7", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.0", "@jridgewell/trace-mapping@^0.3.7": version "0.3.13" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.13.tgz#dcfe3e95f224c8fe97a87a5235defec999aa92ea" integrity sha512-o1xbKhp9qnIAoHJSWd6KlCZfqslL4valSF81H8ImioOAxluWYWOpWkpyktY2vnt4tbrX9XYaxovq6cgowaJp2w== @@ -2277,7 +2321,7 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13": +"@jridgewell/trace-mapping@^0.3.12", "@jridgewell/trace-mapping@^0.3.13", "@jridgewell/trace-mapping@^0.3.9": version "0.3.14" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== @@ -2290,484 +2334,485 @@ resolved "https://registry.yarnpkg.com/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz#b2ac626d6cb9c8718ab459166d4bb405b8ffa78b" integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== -"@lerna/add@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/add/-/add-5.1.6.tgz#f839096084a5d34da9e4813ea230da16c99b54c2" - integrity sha512-+dc5LUxFSxlTgDcC+nTdbFnUphmcGsypPF0eeYPc6tqUrpOpp3Ubn07dRGG0DbpZjk/roZj38DAvx7LYFalZAQ== +"@lerna/add@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/add/-/add-5.4.2.tgz#01cc9f14d1928bca0c0c107ebbe4834203967b8d" + integrity sha512-nkQLHIQH447x0+Rzo2ynJMUedblUk/HFxwWVWvxs4QyyB4zI1B0xuoNSXCgu34Xc/uED0DuUp/ZDc16LtPVK+Q== dependencies: - "@lerna/bootstrap" "5.1.6" - "@lerna/command" "5.1.6" - "@lerna/filter-options" "5.1.6" - "@lerna/npm-conf" "5.1.6" - "@lerna/validation-error" "5.1.6" + "@lerna/bootstrap" "5.4.2" + "@lerna/command" "5.4.2" + "@lerna/filter-options" "5.4.2" + "@lerna/npm-conf" "5.4.2" + "@lerna/validation-error" "5.4.2" dedent "^0.7.0" - npm-package-arg "^8.1.0" + npm-package-arg "8.1.1" p-map "^4.0.0" - pacote "^13.4.1" + pacote "^13.6.1" semver "^7.3.4" -"@lerna/bootstrap@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-5.1.6.tgz#70c643071cade4568fc9b22798a183afd787fb66" - integrity sha512-mCPYySlkreBmhK+uKhnwmBynVN0v7a6DCy4n3WiZ6oJ2puM/F1+8vjCBsWKmnR8YiLtUQt0dwL1fm/dCZgZy8g== - dependencies: - "@lerna/command" "5.1.6" - "@lerna/filter-options" "5.1.6" - "@lerna/has-npm-version" "5.1.6" - "@lerna/npm-install" "5.1.6" - "@lerna/package-graph" "5.1.6" - "@lerna/pulse-till-done" "5.1.6" - "@lerna/rimraf-dir" "5.1.6" - "@lerna/run-lifecycle" "5.1.6" - "@lerna/run-topologically" "5.1.6" - "@lerna/symlink-binary" "5.1.6" - "@lerna/symlink-dependencies" "5.1.6" - "@lerna/validation-error" "5.1.6" - "@npmcli/arborist" "5.2.0" +"@lerna/bootstrap@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/bootstrap/-/bootstrap-5.4.2.tgz#f33c196c372c41a3aca2c918aa64523d37a51323" + integrity sha512-rw/4bOrYHn4DxqkTEf/A0Y/Ma000K+MZbXx5wTct5UTHgshFsocLlb7BwGuU0t4foHEIYnz5AU71e7/Q6JKY7Q== + dependencies: + "@lerna/command" "5.4.2" + "@lerna/filter-options" "5.4.2" + "@lerna/has-npm-version" "5.4.2" + "@lerna/npm-install" "5.4.2" + "@lerna/package-graph" "5.4.2" + "@lerna/pulse-till-done" "5.4.2" + "@lerna/rimraf-dir" "5.4.2" + "@lerna/run-lifecycle" "5.4.2" + "@lerna/run-topologically" "5.4.2" + "@lerna/symlink-binary" "5.4.2" + "@lerna/symlink-dependencies" "5.4.2" + "@lerna/validation-error" "5.4.2" + "@npmcli/arborist" "5.3.0" dedent "^0.7.0" get-port "^5.1.1" multimatch "^5.0.0" - npm-package-arg "^8.1.0" + npm-package-arg "8.1.1" npmlog "^6.0.2" p-map "^4.0.0" p-map-series "^2.1.0" p-waterfall "^2.1.1" semver "^7.3.4" -"@lerna/changed@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-5.1.6.tgz#bf1c60cb90ac451191eb8cfd3fc807ee7a05ad19" - integrity sha512-+dy+qcKZTXmETJm9VVQHuVXfk9OeqPNcJ3qeMvvYBRuMYttEbGZDOrcCjE2vomLGhLpXElHKXnCaJEDAwEla8Q== +"@lerna/changed@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/changed/-/changed-5.4.2.tgz#9f36e9949aed42985cd369723ecaecf2df6fb9b0" + integrity sha512-QNEbOlIQkwQvWQozHZMwAVT9TsA1ybBV6VDb1VF/Awg7dsJYdWm/QUwztiXxtV3xzu3W9BzEuHeS3tctaoRgGg== dependencies: - "@lerna/collect-updates" "5.1.6" - "@lerna/command" "5.1.6" - "@lerna/listable" "5.1.6" - "@lerna/output" "5.1.6" + "@lerna/collect-updates" "5.4.2" + "@lerna/command" "5.4.2" + "@lerna/listable" "5.4.2" + "@lerna/output" "5.4.2" -"@lerna/check-working-tree@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-5.1.6.tgz#c9913325ef8467990217823cfe652e40e1acf964" - integrity sha512-WeTO1Vjyw7ZZzM/o1Q+UWFYvvbludM++MaDhEodpNZxL1bDMR3/bvtKa/SNq52aBr4nSKOLVz1BO0Lg+yNaZXQ== +"@lerna/check-working-tree@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/check-working-tree/-/check-working-tree-5.4.2.tgz#99786015d7f0acac602d029ccbaaaf57142e6037" + integrity sha512-N0+mcftjnoVvepzo6CVuKcqUULhNi5qxUAAjDeWvwfLu4ef9G2jxymE61mFtSmqjACW8zywT4rtp7hHNElmRbQ== dependencies: - "@lerna/collect-uncommitted" "5.1.6" - "@lerna/describe-ref" "5.1.6" - "@lerna/validation-error" "5.1.6" + "@lerna/collect-uncommitted" "5.4.2" + "@lerna/describe-ref" "5.4.2" + "@lerna/validation-error" "5.4.2" -"@lerna/child-process@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-5.1.6.tgz#d9e88c4fb8287d568938db395937b11c94627d7d" - integrity sha512-f0SPxNqXaurSoUMHDVCDjU1uA7/Qa9HnGdxiE9OoDaXaErlVloUT7Wpjbp5khryaJZC4PQ9HnnI3FSA/S/SHaA== +"@lerna/child-process@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/child-process/-/child-process-5.4.2.tgz#3c41e1e8fdbd81106d2e33ae23ed77017e1c8e39" + integrity sha512-ugaTl6SmmAIA5lvkGQpPN9u8ZpjWymHpD02MuRDQWxUMLzzY5t+YBave/JAOBTdhaCBsenZFp1dcC4WxBWGncw== dependencies: chalk "^4.1.0" execa "^5.0.0" strong-log-transformer "^2.1.0" -"@lerna/clean@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-5.1.6.tgz#5507910ebde670bf4cb843ddb86844f441038f39" - integrity sha512-SHRXg6R38NfAtwS8R3hYAacmdDds2Z/51G7YE8bMvmoE4c60eFsBwsCXwwdpPBXL/SdfEGSzoxwEvWHi+f6r7g== +"@lerna/clean@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/clean/-/clean-5.4.2.tgz#b12a649c12184326177508cdad9a3c6db50f4fde" + integrity sha512-kOxS5NjFm/YjcsPZGXJF6z0rzIeFgyF3EQfNHK5zpcEqU4YGqjN3WGoeCosVpxadQz7RFQVgTO9aPCYKSZR7fQ== dependencies: - "@lerna/command" "5.1.6" - "@lerna/filter-options" "5.1.6" - "@lerna/prompt" "5.1.6" - "@lerna/pulse-till-done" "5.1.6" - "@lerna/rimraf-dir" "5.1.6" + "@lerna/command" "5.4.2" + "@lerna/filter-options" "5.4.2" + "@lerna/prompt" "5.4.2" + "@lerna/pulse-till-done" "5.4.2" + "@lerna/rimraf-dir" "5.4.2" p-map "^4.0.0" p-map-series "^2.1.0" p-waterfall "^2.1.1" -"@lerna/cli@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-5.1.6.tgz#94a95cfdc0dd1e482f7b609a8771005e29cb3330" - integrity sha512-+cQoaOBK2ISw0z5uuHoP2QlV3EZZMdTPuPCVsLDuUwiJCDI3hF3Ps2qQauAZTKO8Ull7z3qid8Yv8sLNEMNrCA== +"@lerna/cli@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/cli/-/cli-5.4.2.tgz#a9d747553841c35b0267eba2316856cacbccbbfb" + integrity sha512-gC+zu8uvUqzMewZq0o5JqSU+PZvd9FKJxxGR3MjSUWoCcGlkwyrG8VVZLTtGMCi++kQSnKy/N9cG7ncQD0N6MQ== dependencies: - "@lerna/global-options" "5.1.6" + "@lerna/global-options" "5.4.2" dedent "^0.7.0" npmlog "^6.0.2" yargs "^16.2.0" -"@lerna/collect-uncommitted@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-5.1.6.tgz#56d0994e4039ec340c0c7d0e6ce5a2cd78df6079" - integrity sha512-IvAmcaENJZKXjTsxsalM8+GuApooqcsKJ74q/9yUGwO3FIMevQyz/VDOFDq7e0WCQoq6ttrdNihEjU/QTjNsMw== +"@lerna/collect-uncommitted@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/collect-uncommitted/-/collect-uncommitted-5.4.2.tgz#3bceb4ffe24da5e21e2f890acec81132d0697924" + integrity sha512-VdLD0QWK4dO5U5Pnz3QyJ5JUGHaIEudU4ZqQ/V9uBCZO3Z0bMbmneUljvH/J7XCT0HOkcDhV7KBZvV/yem83cw== dependencies: - "@lerna/child-process" "5.1.6" + "@lerna/child-process" "5.4.2" chalk "^4.1.0" npmlog "^6.0.2" -"@lerna/collect-updates@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-5.1.6.tgz#1ff373f01e5cd8b849f5918f2ab8585da3612433" - integrity sha512-CjKK3bteJpDzqrNOZMGYSwqF5CQsjiPv6soRdayBlJGXB3YW32M2UFcPD77Fvef/Q0xM7FEch3R3ZnBxgzGprg== +"@lerna/collect-updates@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/collect-updates/-/collect-updates-5.4.2.tgz#f320b15bfaa344aa5b7113379dff4765ac0decee" + integrity sha512-PshsjmoNpLkWdKpx2LRqU37PQnFViejhS+tYowKxy5q5XRE/LnsVrFAcNxnmo4zdMb9VuIOOHBRItjETWrwcag== dependencies: - "@lerna/child-process" "5.1.6" - "@lerna/describe-ref" "5.1.6" + "@lerna/child-process" "5.4.2" + "@lerna/describe-ref" "5.4.2" minimatch "^3.0.4" npmlog "^6.0.2" slash "^3.0.0" -"@lerna/command@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/command/-/command-5.1.6.tgz#22b4218d2ae5fc6f41ef7024d2b55995f8b4d986" - integrity sha512-zRiQels/N8LrR3ntkOn9dRE/0kzRKYTvJTdWcjfF7BC7Lz9VsNhPVy7tdv+Un5GZjVKhDQa/Tpn1h2t6/SLaSQ== +"@lerna/command@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/command/-/command-5.4.2.tgz#2ef5bb7d964090b0d57013fed287a2e3dd5f1e8e" + integrity sha512-RvSpAPghQoAUzpjKxxoq6ZezDtymZnimIilRjUCzdZWG68QznkTPaoGP3Yt/pPRoZIXLFeXBndcR+Go8BY0z+Q== dependencies: - "@lerna/child-process" "5.1.6" - "@lerna/package-graph" "5.1.6" - "@lerna/project" "5.1.6" - "@lerna/validation-error" "5.1.6" - "@lerna/write-log-file" "5.1.6" + "@lerna/child-process" "5.4.2" + "@lerna/package-graph" "5.4.2" + "@lerna/project" "5.4.2" + "@lerna/validation-error" "5.4.2" + "@lerna/write-log-file" "5.4.2" clone-deep "^4.0.1" dedent "^0.7.0" execa "^5.0.0" is-ci "^2.0.0" npmlog "^6.0.2" -"@lerna/conventional-commits@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-5.1.6.tgz#a37f671a46974ed7221e2fab801d5d41de9eb069" - integrity sha512-kgdQNglEtsIL6wWAhJieghcvvgpZxG2t2HPy+G/wx1qUbeUqTVkw0z88BDDZ7xOfQh6ffJ5GvLZhAj+LjijYxQ== +"@lerna/conventional-commits@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/conventional-commits/-/conventional-commits-5.4.2.tgz#65dec35922070078ec4cdd1131bf23d80e011e60" + integrity sha512-ovWKGDCMshLBcfgUICoyCOHFR9uCwQknvW6rlPZxjd5ajKHUIAW5zEQoSDkciELqfNUIWEKMu1MQcaJpAz/T3w== dependencies: - "@lerna/validation-error" "5.1.6" + "@lerna/validation-error" "5.4.2" conventional-changelog-angular "^5.0.12" - conventional-changelog-core "^4.2.2" + conventional-changelog-core "^4.2.4" conventional-recommended-bump "^6.1.0" fs-extra "^9.1.0" get-stream "^6.0.0" - npm-package-arg "^8.1.0" + npm-package-arg "8.1.1" npmlog "^6.0.2" pify "^5.0.0" semver "^7.3.4" -"@lerna/create-symlink@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-5.1.6.tgz#1a8e003a194da246e3ba0a22d7b4e4c847c15809" - integrity sha512-qkooK66GY2veqHEarbMraCzdgFpg8hwt3vjuBp9sMddYccXb7HHIsTXIOJPn4H5xFizblcRzf8fUJ73XkQZpUw== +"@lerna/create-symlink@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/create-symlink/-/create-symlink-5.4.2.tgz#78e09b8f121cdb2bf3ab05bf4c57ea51cb10d2cc" + integrity sha512-bD54HAcYnSWurW5z2TFvtmWOkpPPYMvNRpoDWFACQ98sBENgJSgFOnGBiui8uYkRB+dUjegIelSfIRsC3+VYsQ== dependencies: - cmd-shim "^4.1.0" + cmd-shim "^5.0.0" fs-extra "^9.1.0" npmlog "^6.0.2" -"@lerna/create@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/create/-/create-5.1.6.tgz#0e84aabcb4777c17b080f732b9e53d69aa8ae9cb" - integrity sha512-KVwxoYQsojgoUl3AxYSOM40Pa0Coo0SLKV57abVKfHmxfIEyvcGgtxNn6eA3M1lDVntqdlaBmNatkZRt3N1EHg== +"@lerna/create@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/create/-/create-5.4.2.tgz#039cb3f6c850908130c671f03ab9d691cddb4e93" + integrity sha512-LGkmNl/t7uywboQXX0SkIGcl52Gc6wahQS8eZEQN7arQvYWAQglArnQrkB8DlfxTbRrROz1KZky7dl67WObtYw== dependencies: - "@lerna/child-process" "5.1.6" - "@lerna/command" "5.1.6" - "@lerna/npm-conf" "5.1.6" - "@lerna/validation-error" "5.1.6" + "@lerna/child-process" "5.4.2" + "@lerna/command" "5.4.2" + "@lerna/npm-conf" "5.4.2" + "@lerna/validation-error" "5.4.2" dedent "^0.7.0" fs-extra "^9.1.0" globby "^11.0.2" - init-package-json "^2.0.2" - npm-package-arg "^8.1.0" + init-package-json "^3.0.2" + npm-package-arg "8.1.1" p-reduce "^2.1.0" - pacote "^13.4.1" + pacote "^13.6.1" pify "^5.0.0" semver "^7.3.4" slash "^3.0.0" validate-npm-package-license "^3.0.4" - validate-npm-package-name "^3.0.0" + validate-npm-package-name "^4.0.0" whatwg-url "^8.4.0" yargs-parser "20.2.4" -"@lerna/describe-ref@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-5.1.6.tgz#417c4f55b9b3a7d76131fe2da5dd1fa891c7f769" - integrity sha512-1VIy0hTkTnlcPqy5Q1hBMJALZbVhjMvRhCnzSgkP0dEuYjaRTyxr0DbhZ4CThREQuqfE3PB2f3DaHVRO8pSSeA== +"@lerna/describe-ref@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/describe-ref/-/describe-ref-5.4.2.tgz#4d2382c56b48be38a1c688b7a3fc867bc9a321af" + integrity sha512-aBDF8c4rKBrhJwp0/DJsflJQKIN2tYFGEnkvAhDHO05mzvLF1VHVN5YCuMbZTH0O0wr2kx9Rbs2lQjE5SVWkoQ== dependencies: - "@lerna/child-process" "5.1.6" + "@lerna/child-process" "5.4.2" npmlog "^6.0.2" -"@lerna/diff@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-5.1.6.tgz#07b1cc1cc6a1b38d05a4779d5915468f938d7dfc" - integrity sha512-UdZ2yHkeTczfwevY8zTIz3kX9gl57e7fkVfNM5zEXifvhbmIozjreurgD2LWf6k/fkEORaFeQ+4dcWGerE70rQ== +"@lerna/diff@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/diff/-/diff-5.4.2.tgz#a52d4298e2f942cfddc98cb7d8e497e2fbfd02f9" + integrity sha512-5rFeJ98Z407wT3Vuvk59o3VHwHzSzbEgiDu1Um4A0SmGXyCHUkUjIjaXv4q+IDgqgwkQKY7/rVEyQOdygR1XxQ== dependencies: - "@lerna/child-process" "5.1.6" - "@lerna/command" "5.1.6" - "@lerna/validation-error" "5.1.6" + "@lerna/child-process" "5.4.2" + "@lerna/command" "5.4.2" + "@lerna/validation-error" "5.4.2" npmlog "^6.0.2" -"@lerna/exec@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-5.1.6.tgz#de3fb272a14f6c66d4f6bd798ccd458bd4475ef7" - integrity sha512-1OGca09bVdMD5a2jr7kBQMyWMger6rzwgBWOdHxPaIajPJVUTqhcLBrtJA9qVZol7jztWgDLR3mFxrvmqGijaQ== - dependencies: - "@lerna/child-process" "5.1.6" - "@lerna/command" "5.1.6" - "@lerna/filter-options" "5.1.6" - "@lerna/profiler" "5.1.6" - "@lerna/run-topologically" "5.1.6" - "@lerna/validation-error" "5.1.6" +"@lerna/exec@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/exec/-/exec-5.4.2.tgz#8edf6ce79513ea9b5f73d07e78cc9b2a0a390cb2" + integrity sha512-tnucfUP/JKbiQ71XssPyjc6ysxwzWy5Munlv9Zt919czXkRejjjUkvnUPjdaBLALzvSLF2KYyMo6aS7WMetDaw== + dependencies: + "@lerna/child-process" "5.4.2" + "@lerna/command" "5.4.2" + "@lerna/filter-options" "5.4.2" + "@lerna/profiler" "5.4.2" + "@lerna/run-topologically" "5.4.2" + "@lerna/validation-error" "5.4.2" p-map "^4.0.0" -"@lerna/filter-options@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-5.1.6.tgz#cd9a9bba7ec040f5165d46cef5f0496bef140881" - integrity sha512-lssUzYGXEJONS14NHCMp5ddL2aNLamDQufYJh9ziNswcG2lxnis+aeboPxCAQooLptGqcIs6QXkcLo27GXsmbg== +"@lerna/filter-options@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/filter-options/-/filter-options-5.4.2.tgz#e6856b2212cf62274901ecc72ab3c56ea6346870" + integrity sha512-nEFn6yVtAQfKuit2A+rREzb967ydV728qmx7JGC1LDoqT2YQ1A4SQ30XqkPbL0/li48Uf1UCBxRuk/uoCcORHA== dependencies: - "@lerna/collect-updates" "5.1.6" - "@lerna/filter-packages" "5.1.6" + "@lerna/collect-updates" "5.4.2" + "@lerna/filter-packages" "5.4.2" dedent "^0.7.0" npmlog "^6.0.2" -"@lerna/filter-packages@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-5.1.6.tgz#438477438fec319d237d35833cd147323f3c800e" - integrity sha512-5cpAdwQoaGsutsY0xmd0x59IixFVZdpovxXiuhIGAakBdrwbNxNpstqJjnOEakOZ/arVQ0ozTUtZK7Vk0GjR9A== +"@lerna/filter-packages@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/filter-packages/-/filter-packages-5.4.2.tgz#0a601a63f48b81e4862f893b7a9ba8e80678b8fe" + integrity sha512-CQZLcKpNyZI1ods/3BU9EZZBfCwwEE73unOftNjBtKiIMjW9EzvEda671ivixSf2b4FXJOlocrm3v0+8vKOAKQ== dependencies: - "@lerna/validation-error" "5.1.6" + "@lerna/validation-error" "5.4.2" multimatch "^5.0.0" npmlog "^6.0.2" -"@lerna/get-npm-exec-opts@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-5.1.6.tgz#83f81184ac295c3423752b50382b8e0665c987f4" - integrity sha512-YQDHGrN/Ti56sAwBkV5y/Bn2H/aJ8fQzKG+blWdkcJgoBV04I5po0IbgKiGKl57+pd2bPpDEtcA6WYPyI1Spfw== +"@lerna/get-npm-exec-opts@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/get-npm-exec-opts/-/get-npm-exec-opts-5.4.2.tgz#c90b126cbc3c4b182f44d740e313ac7868e51795" + integrity sha512-DzeagB9ir2Law3B/A1ZPiPTnG3G+cD8s/FsOnqbmRJZ9Oc4bP2W1Znnhk1rQ+4fL/eq7fLGlCAXS1bKKq8I+lw== dependencies: npmlog "^6.0.2" -"@lerna/get-packed@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-5.1.6.tgz#af3a2992849573b5dece17322c5d9ce80fd9f832" - integrity sha512-m2LojNTkwSiC5dqvLP2gCj5ljPE1e8I2G/U8hIqdVttMwz5JAGbIx3MfACUBG83d5FzSqnCIA1xNkrEZFB4cQg== +"@lerna/get-packed@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/get-packed/-/get-packed-5.4.2.tgz#579bbc0f9b15d61d441ab5b0788fd97e1f61ead3" + integrity sha512-MCUqeSCWMb2xIHeHB2d74nAj5e5l4a+DKGQFI23bJJxmi2hEhqnNCrOYKaNXeNS+Th6gQiAZ4aMSSBlKEMOeKg== dependencies: fs-extra "^9.1.0" - ssri "^8.0.1" + ssri "^9.0.1" tar "^6.1.0" -"@lerna/github-client@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-5.1.6.tgz#6c20168ee8dc8ac55f2296ffb9ff204f3bc12664" - integrity sha512-ZydjvlhjUKT9HrB1xdcfBB7u/9Vlod1U2V91qj2CqCaWfwG5ob9jXK4v6tLEzZMGxUKKE2OQCyF7o20tHfkcJQ== +"@lerna/github-client@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/github-client/-/github-client-5.4.2.tgz#f47ee418cc35bc36a17b014b37fdf6df48bf8287" + integrity sha512-qYyw97hLLHvTrt6dw1g3HC9ZxABOcnkFS75C86MdZDf/9Itq3HpDU8WIFQJtu3AVV/vZGDAwh+dt2t8OLPGXwg== dependencies: - "@lerna/child-process" "5.1.6" + "@lerna/child-process" "5.4.2" "@octokit/plugin-enterprise-rest" "^6.0.1" - "@octokit/rest" "^18.1.0" - git-url-parse "^11.4.4" + "@octokit/rest" "^19.0.3" + git-url-parse "^12.0.0" npmlog "^6.0.2" -"@lerna/gitlab-client@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-5.1.6.tgz#1d600363ccfb798a93ce41a2a62084a148d57125" - integrity sha512-ck5XsIz7mQdBNtfKhH4dPrD6t1UZxWBrQeIUsCLO+NorXqYcG8Oqvmzrfm0iByCvaC1QCf+zImJYvMOzjozIpg== +"@lerna/gitlab-client@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/gitlab-client/-/gitlab-client-5.4.2.tgz#6b24b2c9fa6a2ec1b286f1a08a02b6bda283cb9f" + integrity sha512-AzQRIaBuJ/SyDoEVuoDgC2iGxJw00FhbNL3qYLPBP2tav/EFbVtyhwcC9PFC9ICdEn9rmumbxPFYAV6/vsETYA== dependencies: node-fetch "^2.6.1" npmlog "^6.0.2" whatwg-url "^8.4.0" -"@lerna/global-options@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-5.1.6.tgz#f6f6f4988c1dcb39d3877c0ef629e0256ed81b44" - integrity sha512-NHMVGs5zhxbtqnBuwujzanYhf7q/HsXBtPn0M/eJpEvcAXaMZgttUMyS2/1JnAUelrAbSMbT+0iOUzSlyD1gtw== +"@lerna/global-options@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/global-options/-/global-options-5.4.2.tgz#75dd4056ca3199ca8a4089bdb302b3f935ab310c" + integrity sha512-OZ55Fu3Mk4nm/d3rUTlFi8TcjGeZ6mxeudwWGCjCaR3N6KxhnhWwgO9Owc1ZnzIxDgcI6SOPxo4N8rSfDtR4+w== -"@lerna/has-npm-version@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-5.1.6.tgz#5e6f7a0b2f24382a56e654be187d0002950cf109" - integrity sha512-hDY5/qxp98oacg9fhBfbDmjuRCVHm1brdKsY76FJ4vN+m89sVhXLqqsSHNKCTiQ8OgSzokO2iQeysvgM7ZlqAg== +"@lerna/has-npm-version@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/has-npm-version/-/has-npm-version-5.4.2.tgz#ee61390cb1c62ceadefa5f3cfa730ceb14b8afca" + integrity sha512-uYDJuCNZLSaeaEwC4ACFYvTyL3rUGt1+/zB+CsqYJRm97y6gOwlnm5SGSsfEXtIf9BlnInNW+r/lh03nqaadAQ== dependencies: - "@lerna/child-process" "5.1.6" + "@lerna/child-process" "5.4.2" semver "^7.3.4" -"@lerna/import@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/import/-/import-5.1.6.tgz#2cd7a8c3a5ef8df1992d0e8f8a31110a3380fb66" - integrity sha512-RhWC/3heIevWseY+jzOfGiqPmTofaYyOOqd7+SVaVdSy79TGU0crxWpUECo7COc/FMflFVa+jlk1/JSXWpqG8g== +"@lerna/import@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/import/-/import-5.4.2.tgz#15caa1863ae06efd2528fae4a40f05d5c4d3685a" + integrity sha512-wuW32z/ayFvlSUTZfKZ5cCkg7VkiQJC3vETKLb055T2Vn6LKEpIcbTqyh0v8+Vxiy+rM7I8zu+MOIcJ6oZRW8Q== dependencies: - "@lerna/child-process" "5.1.6" - "@lerna/command" "5.1.6" - "@lerna/prompt" "5.1.6" - "@lerna/pulse-till-done" "5.1.6" - "@lerna/validation-error" "5.1.6" + "@lerna/child-process" "5.4.2" + "@lerna/command" "5.4.2" + "@lerna/prompt" "5.4.2" + "@lerna/pulse-till-done" "5.4.2" + "@lerna/validation-error" "5.4.2" dedent "^0.7.0" fs-extra "^9.1.0" p-map-series "^2.1.0" -"@lerna/info@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/info/-/info-5.1.6.tgz#d6f2b79a2c18eba14f8655b14601f1f84c60e61e" - integrity sha512-iB4rNweghxng4U7VUsN03M2mDRgjDr8Bv+llXGhtJoSrZ9XzJYyCvGaExG30sBr5VHaArIzJ11nnF0kSDg3bXg== +"@lerna/info@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/info/-/info-5.4.2.tgz#815e09ac3363bc939d70fbca5df5223a33b80b7b" + integrity sha512-kK/0Hs8nD0lyU+rQOB2MRQRErzYVba0I5NQXmHnqyLYsj1gSGh8GO9U/uWbihN3YuSdNMI/DpPDmU/fS++EdNw== dependencies: - "@lerna/command" "5.1.6" - "@lerna/output" "5.1.6" + "@lerna/command" "5.4.2" + "@lerna/output" "5.4.2" envinfo "^7.7.4" -"@lerna/init@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/init/-/init-5.1.6.tgz#2a00a242f69a30f710fa55f39501c2aeb4cd9618" - integrity sha512-S8N2vjWcHrqaowYLrX2KEbhXrs31q5wU5sfsjaJ4UxQd/cBUXvp4OWI98lRTQmXOOcw9XwJNDHhZXIR30Pn0aA== +"@lerna/init@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/init/-/init-5.4.2.tgz#6c1b45e997e96260983ff2a511edb01228174bb9" + integrity sha512-b9rLqkO22LL2eKs7+b95gkon8NE153X1jKbCxIzN2GsquKKKePFMjSE7LsUo8ZrstJS5i9rOT7yrzuLKynp7aw== dependencies: - "@lerna/child-process" "5.1.6" - "@lerna/command" "5.1.6" + "@lerna/child-process" "5.4.2" + "@lerna/command" "5.4.2" + "@lerna/project" "5.4.2" fs-extra "^9.1.0" p-map "^4.0.0" write-json-file "^4.3.0" -"@lerna/link@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/link/-/link-5.1.6.tgz#93123d2b03307444440698c96ff889e56044623f" - integrity sha512-H94MHjhltS8lMA3J38fzcbtQvNe1OoaMO/ZgacC9HvrntIoepqG/2boOKprW6cnTBSwmIFVCn2+LQloBJ2Nwbw== +"@lerna/link@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/link/-/link-5.4.2.tgz#62dbc6c8aec11aeafffc43b3f910c911b96d78a4" + integrity sha512-il4qFlqsFa76ag7pLxSS8U5XqvQ22T/JhcHOSNVVoMjUi9cFmUCjUHVKneXAa+58fEwoLCN6Hm7NiO9Df3nB1w== dependencies: - "@lerna/command" "5.1.6" - "@lerna/package-graph" "5.1.6" - "@lerna/symlink-dependencies" "5.1.6" + "@lerna/command" "5.4.2" + "@lerna/package-graph" "5.4.2" + "@lerna/symlink-dependencies" "5.4.2" p-map "^4.0.0" slash "^3.0.0" -"@lerna/list@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/list/-/list-5.1.6.tgz#61e25437a3a642866cabd1a162d53e95b45c2066" - integrity sha512-GofR6H1YKoVMj0Rczk9Y+Z/y7ymOKkklRLsUJQE0nWmlKkH8/tdxGHIgfR4sX2oiwtQGfFDc8ddtLX7DHAhMiA== +"@lerna/list@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/list/-/list-5.4.2.tgz#fd694e9038308f1a1e9dd17b410658b5c5dbdc8d" + integrity sha512-DFSKgNFkdoUXQkwkvj18dGZ0s8IKXd9LrenqOzSfdKqESbF/9ChVgRYmcJeBjMMDdwLsy5Ax4pBliWTrMqpOYA== dependencies: - "@lerna/command" "5.1.6" - "@lerna/filter-options" "5.1.6" - "@lerna/listable" "5.1.6" - "@lerna/output" "5.1.6" + "@lerna/command" "5.4.2" + "@lerna/filter-options" "5.4.2" + "@lerna/listable" "5.4.2" + "@lerna/output" "5.4.2" -"@lerna/listable@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-5.1.6.tgz#4b77de64f699f96bae8ccfe07d917f68bd10ffae" - integrity sha512-Aslj1Lo/t1jnyX+uKvBY4vyAsYKqW9A6nJ8+o1egkQ/bha8Ic4dr5z7HCBKhJl73iAHRMVNn8KlxM+E7pjwsoQ== +"@lerna/listable@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/listable/-/listable-5.4.2.tgz#7a1e32aebfd78581344cbecbed09a2d851320f8b" + integrity sha512-DdKqERoXfcRFPl/Vrn/pPyGxq5NQ3P22lAs3ueqwQZJPfUsQzjSv4fWEWwLxZW5tU9hbTqflOgnPeNQkmBC/Iw== dependencies: - "@lerna/query-graph" "5.1.6" + "@lerna/query-graph" "5.4.2" chalk "^4.1.0" columnify "^1.6.0" -"@lerna/log-packed@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-5.1.6.tgz#90b95915610b52b67ded3a62d5de20d73024eafd" - integrity sha512-yCtgNgEmicqCVb39RO9pRQQGJaugGcsKtvaS1cDLR+M7vlF8gaSvo9t4bZExFzEF5oWcPf4T1FMuhNV12h/uJg== +"@lerna/log-packed@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/log-packed/-/log-packed-5.4.2.tgz#8ef563e7be43ac82007cd562dcb66ccabc507a10" + integrity sha512-MdLjsQENJxrsRmAcvqHoV6PwWiZJrv/ujwLeuqQquXPi9eWyWb3AoYPplmJRmUFQ9l3i3ROcTO9IDW6TkZ3P0Q== dependencies: byte-size "^7.0.0" columnify "^1.6.0" has-unicode "^2.0.1" npmlog "^6.0.2" -"@lerna/npm-conf@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-5.1.6.tgz#534707babd7ad83d14c70ecb3f36b3c2c3dfa880" - integrity sha512-7x8334t9SO2bih7qJa2s8LFuSOZk5QzZ9q1xG9xNSF8BjrhjsGOVghQ1R97l/1zTkBwhqmb1sxLcvH1e21h+MQ== +"@lerna/npm-conf@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/npm-conf/-/npm-conf-5.4.2.tgz#a1a78f7c81c3dc2a7693c22773aebb347d6b8399" + integrity sha512-FiYfMtH5j6zvqOENX/jo10Ok/aSHSUw68ZQImA1HcbRYeTJ673Oe29d47vDWLH2FvwvgZDaCK5S8WSwRvSrz2g== dependencies: config-chain "^1.1.12" pify "^5.0.0" -"@lerna/npm-dist-tag@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-5.1.6.tgz#5231193e2512669a1244c910489c26463e6bdc35" - integrity sha512-mwjnjqN+Z8z2lAAnOE/2L8OiLChCL374ltaxNOGnhLyWKdCFoit7qhiIIV05CgoE2/iJQoOZP7ioP3H7JtJbsw== +"@lerna/npm-dist-tag@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/npm-dist-tag/-/npm-dist-tag-5.4.2.tgz#a8a3b10ca707de4cc9c7167d181275dcce7b52ac" + integrity sha512-dHiwLpLlC3PkEwbkjx/TD/TuKxcdAO3Gjx1XCT8aw+bVM2U6bw18DINjezA71cLc1aySInPE5zACkb/Hq46wTQ== dependencies: - "@lerna/otplease" "5.1.6" - npm-package-arg "^8.1.0" - npm-registry-fetch "^9.0.0" + "@lerna/otplease" "5.4.2" + npm-package-arg "8.1.1" + npm-registry-fetch "^13.3.0" npmlog "^6.0.2" -"@lerna/npm-install@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-5.1.6.tgz#424c6a18042329c1057d55d9a1c7fe52df58239f" - integrity sha512-SKqXATVPVEGS2xtNNjxGhY1/C9huxYnETelpwAB/eSLcMT4FFBVxeQ83NF9log4w+iCUaS+veElfuF2uvPxaPg== +"@lerna/npm-install@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/npm-install/-/npm-install-5.4.2.tgz#6433d8dd479ac1266447601d08f51313ab1f12d5" + integrity sha512-Zk1NnCWvLUrW5WJ4tjexm74PY+DDExllizh3Q63z6P3F282sriF/pAnTSZcE59z/q2PhBoJop8OyD6O+mdv5Kw== dependencies: - "@lerna/child-process" "5.1.6" - "@lerna/get-npm-exec-opts" "5.1.6" + "@lerna/child-process" "5.4.2" + "@lerna/get-npm-exec-opts" "5.4.2" fs-extra "^9.1.0" - npm-package-arg "^8.1.0" + npm-package-arg "8.1.1" npmlog "^6.0.2" signal-exit "^3.0.3" write-pkg "^4.0.0" -"@lerna/npm-publish@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-5.1.6.tgz#74b41aa670e6a043ed7841679e27424542ab8447" - integrity sha512-ce5UMVZZwjpwkKdekXc1xCtwb4ZKwRVsxHCQFoCisE1/3Pw6+5DBptBOgjmJGa1VA7glxGgp5a6aSERA5grA/g== +"@lerna/npm-publish@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/npm-publish/-/npm-publish-5.4.2.tgz#16f1e87aee335ca03633784179d9d60e0f1104cc" + integrity sha512-fBB6zrYtdiKffZyCgLZEJcSi3wKy4Legpv66Icqyjsnp9U77aEcFnAqjitc9QCSs5hhlpx9RnKFulsgMiZxEWA== dependencies: - "@lerna/otplease" "5.1.6" - "@lerna/run-lifecycle" "5.1.6" + "@lerna/otplease" "5.4.2" + "@lerna/run-lifecycle" "5.4.2" fs-extra "^9.1.0" - libnpmpublish "^4.0.0" - npm-package-arg "^8.1.0" + libnpmpublish "^6.0.4" + npm-package-arg "8.1.1" npmlog "^6.0.2" pify "^5.0.0" - read-package-json "^3.0.0" + read-package-json "^5.0.1" -"@lerna/npm-run-script@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-5.1.6.tgz#9d1c4b5fa615fb10a1cf55c09a1428e6c3a0b158" - integrity sha512-9M7XGnrBoitRnzAT6UGzHtBdQB+HmpsMd+ks7laK7VeqP1rR3t7XXZOm0avMBx2lSBBFSpDIkD4HV0/MeDtcZQ== +"@lerna/npm-run-script@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/npm-run-script/-/npm-run-script-5.4.2.tgz#d5c7094c79421f911c6b7ab2398d72c359854ae5" + integrity sha512-CEtiuT30z3M5wfHAs0gm/Kh3+6NRT69vAw8Avv/WB0oO43teMpdIGB+afmTWMiWb4/wRLzFIgex6Sf2FamEhaQ== dependencies: - "@lerna/child-process" "5.1.6" - "@lerna/get-npm-exec-opts" "5.1.6" + "@lerna/child-process" "5.4.2" + "@lerna/get-npm-exec-opts" "5.4.2" npmlog "^6.0.2" -"@lerna/otplease@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-5.1.6.tgz#31548e54d0e3d0853d9ac1dd1e72a464a6bb4f02" - integrity sha512-HFiiMIuP2BoiN/V8I5KS2xZjlrnBEJSKY/oIkIRFIoL/9uvHRorKjlsi0KsQLnLHx3+pZ+AL65LXjt54sJdWiQ== +"@lerna/otplease@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/otplease/-/otplease-5.4.2.tgz#c23ea2aea6787d6040b2b744030e8fb984962182" + integrity sha512-OFw0+QuS55z5cnSdJZy/YFWhFFpge6z8JVniqtqD5xcV5M1qoinOoV437le3RCMSHStVu/4H8MHSRvUee6Vdjg== dependencies: - "@lerna/prompt" "5.1.6" + "@lerna/prompt" "5.4.2" -"@lerna/output@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/output/-/output-5.1.6.tgz#e69dd303bbb636971caf0c24e9259aafb92b207a" - integrity sha512-FjZfnDwiKHeKMEZVN2eWbVd0pKINwXRjDXV0CGo1HrTvbXQI3lcrhgoPkDE42BSALaH7E9N0YCUYOYVWlJvSzQ== +"@lerna/output@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/output/-/output-5.4.2.tgz#8c6988cf4e461fd0bb0a05390786e2d673782d6e" + integrity sha512-QVmWPgFTPo2RwFkl7+R2AhLAvHyzPYD6DLlnrixEPLzKPjxtiIwYqGPmdWlCDPtsBLNwzjvbkOgxBydZlRIguQ== dependencies: npmlog "^6.0.2" -"@lerna/pack-directory@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-5.1.6.tgz#64fbd571ba346da6b0dbc4e7339851df1b97092c" - integrity sha512-dKFFQ95BheshI4eWOVYT7DF6iM8VITTwOfueLnnUe8h8OgBDHnZJOEHT+zNjvXo6sA0DtN8pvpxA8VVEroq2KQ== +"@lerna/pack-directory@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/pack-directory/-/pack-directory-5.4.2.tgz#8e011917704a67c06ac98e733cb64352f61c1b24" + integrity sha512-sfzmxAVX28+N37lhbbIL/C1dnsCd8WJMDYHPcJpepXKul2yr1dK3yxiTcHgo3uo466EXUbfJjnBWolOn6LfouA== dependencies: - "@lerna/get-packed" "5.1.6" - "@lerna/package" "5.1.6" - "@lerna/run-lifecycle" "5.1.6" - "@lerna/temp-write" "5.1.6" - npm-packlist "^2.1.4" + "@lerna/get-packed" "5.4.2" + "@lerna/package" "5.4.2" + "@lerna/run-lifecycle" "5.4.2" + "@lerna/temp-write" "5.4.2" + npm-packlist "^5.1.1" npmlog "^6.0.2" tar "^6.1.0" -"@lerna/package-graph@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-5.1.6.tgz#553edc82bc489449127386f420d0e0f78574b49b" - integrity sha512-kAmcZLbFcgzdwwEE34ls2hKKwLNXrp++Lb3QgLi5oZl95cGEXjhGNqECdY+hAgBxaSOAgrAd9dvxoR36zl5LJw== +"@lerna/package-graph@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-5.4.2.tgz#87110ff01436e44f7ee61b8bc8fa55010d2f6020" + integrity sha512-IUwpiABvzh8xBV64sS81hFG5dgUnCzOfm0npQ65bZ76B1BEnjUSId8El1csKHd6KQER83EKEWz1RQ3fryWtxrA== dependencies: - "@lerna/prerelease-id-from-version" "5.1.6" - "@lerna/validation-error" "5.1.6" - npm-package-arg "^8.1.0" + "@lerna/prerelease-id-from-version" "5.4.2" + "@lerna/validation-error" "5.4.2" + npm-package-arg "8.1.1" npmlog "^6.0.2" semver "^7.3.4" -"@lerna/package@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/package/-/package-5.1.6.tgz#90159a4d3857178bc35c53a4e53636b4cf68ea35" - integrity sha512-OwsYEVVDEFIybYSh3edn5ZH7EoMPEmfl92pri3rqtaGYj76/ENGaQZSXT5ZH2oJKg5Jh9LrtaYAc+r/fZ+1vuQ== +"@lerna/package@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/package/-/package-5.4.2.tgz#a2ba5ff21ef64e5ff7a9da73626f4015b6c8a0b4" + integrity sha512-fLQa+3LIb9NjuUKANEs+nvhztLiXMpoFYyumsd413wHlGGxyrPpJU9Q0H4aRpaqWWpUoBmib3xIhEdYsZctlSQ== dependencies: load-json-file "^6.2.0" - npm-package-arg "^8.1.0" + npm-package-arg "8.1.1" write-pkg "^4.0.0" -"@lerna/prerelease-id-from-version@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-5.1.6.tgz#ce03815e967433784bbfe9b989e3368008684642" - integrity sha512-LJYIuxw9rpKkCWtE10gOOyqpcKRzV34Ljk0L0WSaXILlcWf5bAb0ZmF8t5UJ/MzhGklYwT/Fk0yPtVtu7GnBaA== +"@lerna/prerelease-id-from-version@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/prerelease-id-from-version/-/prerelease-id-from-version-5.4.2.tgz#a77a3dbfbc2880d212c25202c9b9e76901e96b36" + integrity sha512-A3/2A5lDUk1SzVKpiX5g4Zy/4YF3suQfiELP4UF4/HsSPUMW8El67/BxXAk1BhUiBC9sbP2Eo9jt1Ac6YxtwRQ== dependencies: semver "^7.3.4" -"@lerna/profiler@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-5.1.6.tgz#9d67bde76e119187f35f5dc8d5c1ffe8cf92ee83" - integrity sha512-ZFU7WPIk7FxblnGx9Ux0W+NLnTGTIpjdVWEzi/8QkJssmjxerbW62lO5tvGzv6kjPQsml2kC7yPBwX9JEOFCdQ== +"@lerna/profiler@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/profiler/-/profiler-5.4.2.tgz#e5bf9fcda7047b028897979f820c9fe574c25cf2" + integrity sha512-0PScmsU2JxQrxvWBfNMA5g473qXX4xuunglBshvVzGKVSGcUPWoPttQckcP/GvntpFSRIspPiTub0xAj3ZqIJQ== dependencies: fs-extra "^9.1.0" npmlog "^6.0.2" upath "^2.0.1" -"@lerna/project@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/project/-/project-5.1.6.tgz#a8a79c78f9c9b5406cba77ab75986e265e61940a" - integrity sha512-9EXc2uTDfruvJcWnW3UrDZCAgZ/LUOQDC92xBSi1qazSE3fEsfrLBJmMqUzBRTuGoGh5BPnJgA2l0It01z51dQ== +"@lerna/project@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/project/-/project-5.4.2.tgz#00878cf096558c1833d581f08855c604c412df54" + integrity sha512-CK/aGYoTe/tZBoXvSDb4wSJX48Pn+T1mKo2FQOPvMCtAc3iIyjDfPEyghXwEZvvhznxhuR/KEk0rIGJl9OigYA== dependencies: - "@lerna/package" "5.1.6" - "@lerna/validation-error" "5.1.6" + "@lerna/package" "5.4.2" + "@lerna/validation-error" "5.4.2" cosmiconfig "^7.0.0" dedent "^0.7.0" dot-prop "^6.0.1" @@ -2779,139 +2824,140 @@ resolve-from "^5.0.0" write-json-file "^4.3.0" -"@lerna/prompt@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-5.1.6.tgz#3f1ea0655f047ae0a001a8645152df4c0a77816a" - integrity sha512-3Ds/N8mzb1zyTq079CMPCg2wfo5cwVBtr0N5Bh9A+NERQuLavxF1tBRKRYLF4h9zHdybNvAMkKfoQkkyJNliQg== +"@lerna/prompt@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/prompt/-/prompt-5.4.2.tgz#9046d1f67b38f97c031c402cc8585ddabdaddd80" + integrity sha512-/FrzilpMn+g97U21dAZ7qDQujhHmJT8eVoggw1vHUiCvZ1uLZEPVDlBH4S/t+Rc/o3qbnjvjwXrHPxmzhcCEew== dependencies: - inquirer "^7.3.3" + inquirer "^8.2.4" npmlog "^6.0.2" -"@lerna/publish@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-5.1.6.tgz#9148b47e73e3fdcc0dace0f2c079951f0f63b2a5" - integrity sha512-ZGB4JJBUTBnx5N37qNdyZ+iZX4KXtjbEnB3WU7HH7IzMHc4JZbDEQhAyfELKdvB4gEdYJTsfA8v8J75U3HcluA== - dependencies: - "@lerna/check-working-tree" "5.1.6" - "@lerna/child-process" "5.1.6" - "@lerna/collect-updates" "5.1.6" - "@lerna/command" "5.1.6" - "@lerna/describe-ref" "5.1.6" - "@lerna/log-packed" "5.1.6" - "@lerna/npm-conf" "5.1.6" - "@lerna/npm-dist-tag" "5.1.6" - "@lerna/npm-publish" "5.1.6" - "@lerna/otplease" "5.1.6" - "@lerna/output" "5.1.6" - "@lerna/pack-directory" "5.1.6" - "@lerna/prerelease-id-from-version" "5.1.6" - "@lerna/prompt" "5.1.6" - "@lerna/pulse-till-done" "5.1.6" - "@lerna/run-lifecycle" "5.1.6" - "@lerna/run-topologically" "5.1.6" - "@lerna/validation-error" "5.1.6" - "@lerna/version" "5.1.6" +"@lerna/publish@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/publish/-/publish-5.4.2.tgz#44341098395ebb11034bd1942f87a8ed3c2ac9bc" + integrity sha512-Maskj2reQouNo9XAgbfXWF+Hxt8TYfMb3HiVTWIgpDmhemJykwCifudQF8Ovlq4NZ7CCuTgMpxUySmSClM99Cw== + dependencies: + "@lerna/check-working-tree" "5.4.2" + "@lerna/child-process" "5.4.2" + "@lerna/collect-updates" "5.4.2" + "@lerna/command" "5.4.2" + "@lerna/describe-ref" "5.4.2" + "@lerna/log-packed" "5.4.2" + "@lerna/npm-conf" "5.4.2" + "@lerna/npm-dist-tag" "5.4.2" + "@lerna/npm-publish" "5.4.2" + "@lerna/otplease" "5.4.2" + "@lerna/output" "5.4.2" + "@lerna/pack-directory" "5.4.2" + "@lerna/prerelease-id-from-version" "5.4.2" + "@lerna/prompt" "5.4.2" + "@lerna/pulse-till-done" "5.4.2" + "@lerna/run-lifecycle" "5.4.2" + "@lerna/run-topologically" "5.4.2" + "@lerna/validation-error" "5.4.2" + "@lerna/version" "5.4.2" fs-extra "^9.1.0" - libnpmaccess "^4.0.1" - npm-package-arg "^8.1.0" - npm-registry-fetch "^9.0.0" + libnpmaccess "^6.0.3" + npm-package-arg "8.1.1" + npm-registry-fetch "^13.3.0" npmlog "^6.0.2" p-map "^4.0.0" p-pipe "^3.1.0" - pacote "^13.4.1" + pacote "^13.6.1" semver "^7.3.4" -"@lerna/pulse-till-done@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-5.1.6.tgz#0b79ea17c877ae06a6ae2d41386cd2503df96e66" - integrity sha512-R9YpgGAlRB9XyYBZt41i8rLsnLqUDB8LYlOFhfrBX0Y1mI0/+9iYIHF0xBemrHqimQftu3QxvEoxpsDrXUJBIg== +"@lerna/pulse-till-done@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/pulse-till-done/-/pulse-till-done-5.4.2.tgz#94db33e30220ffd67ac7a03e6d3751e9ffdbd995" + integrity sha512-zeIAg+yd6H9sziupsuT2LgRnrgMu9W4DvI7Cpu3LR4F0xZD+2KDt1SoH1gH3k+6EofEZyrC+qMNAgRVSshIs/g== dependencies: npmlog "^6.0.2" -"@lerna/query-graph@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-5.1.6.tgz#8729cf6d634d7ad978a35674184a9693418bc6c2" - integrity sha512-67dzRjCGjYjEUpO3PwFIcTpgJhaQO4WT687bpJh8M5XaS0xeaz2g+e1C9U/n8xIHJm3N2PlKYMSczuvPhSayCw== +"@lerna/query-graph@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/query-graph/-/query-graph-5.4.2.tgz#34d3717e4f8316fdd66be4a14920247536017c48" + integrity sha512-7CL2ZRj2R7BdjnXHOXl9Pd3+zpLnCDzoyMggGPTKSjb710zqgIRRbk73MTTjhOT081x2MwFdj60m+R/0JED/iw== dependencies: - "@lerna/package-graph" "5.1.6" + "@lerna/package-graph" "5.4.2" -"@lerna/resolve-symlink@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-5.1.6.tgz#57928c17d76971749f862f89fe6de8b84bc81e34" - integrity sha512-+2rCXIj8jM31WRPqUffBAb1e5TimgSDSPTM/q52cvSs+JRgqiw+aVx/8FgG/a/bMg+5+Zx/+A4c8KxnWCjLF5A== +"@lerna/resolve-symlink@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/resolve-symlink/-/resolve-symlink-5.4.2.tgz#ab26572ba973be6979d5b89412ed1937dbaaa034" + integrity sha512-0r7cWwi/LMQv0g8RnFLKKPEAp24LAHvR2XcDu3YhOCa7LMM/DvNPfDMozUHkKlOFhqXTG8NVbWugEeB+cUm3kw== dependencies: fs-extra "^9.1.0" npmlog "^6.0.2" - read-cmd-shim "^2.0.0" + read-cmd-shim "^3.0.0" -"@lerna/rimraf-dir@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-5.1.6.tgz#dff2eb82bcbde1cd5a4d186d1df8aa5cb03b816e" - integrity sha512-8J9LrlW/IzSvDXxk7hbobofSOXvKS2o+q6vdamrwLapk2KfI/KGh0auBo/s4Rvr5t6OZfpr4/woLJyQFdnwWWA== +"@lerna/rimraf-dir@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/rimraf-dir/-/rimraf-dir-5.4.2.tgz#d1fb90064911bd68d9b5795a41b33834b2d8b4d4" + integrity sha512-6flB5eiJ3wBDhMjswfaY0Uh7tZc11T+APu7UOtxIeNPxqxJP6yhsJawzAezQD/klzizxdWxTqyImtqJRzpDqTw== dependencies: - "@lerna/child-process" "5.1.6" + "@lerna/child-process" "5.4.2" npmlog "^6.0.2" path-exists "^4.0.0" rimraf "^3.0.2" -"@lerna/run-lifecycle@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-5.1.6.tgz#8a43e28660b8929b76f6a16088a055fb31ecba1b" - integrity sha512-rTLQwIwUtN6+WpyFceZoahi1emTlLwJYwTMBZZla3w6aBwERdfpEvB4MVz2F6/TTYmJ2uzWa1Y85faGH4x4blA== +"@lerna/run-lifecycle@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/run-lifecycle/-/run-lifecycle-5.4.2.tgz#78390f533ace8c1c63c25b42425a66a9a4591c27" + integrity sha512-uxNJ3l4tliO/bH9E7XR9TJfSSGbOSC561Wm04fyiCY7A6cOxBBLgawbJAzIeZu2OFbhLe9kBKwwIWgY9J0CCHQ== dependencies: - "@lerna/npm-conf" "5.1.6" - "@npmcli/run-script" "^3.0.2" + "@lerna/npm-conf" "5.4.2" + "@npmcli/run-script" "^4.1.7" npmlog "^6.0.2" + p-queue "^6.6.2" -"@lerna/run-topologically@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-5.1.6.tgz#a34e5ce84dcddaa3e94d742c44b7233e7baf1ed8" - integrity sha512-2THwjyU/aq7NOUmjCKQYK7l78fUoBwBtWXFGfeqK5xN5LBc2zr293cC1Z7CAZHUVh1JklLWL0PXX8Z34g3210g== +"@lerna/run-topologically@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/run-topologically/-/run-topologically-5.4.2.tgz#aa2657175e2891208befea48a21ab59171346bf0" + integrity sha512-fzm8mL4nSNDr4rZqvXgRIbw6DsiaOBopFObaSM5WWvGBslMIv/P2vI55PfT51mX7p6zPLvPvJ2Xo/scpQAutag== dependencies: - "@lerna/query-graph" "5.1.6" + "@lerna/query-graph" "5.4.2" p-queue "^6.6.2" -"@lerna/run@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/run/-/run-5.1.6.tgz#1e47bfb792109e37740d65786e7079c666c3fd15" - integrity sha512-WMZF4tKFL/hGhUHphcYJNUDGvpHdrLD8ysACiqgIyu5ssIWiXb0wbUO0OeGWMss0b7TNOUG1y6DGOPFWFWRd3w== - dependencies: - "@lerna/command" "5.1.6" - "@lerna/filter-options" "5.1.6" - "@lerna/npm-run-script" "5.1.6" - "@lerna/output" "5.1.6" - "@lerna/profiler" "5.1.6" - "@lerna/run-topologically" "5.1.6" - "@lerna/timer" "5.1.6" - "@lerna/validation-error" "5.1.6" +"@lerna/run@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/run/-/run-5.4.2.tgz#4dee27edad4689118bbc78b9e8e51a86ea4c988a" + integrity sha512-s4zBCxxwcERLoP8gBDOMz5OaKmBLOKKIMg+7C4o1+j7wPLzm0zMgGx6mIUNCr6kGNKtCNZvh53lNTpPIOGsBlQ== + dependencies: + "@lerna/command" "5.4.2" + "@lerna/filter-options" "5.4.2" + "@lerna/npm-run-script" "5.4.2" + "@lerna/output" "5.4.2" + "@lerna/profiler" "5.4.2" + "@lerna/run-topologically" "5.4.2" + "@lerna/timer" "5.4.2" + "@lerna/validation-error" "5.4.2" p-map "^4.0.0" -"@lerna/symlink-binary@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-5.1.6.tgz#ce4d5be8d8a4885c3f3e81007137c4ae393311d0" - integrity sha512-nj5a77e8Vk+AZY+batyr+lCo3EcGTiGjSP0MFnkXKn1wUyUUZiKgS48J/9RTNdTpWZRC4G2PneR6BUmnF6Mnlg== +"@lerna/symlink-binary@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/symlink-binary/-/symlink-binary-5.4.2.tgz#1fcb507952cdade443f19a2e53aa90c1000947b0" + integrity sha512-GmrkA8EOiC00FcVqYdNk5j+bUCQn87hKVd+biNVnloEFOZeHKE6rQFL8PooXU2/uS4dJUKPid8edThrqxuByrQ== dependencies: - "@lerna/create-symlink" "5.1.6" - "@lerna/package" "5.1.6" + "@lerna/create-symlink" "5.4.2" + "@lerna/package" "5.4.2" fs-extra "^9.1.0" p-map "^4.0.0" -"@lerna/symlink-dependencies@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-5.1.6.tgz#38f5a94e6450b0bff0c17b3e44b4d527827cea24" - integrity sha512-nMVTEm8oi3TrKXmDeS9445zngWQR31AShKH+u9f+YZVYE1Ncv4/XpgDSkTNsbm//vMi0ilWH+QQxjBC+pDXd8Q== +"@lerna/symlink-dependencies@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/symlink-dependencies/-/symlink-dependencies-5.4.2.tgz#b13b1d6ae9d9a08598d6214a8b2b226054199b10" + integrity sha512-ssdqVurn2aXuc4C5TQTHLQYYT0zXNb1q4n4cguNJK1m1TVE03Sz2ixruZ6KC52Oyk9kyajrSTkyLfgLftrjgOg== dependencies: - "@lerna/create-symlink" "5.1.6" - "@lerna/resolve-symlink" "5.1.6" - "@lerna/symlink-binary" "5.1.6" + "@lerna/create-symlink" "5.4.2" + "@lerna/resolve-symlink" "5.4.2" + "@lerna/symlink-binary" "5.4.2" fs-extra "^9.1.0" p-map "^4.0.0" p-map-series "^2.1.0" -"@lerna/temp-write@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/temp-write/-/temp-write-5.1.6.tgz#3b486297b1ccc732c3dbea34e6f42a6198ba2c82" - integrity sha512-Ycb0dNBi5bwgVyc/aeZ5JmgSEWfaJjh9efFqDfsj763HBLr9sBZvqQYBRXGAWxBdDWy+lXTXximsQw5gJZZxpw== +"@lerna/temp-write@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/temp-write/-/temp-write-5.4.2.tgz#b8eba8154afacdd40ae7a45f9d9bfcbfabdd1a00" + integrity sha512-1PWr5K4IL3xMsuQNMuEKrI0QxEDOsbLnjLCp+4R6cPh/6fh/jQNXd+LCtjDE5zfPocGaKtrxF7J/6CIySz3J2A== dependencies: graceful-fs "^4.1.15" is-stream "^2.0.0" @@ -2919,37 +2965,37 @@ temp-dir "^1.0.0" uuid "^8.3.2" -"@lerna/timer@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-5.1.6.tgz#a0fdebc3cbce93907b6855515726c31e8e5c50ac" - integrity sha512-m28ufTfg7zibqPujxborrTy9WrocCmoMXvw1PuSZ0LCf5hhK3HUJJ8ybxYAGpUXdZqjzvRQNlc954GsOkCSJEA== +"@lerna/timer@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/timer/-/timer-5.4.2.tgz#e05b857db5742be18d4d51d24b0a55dd3d657eb3" + integrity sha512-1eJSflPC1USDaO/oVUhld9HbmcoNGz4ZPjwbTzqR4fN8QeMtBmwbgRC9mul7FuOGH8leRDomC19MkBoKpcokog== -"@lerna/validation-error@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-5.1.6.tgz#12371dcc8dc610e04644b1bcf05535c6487755ca" - integrity sha512-6+rc1bGTqaRMvML8Qew+RoqZFxyESSX+GBCTv0pW1SBcNo/yC76fq9y/WSA3dn6GuqHWyX3H0Yki7HutezM7/A== +"@lerna/validation-error@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-5.4.2.tgz#c3309d33a7114e0ac14ccd2e809d3f81cd35155e" + integrity sha512-OR+KcarqBicYslkrLK8PROiYn7PlKvoSG+kuM7ox4VPaX7697Mr5OdYdTePrQjg2BAKJbf0PSccLvXjBjvT7Aw== dependencies: npmlog "^6.0.2" -"@lerna/version@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/version/-/version-5.1.6.tgz#7d0906e130bd29046a3827088033b9b7d2289545" - integrity sha512-UE7ZHUdHtlmHQPK8ZSc62BHnWXIPqV7nzQAM/tQngIGSAH0oXHjxktP4ysPRqX8U0jfl212fSveVK7HK988zoQ== - dependencies: - "@lerna/check-working-tree" "5.1.6" - "@lerna/child-process" "5.1.6" - "@lerna/collect-updates" "5.1.6" - "@lerna/command" "5.1.6" - "@lerna/conventional-commits" "5.1.6" - "@lerna/github-client" "5.1.6" - "@lerna/gitlab-client" "5.1.6" - "@lerna/output" "5.1.6" - "@lerna/prerelease-id-from-version" "5.1.6" - "@lerna/prompt" "5.1.6" - "@lerna/run-lifecycle" "5.1.6" - "@lerna/run-topologically" "5.1.6" - "@lerna/temp-write" "5.1.6" - "@lerna/validation-error" "5.1.6" +"@lerna/version@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/version/-/version-5.4.2.tgz#6a24bfb6a823e1fa56fd0e9e66ebb1a9460d0ad2" + integrity sha512-Jk8LlpfEfK8VGfuhOUDEVKOOS/UjPTppB/GcbPXli+2DiyK6R6HIRfwT85SCDCX5gTKcW358QAVDa+ROHQ7YUQ== + dependencies: + "@lerna/check-working-tree" "5.4.2" + "@lerna/child-process" "5.4.2" + "@lerna/collect-updates" "5.4.2" + "@lerna/command" "5.4.2" + "@lerna/conventional-commits" "5.4.2" + "@lerna/github-client" "5.4.2" + "@lerna/gitlab-client" "5.4.2" + "@lerna/output" "5.4.2" + "@lerna/prerelease-id-from-version" "5.4.2" + "@lerna/prompt" "5.4.2" + "@lerna/run-lifecycle" "5.4.2" + "@lerna/run-topologically" "5.4.2" + "@lerna/temp-write" "5.4.2" + "@lerna/validation-error" "5.4.2" chalk "^4.1.0" dedent "^0.7.0" load-json-file "^6.2.0" @@ -2963,13 +3009,13 @@ slash "^3.0.0" write-json-file "^4.3.0" -"@lerna/write-log-file@5.1.6": - version "5.1.6" - resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-5.1.6.tgz#88f62ca90dd947246a0bf0a45c3012e919002ec6" - integrity sha512-UfuERC0dN5cw6Vc11/8fDfnXfuEQXKbOweJ2D83nrNJIZS/HwWkAoYVZ493w7xJzrqKi6V352BY3m9D7pi8h5g== +"@lerna/write-log-file@5.4.2": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@lerna/write-log-file/-/write-log-file-5.4.2.tgz#1642a5b5c0ee2231b71ce0e8832f05144f8778a6" + integrity sha512-tdOjyxmK5YuuE+Ba5GCtsFzdl18/WXvvQqCsgEWRGHPKAGECnigz3fhJbpJ+2u1mmv7trIkPTNE45fF+o1Z8YQ== dependencies: npmlog "^6.0.2" - write-file-atomic "^3.0.3" + write-file-atomic "^4.0.1" "@mdx-js/mdx@^1.6.22": version "1.6.22" @@ -3006,32 +3052,32 @@ resolved "https://registry.yarnpkg.com/@mdx-js/util/-/util-1.6.22.tgz#219dfd89ae5b97a8801f015323ffa4b62f45718b" integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== -"@microsoft/api-extractor-model@7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.21.0.tgz#2138682e738a14038d40165ec77362e69853f200" - integrity sha512-NN4mXzoQWTuzznIcnLWeV6tGyn6Os9frDK6M/mmTXZ73vUYOvSWoKQ5SYzyzP7HF3YtvTmr1Rs+DsBb0HRx7WQ== +"@microsoft/api-extractor-model@7.23.0": + version "7.23.0" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor-model/-/api-extractor-model-7.23.0.tgz#266de12607fffe72259bfdf94e35331a18fdb223" + integrity sha512-h+2aVyf8IYidPZp+N+yIc/LY/aBwRZ1Vxlsx7rU31807bba5ScJ94bj7OjsPMje0vRYALf+yjZToYT0HdP6omA== dependencies: "@microsoft/tsdoc" "0.14.1" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "3.49.0" + "@rushstack/node-core-library" "3.50.1" "@microsoft/api-extractor@^7.23.2": - version "7.28.3" - resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.28.3.tgz#516d8a81b1c62949116e258d54c03ee8c5b7740a" - integrity sha512-lkDHPyln8MNEy1QHjmGwedRquclGKU0qL0gHplfnHuSTXSoNQ86UYaPmhG77/GiNehXzGNKMYSIfTsuoQb69jA== + version "7.29.2" + resolved "https://registry.yarnpkg.com/@microsoft/api-extractor/-/api-extractor-7.29.2.tgz#a7174297ac9e1acc3a08f87ccc2b8d05cfdebe02" + integrity sha512-MwT/Xi1DperfrBO+SU3f/xKdyR6bMvk59/WN6w7g1rHmDBMegan3Ya6npMo+abJAgQOtp6uExY/elHXcYE/Ofw== dependencies: - "@microsoft/api-extractor-model" "7.21.0" + "@microsoft/api-extractor-model" "7.23.0" "@microsoft/tsdoc" "0.14.1" "@microsoft/tsdoc-config" "~0.16.1" - "@rushstack/node-core-library" "3.49.0" - "@rushstack/rig-package" "0.3.13" - "@rushstack/ts-command-line" "4.12.1" + "@rushstack/node-core-library" "3.50.1" + "@rushstack/rig-package" "0.3.14" + "@rushstack/ts-command-line" "4.12.2" colors "~1.2.1" lodash "~4.17.15" resolve "~1.17.0" semver "~7.3.0" source-map "~0.6.1" - typescript "~4.6.3" + typescript "~4.7.4" "@microsoft/tsdoc-config@~0.16.1": version "0.16.1" @@ -3069,10 +3115,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@npmcli/arborist@5.2.0": - version "5.2.0" - resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-5.2.0.tgz#ee40dfe1f81ae1524819ee39c8f3e7022b0d6269" - integrity sha512-zWV7scFGL0SmpvfQyIWnMFbU/0YgtMNyvJiJwR98kyjUSntJGWFFR0O600d5W+TrDcTg0GyDbY+HdzGEg+GXLg== +"@npmcli/arborist@5.3.0": + version "5.3.0" + resolved "https://registry.yarnpkg.com/@npmcli/arborist/-/arborist-5.3.0.tgz#321d9424677bfc08569e98a5ac445ee781f32053" + integrity sha512-+rZ9zgL1lnbl8Xbb1NQdMjveOMwj4lIYfcDtyJHHi5x4X8jtR6m8SXooJMZy5vmFVZ8w7A2Bnd/oX9eTuU8w5A== dependencies: "@isaacs/string-locale-compare" "^1.1.0" "@npmcli/installed-package-contents" "^1.0.7" @@ -3082,7 +3128,7 @@ "@npmcli/name-from-folder" "^1.0.1" "@npmcli/node-gyp" "^2.0.0" "@npmcli/package-json" "^2.0.0" - "@npmcli/run-script" "^3.0.0" + "@npmcli/run-script" "^4.1.3" bin-links "^3.0.0" cacache "^16.0.6" common-ancestor-path "^1.0.1" @@ -3096,7 +3142,7 @@ npm-pick-manifest "^7.0.0" npm-registry-fetch "^13.0.0" npmlog "^6.0.2" - pacote "^13.0.5" + pacote "^13.6.1" parse-conflict-json "^2.0.1" proc-log "^2.0.0" promise-all-reject-late "^1.0.0" @@ -3109,19 +3155,6 @@ treeverse "^2.0.0" walk-up-path "^1.0.0" -"@npmcli/ci-detect@^1.0.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@npmcli/ci-detect/-/ci-detect-1.4.0.tgz#18478bbaa900c37bfbd8a2006a6262c62e8b0fe1" - integrity sha512-3BGrt6FLjqM6br5AhWRKTr3u5GIVkjRYeAFrMp3HjnfICrg4xOrVRwFavKT6tsp++bq5dluL5t8ME/Nha/6c1Q== - -"@npmcli/fs@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-1.0.0.tgz#589612cfad3a6ea0feafcb901d29c63fd52db09f" - integrity sha512-8ltnOpRR/oJbOp8vaGUnipOi3bqkcW+sLHFlyXIr08OGHmVJLB1Hn7QtGXbYcpVtH1gAYZTlmDXtE4YV0+AMMQ== - dependencies: - "@gar/promisify" "^1.0.1" - semver "^7.3.5" - "@npmcli/fs@^2.1.0": version "2.1.0" resolved "https://registry.yarnpkg.com/@npmcli/fs/-/fs-2.1.0.tgz#f2a21c28386e299d1a9fae8051d35ad180e33109" @@ -3173,14 +3206,6 @@ pacote "^13.0.3" semver "^7.3.5" -"@npmcli/move-file@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-1.1.2.tgz#1a82c3e372f7cae9253eb66d72543d6b8685c674" - integrity sha512-1SUf/Cg2GzGDyaf15aR9St9TWlb+XvbZXWpDx8YKs7MLzMH/BCeopv+y9vzrzgkfykCGuWOlSu3mZhj2+FQcrg== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - "@npmcli/move-file@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@npmcli/move-file/-/move-file-2.0.0.tgz#417f585016081a0184cef3e38902cd917a9bbd02" @@ -3213,7 +3238,7 @@ dependencies: infer-owner "^1.0.4" -"@npmcli/run-script@^3.0.0", "@npmcli/run-script@^3.0.1", "@npmcli/run-script@^3.0.2": +"@npmcli/run-script@^3.0.1": version "3.0.2" resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-3.0.2.tgz#3e9116d831f4539bf292d18b015977a6118997ee" integrity sha512-vdjD/PMBl+OX9j9C9irx5sCCIKfp2PWkpPNH9zxvlJAfSZ3Qp5aU412v+O3PFJl3R1PFNwuyChCqHg4ma6ci2Q== @@ -3223,6 +3248,28 @@ node-gyp "^9.0.0" read-package-json-fast "^2.0.3" +"@npmcli/run-script@^4.1.0": + version "4.1.7" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-4.1.7.tgz#b1a2f57568eb738e45e9ea3123fb054b400a86f7" + integrity sha512-WXr/MyM4tpKA4BotB81NccGAv8B48lNH0gRoILucbcAhTQXLCoi6HflMV3KdXubIqvP9SuLsFn68Z7r4jl+ppw== + dependencies: + "@npmcli/node-gyp" "^2.0.0" + "@npmcli/promise-spawn" "^3.0.0" + node-gyp "^9.0.0" + read-package-json-fast "^2.0.3" + which "^2.0.2" + +"@npmcli/run-script@^4.1.3", "@npmcli/run-script@^4.1.7": + version "4.2.0" + resolved "https://registry.yarnpkg.com/@npmcli/run-script/-/run-script-4.2.0.tgz#2c25758f80831ba138afe25225d456e89acedac3" + integrity sha512-e/QgLg7j2wSJp1/7JRl0GC8c7PMX+uYlA/1Tb+IDOLdSM4T7K1VQ9mm9IGU3WRtY5vEIObpqCLb3aCNCug18DA== + dependencies: + "@npmcli/node-gyp" "^2.0.0" + "@npmcli/promise-spawn" "^3.0.0" + node-gyp "^9.0.0" + read-package-json-fast "^2.0.3" + which "^2.0.2" + "@nrwl/cli@14.1.4": version "14.1.4" resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-14.1.4.tgz#4d896bbfcb49f058711dd47a67c422297db03be9" @@ -3230,6 +3277,13 @@ dependencies: nx "14.1.4" +"@nrwl/cli@14.5.4": + version "14.5.4" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-14.5.4.tgz#86ac4fbcd1bf079b67c420376cf696b68fcc1200" + integrity sha512-UYr14hxeYV8p/zt6D6z33hljZJQROJAVxSC+mm72fyVvy88Gt0sQNLfMmOARXur0p/73PSLM0jJ2Sr7Ftsuu+A== + dependencies: + nx "14.5.4" + "@nrwl/devkit@14.1.4": version "14.1.4" resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-14.1.4.tgz#7cabec88109ec8fec60b11aba7cbfddc4b9e771e" @@ -3287,6 +3341,13 @@ dependencies: nx "14.1.4" +"@nrwl/tao@14.5.4": + version "14.5.4" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-14.5.4.tgz#a67097d424bcbf7073a1944ea1a0209c4f4f859c" + integrity sha512-a2GCuSE8WghjehuU3GVO63KZEnZXXQiqEg137yN/Na+PxwSu68XeaX53SLyzRskTV120YwBBy1YCTNzAZxxsjg== + dependencies: + nx "14.5.4" + "@nrwl/workspace@14.1.4": version "14.1.4" resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-14.1.4.tgz#ec5bfb05d00e7f7bb9eb45b5821ca8f93dad8f86" @@ -3318,41 +3379,41 @@ yargs "^17.4.0" yargs-parser "21.0.1" -"@octokit/auth-token@^2.4.4": - version "2.5.0" - resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36" - integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g== +"@octokit/auth-token@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-3.0.0.tgz#6f22c5fc56445c496628488ba6810131558fa4a9" + integrity sha512-MDNFUBcJIptB9At7HiV7VCvU3NcL4GnfCQaP8C5lrxWrRPMJBnemYtehaKSOlaM7AYxeRyj9etenu8LVpSpVaQ== dependencies: "@octokit/types" "^6.0.3" -"@octokit/core@^3.5.1": - version "3.5.1" - resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.5.1.tgz#8601ceeb1ec0e1b1b8217b960a413ed8e947809b" - integrity sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw== +"@octokit/core@^4.0.0": + version "4.0.4" + resolved "https://registry.yarnpkg.com/@octokit/core/-/core-4.0.4.tgz#335d9b377691e3264ce57a9e5a1f6cda783e5838" + integrity sha512-sUpR/hc4Gc7K34o60bWC7WUH6Q7T6ftZ2dUmepSyJr9PRF76/qqkWjE2SOEzCqLA5W83SaISymwKtxks+96hPQ== dependencies: - "@octokit/auth-token" "^2.4.4" - "@octokit/graphql" "^4.5.8" - "@octokit/request" "^5.6.0" - "@octokit/request-error" "^2.0.5" + "@octokit/auth-token" "^3.0.0" + "@octokit/graphql" "^5.0.0" + "@octokit/request" "^6.0.0" + "@octokit/request-error" "^3.0.0" "@octokit/types" "^6.0.3" before-after-hook "^2.2.0" universal-user-agent "^6.0.0" -"@octokit/endpoint@^6.0.1": - version "6.0.12" - resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658" - integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA== +"@octokit/endpoint@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-7.0.0.tgz#be758a1236d68d6bbb505e686dd50881c327a519" + integrity sha512-Kz/mIkOTjs9rV50hf/JK9pIDl4aGwAtT8pry6Rpy+hVXkAPhXanNQRxMoq6AeRgDCZR6t/A1zKniY2V1YhrzlQ== dependencies: "@octokit/types" "^6.0.3" is-plain-object "^5.0.0" universal-user-agent "^6.0.0" -"@octokit/graphql@^4.5.8": - version "4.8.0" - resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3" - integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg== +"@octokit/graphql@^5.0.0": + version "5.0.0" + resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-5.0.0.tgz#2cc6eb3bf8e0278656df1a7d0ca0d7591599e3b3" + integrity sha512-1ZZ8tX4lUEcLPvHagfIVu5S2xpHYXAmgN0+95eAOPoaVPzCfUXJtA5vASafcpWcO86ze0Pzn30TAx72aB2aguQ== dependencies: - "@octokit/request" "^5.6.0" + "@octokit/request" "^6.0.0" "@octokit/types" "^6.0.3" universal-user-agent "^6.0.0" @@ -3361,69 +3422,81 @@ resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-11.2.0.tgz#b38d7fc3736d52a1e96b230c1ccd4a58a2f400a6" integrity sha512-PBsVO+15KSlGmiI8QAzaqvsNlZlrDlyAJYcrXBCvVUxCp7VnXjkwPoFHgjEJXx3WF9BAwkA6nfCUA7i9sODzKA== +"@octokit/openapi-types@^12.10.0": + version "12.10.1" + resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.10.1.tgz#57b5cc6c7b4e55d8642c93d06401fb1af4839899" + integrity sha512-P+SukKanjFY0ZhsK6wSVnQmxTP2eVPPE8OPSNuxaMYtgVzwJZgfGdwlYjf4RlRU4vLEw4ts2fsE2icG4nZ5ddQ== + "@octokit/plugin-enterprise-rest@^6.0.1": version "6.0.1" resolved "https://registry.yarnpkg.com/@octokit/plugin-enterprise-rest/-/plugin-enterprise-rest-6.0.1.tgz#e07896739618dab8da7d4077c658003775f95437" integrity sha512-93uGjlhUD+iNg1iWhUENAtJata6w5nE+V4urXOAlIXdco6xNZtUSfYY8dzp3Udy74aqO/B5UZL80x/YMa5PKRw== -"@octokit/plugin-paginate-rest@^2.16.8": - version "2.17.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.17.0.tgz#32e9c7cab2a374421d3d0de239102287d791bce7" - integrity sha512-tzMbrbnam2Mt4AhuyCHvpRkS0oZ5MvwwcQPYGtMv4tUa5kkzG58SVB0fcsLulOZQeRnOgdkZWkRUiyBlh0Bkyw== +"@octokit/plugin-paginate-rest@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-3.0.0.tgz#df779de686aeb21b5e776e4318defc33b0418566" + integrity sha512-fvw0Q5IXnn60D32sKeLIxgXCEZ7BTSAjJd8cFAE6QU5qUp0xo7LjFUjjX1J5D7HgN355CN4EXE4+Q1/96JaNUA== dependencies: - "@octokit/types" "^6.34.0" + "@octokit/types" "^6.39.0" "@octokit/plugin-request-log@^1.0.4": version "1.0.4" resolved "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85" integrity sha512-mLUsMkgP7K/cnFEw07kWqXGF5LKrOkD+lhCrKvPHXWDywAwuDUeDwWBpc69XK3pNX0uKiVt8g5z96PJ6z9xCFA== -"@octokit/plugin-rest-endpoint-methods@^5.12.0": - version "5.13.0" - resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.13.0.tgz#8c46109021a3412233f6f50d28786f8e552427ba" - integrity sha512-uJjMTkN1KaOIgNtUPMtIXDOjx6dGYysdIFhgA52x4xSadQCz3b/zJexvITDVpANnfKPW/+E0xkOvLntqMYpviA== +"@octokit/plugin-rest-endpoint-methods@^6.0.0": + version "6.1.2" + resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.1.2.tgz#bbf55cfc43acf177514441ecd1d26031006f73ed" + integrity sha512-sAfSKtLHNq0UQ2iFuI41I6m5SK6bnKFRJ5kUjDRVbmQXiRVi4aQiIcgG4cM7bt+bhSiWL4HwnTxDkWFlKeKClA== dependencies: - "@octokit/types" "^6.34.0" + "@octokit/types" "^6.40.0" deprecation "^2.3.1" -"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0": - version "2.1.0" - resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677" - integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg== +"@octokit/request-error@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-3.0.0.tgz#f527d178f115a3b62d76ce4804dd5bdbc0270a81" + integrity sha512-WBtpzm9lR8z4IHIMtOqr6XwfkGvMOOILNLxsWvDwtzm/n7f5AWuqJTXQXdDtOvPfTDrH4TPhEvW2qMlR4JFA2w== dependencies: "@octokit/types" "^6.0.3" deprecation "^2.0.0" once "^1.4.0" -"@octokit/request@^5.6.0": - version "5.6.2" - resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.2.tgz#1aa74d5da7b9e04ac60ef232edd9a7438dcf32d8" - integrity sha512-je66CvSEVf0jCpRISxkUcCa0UkxmFs6eGDRSbfJtAVwbLH5ceqF+YEyC8lj8ystKyZTy8adWr0qmkY52EfOeLA== +"@octokit/request@^6.0.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@octokit/request/-/request-6.2.0.tgz#9c25606df84e6f2ccbcc2c58e1d35438e20b688b" + integrity sha512-7IAmHnaezZrgUqtRShMlByJK33MT9ZDnMRgZjnRrRV9a/jzzFwKGz0vxhFU6i7VMLraYcQ1qmcAOin37Kryq+Q== dependencies: - "@octokit/endpoint" "^6.0.1" - "@octokit/request-error" "^2.1.0" + "@octokit/endpoint" "^7.0.0" + "@octokit/request-error" "^3.0.0" "@octokit/types" "^6.16.1" is-plain-object "^5.0.0" - node-fetch "^2.6.1" + node-fetch "^2.6.7" universal-user-agent "^6.0.0" -"@octokit/rest@^18.1.0": - version "18.12.0" - resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.12.0.tgz#f06bc4952fc87130308d810ca9d00e79f6988881" - integrity sha512-gDPiOHlyGavxr72y0guQEhLsemgVjwRePayJ+FcKc2SJqKUbxbkvf5kAZEWA/MKvsfYlQAMVzNJE3ezQcxMJ2Q== +"@octokit/rest@^19.0.3": + version "19.0.3" + resolved "https://registry.yarnpkg.com/@octokit/rest/-/rest-19.0.3.tgz#b9a4e8dc8d53e030d611c053153ee6045f080f02" + integrity sha512-5arkTsnnRT7/sbI4fqgSJ35KiFaN7zQm0uQiQtivNQLI8RQx8EHwJCajcTUwmaCMNDg7tdCvqAnc7uvHHPxrtQ== dependencies: - "@octokit/core" "^3.5.1" - "@octokit/plugin-paginate-rest" "^2.16.8" + "@octokit/core" "^4.0.0" + "@octokit/plugin-paginate-rest" "^3.0.0" "@octokit/plugin-request-log" "^1.0.4" - "@octokit/plugin-rest-endpoint-methods" "^5.12.0" + "@octokit/plugin-rest-endpoint-methods" "^6.0.0" -"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.34.0": +"@octokit/types@^6.0.3", "@octokit/types@^6.16.1": version "6.34.0" resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.34.0.tgz#c6021333334d1ecfb5d370a8798162ddf1ae8218" integrity sha512-s1zLBjWhdEI2zwaoSgyOFoKSl109CUcVBCc7biPJ3aAf6LGLU6szDvi31JPU7bxfla2lqfhjbbg/5DdFNxOwHw== dependencies: "@octokit/openapi-types" "^11.2.0" +"@octokit/types@^6.39.0", "@octokit/types@^6.40.0": + version "6.40.0" + resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.40.0.tgz#f2e665196d419e19bb4265603cf904a820505d0e" + integrity sha512-MFZOU5r8SwgJWDMhrLUSvyJPtVsqA6VnbVI3TNbsmw+Jnvrktzvq2fYES/6RiJA/5Ykdwq4mJmtlYUfW7CGjmw== + dependencies: + "@octokit/openapi-types" "^12.10.0" + "@parcel/watcher@2.0.4": version "2.0.4" resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.4.tgz#f300fef4cc38008ff4b8c29d92588eced3ce014b" @@ -3445,9 +3518,9 @@ integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== "@rollup/plugin-commonjs@^22.0.0": - version "22.0.1" - resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.1.tgz#f7cb777d20de3eeeaf994f39080115c336bef810" - integrity sha512-dGfEZvdjDHObBiP5IvwTKMVeq/tBZGMBHZFMdIV1ClMM/YoWS34xrHFGfag9SN2ZtMgNZRFruqvxZQEa70O6nQ== + version "22.0.2" + resolved "https://registry.yarnpkg.com/@rollup/plugin-commonjs/-/plugin-commonjs-22.0.2.tgz#ee8ca8415cda30d383b4096aad5222435b4b69b6" + integrity sha512-//NdP6iIwPbMTcazYsiBMbJW7gfmpHom33u1beiIoHDEM0Q9clvtQB1T0efvMqHeKsGohiHo97BCPCkBXdscwg== dependencies: "@rollup/pluginutils" "^3.1.0" commondir "^1.0.1" @@ -3493,10 +3566,10 @@ estree-walker "^2.0.1" picomatch "^2.2.2" -"@rushstack/node-core-library@3.49.0": - version "3.49.0" - resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.49.0.tgz#0324c1a5ba5e469967b70e9718d1a90750648503" - integrity sha512-yBJRzGgUNFwulVrwwBARhbGaHsxVMjsZ9JwU1uSBbqPYCdac+t2HYdzi4f4q/Zpgb0eNbwYj2yxgHYpJORNEaw== +"@rushstack/node-core-library@3.50.1": + version "3.50.1" + resolved "https://registry.yarnpkg.com/@rushstack/node-core-library/-/node-core-library-3.50.1.tgz#d4aa4602460f29bbf0662052969b65129384da23" + integrity sha512-9d2xE7E9yQEBS6brTptdP8cslt6iL5+UnkY2lRxQQ4Q/jlXtsrWCCJCxwr56W/eJEe9YT/yHR4mMn5QY64Ps2w== dependencies: "@types/node" "12.20.24" colors "~1.2.1" @@ -3508,18 +3581,18 @@ timsort "~0.3.0" z-schema "~5.0.2" -"@rushstack/rig-package@0.3.13": - version "0.3.13" - resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.13.tgz#80d7b34bc9b7a7feeba133f317df8dbd1f65a822" - integrity sha512-4/2+yyA/uDl7LQvtYtFs1AkhSWuaIGEKhP9/KK2nNARqOVc5eCXmu1vyOqr5mPvNq7sHoIR+sG84vFbaKYGaDA== +"@rushstack/rig-package@0.3.14": + version "0.3.14" + resolved "https://registry.yarnpkg.com/@rushstack/rig-package/-/rig-package-0.3.14.tgz#f2611b59245fd7cc29c6982566b2fbb4a4192bc5" + integrity sha512-Ic9EN3kWJCK6iOxEDtwED9nrM146zCDrQaUxbeGOF+q/VLZ/HNHPw+aLqrqmTl0ZT66Sf75Qk6OG+rySjTorvQ== dependencies: resolve "~1.17.0" strip-json-comments "~3.1.1" -"@rushstack/ts-command-line@4.12.1": - version "4.12.1" - resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.12.1.tgz#4437ffae6459eb88791625ad9e89b2f0ba254476" - integrity sha512-S1Nev6h/kNnamhHeGdp30WgxZTA+B76SJ/P721ctP7DrnC+rrjAc6h/R80I4V0cA2QuEEcMdVOQCtK2BTjsOiQ== +"@rushstack/ts-command-line@4.12.2": + version "4.12.2" + resolved "https://registry.yarnpkg.com/@rushstack/ts-command-line/-/ts-command-line-4.12.2.tgz#59b7450c5d75190778cce8b159c7d7043c32cc4e" + integrity sha512-poBtnumLuWmwmhCEkVAgynWgtnF9Kygekxyp4qtQUSbBrkuyPQTL85c8Cva1YfoUpOdOXxezMAkUt0n5SNKGqw== dependencies: "@types/argparse" "1.0.38" argparse "~1.0.9" @@ -3548,6 +3621,11 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.23.5.tgz#93f7b9f4e3285a7a9ade7557d9a8d36809cbc47d" integrity sha512-AFBVi/iT4g20DHoujvMH1aEDn8fGJh4xsRGCP6d8RpLPMqsNPvW01Jcn0QysXTsg++/xj25NmJsGyH9xug/wKg== +"@sinclair/typebox@^0.24.1": + version "0.24.20" + resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.20.tgz#11a657875de6008622d53f56e063a6347c51a6dd" + integrity sha512-kVaO5aEFZb33nPMTZBxiPEkY+slxiPtqC7QX8f9B3eGOMBvEfuMfxp9DSTTCsRJPumPKjrge4yagyssO4q6qzQ== + "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" @@ -3793,9 +3871,9 @@ "@swc/core-win32-x64-msvc" "1.2.189" "@swc/jest@^0.2.21": - version "0.2.21" - resolved "https://registry.yarnpkg.com/@swc/jest/-/jest-0.2.21.tgz#e8c4e234016a914f4cfbb7d75844860a250c1d1c" - integrity sha512-/+NcExiZbxXANNhNPnIdFuGq62CeumulLS1bngwqIXd8H7d96LFUfrYzdt8tlTwLMel8tFtQ5aRjzVkyOTyPDw== + version "0.2.22" + resolved "https://registry.yarnpkg.com/@swc/jest/-/jest-0.2.22.tgz#70d02ac648c21a442016d7a0aa485577335a4c9a" + integrity sha512-PIUIk9IdB1oAVfF9zNIfYoMBoEhahrrSvyryFANas7swC1cF0L5HR0f9X4qfet46oyCHCBtNcSpN0XJEOFIKlw== dependencies: "@jest/create-cache-key-function" "^27.4.2" @@ -3806,11 +3884,6 @@ dependencies: defer-to-connect "^1.0.1" -"@tootallnate/once@1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" - integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== - "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf" @@ -4218,9 +4291,9 @@ integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== "@types/semver@*", "@types/semver@^7.3.9": - version "7.3.10" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.10.tgz#5f19ee40cbeff87d916eedc8c2bfe2305d957f73" - integrity sha512-zsv3fsC7S84NN6nPK06u79oWgrPVd0NvOyqgghV1haPaFcVxIrP4DLomRwGAXk0ui4HZA7mOcSFL98sMVW9viw== + version "7.3.12" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.12.tgz#920447fdd78d76b19de0438b7f60df3c4a80bf1c" + integrity sha512-WwA1MW0++RfXmCr12xeYOOC5baSC9mSb0ZqCquFzKhcoF4TvHu5MKOuXsncgZcpVFhB1pXd5hZmM0ryAoCp12A== "@types/serve-index@^1.9.1": version "1.9.1" @@ -4463,9 +4536,9 @@ acorn-walk@^8.0.0, acorn-walk@^8.1.1: integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== acorn@^8.0.4, acorn@^8.4.1, acorn@^8.5.0, acorn@^8.7.1: - version "8.7.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.1.tgz#0197122c843d1bf6d0a5e83220a788f278f63c30" - integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== + version "8.8.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== add-stream@^1.0.0: version "1.0.0" @@ -4484,7 +4557,7 @@ agent-base@6, agent-base@^6.0.2: dependencies: debug "4" -agentkeepalive@^4.1.3, agentkeepalive@^4.2.1: +agentkeepalive@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-4.2.1.tgz#a7975cbb9f83b367f06c90cc51ff28fe7d499717" integrity sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA== @@ -4815,10 +4888,10 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== -axe-core@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.2.tgz#dcf7fb6dea866166c3eab33d68208afe4d5f670c" - integrity sha512-LVAaGp/wkkgYJcjmHsoKx4juT1aQvJyPcW09MLCjVTh3V2cc6PnyempiLMNH5iMdfIX/zdbjUx2KDjMLCTdPeA== +axe-core@^4.4.3: + version "4.4.3" + resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.4.3.tgz#11c74d23d5013c0fa5d183796729bc3482bd2f6f" + integrity sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w== axios@^0.21.1: version "0.21.4" @@ -4839,15 +4912,15 @@ axobject-query@^2.2.0: resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.2.0.tgz#943d47e10c0b704aa42275e20edf3722648989be" integrity sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA== -babel-jest@^28.1.2: - version "28.1.2" - resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.2.tgz#2b37fb81439f14d34d8b2cc4a4bd7efabf9acbfe" - integrity sha512-pfmoo6sh4L/+5/G2OOfQrGJgvH7fTa1oChnuYH2G/6gA+JwDvO8PELwvwnofKBMNrQsam0Wy/Rw+QSrBNewq2Q== +babel-jest@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-28.1.3.tgz#c1187258197c099072156a0a121c11ee1e3917d5" + integrity sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q== dependencies: - "@jest/transform" "^28.1.2" + "@jest/transform" "^28.1.3" "@types/babel__core" "^7.1.14" babel-plugin-istanbul "^6.1.1" - babel-preset-jest "^28.1.1" + babel-preset-jest "^28.1.3" chalk "^4.0.0" graceful-fs "^4.2.9" slash "^3.0.0" @@ -4895,10 +4968,10 @@ babel-plugin-istanbul@^6.1.1: istanbul-lib-instrument "^5.0.4" test-exclude "^6.0.0" -babel-plugin-jest-hoist@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.1.tgz#5e055cdcc47894f28341f87f5e35aad2df680b11" - integrity sha512-NovGCy5Hn25uMJSAU8FaHqzs13cFoOI4lhIujiepssjCKRsAo3TA734RDWSGxuFTsUJXerYOqQQodlxgmtqbzw== +babel-plugin-jest-hoist@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-28.1.3.tgz#1952c4d0ea50f2d6d794353762278d1d8cca3fbe" + integrity sha512-Ys3tUKAmfnkRUpPdpa98eYrAR0nV+sSFUZZEGuQ2EbFd1y4SOLtD5QDNHAq+bb9a+bbXvYQC4b+ID/THIMcU6Q== dependencies: "@babel/template" "^7.3.3" "@babel/types" "^7.3.3" @@ -4947,12 +5020,12 @@ babel-preset-current-node-syntax@^1.0.0: "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-top-level-await" "^7.8.3" -babel-preset-jest@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.1.tgz#5b6e5e69f963eb2d70f739c607b8f723c0ee75e4" - integrity sha512-FCq9Oud0ReTeWtcneYf/48981aTfXYuB9gbU4rBNNJVBSQ6ssv7E6v/qvbBxtOWwZFXjLZwpg+W3q7J6vhH25g== +babel-preset-jest@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/babel-preset-jest/-/babel-preset-jest-28.1.3.tgz#5dfc20b99abed5db994406c2b9ab94c73aaa419d" + integrity sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A== dependencies: - babel-plugin-jest-hoist "^28.1.1" + babel-plugin-jest-hoist "^28.1.3" babel-preset-current-node-syntax "^1.0.0" bail@^1.0.0: @@ -5014,7 +5087,7 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bl@^4.0.3: +bl@^4.0.3, bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== @@ -5189,30 +5262,6 @@ bytes@3.1.2: resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.2.tgz#8b0beeb98605adf1b128fa4386403c009e0221a5" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== -cacache@^15.0.5, cacache@^15.2.0: - version "15.3.0" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-15.3.0.tgz#dc85380fb2f556fe3dda4c719bfa0ec875a7f1eb" - integrity sha512-VVdYzXEn+cnbXpFgWs5hTT7OScegHVmLhJIR8Ufqk3iFD6A6j5iSX1KuBTfNEv4tdJWE2PzA6IVFtcLC7fN9wQ== - dependencies: - "@npmcli/fs" "^1.0.0" - "@npmcli/move-file" "^1.0.1" - chownr "^2.0.0" - fs-minipass "^2.0.0" - glob "^7.1.4" - infer-owner "^1.0.4" - lru-cache "^6.0.0" - minipass "^3.1.1" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.2" - mkdirp "^1.0.3" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^8.0.1" - tar "^6.0.2" - unique-filename "^1.1.1" - cacache@^16.0.0, cacache@^16.0.6, cacache@^16.1.0: version "16.1.0" resolved "https://registry.yarnpkg.com/cacache/-/cacache-16.1.0.tgz#87a6bae558a511c9cb2a13768073e240ca76153a" @@ -5325,7 +5374,7 @@ ccount@^1.0.0, ccount@^1.0.3: resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.1.0.tgz#246687debb6014735131be8abab2d93898f8d043" integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== -chalk@4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.2: +chalk@4, chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -5515,6 +5564,11 @@ cli-spinners@2.6.1: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== +cli-spinners@^2.5.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.7.0.tgz#f815fd30b5f9eaac02db604c7a231ed7cb2f797a" + integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== + cli-table3@^0.6.2, cli-table3@~0.6.0: version "0.6.2" resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.2.tgz#aaf5df9d8b5bf12634dc8b3040806a0c07120d2a" @@ -5576,16 +5630,9 @@ clone@^1.0.2: integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= clsx@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.0.tgz#b0e415ea7537dbac01b169c5cec1caeb11d86566" - integrity sha512-EPRP7XJsM1y0iCU3Z7C7jFKdQboXSeHgEfzQUTlz7m5NP3hDrlz48aUsmNGp4pC+JOW9WA3vIRqlYuo/bl4Drw== - -cmd-shim@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/cmd-shim/-/cmd-shim-4.1.0.tgz#b3a904a6743e9fede4148c6f3800bf2a08135bdd" - integrity sha512-lb9L7EM4I/ZRVuljLPEtUJOP+xiQVknZ4ZMpMgEp4JzNldPb27HU03hi6K1/6CoIuit/Zm/LQXySErFeXxDprw== - dependencies: - mkdirp-infer-owner "^2.0.0" + version "1.2.1" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" + integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== cmd-shim@^5.0.0: version "5.0.0" @@ -5837,7 +5884,7 @@ conventional-changelog-angular@^5.0.12: compare-func "^2.0.0" q "^1.5.1" -conventional-changelog-core@^4.2.2: +conventional-changelog-core@^4.2.4: version "4.2.4" resolved "https://registry.yarnpkg.com/conventional-changelog-core/-/conventional-changelog-core-4.2.4.tgz#e50d047e8ebacf63fac3dc67bf918177001e1e9f" integrity sha512-gDVS+zVJHE2v4SLc6B0sLsPiloR0ygU7HaDW14aNJE1v4SlqJPILPl/aJC7YdtRE4CybBf8gDwObBvKha8Xlyg== @@ -6385,11 +6432,6 @@ decamelize@^1.1.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og== - decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" @@ -6804,7 +6846,7 @@ encodeurl@~1.0.2: resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= -encoding@^0.1.12, encoding@^0.1.13: +encoding@^0.1.13: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== @@ -6818,7 +6860,7 @@ end-of-stream@^1.1.0, end-of-stream@^1.4.1: dependencies: once "^1.4.0" -enhanced-resolve@^5.9.3: +enhanced-resolve@^5.10.0, enhanced-resolve@^5.9.3: version "5.10.0" resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz#0dc579c3bb2a1032e357ac45b8f3a6f3ad4fb1e6" integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== @@ -6984,10 +7026,10 @@ eslint-plugin-eslint-comments@^3.2.0: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-eslint-plugin@^4.1.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-4.4.0.tgz#52475a3f9635de9990b0c09c201eb2601467daae" - integrity sha512-Y29xyomdpWybXJBVcmS9iHZwQyqYz9TVGtsxqcRa/mxhWdFexPH9lTXjT61QbsScgvh3PBTjTIpktImJLoqN6g== +eslint-plugin-eslint-plugin@^5.0.1: + version "5.0.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-5.0.5.tgz#ae6e92d4acd23b5b97f8bc59ee731e265e419fbb" + integrity sha512-ILj2DQ1g3c9J7Nm5CcipMc/fZGDjg5Ehr3v0V9/yVIavMv0lvjSt3tqOhuVZL7SqQC0JJBao9Wk/IPSzw0lecg== dependencies: eslint-utils "^3.0.0" estraverse "^5.2.0" @@ -7012,27 +7054,27 @@ eslint-plugin-import@^2.26.0: tsconfig-paths "^3.14.1" eslint-plugin-jest@^26.1.5: - version "26.5.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.5.3.tgz#a3ceeaf4a757878342b8b00eca92379b246e5505" - integrity sha512-sICclUqJQnR1bFRZGLN2jnSVsYOsmPYYnroGCIMVSvTS3y8XR3yjzy1EcTQmk6typ5pRgyIWzbjqxK6cZHEZuQ== + version "26.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.7.0.tgz#41d405ac9143e1284a3401282db47ed459436778" + integrity sha512-/YNitdfG3o3cC6juZziAdkk6nfJt01jXVfj4AgaYVLs7bupHzRDL5K+eipdzhDXtQsiqaX1TzfwSuRlEgeln1A== dependencies: "@typescript-eslint/utils" "^5.10.0" eslint-plugin-jsx-a11y@^6.5.1: - version "6.6.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.6.0.tgz#2c5ac12e013eb98337b9aa261c3b355275cc6415" - integrity sha512-kTeLuIzpNhXL2CwLlc8AHI0aFRwWHcg483yepO9VQiHzM9bZwJdzTkzBszbuPrbgGmq2rlX/FaT2fJQsjUSHsw== + version "6.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.6.1.tgz#93736fc91b83fdc38cc8d115deedfc3091aef1ff" + integrity sha512-sXgFVNHiWffBq23uiS/JaP6eVR622DqwB4yTzKvGZGcPq6/yZ3WmOZfuBks/vHWo9GaFOqC2ZK4i6+C35knx7Q== dependencies: - "@babel/runtime" "^7.18.3" + "@babel/runtime" "^7.18.9" aria-query "^4.2.2" array-includes "^3.1.5" ast-types-flow "^0.0.7" - axe-core "^4.4.2" + axe-core "^4.4.3" axobject-query "^2.2.0" damerau-levenshtein "^1.0.8" emoji-regex "^9.2.2" has "^1.0.3" - jsx-ast-utils "^3.3.1" + jsx-ast-utils "^3.3.2" language-tags "^1.0.5" minimatch "^3.1.2" semver "^6.3.0" @@ -7295,6 +7337,17 @@ expect@^28.1.1: jest-message-util "^28.1.1" jest-util "^28.1.1" +expect@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/expect/-/expect-28.1.3.tgz#90a7c1a124f1824133dd4533cce2d2bdcb6603ec" + integrity sha512-eEh0xn8HlsuOBxFgIss+2mX85VAS4Qy3OSkjV7rlBWljtA4oWH37glVGyOZSZvErDT/yBywZdPGwCXuTvSG85g== + dependencies: + "@jest/expect-utils" "^28.1.3" + jest-get-type "^28.0.2" + jest-matcher-utils "^28.1.3" + jest-message-util "^28.1.3" + jest-util "^28.1.3" + express@^4.17.3: version "4.18.1" resolved "https://registry.yarnpkg.com/express/-/express-4.18.1.tgz#7797de8b9c72c857b9cd0e14a5eea80666267caf" @@ -7524,11 +7577,6 @@ fill-range@^7.0.1: dependencies: to-regex-range "^5.0.1" -filter-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/filter-obj/-/filter-obj-1.1.0.tgz#9b311112bc6c6127a16e016c6c5d7f19e0805c5b" - integrity sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ== - finalhandler@1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.2.0.tgz#7d23fe5731b207b4640e4fcd00aec1f9207a7b32" @@ -7890,20 +7938,20 @@ git-semver-tags@^4.1.1: meow "^8.0.0" semver "^6.0.0" -git-up@^4.0.0: - version "4.0.5" - resolved "https://registry.yarnpkg.com/git-up/-/git-up-4.0.5.tgz#e7bb70981a37ea2fb8fe049669800a1f9a01d759" - integrity sha512-YUvVDg/vX3d0syBsk/CKUTib0srcQME0JyHkL5BaYdwLsiCslPWmDSi8PUMo9pXYjrryMcmsCoCgsTpSCJEQaA== +git-up@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/git-up/-/git-up-6.0.0.tgz#dbd6e4eee270338be847a0601e6d0763c90b74db" + integrity sha512-6RUFSNd1c/D0xtGnyWN2sxza2bZtZ/EmI9448n6rCZruFwV/ezeEn2fJP7XnUQGwf0RAtd/mmUCbtH6JPYA2SA== dependencies: - is-ssh "^1.3.0" - parse-url "^6.0.0" + is-ssh "^1.4.0" + parse-url "^7.0.2" -git-url-parse@^11.4.4: - version "11.6.0" - resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-11.6.0.tgz#c634b8de7faa66498a2b88932df31702c67df605" - integrity sha512-WWUxvJs5HsyHL6L08wOusa/IXYtMuCAhrMmnTjQPpBU0TTHyDhnOATNH3xNQz7YOQUsqIIPTGr4xiVti1Hsk5g== +git-url-parse@^12.0.0: + version "12.0.0" + resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-12.0.0.tgz#4ba70bc1e99138321c57e3765aaf7428e5abb793" + integrity sha512-I6LMWsxV87vysX1WfsoglXsXg6GjQRKq7+Dgiseo+h0skmp5Hp2rzmcEIRQot9CPA+uzU7x1x7jZdqvTFGnB+Q== dependencies: - git-up "^4.0.0" + git-up "^6.0.0" gitconfiglocal@^1.0.0: version "1.0.0" @@ -8276,6 +8324,13 @@ hosted-git-info@^2.1.4: resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== +hosted-git-info@^3.0.6: + version "3.0.8" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-3.0.8.tgz#6e35d4cc87af2c5f816e4cb9ce350ba87a3f370d" + integrity sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw== + dependencies: + lru-cache "^6.0.0" + hosted-git-info@^4.0.0, hosted-git-info@^4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-4.0.2.tgz#5e425507eede4fea846b7262f0838456c4209961" @@ -8412,15 +8467,6 @@ http-parser-js@>=0.5.1: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.3.tgz#01d2709c79d41698bb01d4decc5e9da4e4a033d9" integrity sha512-t7hjvef/5HEK7RWTdUzVUhl8zkEu+LlaE0IYzdMuvbSDipxBRpOn4Uhw8ZyECEa808iVT8XCjzo6xmYt4CiLZg== -http-proxy-agent@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" - integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== - dependencies: - "@tootallnate/once" "1" - agent-base "6" - debug "4" - http-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz#5129800203520d434f142bc78ff3c170800f2b43" @@ -8525,13 +8571,6 @@ ieee754@^1.1.13: resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== -ignore-walk@^3.0.3: - version "3.0.4" - resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-3.0.4.tgz#c9a09f69b7c7b479a5d74ac1a3c0d4236d2a6335" - integrity sha512-PY6Ii8o1jMRA1z4F2hRkH/xN59ox43DavKvD3oDpfurRlOJyAHpifIwpbdv1n4jt4ov0jSpw3kQ4GhJnpBL6WQ== - dependencies: - minimatch "^3.0.4" - ignore-walk@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ignore-walk/-/ignore-walk-5.0.1.tgz#5f199e23e1288f518d90358d461387788a154776" @@ -8630,42 +8669,44 @@ ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -init-package-json@^2.0.2: - version "2.0.5" - resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-2.0.5.tgz#78b85f3c36014db42d8f32117252504f68022646" - integrity sha512-u1uGAtEFu3VA6HNl/yUWw57jmKEMx8SKOxHhxjGnOFUiIlFnohKDFg4ZrPpv9wWqk44nDxGJAtqjdQFm+9XXQA== +init-package-json@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-3.0.2.tgz#f5bc9bac93f2bdc005778bc2271be642fecfcd69" + integrity sha512-YhlQPEjNFqlGdzrBfDNRLhvoSgX7iQRgSxgsNknRQ9ITXFT7UMfVMWhBTOh2Y+25lRnGrv5Xz8yZwQ3ACR6T3A== dependencies: - npm-package-arg "^8.1.5" + npm-package-arg "^9.0.1" promzard "^0.3.0" - read "~1.0.1" - read-package-json "^4.1.1" + read "^1.0.7" + read-package-json "^5.0.0" semver "^7.3.5" validate-npm-package-license "^3.0.4" - validate-npm-package-name "^3.0.0" + validate-npm-package-name "^4.0.0" inline-style-parser@0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/inline-style-parser/-/inline-style-parser-0.1.1.tgz#ec8a3b429274e9c0a1f1c4ffa9453a7fef72cea1" integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== -inquirer@^7.3.3: - version "7.3.3" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" - integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== +inquirer@^8.2.4: + version "8.2.4" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-8.2.4.tgz#ddbfe86ca2f67649a67daa6f1051c128f684f0b4" + integrity sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg== dependencies: ansi-escapes "^4.2.1" - chalk "^4.1.0" + chalk "^4.1.1" cli-cursor "^3.1.0" cli-width "^3.0.0" external-editor "^3.0.3" figures "^3.0.0" - lodash "^4.17.19" + lodash "^4.17.21" mute-stream "0.0.8" + ora "^5.4.1" run-async "^2.4.0" - rxjs "^6.6.0" + rxjs "^7.5.5" string-width "^4.1.0" strip-ansi "^6.0.0" through "^2.3.6" + wrap-ansi "^7.0.0" internal-slot@^1.0.3: version "1.0.3" @@ -8843,6 +8884,11 @@ is-installed-globally@^0.4.0, is-installed-globally@~0.4.0: global-dirs "^3.0.0" is-path-inside "^3.0.2" +is-interactive@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-interactive/-/is-interactive-1.0.0.tgz#cea6e6ae5c870a7b0a0004070b7b587e0252912e" + integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== + is-lambda@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" @@ -8954,7 +9000,7 @@ is-shared-array-buffer@^1.0.2: dependencies: call-bind "^1.0.2" -is-ssh@^1.3.0: +is-ssh@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.4.0.tgz#4f8220601d2839d8fa624b3106f8e8884f01b8b2" integrity sha512-x7+VxdxOdlV3CYpjvRLBv5Lo9OJerlYanjwFrPR9fuGPjCiNiCzFgAWpiLAohSbsnH4ZAys3SBh+hq5rJosxUQ== @@ -9116,30 +9162,30 @@ jest-changed-files@^28.0.2: execa "^5.0.0" throat "^6.0.1" -jest-circus@^28.1.2: - version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.2.tgz#0d5a5623eccb244efe87d1edc365696e4fcf80ce" - integrity sha512-E2vdPIJG5/69EMpslFhaA46WkcrN74LI5V/cSJ59L7uS8UNoXbzTxmwhpi9XrIL3zqvMt5T0pl5k2l2u2GwBNQ== +jest-circus@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-circus/-/jest-circus-28.1.3.tgz#d14bd11cf8ee1a03d69902dc47b6bd4634ee00e4" + integrity sha512-cZ+eS5zc79MBwt+IhQhiEp0OeBddpc1n8MBo1nMB8A7oPMKEO+Sre+wHaLJexQUj9Ya/8NOBY0RESUgYjB6fow== dependencies: - "@jest/environment" "^28.1.2" - "@jest/expect" "^28.1.2" - "@jest/test-result" "^28.1.1" - "@jest/types" "^28.1.1" + "@jest/environment" "^28.1.3" + "@jest/expect" "^28.1.3" + "@jest/test-result" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" chalk "^4.0.0" co "^4.6.0" dedent "^0.7.0" is-generator-fn "^2.0.0" - jest-each "^28.1.1" - jest-matcher-utils "^28.1.1" - jest-message-util "^28.1.1" - jest-runtime "^28.1.2" - jest-snapshot "^28.1.2" - jest-util "^28.1.1" - pretty-format "^28.1.1" + jest-each "^28.1.3" + jest-matcher-utils "^28.1.3" + jest-message-util "^28.1.3" + jest-runtime "^28.1.3" + jest-snapshot "^28.1.3" + jest-util "^28.1.3" + p-limit "^3.1.0" + pretty-format "^28.1.3" slash "^3.0.0" stack-utils "^2.0.3" - throat "^6.0.1" jest-cli@^28.1.1: version "28.1.1" @@ -9160,42 +9206,42 @@ jest-cli@^28.1.1: yargs "^17.3.1" jest-config@27.5.1, jest-config@^28, jest-config@^28.1.1: - version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.2.tgz#ba00ad30caf62286c86e7c1099e915218a0ac8c6" - integrity sha512-g6EfeRqddVbjPVBVY4JWpUY4IvQoFRIZcv4V36QkqzE0IGhEC/VkugFeBMAeUE7PRgC8KJF0yvJNDeQRbamEVA== + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-config/-/jest-config-28.1.3.tgz#e315e1f73df3cac31447eed8b8740a477392ec60" + integrity sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ== dependencies: "@babel/core" "^7.11.6" - "@jest/test-sequencer" "^28.1.1" - "@jest/types" "^28.1.1" - babel-jest "^28.1.2" + "@jest/test-sequencer" "^28.1.3" + "@jest/types" "^28.1.3" + babel-jest "^28.1.3" chalk "^4.0.0" ci-info "^3.2.0" deepmerge "^4.2.2" glob "^7.1.3" graceful-fs "^4.2.9" - jest-circus "^28.1.2" - jest-environment-node "^28.1.2" + jest-circus "^28.1.3" + jest-environment-node "^28.1.3" jest-get-type "^28.0.2" jest-regex-util "^28.0.2" - jest-resolve "^28.1.1" - jest-runner "^28.1.2" - jest-util "^28.1.1" - jest-validate "^28.1.1" + jest-resolve "^28.1.3" + jest-runner "^28.1.3" + jest-util "^28.1.3" + jest-validate "^28.1.3" micromatch "^4.0.4" parse-json "^5.2.0" - pretty-format "^28.1.1" + pretty-format "^28.1.3" slash "^3.0.0" strip-json-comments "^3.1.1" -jest-diff@*, jest-diff@^28, jest-diff@^28.1.0, jest-diff@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.1.tgz#1a3eedfd81ae79810931c63a1d0f201b9120106c" - integrity sha512-/MUUxeR2fHbqHoMMiffe/Afm+U8U4olFRJ0hiVG2lZatPJcnGxx292ustVu7bULhjV65IYMxRdploAKLbcrsyg== +jest-diff@*, jest-diff@^28, jest-diff@^28.1.0, jest-diff@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-28.1.3.tgz#948a192d86f4e7a64c5264ad4da4877133d8792f" + integrity sha512-8RqP1B/OXzjjTWkqMX67iqgwBVJRgCyKD3L9nq+6ZqJMdvjE8RgHktqZ6jNrkdMT+dJuYNI3rhQpxaz7drJHfw== dependencies: chalk "^4.0.0" diff-sequences "^28.1.1" jest-get-type "^28.0.2" - pretty-format "^28.1.1" + pretty-format "^28.1.3" jest-docblock@^28.1.1: version "28.1.1" @@ -9204,16 +9250,16 @@ jest-docblock@^28.1.1: dependencies: detect-newline "^3.0.0" -jest-each@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-28.1.1.tgz#ba5238dacf4f31d9fe23ddc2c44c01e7c23885c4" - integrity sha512-A042rqh17ZvEhRceDMi784ppoXR7MWGDEKTXEZXb4svt0eShMZvijGxzKsx+yIjeE8QYmHPrnHiTSQVhN4nqaw== +jest-each@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-each/-/jest-each-28.1.3.tgz#bdd1516edbe2b1f3569cfdad9acd543040028f81" + integrity sha512-arT1z4sg2yABU5uogObVPvSlSMQlDA48owx07BDPAiasW0yYpYHYOo4HHLz9q0BVzDVU4hILFjzJw0So9aCL/g== dependencies: - "@jest/types" "^28.1.1" + "@jest/types" "^28.1.3" chalk "^4.0.0" jest-get-type "^28.0.2" - jest-util "^28.1.1" - pretty-format "^28.1.1" + jest-util "^28.1.3" + pretty-format "^28.1.3" jest-environment-node@^28.1.1: version "28.1.1" @@ -9227,17 +9273,17 @@ jest-environment-node@^28.1.1: jest-mock "^28.1.1" jest-util "^28.1.1" -jest-environment-node@^28.1.2: - version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.2.tgz#3e2eb47f6d173b0648d5f7c717cb1c26651d5c8a" - integrity sha512-oYsZz9Qw27XKmOgTtnl0jW7VplJkN2oeof+SwAwKFQacq3CLlG9u4kTGuuLWfvu3J7bVutWlrbEQMOCL/jughw== +jest-environment-node@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-environment-node/-/jest-environment-node-28.1.3.tgz#7e74fe40eb645b9d56c0c4b70ca4357faa349be5" + integrity sha512-ugP6XOhEpjAEhGYvp5Xj989ns5cB1K6ZdjBYuS30umT4CQEETaxSiPcZ/E1kFktX4GkrcM4qu07IIlDYX1gp+A== dependencies: - "@jest/environment" "^28.1.2" - "@jest/fake-timers" "^28.1.2" - "@jest/types" "^28.1.1" + "@jest/environment" "^28.1.3" + "@jest/fake-timers" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" - jest-mock "^28.1.1" - jest-util "^28.1.1" + jest-mock "^28.1.3" + jest-util "^28.1.3" jest-get-type@^28, jest-get-type@^28.0.2: version "28.0.2" @@ -9263,6 +9309,25 @@ jest-haste-map@^28.1.1: optionalDependencies: fsevents "^2.3.2" +jest-haste-map@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-28.1.3.tgz#abd5451129a38d9841049644f34b034308944e2b" + integrity sha512-3S+RQWDXccXDKSWnkHa/dPwt+2qwA8CJzR61w3FoYCvoo3Pn8tvGcysmMF0Bj0EX5RYvAI2EIvC57OmotfdtKA== + dependencies: + "@jest/types" "^28.1.3" + "@types/graceful-fs" "^4.1.3" + "@types/node" "*" + anymatch "^3.0.3" + fb-watchman "^2.0.0" + graceful-fs "^4.2.9" + jest-regex-util "^28.0.2" + jest-util "^28.1.3" + jest-worker "^28.1.3" + micromatch "^4.0.4" + walker "^1.0.8" + optionalDependencies: + fsevents "^2.3.2" + jest-leak-detector@^28.1.1: version "28.1.1" resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.1.tgz#537f37afd610a4b3f4cab15e06baf60484548efb" @@ -9271,15 +9336,23 @@ jest-leak-detector@^28.1.1: jest-get-type "^28.0.2" pretty-format "^28.1.1" -jest-matcher-utils@^28, jest-matcher-utils@^28.0.0, jest-matcher-utils@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.1.tgz#a7c4653c2b782ec96796eb3088060720f1e29304" - integrity sha512-NPJPRWrbmR2nAJ+1nmnfcKKzSwgfaciCCrYZzVnNoxVoyusYWIjkBMNvu0RHJe7dNj4hH3uZOPZsQA+xAYWqsw== +jest-leak-detector@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-leak-detector/-/jest-leak-detector-28.1.3.tgz#a6685d9b074be99e3adee816ce84fd30795e654d" + integrity sha512-WFVJhnQsiKtDEo5lG2mM0v40QWnBM+zMdHHyJs8AWZ7J0QZJS59MsyKeJHWhpBZBH32S48FOVvGyOFT1h0DlqA== + dependencies: + jest-get-type "^28.0.2" + pretty-format "^28.1.3" + +jest-matcher-utils@^28, jest-matcher-utils@^28.0.0, jest-matcher-utils@^28.1.1, jest-matcher-utils@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-28.1.3.tgz#5a77f1c129dd5ba3b4d7fc20728806c78893146e" + integrity sha512-kQeJ7qHemKfbzKoGjHHrRKH6atgxMk8Enkk2iPQ3XwO6oE/KYD8lMYOziCkeSB9G4adPM4nR1DE8Tf5JeWH6Bw== dependencies: chalk "^4.0.0" - jest-diff "^28.1.1" + jest-diff "^28.1.3" jest-get-type "^28.0.2" - pretty-format "^28.1.1" + pretty-format "^28.1.3" jest-message-util@^28.1.1: version "28.1.1" @@ -9296,6 +9369,21 @@ jest-message-util@^28.1.1: slash "^3.0.0" stack-utils "^2.0.3" +jest-message-util@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-28.1.3.tgz#232def7f2e333f1eecc90649b5b94b0055e7c43d" + integrity sha512-PFdn9Iewbt575zKPf1286Ht9EPoJmYT7P0kY+RibeYZ2XtOr53pDLEFoTWXbd1h4JiGiWpTBC84fc8xMXQMb7g== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^28.1.3" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^28.1.3" + slash "^3.0.0" + stack-utils "^2.0.3" + jest-mock@^28.1.1: version "28.1.1" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.1.tgz#37903d269427fa1ef5b2447be874e1c62a39a371" @@ -9304,6 +9392,14 @@ jest-mock@^28.1.1: "@jest/types" "^28.1.1" "@types/node" "*" +jest-mock@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-28.1.3.tgz#d4e9b1fc838bea595c77ab73672ebf513ab249da" + integrity sha512-o3J2jr6dMMWYVH4Lh/NKmDXdosrsJgi4AviS8oXLujcjpCMBb1FMsblDnOXKZKfSiHLxYub1eS0IHuRXsio9eA== + dependencies: + "@jest/types" "^28.1.3" + "@types/node" "*" + jest-pnp-resolver@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" @@ -9322,17 +9418,17 @@ jest-resolve-dependencies@^28.1.1: jest-regex-util "^28.0.2" jest-snapshot "^28.1.1" -jest-resolve@27.5.1, jest-resolve@^28, jest-resolve@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-28.1.1.tgz#bc2eaf384abdcc1aaf3ba7c50d1adf01e59095e5" - integrity sha512-/d1UbyUkf9nvsgdBildLe6LAD4DalgkgZcKd0nZ8XUGPyA/7fsnaQIlKVnDiuUXv/IeZhPEDrRJubVSulxrShA== +jest-resolve@27.5.1, jest-resolve@^28, jest-resolve@^28.1.1, jest-resolve@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-resolve/-/jest-resolve-28.1.3.tgz#cfb36100341ddbb061ec781426b3c31eb51aa0a8" + integrity sha512-Z1W3tTjE6QaNI90qo/BJpfnvpxtaFTFw5CDgwpyE/Kz8U/06N1Hjf4ia9quUhCh39qIGWF1ZuxFiBiJQwSEYKQ== dependencies: chalk "^4.0.0" graceful-fs "^4.2.9" - jest-haste-map "^28.1.1" + jest-haste-map "^28.1.3" jest-pnp-resolver "^1.2.2" - jest-util "^28.1.1" - jest-validate "^28.1.1" + jest-util "^28.1.3" + jest-validate "^28.1.3" resolve "^1.20.0" resolve.exports "^1.1.0" slash "^3.0.0" @@ -9364,32 +9460,32 @@ jest-runner@^28.1.1: source-map-support "0.5.13" throat "^6.0.1" -jest-runner@^28.1.2: - version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.2.tgz#f293409592a62234285a71237e38499a3554e350" - integrity sha512-6/k3DlAsAEr5VcptCMdhtRhOoYClZQmxnVMZvZ/quvPGRpN7OBQYPIC32tWSgOnbgqLXNs5RAniC+nkdFZpD4A== - dependencies: - "@jest/console" "^28.1.1" - "@jest/environment" "^28.1.2" - "@jest/test-result" "^28.1.1" - "@jest/transform" "^28.1.2" - "@jest/types" "^28.1.1" +jest-runner@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-runner/-/jest-runner-28.1.3.tgz#5eee25febd730b4713a2cdfd76bdd5557840f9a1" + integrity sha512-GkMw4D/0USd62OVO0oEgjn23TM+YJa2U2Wu5zz9xsQB1MxWKDOlrnykPxnMsN0tnJllfLPinHTka61u0QhaxBA== + dependencies: + "@jest/console" "^28.1.3" + "@jest/environment" "^28.1.3" + "@jest/test-result" "^28.1.3" + "@jest/transform" "^28.1.3" + "@jest/types" "^28.1.3" "@types/node" "*" chalk "^4.0.0" emittery "^0.10.2" graceful-fs "^4.2.9" jest-docblock "^28.1.1" - jest-environment-node "^28.1.2" - jest-haste-map "^28.1.1" - jest-leak-detector "^28.1.1" - jest-message-util "^28.1.1" - jest-resolve "^28.1.1" - jest-runtime "^28.1.2" - jest-util "^28.1.1" - jest-watcher "^28.1.1" - jest-worker "^28.1.1" + jest-environment-node "^28.1.3" + jest-haste-map "^28.1.3" + jest-leak-detector "^28.1.3" + jest-message-util "^28.1.3" + jest-resolve "^28.1.3" + jest-runtime "^28.1.3" + jest-util "^28.1.3" + jest-watcher "^28.1.3" + jest-worker "^28.1.3" + p-limit "^3.1.0" source-map-support "0.5.13" - throat "^6.0.1" jest-runtime@^28.1.1: version "28.1.1" @@ -9419,61 +9515,61 @@ jest-runtime@^28.1.1: slash "^3.0.0" strip-bom "^4.0.0" -jest-runtime@^28.1.2: - version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.2.tgz#d68f34f814a848555a345ceda23289f14d59a688" - integrity sha512-i4w93OsWzLOeMXSi9epmakb2+3z0AchZtUQVF1hesBmcQQy4vtaql5YdVe9KexdJaVRyPDw8DoBR0j3lYsZVYw== +jest-runtime@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-runtime/-/jest-runtime-28.1.3.tgz#a57643458235aa53e8ec7821949e728960d0605f" + integrity sha512-NU+881ScBQQLc1JHG5eJGU7Ui3kLKrmwCPPtYsJtBykixrM2OhVQlpMmFWJjMyDfdkGgBMNjXCGB/ebzsgNGQw== dependencies: - "@jest/environment" "^28.1.2" - "@jest/fake-timers" "^28.1.2" - "@jest/globals" "^28.1.2" + "@jest/environment" "^28.1.3" + "@jest/fake-timers" "^28.1.3" + "@jest/globals" "^28.1.3" "@jest/source-map" "^28.1.2" - "@jest/test-result" "^28.1.1" - "@jest/transform" "^28.1.2" - "@jest/types" "^28.1.1" + "@jest/test-result" "^28.1.3" + "@jest/transform" "^28.1.3" + "@jest/types" "^28.1.3" chalk "^4.0.0" cjs-module-lexer "^1.0.0" collect-v8-coverage "^1.0.0" execa "^5.0.0" glob "^7.1.3" graceful-fs "^4.2.9" - jest-haste-map "^28.1.1" - jest-message-util "^28.1.1" - jest-mock "^28.1.1" + jest-haste-map "^28.1.3" + jest-message-util "^28.1.3" + jest-mock "^28.1.3" jest-regex-util "^28.0.2" - jest-resolve "^28.1.1" - jest-snapshot "^28.1.2" - jest-util "^28.1.1" + jest-resolve "^28.1.3" + jest-snapshot "^28.1.3" + jest-util "^28.1.3" slash "^3.0.0" strip-bom "^4.0.0" -jest-snapshot@*, jest-snapshot@^27.0.2, jest-snapshot@^28, jest-snapshot@^28.1.0, jest-snapshot@^28.1.1, jest-snapshot@^28.1.2: - version "28.1.2" - resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.2.tgz#93d31b87b11b384f5946fe0767541496135f8d52" - integrity sha512-wzrieFttZYfLvrCVRJxX+jwML2YTArOUqFpCoSVy1QUapx+LlV9uLbV/mMEhYj4t7aMeE9aSQFHSvV/oNoDAMA== +jest-snapshot@*, jest-snapshot@^27.0.2, jest-snapshot@^28, jest-snapshot@^28.1.0, jest-snapshot@^28.1.1, jest-snapshot@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-snapshot/-/jest-snapshot-28.1.3.tgz#17467b3ab8ddb81e2f605db05583d69388fc0668" + integrity sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg== dependencies: "@babel/core" "^7.11.6" "@babel/generator" "^7.7.2" "@babel/plugin-syntax-typescript" "^7.7.2" "@babel/traverse" "^7.7.2" "@babel/types" "^7.3.3" - "@jest/expect-utils" "^28.1.1" - "@jest/transform" "^28.1.2" - "@jest/types" "^28.1.1" + "@jest/expect-utils" "^28.1.3" + "@jest/transform" "^28.1.3" + "@jest/types" "^28.1.3" "@types/babel__traverse" "^7.0.6" "@types/prettier" "^2.1.5" babel-preset-current-node-syntax "^1.0.0" chalk "^4.0.0" - expect "^28.1.1" + expect "^28.1.3" graceful-fs "^4.2.9" - jest-diff "^28.1.1" + jest-diff "^28.1.3" jest-get-type "^28.0.2" - jest-haste-map "^28.1.1" - jest-matcher-utils "^28.1.1" - jest-message-util "^28.1.1" - jest-util "^28.1.1" + jest-haste-map "^28.1.3" + jest-matcher-utils "^28.1.3" + jest-message-util "^28.1.3" + jest-util "^28.1.3" natural-compare "^1.4.0" - pretty-format "^28.1.1" + pretty-format "^28.1.3" semver "^7.3.5" jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: @@ -9483,12 +9579,12 @@ jest-specific-snapshot@*, jest-specific-snapshot@^5.0.0: dependencies: jest-snapshot "^27.0.2" -jest-util@27.5.1, jest-util@^28, jest-util@^28.1.1: - version "28.1.1" - resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.1.tgz#ff39e436a1aca397c0ab998db5a51ae2b7080d05" - integrity sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw== +jest-util@27.5.1, jest-util@^28, jest-util@^28.1.1, jest-util@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-28.1.3.tgz#f4f932aa0074f0679943220ff9cbba7e497028b0" + integrity sha512-XdqfpHwpcSRko/C35uLYFM2emRAltIIKZiJ9eAmhjsj0CqZMa0p1ib0R5fWIqGhn1a103DebTbpqIaP1qCQ6tQ== dependencies: - "@jest/types" "^28.1.1" + "@jest/types" "^28.1.3" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" @@ -9507,6 +9603,18 @@ jest-validate@^28.1.1: leven "^3.1.0" pretty-format "^28.1.1" +jest-validate@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-28.1.3.tgz#e322267fd5e7c64cea4629612c357bbda96229df" + integrity sha512-SZbOGBWEsaTxBGCOpsRWlXlvNkvTkY0XxRfh7zYmvd8uL5Qzyg0CHAXiXKROflh801quA6+/DsT4ODDthOC/OA== + dependencies: + "@jest/types" "^28.1.3" + camelcase "^6.2.0" + chalk "^4.0.0" + jest-get-type "^28.0.2" + leven "^3.1.0" + pretty-format "^28.1.3" + jest-watcher@^28.1.1: version "28.1.1" resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.1.tgz#533597fb3bfefd52b5cd115cd916cffd237fb60c" @@ -9521,6 +9629,20 @@ jest-watcher@^28.1.1: jest-util "^28.1.1" string-length "^4.0.1" +jest-watcher@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-watcher/-/jest-watcher-28.1.3.tgz#c6023a59ba2255e3b4c57179fc94164b3e73abd4" + integrity sha512-t4qcqj9hze+jviFPUN3YAtAEeFnr/azITXQEMARf5cMwKY2SMBRnCQTXLixTl20OR6mLh9KLMrgVJgJISym+1g== + dependencies: + "@jest/test-result" "^28.1.3" + "@jest/types" "^28.1.3" + "@types/node" "*" + ansi-escapes "^4.2.1" + chalk "^4.0.0" + emittery "^0.10.2" + jest-util "^28.1.3" + string-length "^4.0.1" + jest-worker@^26.2.1: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed" @@ -9548,6 +9670,15 @@ jest-worker@^28.1.1: merge-stream "^2.0.0" supports-color "^8.0.0" +jest-worker@^28.1.3: + version "28.1.3" + resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-28.1.3.tgz#7e3c4ce3fa23d1bb6accb169e7f396f98ed4bb98" + integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + jest@^28.1.0: version "28.1.1" resolved "https://registry.yarnpkg.com/jest/-/jest-28.1.1.tgz#3c39a3a09791e16e9ef283597d24ab19a0df701e" @@ -9579,6 +9710,13 @@ joi@^17.6.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== +js-yaml@4.1.0, js-yaml@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" + integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== + dependencies: + argparse "^2.0.1" + js-yaml@^3.13.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" @@ -9587,13 +9725,6 @@ js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" @@ -9702,10 +9833,10 @@ jsprim@^2.0.2: json-schema "0.4.0" verror "1.10.0" -"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.1: - version "3.3.1" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.1.tgz#a3e0f1cb7e230954eab4dcbce9f6288a78f8ba44" - integrity sha512-pxrjmNpeRw5wwVeWyEAk7QJu2GnBO3uzPFmHCKJJFPKK2Cy0cWL23krGtLdnMmbIi6/FjlrQpPyfQI19ByPOhQ== +"jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.3.2.tgz#afe5efe4332cd3515c065072bd4d6b0aa22152bd" + integrity sha512-4ZCADZHRkno244xlNnn4AOG6sRQ7iBZ5BbgZ4vW4y5IZw7cVUD1PPeblm1xx/nfmMxPdt/LHsXZW8z/j58+l9Q== dependencies: array-includes "^3.1.5" object.assign "^4.1.2" @@ -9779,29 +9910,30 @@ lazy-ass@^1.6.0: resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= -lerna@5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/lerna/-/lerna-5.1.6.tgz#07db65b5cc3683a237f655feb7671f2c2a27255b" - integrity sha512-eiLj3IurbEas1rGtntW4Cf2/6y90Ot2oQaU2wv4uo2rHf6GRXUBEZ0nrE4yseDlNtsS/H7bqfrvlAYb3PWUG1A== - dependencies: - "@lerna/add" "5.1.6" - "@lerna/bootstrap" "5.1.6" - "@lerna/changed" "5.1.6" - "@lerna/clean" "5.1.6" - "@lerna/cli" "5.1.6" - "@lerna/create" "5.1.6" - "@lerna/diff" "5.1.6" - "@lerna/exec" "5.1.6" - "@lerna/import" "5.1.6" - "@lerna/info" "5.1.6" - "@lerna/init" "5.1.6" - "@lerna/link" "5.1.6" - "@lerna/list" "5.1.6" - "@lerna/publish" "5.1.6" - "@lerna/run" "5.1.6" - "@lerna/version" "5.1.6" +lerna@5.4.2: + version "5.4.2" + resolved "https://registry.yarnpkg.com/lerna/-/lerna-5.4.2.tgz#f13dc9929fae84e03d16ed5412e7baa1ba3b366e" + integrity sha512-ELx2ho8C2Mb6kdDA9rcLyobSjzYEu4Hr2+g/fj5IbfSHe3s7rZOMiDM8QPxyslx49Ml4LdepZAJ6gwBYiJygWg== + dependencies: + "@lerna/add" "5.4.2" + "@lerna/bootstrap" "5.4.2" + "@lerna/changed" "5.4.2" + "@lerna/clean" "5.4.2" + "@lerna/cli" "5.4.2" + "@lerna/create" "5.4.2" + "@lerna/diff" "5.4.2" + "@lerna/exec" "5.4.2" + "@lerna/import" "5.4.2" + "@lerna/info" "5.4.2" + "@lerna/init" "5.4.2" + "@lerna/link" "5.4.2" + "@lerna/list" "5.4.2" + "@lerna/publish" "5.4.2" + "@lerna/run" "5.4.2" + "@lerna/version" "5.4.2" import-local "^3.0.2" npmlog "^6.0.2" + nx ">=14.5.4 < 16" leven@^3.1.0: version "3.1.0" @@ -9816,26 +9948,26 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -libnpmaccess@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-4.0.3.tgz#dfb0e5b0a53c315a2610d300e46b4ddeb66e7eec" - integrity sha512-sPeTSNImksm8O2b6/pf3ikv4N567ERYEpeKRPSmqlNt1dTZbvgpJIzg5vAhXHpw2ISBsELFRelk0jEahj1c6nQ== +libnpmaccess@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-6.0.3.tgz#473cc3e4aadb2bc713419d92e45d23b070d8cded" + integrity sha512-4tkfUZprwvih2VUZYMozL7EMKgQ5q9VW2NtRyxWtQWlkLTAWHRklcAvBN49CVqEkhUw7vTX2fNgB5LzgUucgYg== dependencies: aproba "^2.0.0" minipass "^3.1.1" - npm-package-arg "^8.1.2" - npm-registry-fetch "^11.0.0" + npm-package-arg "^9.0.1" + npm-registry-fetch "^13.0.0" -libnpmpublish@^4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-4.0.2.tgz#be77e8bf5956131bcb45e3caa6b96a842dec0794" - integrity sha512-+AD7A2zbVeGRCFI2aO//oUmapCwy7GHqPXFJh3qpToSRNU+tXKJ2YFUgjt04LPPAf2dlEH95s6EhIHM1J7bmOw== +libnpmpublish@^6.0.4: + version "6.0.4" + resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-6.0.4.tgz#adb41ec6b0c307d6f603746a4d929dcefb8f1a0b" + integrity sha512-lvAEYW8mB8QblL6Q/PI/wMzKNvIrF7Kpujf/4fGS/32a2i3jzUXi04TNyIBcK6dQJ34IgywfaKGh+Jq4HYPFmg== dependencies: - normalize-package-data "^3.0.2" - npm-package-arg "^8.1.2" - npm-registry-fetch "^11.0.0" - semver "^7.1.3" - ssri "^8.0.1" + normalize-package-data "^4.0.0" + npm-package-arg "^9.0.1" + npm-registry-fetch "^13.0.0" + semver "^7.3.7" + ssri "^9.0.0" lilconfig@2.0.5, lilconfig@^2.0.3: version "2.0.5" @@ -10080,7 +10212,7 @@ lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7. resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@^4.0.0: +log-symbols@^4.0.0, log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -10190,49 +10322,6 @@ make-fetch-happen@^10.0.3, make-fetch-happen@^10.0.6: socks-proxy-agent "^6.1.1" ssri "^9.0.0" -make-fetch-happen@^8.0.9: - version "8.0.14" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-8.0.14.tgz#aaba73ae0ab5586ad8eaa68bd83332669393e222" - integrity sha512-EsS89h6l4vbfJEtBZnENTOFk8mCRpY5ru36Xe5bcX1KYIli2mkSHqoFsp5O1wMDvTJJzxe/4THpCTtygjeeGWQ== - dependencies: - agentkeepalive "^4.1.3" - cacache "^15.0.5" - http-cache-semantics "^4.1.0" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^6.0.0" - minipass "^3.1.3" - minipass-collect "^1.0.2" - minipass-fetch "^1.3.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - promise-retry "^2.0.1" - socks-proxy-agent "^5.0.0" - ssri "^8.0.0" - -make-fetch-happen@^9.0.1: - version "9.1.0" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-9.1.0.tgz#53085a09e7971433e6765f7971bf63f4e05cb968" - integrity sha512-+zopwDy7DNknmwPQplem5lAZX/eCOzSvSNNcSKm5eVwTkOBzoktEfXsa9L23J/GIRhxRsaxzkPEhrJEpE2F4Gg== - dependencies: - agentkeepalive "^4.1.3" - cacache "^15.2.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^4.0.1" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^6.0.0" - minipass "^3.1.3" - minipass-collect "^1.0.2" - minipass-fetch "^1.3.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.2" - promise-retry "^2.0.1" - socks-proxy-agent "^6.0.0" - ssri "^8.0.0" - makeerror@1.0.12: version "1.0.12" resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.12.tgz#3e5dd2079a82e812e983cc6610c4a2cb0eaa801a" @@ -10480,6 +10569,13 @@ minimatch@3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@3.0.5: + version "3.0.5" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.5.tgz#4da8f1290ee0f0f8e83d60ca69f8f134068604a3" + integrity sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw== + dependencies: + brace-expansion "^1.1.7" + minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -10522,17 +10618,6 @@ minipass-collect@^1.0.2: dependencies: minipass "^3.0.0" -minipass-fetch@^1.3.0, minipass-fetch@^1.3.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-1.4.1.tgz#d75e0091daac1b0ffd7e9d41629faff7d0c1f1b6" - integrity sha512-CGH1eblLq26Y15+Azk7ey4xh0J/XfJfrCox5LDJiKqI2Q2iwOLOKrlmIaODiSQS8d18jalF6y2K2ePUm0CmShw== - dependencies: - minipass "^3.1.0" - minipass-sized "^1.0.3" - minizlib "^2.0.0" - optionalDependencies: - encoding "^0.1.12" - minipass-fetch@^2.0.3: version "2.1.0" resolved "https://registry.yarnpkg.com/minipass-fetch/-/minipass-fetch-2.1.0.tgz#ca1754a5f857a3be99a9271277246ac0b44c3ff8" @@ -10559,7 +10644,7 @@ minipass-json-stream@^1.0.1: jsonparse "^1.3.1" minipass "^3.0.0" -minipass-pipeline@^1.2.2, minipass-pipeline@^1.2.4: +minipass-pipeline@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz#68472f79711c084657c067c5c6ad93cddea8214c" integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== @@ -10573,14 +10658,14 @@ minipass-sized@^1.0.3: dependencies: minipass "^3.0.0" -minipass@^3.0.0, minipass@^3.1.0, minipass@^3.1.1, minipass@^3.1.3, minipass@^3.1.6: +minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.6: version "3.1.6" resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== dependencies: yallist "^4.0.0" -minizlib@^2.0.0, minizlib@^2.1.1, minizlib@^2.1.2: +minizlib@^2.1.1, minizlib@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== @@ -10673,7 +10758,7 @@ ncp@^2.0.0: resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= -negotiator@0.6.3, negotiator@^0.6.2, negotiator@^0.6.3: +negotiator@0.6.3, negotiator@^0.6.3: version "0.6.3" resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== @@ -10703,7 +10788,7 @@ node-emoji@^1.10.0: dependencies: lodash "^4.17.21" -node-fetch@2.6.7, node-fetch@^2.6.1: +node-fetch@2.6.7, node-fetch@^2.6.1, node-fetch@^2.6.7: version "2.6.7" resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== @@ -10768,7 +10853,7 @@ normalize-package-data@^2.3.2, normalize-package-data@^2.5.0: semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" -normalize-package-data@^3.0.0, normalize-package-data@^3.0.2: +normalize-package-data@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-3.0.3.tgz#dbcc3e2da59509a0983422884cd172eefdfa525e" integrity sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA== @@ -10827,13 +10912,13 @@ npm-normalize-package-bin@^1.0.0, npm-normalize-package-bin@^1.0.1: resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== -npm-package-arg@^8.0.0, npm-package-arg@^8.1.0, npm-package-arg@^8.1.2, npm-package-arg@^8.1.5: - version "8.1.5" - resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.5.tgz#3369b2d5fe8fdc674baa7f1786514ddc15466e44" - integrity sha512-LhgZrg0n0VgvzVdSm1oiZworPbTxYHUJCgtsJW8mGvlDpxTM1vSJc3m5QZeUkhAHIzbz3VCHd/R4osi1L1Tg/Q== +npm-package-arg@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-8.1.1.tgz#00ebf16ac395c63318e67ce66780a06db6df1b04" + integrity sha512-CsP95FhWQDwNqiYS+Q0mZ7FAEDytDZAkNxQqea6IaAFJTAY9Lhhqyl0irU/6PMc7BGfUmnsbHcqxJD7XuVM/rg== dependencies: - hosted-git-info "^4.0.1" - semver "^7.3.4" + hosted-git-info "^3.0.6" + semver "^7.0.0" validate-npm-package-name "^3.0.0" npm-package-arg@^9.0.0, npm-package-arg@^9.0.1: @@ -10845,16 +10930,6 @@ npm-package-arg@^9.0.0, npm-package-arg@^9.0.1: semver "^7.3.5" validate-npm-package-name "^4.0.0" -npm-packlist@^2.1.4: - version "2.2.2" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-2.2.2.tgz#076b97293fa620f632833186a7a8f65aaa6148c8" - integrity sha512-Jt01acDvJRhJGthnUJVF/w6gumWOZxO7IkpY/lsX9//zqQgnF7OJaxgQXcerd4uQOLu7W5bkb4mChL9mdfm+Zg== - dependencies: - glob "^7.1.6" - ignore-walk "^3.0.3" - npm-bundled "^1.1.1" - npm-normalize-package-bin "^1.0.1" - npm-packlist@^5.0.0: version "5.0.4" resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-5.0.4.tgz#b8a0635964dbf72baeeb7e69ec32e822f1c26159" @@ -10865,6 +10940,16 @@ npm-packlist@^5.0.0: npm-bundled "^1.1.2" npm-normalize-package-bin "^1.0.1" +npm-packlist@^5.1.0, npm-packlist@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-5.1.1.tgz#79bcaf22a26b6c30aa4dd66b976d69cc286800e0" + integrity sha512-UfpSvQ5YKwctmodvPPkK6Fwk603aoVsf8AEbmVKAEECrfvL8SSe1A2YIwrJ6xmTHAITKPwwZsWo7WwEbNk0kxw== + dependencies: + glob "^8.0.1" + ignore-walk "^5.0.1" + npm-bundled "^1.1.2" + npm-normalize-package-bin "^1.0.1" + npm-pick-manifest@^7.0.0: version "7.0.1" resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-7.0.1.tgz#76dda30a7cd6b99be822217a935c2f5eacdaca4c" @@ -10875,18 +10960,6 @@ npm-pick-manifest@^7.0.0: npm-package-arg "^9.0.0" semver "^7.3.5" -npm-registry-fetch@^11.0.0: - version "11.0.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-11.0.0.tgz#68c1bb810c46542760d62a6a965f85a702d43a76" - integrity sha512-jmlgSxoDNuhAtxUIG6pVwwtz840i994dL14FoNVZisrmZW5kWd63IUTNv1m/hyRSGSqWjCUp/YZlS1BJyNp9XA== - dependencies: - make-fetch-happen "^9.0.1" - minipass "^3.1.3" - minipass-fetch "^1.3.0" - minipass-json-stream "^1.0.1" - minizlib "^2.0.0" - npm-package-arg "^8.0.0" - npm-registry-fetch@^13.0.0, npm-registry-fetch@^13.0.1: version "13.1.1" resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-13.1.1.tgz#26dc4b26d0a545886e807748032ba2aefaaae96b" @@ -10900,19 +10973,18 @@ npm-registry-fetch@^13.0.0, npm-registry-fetch@^13.0.1: npm-package-arg "^9.0.1" proc-log "^2.0.0" -npm-registry-fetch@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-9.0.0.tgz#86f3feb4ce00313bc0b8f1f8f69daae6face1661" - integrity sha512-PuFYYtnQ8IyVl6ib9d3PepeehcUeHN9IO5N/iCRhyg9tStQcqGQBRVHmfmMWPDERU3KwZoHFvbJ4FPXPspvzbA== +npm-registry-fetch@^13.3.0: + version "13.3.0" + resolved "https://registry.yarnpkg.com/npm-registry-fetch/-/npm-registry-fetch-13.3.0.tgz#0ce10fa4a699a1e70685ecf41bbfb4150d74231b" + integrity sha512-10LJQ/1+VhKrZjIuY9I/+gQTvumqqlgnsCufoXETHAPFTS3+M+Z5CFhZRDHGavmJ6rOye3UvNga88vl8n1r6gg== dependencies: - "@npmcli/ci-detect" "^1.0.0" - lru-cache "^6.0.0" - make-fetch-happen "^8.0.9" - minipass "^3.1.3" - minipass-fetch "^1.3.0" + make-fetch-happen "^10.0.6" + minipass "^3.1.6" + minipass-fetch "^2.0.3" minipass-json-stream "^1.0.1" - minizlib "^2.0.0" - npm-package-arg "^8.0.0" + minizlib "^2.1.2" + npm-package-arg "^9.0.1" + proc-log "^2.0.0" npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" @@ -11001,6 +11073,42 @@ nx@14.1.4: yargs "^17.4.0" yargs-parser "21.0.1" +nx@14.5.4, "nx@>=14.5.4 < 16": + version "14.5.4" + resolved "https://registry.yarnpkg.com/nx/-/nx-14.5.4.tgz#58b6e8ee798733a6ab9aff2a19180c371482fa10" + integrity sha512-xv1nTaQP6kqVDE4PXcB1tLlgzNAPUHE/2vlqSLgxjNb6colKf0vrEZhVTjhnbqBeJiTb33gUx50bBXkurCkN5w== + dependencies: + "@nrwl/cli" "14.5.4" + "@nrwl/tao" "14.5.4" + "@parcel/watcher" "2.0.4" + chalk "4.1.0" + chokidar "^3.5.1" + cli-cursor "3.1.0" + cli-spinners "2.6.1" + cliui "^7.0.2" + dotenv "~10.0.0" + enquirer "~2.3.6" + fast-glob "3.2.7" + figures "3.2.0" + flat "^5.0.2" + fs-extra "^10.1.0" + glob "7.1.4" + ignore "^5.0.4" + js-yaml "4.1.0" + jsonc-parser "3.0.0" + minimatch "3.0.5" + npm-run-path "^4.0.1" + open "^8.4.0" + semver "7.3.4" + string-width "^4.2.3" + tar-stream "~2.2.0" + tmp "~0.2.1" + tsconfig-paths "^3.9.0" + tslib "^2.3.0" + v8-compile-cache "2.3.0" + yargs "^17.4.0" + yargs-parser "21.0.1" + object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -11125,6 +11233,21 @@ optionator@^0.9.1: type-check "^0.4.0" word-wrap "^1.2.3" +ora@^5.4.1: + version "5.4.1" + resolved "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18" + integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== + dependencies: + bl "^4.1.0" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-spinners "^2.5.0" + is-interactive "^1.0.0" + is-unicode-supported "^0.1.0" + log-symbols "^4.1.0" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -11159,7 +11282,7 @@ p-limit@^2.0.0, p-limit@^2.2.0: dependencies: p-try "^2.0.0" -p-limit@^3.0.2: +p-limit@^3.0.2, p-limit@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== @@ -11266,7 +11389,7 @@ package-json@^6.3.0: registry-url "^5.0.0" semver "^6.2.0" -pacote@^13.0.3, pacote@^13.0.5, pacote@^13.4.1: +pacote@^13.0.3: version "13.4.1" resolved "https://registry.yarnpkg.com/pacote/-/pacote-13.4.1.tgz#b6610bf8903abc075bfffa02a2cedafe81a97293" integrity sha512-FqlSWlD8n+ejCE17GF/lf0yasztMGFl4UFzYQk5njaK/qPPWfVDWnfQwqmqeXObWLSmIBew+O+CFD24vxkVDjg== @@ -11293,6 +11416,33 @@ pacote@^13.0.3, pacote@^13.0.5, pacote@^13.4.1: ssri "^9.0.0" tar "^6.1.11" +pacote@^13.6.1: + version "13.6.1" + resolved "https://registry.yarnpkg.com/pacote/-/pacote-13.6.1.tgz#ac6cbd9032b4c16e5c1e0c60138dfe44e4cc589d" + integrity sha512-L+2BI1ougAPsFjXRyBhcKmfT016NscRFLv6Pz5EiNf1CCFJFU0pSKKQwsZTyAQB+sTuUL4TyFyp6J1Ork3dOqw== + dependencies: + "@npmcli/git" "^3.0.0" + "@npmcli/installed-package-contents" "^1.0.7" + "@npmcli/promise-spawn" "^3.0.0" + "@npmcli/run-script" "^4.1.0" + cacache "^16.0.0" + chownr "^2.0.0" + fs-minipass "^2.1.0" + infer-owner "^1.0.4" + minipass "^3.1.6" + mkdirp "^1.0.4" + npm-package-arg "^9.0.0" + npm-packlist "^5.1.0" + npm-pick-manifest "^7.0.0" + npm-registry-fetch "^13.0.1" + proc-log "^2.0.0" + promise-retry "^2.0.1" + read-package-json "^5.0.0" + read-package-json-fast "^2.0.3" + rimraf "^3.0.2" + ssri "^9.0.0" + tar "^6.1.11" + param-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/param-case/-/param-case-3.0.4.tgz#7d17fe4aa12bde34d4a77d91acfb6219caad01c5" @@ -11359,25 +11509,22 @@ parse-numeric-range@^1.3.0: resolved "https://registry.yarnpkg.com/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz#7c63b61190d61e4d53a1197f0c83c47bb670ffa3" integrity sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ== -parse-path@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-4.0.4.tgz#4bf424e6b743fb080831f03b536af9fc43f0ffea" - integrity sha512-Z2lWUis7jlmXC1jeOG9giRO2+FsuyNipeQ43HAjqAZjwSe3SEf+q/84FGPHoso3kyntbxa4c4i77t3m6fGf8cw== +parse-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/parse-path/-/parse-path-5.0.0.tgz#f933152f3c6d34f4cf36cfc3d07b138ac113649d" + integrity sha512-qOpH55/+ZJ4jUu/oLO+ifUKjFPNZGfnPJtzvGzKN/4oLMil5m9OH4VpOj6++9/ytJcfks4kzH2hhi87GL/OU9A== dependencies: - is-ssh "^1.3.0" - protocols "^1.4.0" - qs "^6.9.4" - query-string "^6.13.8" + protocols "^2.0.0" -parse-url@^6.0.0: - version "6.0.2" - resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-6.0.2.tgz#4a30b057bfc452af64512dfb1a7755c103db3ea1" - integrity sha512-uCSjOvD3T+6B/sPWhR+QowAZcU/o4bjPrVBQBGFxcDF6J6FraCGIaDBsdoQawiaaAVdHvtqBe3w3vKlfBKySOQ== +parse-url@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/parse-url/-/parse-url-7.0.2.tgz#d21232417199b8d371c6aec0cedf1406fd6393f0" + integrity sha512-PqO4Z0eCiQ08Wj6QQmrmp5YTTxpYfONdOEamrtvK63AmzXpcavIVQubGHxOEwiIoDZFb8uDOoQFS0NCcjqIYQg== dependencies: - is-ssh "^1.3.0" + is-ssh "^1.4.0" normalize-url "^6.1.0" - parse-path "^4.0.4" - protocols "^1.4.0" + parse-path "^5.0.0" + protocols "^2.0.1" parse5-htmlparser2-tree-adapter@^7.0.0: version "7.0.0" @@ -11845,10 +11992,10 @@ prepend-http@^2.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= -prettier@*, prettier@2.5.1: - version "2.5.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" - integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== +prettier@*, prettier@2.7.1: + version "2.7.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.7.1.tgz#e235806850d057f97bb08368a4f7d899f7760c64" + integrity sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g== pretty-bytes@^5.6.0: version "5.6.0" @@ -11863,7 +12010,7 @@ pretty-error@^4.0.0: lodash "^4.17.20" renderkid "^3.0.0" -pretty-format@*, pretty-format@^28.0.0, pretty-format@^28.1.0, pretty-format@^28.1.1: +pretty-format@*, pretty-format@^28.0.0, pretty-format@^28.1.0, pretty-format@^28.1.1, pretty-format@^28.1.3: version "28.1.0" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.0.tgz#8f5836c6a0dfdb834730577ec18029052191af55" integrity sha512-79Z4wWOYCdvQkEoEuSlBhHJqWeZ8D8YRPiPctJFCtvuaClGpiwiQYSCUOE6IEKUbbFukKOTFIUAXE8N4EQTo1Q== @@ -11964,12 +12111,7 @@ proto-list@~1.2.1: resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849" integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk= -protocols@^1.4.0: - version "1.4.8" - resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.8.tgz#48eea2d8f58d9644a4a32caae5d5db290a075ce8" - integrity sha512-IgjKyaUSjsROSO8/D49Ab7hP8mJgTYcqApOqdPhLoPxAplXmkp+zRvsrSQjFn5by0rhm4VH0GAUELIPpx7B1yg== - -protocols@^2.0.1: +protocols@^2.0.0, protocols@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" integrity sha512-/XJ368cyBJ7fzLMwLKv1e4vLxOju2MNAIokcr7meSaNcVbWz/CPcW22cP04mwxOErdA5mwjA8Q6w/cdAQxVn7Q== @@ -12034,28 +12176,11 @@ qs@6.10.3: dependencies: side-channel "^1.0.4" -qs@^6.9.4: - version "6.11.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== -query-string@^6.13.8: - version "6.14.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.14.1.tgz#7ac2dca46da7f309449ba0f86b1fd28255b0c86a" - integrity sha512-XDxAeVmpfu1/6IjyT/gXHOl+S0vQ9owggJ30hhWKdHAsNPOcasn5o9BW0eejZqL2e4vMjhAxoW3jVHcD6mbcYw== - dependencies: - decode-uri-component "^0.2.0" - filter-obj "^1.1.0" - split-on-first "^1.0.0" - strict-uri-encode "^2.0.0" - querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" @@ -12273,11 +12398,6 @@ react@^18.1.0: dependencies: loose-envify "^1.1.0" -read-cmd-shim@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-2.0.0.tgz#4a50a71d6f0965364938e9038476f7eede3928d9" - integrity sha512-HJpV9bQpkl6KwjxlJcBoqu9Ba0PQg8TqSNIOrulGt54a0uup0HtevreFHzYzkm0lpnleRdNBzXznKrgxglEHQw== - read-cmd-shim@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-3.0.0.tgz#62b8c638225c61e6cc607f8f4b779f3b8238f155" @@ -12291,27 +12411,7 @@ read-package-json-fast@^2.0.2, read-package-json-fast@^2.0.3: json-parse-even-better-errors "^2.3.0" npm-normalize-package-bin "^1.0.1" -read-package-json@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-3.0.1.tgz#c7108f0b9390257b08c21e3004d2404c806744b9" - integrity sha512-aLcPqxovhJTVJcsnROuuzQvv6oziQx4zd3JvG0vGCL5MjTONUc4uJ90zCBC6R7W7oUKBNoR/F8pkyfVwlbxqng== - dependencies: - glob "^7.1.1" - json-parse-even-better-errors "^2.3.0" - normalize-package-data "^3.0.0" - npm-normalize-package-bin "^1.0.0" - -read-package-json@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-4.1.1.tgz#153be72fce801578c1c86b8ef2b21188df1b9eea" - integrity sha512-P82sbZJ3ldDrWCOSKxJT0r/CXMWR0OR3KRh55SgKo3p91GSIEEC32v3lSHAvO/UcH3/IoL7uqhOFBduAnwdldw== - dependencies: - glob "^7.1.1" - json-parse-even-better-errors "^2.3.0" - normalize-package-data "^3.0.0" - npm-normalize-package-bin "^1.0.0" - -read-package-json@^5.0.0: +read-package-json@^5.0.0, read-package-json@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-5.0.1.tgz#1ed685d95ce258954596b13e2e0e76c7d0ab4c26" integrity sha512-MALHuNgYWdGW3gKzuNMuYtcSSZbGQm94fAp16xt8VsYTLBjUSc55bLMKe6gzpWue0Tfi6CBgwCSdDAqutGDhMg== @@ -12357,7 +12457,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -read@1, read@~1.0.1: +read@1, read@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" integrity sha1-s9oZvQUkMal2cdRKQmNK33ELQMQ= @@ -12756,9 +12856,9 @@ rollup-plugin-terser@^7.0.2: terser "^5.0.0" rollup@^2.75.4: - version "2.75.7" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.75.7.tgz#221ff11887ae271e37dcc649ba32ce1590aaa0b9" - integrity sha512-VSE1iy0eaAYNCxEXaleThdFXqZJ42qDBatAwrfnPlENEZ8erQ+0LYX4JXOLPceWfZpV1VtZwZ3dFCuOZiSyFtQ== + version "2.78.0" + resolved "https://registry.yarnpkg.com/rollup/-/rollup-2.78.0.tgz#00995deae70c0f712ea79ad904d5f6b033209d9e" + integrity sha512-4+YfbQC9QEVvKTanHhIAFVUFSRsezvQF8vFOJwtGfb9Bb+r014S+qryr9PSmw8x6sMnPkmFBGAvIFVQxvJxjtg== optionalDependencies: fsevents "~2.3.2" @@ -12804,7 +12904,7 @@ rxjs-for-await@0.0.2: resolved "https://registry.yarnpkg.com/rxjs-for-await/-/rxjs-for-await-0.0.2.tgz#26598a1d6167147cc192172970e7eed4e620384b" integrity sha512-IJ8R/ZCFMHOcDIqoABs82jal00VrZx8Xkgfe7TOKoaRPAW5nH/VFlG23bXpeGdrmtqI9UobFPgUKgCuFc7Lncw== -rxjs@^6.5.4, rxjs@^6.6.0: +rxjs@^6.5.4: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== @@ -12931,7 +13031,7 @@ semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== -semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@~7.3.0: +semver@^7.0.0, semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@~7.3.0: version "7.3.7" resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== @@ -13154,16 +13254,7 @@ sockjs@^0.3.21: uuid "^3.4.0" websocket-driver "^0.7.4" -socks-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-5.0.1.tgz#032fb583048a29ebffec2e6a73fca0761f48177e" - integrity sha512-vZdmnjb9a2Tz6WEQVIurybSwElwPxMZaIc7PzqbJTrezcKNznv6giT7J7tZDZ1BojVaa1jvO/UiUdhDVB0ACoQ== - dependencies: - agent-base "^6.0.2" - debug "4" - socks "^2.3.3" - -socks-proxy-agent@^6.0.0, socks-proxy-agent@^6.1.1: +socks-proxy-agent@^6.1.1: version "6.2.0" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz#f6b5229cc0cbd6f2f202d9695f09d871e951c85e" integrity sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ== @@ -13172,7 +13263,7 @@ socks-proxy-agent@^6.0.0, socks-proxy-agent@^6.1.1: debug "^4.3.3" socks "^2.6.2" -socks@^2.3.3, socks@^2.6.2: +socks@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" integrity sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA== @@ -13294,11 +13385,6 @@ spdy@^4.0.2: select-hose "^2.0.0" spdy-transport "^3.0.0" -split-on-first@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" - integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== - split2@^3.0.0: version "3.2.2" resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" @@ -13333,14 +13419,7 @@ sshpk@^1.14.1: safer-buffer "^2.0.2" tweetnacl "~0.14.0" -ssri@^8.0.0, ssri@^8.0.1: - version "8.0.1" - resolved "https://registry.yarnpkg.com/ssri/-/ssri-8.0.1.tgz#638e4e439e2ffbd2cd289776d5ca457c4f51a2af" - integrity sha512-97qShzy1AiyxvPNIkLWoGua7xoQzzPjQ0HAH4B0rWKo7SZ6USuPcrUiAFrws0UH8RrbWmgq3LMTObhPIHbbBeQ== - dependencies: - minipass "^3.1.1" - -ssri@^9.0.0: +ssri@^9.0.0, ssri@^9.0.1: version "9.0.1" resolved "https://registry.yarnpkg.com/ssri/-/ssri-9.0.1.tgz#544d4c357a8d7b71a19700074b6883fcb4eae057" integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== @@ -13379,11 +13458,6 @@ std-env@^3.0.1: resolved "https://registry.yarnpkg.com/std-env/-/std-env-3.0.1.tgz#bc4cbc0e438610197e34c2d79c3df30b491f5182" integrity sha512-mC1Ps9l77/97qeOZc+HrOL7TIaOboHqMZ24dGVQrlxFcpPpfCHpH+qfUT7Dz+6mlG8+JPA1KfBQo19iC/+Ngcw== -strict-uri-encode@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" - integrity sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ== - string-argv@^0.3.1, string-argv@~0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/string-argv/-/string-argv-0.3.1.tgz#95e2fbec0427ae19184935f816d74aaa4c5c19da" @@ -13623,7 +13697,7 @@ tar-stream@~2.2.0: inherits "^2.0.3" readable-stream "^3.1.1" -tar@6.1.11, tar@^6.0.2, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2: +tar@6.1.11, tar@^6.1.0, tar@^6.1.11, tar@^6.1.2: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== @@ -13660,9 +13734,9 @@ terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.3.1: terser "^5.7.2" terser@^5.0.0, terser@^5.10.0, terser@^5.7.2: - version "5.14.0" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.0.tgz#eefeec9af5153f55798180ee2617f390bdd285e2" - integrity sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g== + version "5.14.2" + resolved "https://registry.yarnpkg.com/terser/-/terser-5.14.2.tgz#9ac9f22b06994d736174f4091aa368db896f1c10" + integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" @@ -13992,10 +14066,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@4.7.2, "typescript@>=3.3.1 <4.8.0", typescript@^4.5.3, typescript@^4.5.5, typescript@~4.6.3: - version "4.7.2" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.2.tgz#1f9aa2ceb9af87cca227813b4310fff0b51593c4" - integrity sha512-Mamb1iX2FDUpcTRzltPxgWMKy3fhg0TN378ylbktPGPK/99KbDtMQ4W1hwgsbPAsG3a0xKa1vmw4VKZQbkvz5A== +typescript@*, typescript@4.7.4, "typescript@>=3.3.1 <4.8.0", typescript@^4.5.3, typescript@^4.5.5, typescript@~4.7.4: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== ua-parser-js@^0.7.30: version "0.7.31" @@ -14406,10 +14480,10 @@ walker@^1.0.8: dependencies: makeerror "1.0.12" -watchpack@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25" - integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA== +watchpack@^2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.4.0.tgz#fa33032374962c78113f93c7f2fb4c54c9862a5d" + integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" @@ -14421,7 +14495,7 @@ wbuf@^1.1.0, wbuf@^1.7.3: dependencies: minimalistic-assert "^1.0.0" -wcwidth@^1.0.0: +wcwidth@^1.0.0, wcwidth@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g= @@ -14525,20 +14599,20 @@ webpack-sources@^3.2.3: integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.72.1: - version "5.73.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.73.0.tgz#bbd17738f8a53ee5760ea2f59dce7f3431d35d38" - integrity sha512-svjudQRPPa0YiOYa2lM/Gacw0r6PvxptHj4FuEKQ2kX05ZLkjbVc5MnPs6its5j7IZljnIqSVo/OsY2X0IpHGA== + version "5.74.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.74.0.tgz#02a5dac19a17e0bb47093f2be67c695102a55980" + integrity sha512-A2InDwnhhGN4LYctJj6M1JEaGL7Luj6LOmyBHjcI8529cm5p6VXiTIW2sn6ffvEAKmveLzvu4jrihwXtPojlAA== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/wasm-edit" "1.11.1" "@webassemblyjs/wasm-parser" "1.11.1" - acorn "^8.4.1" + acorn "^8.7.1" acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" - enhanced-resolve "^5.9.3" + enhanced-resolve "^5.10.0" es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" @@ -14551,7 +14625,7 @@ webpack@^5.72.1: schema-utils "^3.1.0" tapable "^2.1.1" terser-webpack-plugin "^5.1.3" - watchpack "^2.3.1" + watchpack "^2.4.0" webpack-sources "^3.2.3" webpackbar@^5.0.2: @@ -14697,7 +14771,7 @@ write-file-atomic@^2.4.2: imurmurhash "^0.1.4" signal-exit "^3.0.2" -write-file-atomic@^3.0.0, write-file-atomic@^3.0.3: +write-file-atomic@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==