diff --git a/.cspell.json b/.cspell.json index ec11ebf5018d..080101b25f08 100644 --- a/.cspell.json +++ b/.cspell.json @@ -119,6 +119,7 @@ "serializers", "Sourcegraph", "stringification", + "stringifying", "stringly", "superset", "thenables", diff --git a/.eslintrc.js b/.eslintrc.js index d852a75216f9..400ed10c4aaa 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -53,7 +53,6 @@ module.exports = { 'deprecation/deprecation': 'error', // TODO(#7338): Investigate enabling these soon ✨ - '@typescript-eslint/no-unnecessary-condition': 'off', '@typescript-eslint/no-dynamic-delete': 'off', '@typescript-eslint/prefer-nullish-coalescing': 'off', @@ -85,6 +84,11 @@ module.exports = { ], '@typescript-eslint/no-explicit-any': 'error', '@typescript-eslint/no-non-null-assertion': 'off', + 'no-constant-condition': 'off', + '@typescript-eslint/no-unnecessary-condition': [ + 'error', + { allowConstantLoopConditions: true }, + ], '@typescript-eslint/no-var-requires': 'off', '@typescript-eslint/prefer-literal-enum-member': [ 'error', diff --git a/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml b/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml index 89fe40a297f6..1822b857c44c 100644 --- a/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml +++ b/.github/ISSUE_TEMPLATE/01-bug-report-plugin.yaml @@ -1,5 +1,5 @@ name: 'πŸ› Rule Bug' -description: 'Report a bug you encountered with a lint rule' +description: 'An issue with a single lint rule' title: 'Bug: [rule name here] ' labels: - bug @@ -7,7 +7,7 @@ labels: - triage body: - type: checkboxes - id: sanity-checks + id: preliminary-checks attributes: label: Before You File a Bug Report Please Confirm You Have Done The Following... description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you! @@ -41,7 +41,7 @@ body: attributes: label: Repro Code description: A ***minimal*** code sample which reproduces the issue - render: typescript + render: TypeScript validations: required: true - type: textarea diff --git a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml index 683aa4aabb38..2ea82b2ad19e 100644 --- a/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml +++ b/.github/ISSUE_TEMPLATE/02-enhancement-rule-option.yaml @@ -1,5 +1,5 @@ name: '✨ New Rule Option or Additional Check' -description: 'Propose a new lint rule option or propose that a lint rule checks more cases' +description: 'Propose a new lint rule option or that a lint rule checks more cases' title: 'Enhancement: [rule-name] ' labels: - 'enhancement: plugin rule option' @@ -7,7 +7,7 @@ labels: - triage body: - type: checkboxes - id: sanity-checks + id: preliminary-checks attributes: label: Before You File a Proposal Please Confirm You Have Done The Following... description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you! @@ -46,7 +46,7 @@ body: attributes: label: Fail description: Specify an example of code that should be detected and errored on. - render: typescript + render: TypeScript value: | var replace = 'me'; validations: @@ -56,7 +56,7 @@ body: attributes: label: Pass description: Specify an example of code that would be accepted in its place - render: typescript + render: TypeScript value: | const replace = 'me'; validations: diff --git a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml index 0065b2f24617..dd9bf8b0f1a1 100644 --- a/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml +++ b/.github/ISSUE_TEMPLATE/03-enhancement-new-rule.yaml @@ -7,7 +7,7 @@ labels: - triage body: - type: checkboxes - id: sanity-checks + id: preliminary-checks attributes: label: Before You File a Proposal Please Confirm You Have Done The Following... description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you! @@ -48,7 +48,7 @@ body: attributes: label: Fail Cases description: Specify an example of code that should be detected and errored on. - render: typescript + render: TypeScript value: | var replace = 'me'; validations: @@ -58,7 +58,7 @@ body: attributes: label: Pass Cases description: Specify an example of code that would be accepted in its place - render: typescript + render: TypeScript value: | const replace = 'me'; validations: 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 49f03f9e6fb2..28f6699b3fb7 100644 --- a/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml +++ b/.github/ISSUE_TEMPLATE/04-enhancement-new-base-rule-extension.yaml @@ -14,7 +14,7 @@ body: In some cases, ESLint provides a rule itself, but it doesn't support TypeScript syntax; either it crashes, or it ignores the syntax, or it falsely reports against it. In these cases, we create what we call an extension rule; a rule within our plugin that has the same functionality, but also supports TypeScript. - type: checkboxes - id: sanity-checks + id: preliminary-checks attributes: label: Before You File a Proposal Please Confirm You Have Done The Following... description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you! @@ -55,7 +55,7 @@ body: attributes: label: Fail description: Specify an example of code that should be detected and errored on. - render: typescript + render: TypeScript value: | var replace = 'me'; validations: @@ -65,7 +65,7 @@ body: attributes: label: Pass description: Specify an example of code that would be accepted in its place - render: typescript + render: TypeScript value: | const replace = 'me'; validations: diff --git a/.github/ISSUE_TEMPLATE/05-documentation-request.yml b/.github/ISSUE_TEMPLATE/05-documentation-request.yml index be98ea3587f0..742a1a03d300 100644 --- a/.github/ISSUE_TEMPLATE/05-documentation-request.yml +++ b/.github/ISSUE_TEMPLATE/05-documentation-request.yml @@ -1,12 +1,12 @@ name: 'πŸ“ Documentation' -description: 'Request a change in documentation' +description: 'Adding or improving in docs' title: 'Docs: ' labels: - documentation - triage body: - type: checkboxes - id: sanity-checks + id: preliminary-checks attributes: label: Before You File a Documentation Request Please Confirm You Have Done The Following... options: diff --git a/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml b/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml index 8f4dc860625a..a7da8ab04c37 100644 --- a/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml +++ b/.github/ISSUE_TEMPLATE/06-bug-report-other.yaml @@ -1,12 +1,12 @@ name: 'πŸ› Bug With Another Package' -description: 'Report a bug you encountered with another one of our packages (parser, util, scope-manager, etc)' +description: 'An issue with another one of our packages (parser, utils, etc)' title: 'Bug: ' labels: - bug - triage body: - type: checkboxes - id: sanity-checks + id: preliminary-checks attributes: label: Before You File a Bug Report Please Confirm You Have Done The Following... description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you! @@ -54,7 +54,7 @@ body: attributes: label: Repro Code description: A ***minimal*** code sample which reproduces the issue - render: typescript + render: TypeScript validations: required: true - type: textarea diff --git a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml index bd15be8306f5..2d586fc7c8ba 100644 --- a/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml +++ b/.github/ISSUE_TEMPLATE/07-enhancement-other.yaml @@ -1,12 +1,12 @@ name: '✨ Enhance Another Package' -description: 'Report an enhancement to another one of our packages (parser, util, scope-manager, etc)' +description: 'Request a change to another one of our packages (parser, utils, etc)' title: 'Enhancement: ' labels: - enhancement - triage body: - type: checkboxes - id: sanity-checks + id: preliminary-checks attributes: label: Before You File a Proposal Please Confirm You Have Done The Following... description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you! @@ -48,26 +48,6 @@ body: placeholder: I propose that the foo rule should also check for when bars are force to be a baz. validations: required: true - - type: textarea - id: fail-cases - attributes: - label: Fail - description: Specify an example of code that should be detected and errored on. - render: typescript - value: | - var replace = 'me'; - validations: - required: true - - type: textarea - id: pass-cases - attributes: - label: Pass - description: Specify an example of code that would be accepted in its place - render: typescript - value: | - const replace = 'me'; - validations: - required: true - type: textarea id: additional attributes: diff --git a/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml b/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml index a4b1a883fa3d..70f584917464 100644 --- a/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml +++ b/.github/ISSUE_TEMPLATE/08-bug-report-complex.yaml @@ -1,17 +1,16 @@ -name: 'πŸ› Complex Bug With a Reproduction Repository' -description: Report a complex bug you encountered by providing an isolated reproduction repository +name: 'πŸ› Complex Bug With a Reproduction' +description: Report a complex bug with an isolated reproduction title: 'Bug: ' labels: - bug - triage body: - type: markdown - id: preamble attributes: value: | An isolated reproduction is one we can clone locally and get running without other projects or existing knowledge of your project. If we cannot reproduce your bug quickly with the provided steps, we may not be able to take action on this issue. Help us to help you! - type: checkboxes - id: sanity-checks + id: preliminary-checks attributes: label: Before You File a Bug Report Please Confirm You Have Done The Following... description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you! diff --git a/.github/ISSUE_TEMPLATE/09-config-change.yaml b/.github/ISSUE_TEMPLATE/09-config-change.yaml index b18ae438e6af..0e3e438f8a5b 100644 --- a/.github/ISSUE_TEMPLATE/09-config-change.yaml +++ b/.github/ISSUE_TEMPLATE/09-config-change.yaml @@ -7,7 +7,7 @@ labels: - triage body: - type: checkboxes - id: sanity-checks + id: preliminary-checks attributes: label: Before You File a Proposal Please Confirm You Have Done The Following... description: If any of these required steps are not taken, we may not be able to review your issue. Help us to help you! diff --git a/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml b/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml index 24a15e85d532..0a6dc3b024da 100644 --- a/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml +++ b/.github/ISSUE_TEMPLATE/10-repo-maintenance.yaml @@ -1,5 +1,5 @@ name: 'πŸ— Improve Repository Maintenance' -description: Report a bug or request a feature related to developing the typescript-eslint monorepo +description: Improve the development experience for the typescript-eslint monorepo title: 'Repo: ' labels: - 'repo maintenance' diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f8f0ec0f29d9..bc681b741523 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,10 +1,10 @@ blank_issues_enabled: false contact_links: - name: FAQ - about: Please check out our FAQ before filing new issues + about: Please read our FAQ before filing new issues url: https://typescript-eslint.io/linting/troubleshooting - name: Getting Started Guide - about: If you're looking for help setting up check out our getting started guide + about: If you're looking for help setting up, check out our getting started guide url: https://typescript-eslint.io - name: Ask a question on Discord about: If you just want to ask a question, consider asking it on Discord! diff --git a/CHANGELOG.md b/CHANGELOG.md index fe35764b6c57..04c36e31d22b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/typescript-eslint + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) diff --git a/docs/packages/Rule_Tester.mdx b/docs/packages/Rule_Tester.mdx index de9d2ce7a33b..51f53519e797 100644 --- a/docs/packages/Rule_Tester.mdx +++ b/docs/packages/Rule_Tester.mdx @@ -219,7 +219,7 @@ RuleTester.afterAll = mocha.after; #### Vitest -Consider setting up `RuleTester`'s static properties in a [`globalSetup` script](https://vitest.dev/config/#globalsetup): +Consider setting up `RuleTester`'s static properties in a [`setupFiles` script](https://vitest.dev/config/#setupfiles): ```ts import * as vitest from 'vitest'; diff --git a/lerna.json b/lerna.json index 79835e11b586..0ebaa81a80b8 100644 --- a/lerna.json +++ b/lerna.json @@ -1,6 +1,6 @@ { "$schema": "node_modules/lerna/schemas/lerna-schema.json", - "version": "6.13.1", + "version": "6.13.2", "npmClient": "yarn", "stream": true, "command": { diff --git a/package.json b/package.json index 8202bc8f9b4d..1e3f4731429e 100644 --- a/package.json +++ b/package.json @@ -23,30 +23,30 @@ "url": "https://github.com/typescript-eslint/typescript-eslint/issues" }, "scripts": { - "build": "nx run-many --target=build --parallel --exclude website --exclude website-eslint", + "build": "npx nx run-many --target=build --parallel --exclude website --exclude website-eslint", "check-clean-workspace-after-install": "git diff --quiet --exit-code", - "check-configs": "nx run-many --target=check-configs --parallel", - "check-docs": "nx run-many --target=check-docs --parallel", + "check-configs": "npx nx run-many --target=check-configs --parallel", + "check-docs": "npx nx run-many --target=check-docs --parallel", "check-format": "prettier --check .", "check-spelling": "cspell --config=.cspell.json \"**/*.{md,mdx,ts,mts,cts,js,cjs,mjs,tsx,jsx}\" --no-progress --show-context --show-suggestions", "clean": "lerna clean -y && nx run-many --target=clean", "format": "prettier --write .", - "generate-breaking-changes": "nx run eslint-plugin:generate-breaking-changes", - "generate-configs": "nx run eslint-plugin:generate:configs", - "generate-contributors": "nx run repo-tools:generate-contributors", - "generate-sponsors": "nx run repo-tools:generate-sponsors", - "generate-website-dts": "nx run website:generate-website-dts", - "generate-lib": "nx run repo-tools:generate-lib", + "generate-breaking-changes": "npx nx run eslint-plugin:generate-breaking-changes", + "generate-configs": "npx nx run eslint-plugin:generate:configs", + "generate-contributors": "npx nx run repo-tools:generate-contributors", + "generate-sponsors": "npx nx run repo-tools:generate-sponsors", + "generate-website-dts": "npx nx run website:generate-website-dts", + "generate-lib": "npx nx run repo-tools:generate-lib", "lint-fix": "yarn lint --fix", "lint-markdown-fix": "yarn lint-markdown --fix", "lint-markdown": "markdownlint \"**/*.md\" --config=.markdownlint.json --ignore-path=.markdownlintignore", - "lint": "nx run-many --target=lint --parallel", - "postinstall": "nx run repo-tools:postinstall-script", + "lint": "npx nx run-many --target=lint --parallel", + "postinstall": "npx nx run repo-tools:postinstall-script", "pre-commit": "yarn lint-staged", - "start": "nx run website:start", - "test": "nx run-many --target=test --parallel --exclude integration-tests --exclude website --exclude website-eslint", - "test-integration": "nx run integration-tests:test", - "typecheck": "nx run-many --target=typecheck --parallel" + "start": "npx nx run website:start", + "test": "npx nx run-many --target=test --parallel --exclude integration-tests --exclude website --exclude website-eslint", + "test-integration": "npx nx run integration-tests:test", + "typecheck": "npx nx run-many --target=typecheck --parallel" }, "engines": { "node": "^16.0.0 || >=18.0.0" @@ -54,11 +54,11 @@ "devDependencies": { "@actions/core": "^1.10.0", "@actions/github": "^6.0.0", - "@babel/code-frame": "^7.22.5", - "@babel/core": "^7.22.8", - "@babel/eslint-parser": "^7.22.7", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", + "@babel/code-frame": "^7.22.13", + "@babel/core": "^7.23.3", + "@babel/eslint-parser": "^7.23.3", + "@babel/parser": "^7.23.3", + "@babel/types": "^7.23.3", "@nx/eslint": "17.1.2", "@nx/jest": "17.1.2", "@nx/workspace": "17.1.2", diff --git a/packages/ast-spec/CHANGELOG.md b/packages/ast-spec/CHANGELOG.md index 56f409bc51b9..9e3513c8d30b 100644 --- a/packages/ast-spec/CHANGELOG.md +++ b/packages/ast-spec/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/ast-spec + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **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 ee7b0e755100..8dbf11956518 100644 --- a/packages/ast-spec/package.json +++ b/packages/ast-spec/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/ast-spec", - "version": "6.13.1", + "version": "6.13.2", "description": "Complete specification for the TypeScript-ESTree AST", "private": true, "keywords": [ @@ -34,7 +34,7 @@ "postclean": "rimraf dist && rimraf coverage", "clean-fixtures": "rimraf -g \"./src/**/fixtures/**/snapshots\"", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/dynamic-import-with-import-assertions/snapshots/3-Babel-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/dynamic-import-with-import-assertions/snapshots/3-Babel-AST.shot index fec2f6e4759d..422530628713 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/dynamic-import-with-import-assertions/snapshots/3-Babel-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/dynamic-import-with-import-assertions/snapshots/3-Babel-AST.shot @@ -87,6 +87,85 @@ Program { end: { column: 42, line: 3 }, }, }, + options: ObjectExpression { + type: "ObjectExpression", + properties: [ + Property { + type: "Property", + computed: false, + key: Identifier { + type: "Identifier", + name: "assert", + + range: [89, 95], + loc: { + start: { column: 16, line: 3 }, + end: { column: 22, line: 3 }, + }, + }, + kind: "init", + method: false, + shorthand: false, + value: ObjectExpression { + type: "ObjectExpression", + properties: [ + Property { + type: "Property", + computed: false, + key: Identifier { + type: "Identifier", + name: "type", + + range: [99, 103], + loc: { + start: { column: 26, line: 3 }, + end: { column: 30, line: 3 }, + }, + }, + kind: "init", + method: false, + shorthand: false, + value: Literal { + type: "Literal", + raw: "'json'", + value: "json", + + range: [105, 111], + loc: { + start: { column: 32, line: 3 }, + end: { column: 38, line: 3 }, + }, + }, + + range: [99, 111], + loc: { + start: { column: 26, line: 3 }, + end: { column: 38, line: 3 }, + }, + }, + ], + + range: [97, 113], + loc: { + start: { column: 24, line: 3 }, + end: { column: 40, line: 3 }, + }, + }, + + range: [89, 113], + loc: { + start: { column: 16, line: 3 }, + end: { column: 40, line: 3 }, + }, + }, + ], + + range: [87, 115], + loc: { + start: { column: 14, line: 3 }, + end: { column: 42, line: 3 }, + }, + }, source: Literal { type: "Literal", raw: "'foo'", diff --git a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/dynamic-import-with-import-assertions/snapshots/5-AST-Alignment-AST.shot b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/dynamic-import-with-import-assertions/snapshots/5-AST-Alignment-AST.shot index e2f15f25d11e..716706840f94 100644 --- a/packages/ast-spec/src/legacy-fixtures/basics/fixtures/dynamic-import-with-import-assertions/snapshots/5-AST-Alignment-AST.shot +++ b/packages/ast-spec/src/legacy-fixtures/basics/fixtures/dynamic-import-with-import-assertions/snapshots/5-AST-Alignment-AST.shot @@ -21,6 +21,85 @@ exports[`AST Fixtures legacy-fixtures basics dynamic-import-with-import-assertio key: Identifier { type: 'Identifier', - decorators: Array [], ++ name: 'assert', ++ ++ range: [89, 95], ++ loc: { ++ start: { column: 16, line: 3 }, ++ end: { column: 22, line: 3 }, ++ }, ++ }, ++ kind: 'init', ++ method: false, ++ shorthand: false, ++ value: ObjectExpression { ++ type: 'ObjectExpression', ++ properties: Array [ ++ Property { ++ type: 'Property', ++ computed: false, ++ key: Identifier { ++ type: 'Identifier', ++ name: 'type', ++ ++ range: [99, 103], ++ loc: { ++ start: { column: 26, line: 3 }, ++ end: { column: 30, line: 3 }, ++ }, ++ }, ++ kind: 'init', ++ method: false, ++ shorthand: false, ++ value: Literal { ++ type: 'Literal', ++ raw: '\\'json\\'', ++ value: 'json', ++ ++ range: [105, 111], ++ loc: { ++ start: { column: 32, line: 3 }, ++ end: { column: 38, line: 3 }, ++ }, ++ }, ++ ++ range: [99, 111], ++ loc: { ++ start: { column: 26, line: 3 }, ++ end: { column: 38, line: 3 }, ++ }, ++ }, ++ ], ++ ++ range: [97, 113], ++ loc: { ++ start: { column: 24, line: 3 }, ++ end: { column: 40, line: 3 }, ++ }, ++ }, ++ ++ range: [89, 113], ++ loc: { ++ start: { column: 16, line: 3 }, ++ end: { column: 40, line: 3 }, ++ }, ++ }, ++ ], ++ ++ range: [87, 115], ++ loc: { ++ start: { column: 14, line: 3 }, ++ end: { column: 42, line: 3 }, ++ }, ++ }, ++ options: ObjectExpression { ++ type: 'ObjectExpression', ++ properties: Array [ ++ Property { ++ type: 'Property', ++ computed: false, ++ key: Identifier { ++ type: 'Identifier', name: 'assert', - optional: false, diff --git a/packages/ast-spec/tests/util/serializers/Node.ts b/packages/ast-spec/tests/util/serializers/Node.ts index bd6a9536ba76..a0fe170f4501 100644 --- a/packages/ast-spec/tests/util/serializers/Node.ts +++ b/packages/ast-spec/tests/util/serializers/Node.ts @@ -3,7 +3,9 @@ import type { NewPlugin } from 'pretty-format'; import type * as TSESTree from '../../../src'; import { AST_NODE_TYPES } from '../../../src'; -function sortKeys(node: TSESTree.Node): (keyof typeof node)[] { +function sortKeys( + node: Node, +): (keyof typeof node)[] { const keySet = new Set(Object.keys(node)); // type place as first key @@ -39,7 +41,14 @@ const serializer: NewPlugin = { test(val: unknown) { return isObject(val) && hasValidType(val.type); }, - serialize(node: TSESTree.Node, config, indentation, depth, refs, printer) { + serialize( + node: TSESTree.Node & Record, + config, + indentation, + depth, + refs, + printer, + ) { const keys = sortKeys(node); const type = node.type; const loc = node.loc; diff --git a/packages/eslint-plugin-internal/CHANGELOG.md b/packages/eslint-plugin-internal/CHANGELOG.md index 5aa29daa8560..c1012ffe5188 100644 --- a/packages/eslint-plugin-internal/CHANGELOG.md +++ b/packages/eslint-plugin-internal/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-internal + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **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 58ab53ff7bc0..686955db3d65 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": "6.13.1", + "version": "6.13.2", "private": true, "main": "dist/index.js", "scripts": { @@ -8,16 +8,16 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/rule-tester": "6.13.1", - "@typescript-eslint/scope-manager": "6.13.1", - "@typescript-eslint/type-utils": "6.13.1", - "@typescript-eslint/utils": "6.13.1", + "@typescript-eslint/rule-tester": "6.13.2", + "@typescript-eslint/scope-manager": "6.13.2", + "@typescript-eslint/type-utils": "6.13.2", + "@typescript-eslint/utils": "6.13.2", "prettier": "^3.0.3" }, "devDependencies": { 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 7656fa4ccf5c..4c13b42b9cc5 100644 --- a/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts +++ b/packages/eslint-plugin-internal/src/rules/plugin-test-formatting.ts @@ -172,6 +172,7 @@ export default createRule({ } catch (ex) { // ex instanceof Error is false as of @prettier/sync@0.3.0, as is ex instanceof SyntaxError if ( + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition (ex as Partial | undefined)?.constructor?.name !== 'SyntaxError' ) { diff --git a/packages/eslint-plugin-tslint/CHANGELOG.md b/packages/eslint-plugin-tslint/CHANGELOG.md index 03accc8c1623..bc518d908c51 100644 --- a/packages/eslint-plugin-tslint/CHANGELOG.md +++ b/packages/eslint-plugin-tslint/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin-tslint + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **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 bc72e31d9701..e9ecac4613a5 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": "6.13.1", + "version": "6.13.2", "main": "dist/index.js", "typings": "src/index.ts", "description": "ESLint plugin that wraps a TSLint configuration and lints the whole source using TSLint", @@ -41,12 +41,12 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/utils": "6.13.1" + "@typescript-eslint/utils": "6.13.2" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0", @@ -55,7 +55,7 @@ }, "devDependencies": { "@types/lodash": "*", - "@typescript-eslint/parser": "6.13.1", + "@typescript-eslint/parser": "6.13.2", "jest": "29.7.0", "prettier": "^3.0.3", "rimraf": "*" diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 68f15e01b189..bd7760d35c73 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/eslint-plugin + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **Note:** Version bump only for package @typescript-eslint/eslint-plugin diff --git a/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md b/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md index b221b4497240..50b96b83639c 100644 --- a/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md +++ b/packages/eslint-plugin/docs/rules/adjacent-overload-signatures.md @@ -90,4 +90,10 @@ export function foo(sn: string | number): void; ## When Not To Use It -If you don't care about the general structure of the code, then you will not need this rule. +It can sometimes be useful to place overload signatures alongside other meaningful parts of a type. +For example, if each of a function's overloads corresponds to a different property, you might wish to put each overloads next to its corresponding property. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +## Related To + +- [`unified-signatures`](./unified-signatures.md) diff --git a/packages/eslint-plugin/docs/rules/array-type.md b/packages/eslint-plugin/docs/rules/array-type.md index 19b0c319d51f..e04635d607e8 100644 --- a/packages/eslint-plugin/docs/rules/array-type.md +++ b/packages/eslint-plugin/docs/rules/array-type.md @@ -101,3 +101,11 @@ This matrix lists all possible option combinations and their expected results fo | `generic` | `array` | `Array` | `Array` | `readonly number[]` | `readonly (Foo & Bar)[]` | | `generic` | `array-simple` | `Array` | `Array` | `readonly number[]` | `ReadonlyArray` | | `generic` | `generic` | `Array` | `Array` | `ReadonlyArray` | `ReadonlyArray` | + +## When Not To Use It + +This rule is purely a stylistic rule for maintaining consistency in your project. +You can turn it off if you don't want to keep a consistent style for array types. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/packages/eslint-plugin/docs/rules/await-thenable.md b/packages/eslint-plugin/docs/rules/await-thenable.md index 49238bbfcf12..fa02a9f286d5 100644 --- a/packages/eslint-plugin/docs/rules/await-thenable.md +++ b/packages/eslint-plugin/docs/rules/await-thenable.md @@ -37,4 +37,6 @@ await createValue(); ## When Not To Use It If you want to allow code to `await` non-Promise values. -This is generally not preferred, but can sometimes be useful for visual consistency. +For example, if your framework is in transition from one style of asynchronous code to another, it may be useful to include `await`s unnecessarily. +This is generally not preferred but can sometimes be useful for visual consistency. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/packages/eslint-plugin/docs/rules/ban-ts-comment.md b/packages/eslint-plugin/docs/rules/ban-ts-comment.md index 742b29e2e928..cd62195fd47f 100644 --- a/packages/eslint-plugin/docs/rules/ban-ts-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-ts-comment.md @@ -143,7 +143,8 @@ if (false) { ## When Not To Use It -If you want to use all of the TypeScript directives. +If your projectΒ or its dependencies were not architected with strong type safety in mind, it can be difficult to always adhere to proper TypeScript semantics. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. ## Further Reading diff --git a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md index 96a5e9b91dbc..eac42f6cdabf 100644 --- a/packages/eslint-plugin/docs/rules/ban-tslint-comment.md +++ b/packages/eslint-plugin/docs/rules/ban-tslint-comment.md @@ -36,4 +36,4 @@ someCode(); // This is a comment that just happens to mention tslint ## When Not To Use It -If you are still using TSLint. +If you are still using TSLint alongside ESLint. diff --git a/packages/eslint-plugin/docs/rules/ban-types.md b/packages/eslint-plugin/docs/rules/ban-types.md index f52b24cf7e9f..818528451e09 100644 --- a/packages/eslint-plugin/docs/rules/ban-types.md +++ b/packages/eslint-plugin/docs/rules/ban-types.md @@ -125,3 +125,8 @@ Example configuration: ] } ``` + +## When Not To Use It + +If your project is a rare one that intentionally deals with the class equivalents of primitives, it might not be worthwhile to enable the default `ban-types` options. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. 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 6d882f92caa9..8567bc3ca83b 100644 --- a/packages/eslint-plugin/docs/rules/class-literal-property-style.md +++ b/packages/eslint-plugin/docs/rules/class-literal-property-style.md @@ -102,5 +102,4 @@ class Mx { ## When Not To Use It -When you have no strong preference, or do not wish to enforce a particular style -for how literal values are exposed by your classes. +When you have no strong preference, or do not wish to enforce a particular style for how literal values are exposed by your classes. diff --git a/packages/eslint-plugin/docs/rules/class-methods-use-this.md b/packages/eslint-plugin/docs/rules/class-methods-use-this.md index 098d4c692b14..8864b44cf3aa 100644 --- a/packages/eslint-plugin/docs/rules/class-methods-use-this.md +++ b/packages/eslint-plugin/docs/rules/class-methods-use-this.md @@ -89,3 +89,8 @@ class X implements Y { property = () => {}; } ``` + +## When Not To Use It + +If your project dynamically changes `this` scopes around in a way TypeScript has difficulties modeling, this rule may not be viable to use. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md b/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md index 4f347ef069c9..6056a58dfec4 100644 --- a/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md +++ b/packages/eslint-plugin/docs/rules/consistent-generic-constructors.md @@ -71,3 +71,6 @@ const set: Set = new Set(); ## When Not To Use It You can turn this rule off if you don't want to enforce one kind of generic constructor style over the other. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. 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 3da4679e28b6..82321b4fe61e 100644 --- a/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md +++ b/packages/eslint-plugin/docs/rules/consistent-indexed-object-style.md @@ -70,3 +70,11 @@ type Foo = { [key: string]: unknown; }; ``` + +## When Not To Use It + +This rule is purely a stylistic rule for maintaining consistency in your project. +You can turn it off if you don't want to keep a consistent style for indexed object types. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md index 3e6f3fce6061..b453e7201aa6 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-assertions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-assertions.md @@ -106,3 +106,6 @@ const foo = ; ## When Not To Use It If you do not want to enforce consistent type assertions. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md index dd06eabe686a..4394e82f39ce 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-definitions.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-definitions.md @@ -71,4 +71,11 @@ type T = { x: number }; ## When Not To Use It -If you specifically want to use an interface or type literal for stylistic reasons, you can disable this rule. +If you specifically want to use an interface or type literal for stylistic reasons, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. + +There are also subtle differences between `Record` and `interface` that can be difficult to catch statically. +For example, if your project is a dependency of another project that relies on a specific type definition style, this rule may be counterproductive. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-exports.md b/packages/eslint-plugin/docs/rules/consistent-type-exports.md index 0088d3fa5ba5..61f520845c5f 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-exports.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-exports.md @@ -96,5 +96,10 @@ export { Button, type ButtonProps } from 'some-library'; ## When Not To Use It -- If you specifically want to use both export kinds for stylistic reasons, you can disable this rule. -- If you use `--isolatedModules` the compiler would error if a type is not re-exported using `export type`. If you also don't wish to enforce one style over the other, you can disable this rule. +If you use `--isolatedModules` the compiler would error if a type is not re-exported using `export type`. +This rule may be less useful in those cases. + +If you specifically want to use both export kinds for stylistic reasons, or don't wish to enforce one style over the other, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/packages/eslint-plugin/docs/rules/consistent-type-imports.md b/packages/eslint-plugin/docs/rules/consistent-type-imports.md index 96e50791f3d3..496172f342e3 100644 --- a/packages/eslint-plugin/docs/rules/consistent-type-imports.md +++ b/packages/eslint-plugin/docs/rules/consistent-type-imports.md @@ -96,7 +96,10 @@ If you are using [type-aware linting](https://typescript-eslint.io/linting/typed ## When Not To Use It -- If you specifically want to use both import kinds for stylistic reasons, you can disable this rule. +If you specifically want to use both import kinds for stylistic reasons, or don't wish to enforce one style over the other, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. ## Related To diff --git a/packages/eslint-plugin/docs/rules/dot-notation.md b/packages/eslint-plugin/docs/rules/dot-notation.md index afb2c352844a..8d939219bb2d 100644 --- a/packages/eslint-plugin/docs/rules/dot-notation.md +++ b/packages/eslint-plugin/docs/rules/dot-notation.md @@ -73,3 +73,10 @@ x['hello'] = 123; ``` If the TypeScript compiler option `noPropertyAccessFromIndexSignature` is set to `true`, then the above code is always allowed, even if `allowIndexSignaturePropertyAccess` is `false`. + +## When Not To Use It + +If you specifically want to use both member access kinds for stylistic reasons, or don't wish to enforce one style over the other, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. 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 6aa1e6213145..ad6b5598e557 100644 --- a/packages/eslint-plugin/docs/rules/explicit-function-return-type.md +++ b/packages/eslint-plugin/docs/rules/explicit-function-return-type.md @@ -317,8 +317,7 @@ var bar = (function () { ## When Not To Use It -If you don't wish to prevent calling code from using function return values in unexpected ways, then -you will not need this rule. +If you don't find the added cost of explicitly writing function return types to be worth the visual clarity, or your project is not large enough for it to be a factor in type checking performance, then you will not need this rule. ## Further Reading diff --git a/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md b/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md index d41f85c09c40..83b183800d86 100644 --- a/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md +++ b/packages/eslint-plugin/docs/rules/explicit-member-accessibility.md @@ -333,7 +333,11 @@ class Animal { ## When Not To Use It -If you think defaulting to public is a good default, then you should consider using the `no-public` setting. If you want to mix implicit and explicit public members then disable this rule. +If you think defaulting to public is a good default, then you should consider using the `no-public` setting. +If you want to mix implicit and explicit public members then you can disable this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. ## Further Reading 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 306c455c0041..d70bc3b17d81 100644 --- a/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md +++ b/packages/eslint-plugin/docs/rules/explicit-module-boundary-types.md @@ -243,8 +243,12 @@ export const foo: FooType = bar => {}; ## When Not To Use It -If you wish to make sure all functions have explicit return types, as opposed to only the module boundaries, you can use [explicit-function-return-type](./explicit-function-return-type.md) +If your project is not used by downstream consumers that are sensitive to API types, you can disable this rule. ## Further Reading - TypeScript [Functions](https://www.typescriptlang.org/docs/handbook/functions.html#function-types) + +## Related To + +- [explicit-function-return-type](./explicit-function-return-type.md) diff --git a/packages/eslint-plugin/docs/rules/member-delimiter-style.md b/packages/eslint-plugin/docs/rules/member-delimiter-style.md index d2e1f59ec4fc..6ac58c573cee 100644 --- a/packages/eslint-plugin/docs/rules/member-delimiter-style.md +++ b/packages/eslint-plugin/docs/rules/member-delimiter-style.md @@ -158,4 +158,7 @@ type FooBar = { name: string; greet(): string } ## When Not To Use It -If you don't care about enforcing a consistent member delimiter in interfaces and type literals, then you will not need this rule. +If you specifically want to use both member delimiter kinds for stylistic reasons, or don't wish to enforce one style over the other, you can avoid this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/packages/eslint-plugin/docs/rules/method-signature-style.md b/packages/eslint-plugin/docs/rules/method-signature-style.md index a731e85bfacb..b834d383d649 100644 --- a/packages/eslint-plugin/docs/rules/method-signature-style.md +++ b/packages/eslint-plugin/docs/rules/method-signature-style.md @@ -108,3 +108,6 @@ type T2 = { ## When Not To Use It If you don't want to enforce a particular style for object/interface function types, and/or if you don't use `strictFunctionTypes`, then you don't need this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/packages/eslint-plugin/docs/rules/naming-convention.md b/packages/eslint-plugin/docs/rules/naming-convention.md index ac8cf6d0bcbe..ba5a59adda96 100644 --- a/packages/eslint-plugin/docs/rules/naming-convention.md +++ b/packages/eslint-plugin/docs/rules/naming-convention.md @@ -711,4 +711,11 @@ You can use the `destructured` modifier to match these names, and explicitly set ## When Not To Use It -If you do not want to enforce naming conventions for anything. +This rule can be very strict. +If you don't have strong needs for enforcing naming conventions, we recommend using it only to flag very egregious violations of your naming standards. +Consider documenting your naming conventions and enforcing them in code review if you have processes like that. + +If you do not want to enforce naming conventions for anything, you can disable this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend that if you care about naming conventions, pick a single option for this rule that works best for your project. 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 4f7b230fe41f..470e49121c3a 100644 --- a/packages/eslint-plugin/docs/rules/no-base-to-string.md +++ b/packages/eslint-plugin/docs/rules/no-base-to-string.md @@ -76,7 +76,7 @@ let text = `${value}`; ## When Not To Use It -If you don't mind `"[object Object]"` in your strings, then you will not need this rule. +If you don't mind a risk of `"[object Object]"` or incorrect type coercions in your values, then you will not need this rule. ## Related To 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 9e8acf5fb171..ef2b51b64724 100644 --- a/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md +++ b/packages/eslint-plugin/docs/rules/no-confusing-void-expression.md @@ -113,4 +113,4 @@ console.log(void alert('Hello, world!')); The return type of a function can be inspected by going to its definition or hovering over it in an IDE. If you don't care about being explicit about the void type in actual code then don't use this rule. -Also, if you prefer concise coding style then also don't use it. +Also, if you strongly prefer a concise coding style more strongly than any fear of `void`-related bugs then you can avoid this rule. 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 22b951a4a160..4e5488cdcba9 100644 --- a/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md +++ b/packages/eslint-plugin/docs/rules/no-duplicate-enum-values.md @@ -48,3 +48,11 @@ enum E { B = 'B', } ``` + +## When Not To Use It + +It can sometimes be useful to include duplicate enum members for very specific use cases. +For example, when renaming an enum member, it can sometimes be useful to keep the old name until a scheduled major breaking change. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +In general, if your project intentionally duplicates enum member values, you can avoid this rule. diff --git a/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.md b/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.md index c240bd4582eb..744537d0900e 100644 --- a/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.md +++ b/packages/eslint-plugin/docs/rules/no-duplicate-type-constituents.md @@ -57,3 +57,10 @@ When set to true, duplicate checks on intersection type constituents are ignored ### `ignoreUnions` When set to true, duplicate checks on union type constituents are ignored. + +## When Not To Use It + +It can sometimes be useful for the sake of documentation to include aliases for the same type. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +> In some of those cases, [branded types](https://basarat.gitbook.io/typescript/main-1/nominaltyping#using-interfaces) might be a type-safe way to represent the underlying data types. diff --git a/packages/eslint-plugin/docs/rules/no-dynamic-delete.md b/packages/eslint-plugin/docs/rules/no-dynamic-delete.md index e6afb335bc84..1fd8f9123455 100644 --- a/packages/eslint-plugin/docs/rules/no-dynamic-delete.md +++ b/packages/eslint-plugin/docs/rules/no-dynamic-delete.md @@ -47,7 +47,7 @@ delete container['-Infinity']; ## When Not To Use It When you know your keys are safe to delete, this rule can be unnecessary. -Some environments such as older browsers might not support `Map` and `Set`. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. Do not consider this rule as performance advice before profiling your code's bottlenecks. Even repeated minor performance slowdowns likely do not significantly affect your application's general perceived speed. diff --git a/packages/eslint-plugin/docs/rules/no-empty-function.md b/packages/eslint-plugin/docs/rules/no-empty-function.md index f650aa997eee..6275a1de7f77 100644 --- a/packages/eslint-plugin/docs/rules/no-empty-function.md +++ b/packages/eslint-plugin/docs/rules/no-empty-function.md @@ -84,3 +84,12 @@ class Foo extends Base { protected override greet(): void {} } ``` + +## When Not To Use It + +If you are working with external APIs that require functions even if they do nothing, then you may want to avoid this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + +Test code often violates this rule as well. +If your testing setup doesn't support "mock" or "spy" functions such as [`jest.fn()`](https://jestjs.io/docs/mock-functions), [`sinon.spy()`](https://sinonjs.org/releases/latest/spies), or [`vi.fn()`](https://vitest.dev/guide/mocking.html), you may wish to disable this rule in test files. +Again, if those cases aren't extremely common, you might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule in test files. diff --git a/packages/eslint-plugin/docs/rules/no-explicit-any.md b/packages/eslint-plugin/docs/rules/no-explicit-any.md index 5694ebf709a1..5e251fb7a03b 100644 --- a/packages/eslint-plugin/docs/rules/no-explicit-any.md +++ b/packages/eslint-plugin/docs/rules/no-explicit-any.md @@ -138,6 +138,8 @@ Most commonly: - If an external package doesn't yet have typings and you want to use `any` pending adding a `.d.ts` for it - You're working with particularly complex or nuanced code that can't yet be represented in the TypeScript type system +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + ## Related To - [`no-unsafe-argument`](./no-unsafe-argument.md) @@ -148,5 +150,7 @@ Most commonly: ## Further Reading +- TypeScript [`any` type](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any) +- TypeScript's [`unknown` type](https://www.typescriptlang.org/docs/handbook/2/functions.html#unknown) - TypeScript [`any` type documentation](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#any) - TypeScript [`unknown` type release notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type) 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 db2c584827c7..5e71dc011a70 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 @@ -50,3 +50,5 @@ function foo(bar?: { n: number }) { return bar?.n; } ``` + + diff --git a/packages/eslint-plugin/docs/rules/no-extraneous-class.md b/packages/eslint-plugin/docs/rules/no-extraneous-class.md index c0bd1de4ca75..451b01ae4a5d 100644 --- a/packages/eslint-plugin/docs/rules/no-extraneous-class.md +++ b/packages/eslint-plugin/docs/rules/no-extraneous-class.md @@ -291,4 +291,5 @@ class Constants { ## When Not To Use It -You can disable this rule if you are unable -or unwilling- to switch off using classes as namespaces. +If your project was set up before modern class and namespace practices, and you don't have the time to switch over, you might not be practically able to use this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/packages/eslint-plugin/docs/rules/no-floating-promises.md b/packages/eslint-plugin/docs/rules/no-floating-promises.md index 69eca84b179b..c08216cd794e 100644 --- a/packages/eslint-plugin/docs/rules/no-floating-promises.md +++ b/packages/eslint-plugin/docs/rules/no-floating-promises.md @@ -99,7 +99,9 @@ await(async function () { ## When Not To Use It -If you do not use Promise-like values in your codebase, or want to allow them to remain unhandled. +This rule can be difficult to enable on large existing projects that set up many floating Promises. +Alternately, if you're not worried about crashes from floating or misused Promises -such as if you have global unhandled Promise handlers registered- then in some cases it may be safe to not use this rule. +You might consider using `void`s and/or [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. ## Related To 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 759f427b9ace..2777c32a1e5d 100644 --- a/packages/eslint-plugin/docs/rules/no-for-in-array.md +++ b/packages/eslint-plugin/docs/rules/no-for-in-array.md @@ -53,4 +53,5 @@ for (const [i, value] of array.entries()) { ## When Not To Use It -If you want to iterate through a loop using the indices in an array as strings, you can turn off this rule. +If your project is a rare one that intentionally loops over string indices of arrays, you can turn off this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/packages/eslint-plugin/docs/rules/no-implied-eval.md b/packages/eslint-plugin/docs/rules/no-implied-eval.md index 918b6a12e755..10f787d6d43f 100644 --- a/packages/eslint-plugin/docs/rules/no-implied-eval.md +++ b/packages/eslint-plugin/docs/rules/no-implied-eval.md @@ -98,4 +98,5 @@ setTimeout(Foo.fn, 100); ## When Not To Use It -If you want to allow `new Function()` or `setTimeout()`, `setInterval()`, `setImmediate()` and `execScript()` with string arguments, then you can safely disable this rule. +If your project is a rare one that needs to allow `new Function()` or `setTimeout()`, `setInterval()`, `setImmediate()` and `execScript()` with string arguments, then you can disable this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md b/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md index 35b8f2c5282e..fedd08cb19f0 100644 --- a/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md +++ b/packages/eslint-plugin/docs/rules/no-import-type-side-effects.md @@ -65,8 +65,7 @@ import T, { type U } from 'mod'; ## When Not To Use It -- If you want to leave behind side effect imports, then you shouldn't use this rule. -- If you're not using TypeScript 5.0's `verbatimModuleSyntax` option, then you don't need this rule. +If you're not using TypeScript 5.0's `verbatimModuleSyntax` option and your project is built with a bundler that manages import side effects for you, this rule may not be as useful for you. ## Related To diff --git a/packages/eslint-plugin/docs/rules/no-inferrable-types.md b/packages/eslint-plugin/docs/rules/no-inferrable-types.md index 2a06fa890f3c..721c6ce6c0c3 100644 --- a/packages/eslint-plugin/docs/rules/no-inferrable-types.md +++ b/packages/eslint-plugin/docs/rules/no-inferrable-types.md @@ -96,8 +96,8 @@ class Foo { ## When Not To Use It -If you do not want to enforce inferred types. +If you strongly prefer to have explicit types regardless of whether they can be inferred, this rule may not be for you. ## Further Reading -TypeScript [Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html) +- [TpeScript Inference](https://www.typescriptlang.org/docs/handbook/type-inference.html) 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 eaa488116424..426e878c67d4 100644 --- a/packages/eslint-plugin/docs/rules/no-invalid-void-type.md +++ b/packages/eslint-plugin/docs/rules/no-invalid-void-type.md @@ -109,5 +109,4 @@ class Example { ## When Not To Use It -If you don't care about if `void` is used with other types, -or in invalid places, then you don't need this rule. +If you don't care about if `void` is used with other types, or in invalid places, then you don't need this rule. diff --git a/packages/eslint-plugin/docs/rules/no-magic-numbers.md b/packages/eslint-plugin/docs/rules/no-magic-numbers.md index fa2c7c167a25..211add8302a7 100644 --- a/packages/eslint-plugin/docs/rules/no-magic-numbers.md +++ b/packages/eslint-plugin/docs/rules/no-magic-numbers.md @@ -111,3 +111,9 @@ Examples of **correct** code for the `{ "ignoreTypeIndexes": true }` option: type Foo = Bar[0]; type Baz = Parameters[2]; ``` + +## When Not To Use It + +If your project frequently deals with constant numbers and you don't wish to take up extra space to declare them, this rule might not be for you. +We recommend at least using descriptive comments and/or names to describe constants. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) instead of completely disabling this rule. 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 f904c473d667..5c149ef653af 100644 --- a/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md +++ b/packages/eslint-plugin/docs/rules/no-meaningless-void-operator.md @@ -45,3 +45,7 @@ void bar(); // discarding a number ## Options `checkNever: true` will suggest removing `void` when the argument has type `never`. + +## When Not To Use It + +If you don't mind extra `void`s in your project, you can avoid this rule. diff --git a/packages/eslint-plugin/docs/rules/no-misused-new.md b/packages/eslint-plugin/docs/rules/no-misused-new.md index a311c40be7a0..b3fc829f42d8 100644 --- a/packages/eslint-plugin/docs/rules/no-misused-new.md +++ b/packages/eslint-plugin/docs/rules/no-misused-new.md @@ -43,4 +43,5 @@ interface I { ## When Not To Use It -If you intentionally want a class with a `new` method, and you're confident nobody working in your code will mistake it with a constructor. +If you intentionally want a class with a `new` method, and you're confident nobody working in your code will mistake it with a constructor, you might not want this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/packages/eslint-plugin/docs/rules/no-misused-promises.md b/packages/eslint-plugin/docs/rules/no-misused-promises.md index b1cddcb6d68d..d8152f5d55fa 100644 --- a/packages/eslint-plugin/docs/rules/no-misused-promises.md +++ b/packages/eslint-plugin/docs/rules/no-misused-promises.md @@ -233,8 +233,9 @@ return { foo: 42, ...(await getData2()) }; ## When Not To Use It -If you do not use Promises in your codebase or are not concerned with possible -misuses of them outside of what the TypeScript compiler will check. +This rule can be difficult to enable on large existing projects that set up many misused Promises. +Alternately, if you're not worried about crashes from floating or misused Promises -such as if you have global unhandled Promise handlers registered- then in some cases it may be safe to not use this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. ## Further Reading diff --git a/packages/eslint-plugin/docs/rules/no-namespace.md b/packages/eslint-plugin/docs/rules/no-namespace.md index 47e9670f572a..c5e77612aa3b 100644 --- a/packages/eslint-plugin/docs/rules/no-namespace.md +++ b/packages/eslint-plugin/docs/rules/no-namespace.md @@ -120,7 +120,9 @@ declare module 'foo' {} ## When Not To Use It -If you are using the ES2015 module syntax, then you will not need this rule. +If your project was architected before modern modules and namespaces, it may be difficult to migrate off of namespaces. +In that case you may not be able to use this rule for parts of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. ## Further Reading 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 09bf9be3be84..f7ac17e740d4 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 @@ -43,6 +43,11 @@ let x: string; x! ?? ''; ``` +## When Not To Use It + +If your project's types don't yet fully describe whether certain values may be nullable, such as if you're transitioning to `strictNullChecks`, this rule might create many false reports. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + ## Further Reading - [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) 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 4a6c1607a947..f758fb2ba7e7 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 @@ -29,6 +29,11 @@ foo?.bar; foo?.bar(); ``` +## When Not To Use It + +If your project's types don't yet fully describe whether certain values may be nullable, such as if you're transitioning to `strictNullChecks`, this rule might create many false reports. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + ## Further Reading - [TypeScript 3.7 Release Notes](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-7.html) 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 874e01605c8e..1a676212fd80 100644 --- a/packages/eslint-plugin/docs/rules/no-non-null-assertion.md +++ b/packages/eslint-plugin/docs/rules/no-non-null-assertion.md @@ -38,5 +38,5 @@ const includesBaz = example.property?.includes('baz') ?? false; ## When Not To Use It -If your project does not use the `strictNullChecks` compiler option, this rule is likely useless to you. -If your code is often wildly incorrect with respect to strict null-checking, your code may not yet be ready for this rule. +If your project's types don't yet fully describe whether certain values may be nullable, such as if you're transitioning to `strictNullChecks`, this rule might create many false reports. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. 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 69cd6c83af03..a18b06b4f42b 100644 --- a/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md +++ b/packages/eslint-plugin/docs/rules/no-redundant-type-constituents.md @@ -70,6 +70,20 @@ type IntersectionStringLiteral = 'foo'; This rule plays it safe and only works with bottom types, top types, and comparing literal types to primitive types. +## When Not To Use It + +Some projects choose to occasionally intentionally include a redundant type constituent for documentation purposes. +For example, the following code includes `string` in a union even though the `unknown` makes it redundant: + +```ts +/** + * Normally a string name, but sometimes arbitrary unknown data. + */ +type NameOrOther = string | unknown; +``` + +If you strongly feel a preference for these unnecessary type constituents, this rule might not be for you. + ## Further Reading - [Union Types](https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#union-types) diff --git a/packages/eslint-plugin/docs/rules/no-require-imports.md b/packages/eslint-plugin/docs/rules/no-require-imports.md index 6e75a3d41cd3..746ca6dff7ed 100644 --- a/packages/eslint-plugin/docs/rules/no-require-imports.md +++ b/packages/eslint-plugin/docs/rules/no-require-imports.md @@ -30,7 +30,8 @@ import * as lib3 from 'lib3'; ## When Not To Use It -If you don't care about using newer module syntax, then you will not need this rule. +If your project frequently uses older CommonJS `require`s, then this rule might not be applicable to you. +If only a subset of your project uses `require`s then you might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. ## Related To diff --git a/packages/eslint-plugin/docs/rules/no-this-alias.md b/packages/eslint-plugin/docs/rules/no-this-alias.md index 640d5a6a2b54..e9be8a524e6d 100644 --- a/packages/eslint-plugin/docs/rules/no-this-alias.md +++ b/packages/eslint-plugin/docs/rules/no-this-alias.md @@ -35,4 +35,5 @@ setTimeout(() => { ## When Not To Use It -If you need to assign `this` to variables, you shouldn’t use this rule. +If your project is structured in a way that it needs to assign `this` to variables, this rule is likely not for you. +If only a subset of your project assigns `this` to variables then you might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. diff --git a/packages/eslint-plugin/docs/rules/no-throw-literal.md b/packages/eslint-plugin/docs/rules/no-throw-literal.md index f4d189067b96..2e488ed4eda8 100644 --- a/packages/eslint-plugin/docs/rules/no-throw-literal.md +++ b/packages/eslint-plugin/docs/rules/no-throw-literal.md @@ -109,3 +109,5 @@ const defaultOptions: Options = { allowThrowingUnknown: false, }; ``` + + diff --git a/packages/eslint-plugin/docs/rules/no-type-alias.md b/packages/eslint-plugin/docs/rules/no-type-alias.md index bb1428fbf8d0..527903e6a5cb 100644 --- a/packages/eslint-plugin/docs/rules/no-type-alias.md +++ b/packages/eslint-plugin/docs/rules/no-type-alias.md @@ -606,10 +606,7 @@ type Foo = Partial; type Foo = Omit; ``` -## When Not To Use It - -When you can't express some shape with an interface or you need to use a union, tuple type, -callback, etc. that would cause the code to be unreadable or impractical. + ## Further Reading 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 3397a96082ec..09d85216ba69 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 @@ -126,7 +126,7 @@ if (!(someNullCondition ?? true)) { | `!(nullableBooleanVar === false)` | `nullableBooleanVar ?? true` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` | | `!(nullableBooleanVar !== false)` | `!(nullableBooleanVar ?? true)` | Only checked/fixed if the `allowComparingNullableBooleansToFalse` option is `false` | -## Not To Use It +## When Not To Use It Do not use this rule when `strictNullChecks` is disabled. ESLint is not able to distinguish between `false` and `undefined` or `null` values. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md b/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md index 26b7de35f7ae..7afa80861999 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-condition.md @@ -95,7 +95,8 @@ If for some reason you cannot turn on `strictNullChecks`, but still want to use ## When Not To Use It -The main downside to using this rule is the need for type information. +If your project is not accurately typed, such as if it's in the process of being converted to TypeScript or is susceptible to [trade-offs in control flow analysis](https://github.com/Microsoft/TypeScript/issues/9998), it may be difficult to enable this rule for particularly non-type-safe areas of code. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. This rule has a known edge case of triggering on conditions that were modified within function calls (as side effects). It is due to limitations of TypeScript's type narrowing. diff --git a/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md b/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md index 6ca2afe17f52..8c698145a93a 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-qualifier.md @@ -48,4 +48,4 @@ namespace A { ## When Not To Use It -If you don't care about having unneeded enum or namespace qualifiers, then you don't need to use this rule. +If you explicitly prefer to use fully qualified names, such as for explicitness, then you don't need to use this rule. 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 43526aec5719..aa75e0359f4f 100644 --- a/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md +++ b/packages/eslint-plugin/docs/rules/no-unnecessary-type-arguments.md @@ -71,3 +71,7 @@ class D extends C {} interface I {} class Impl implements I {} ``` + +## When Not To Use It + +If you prefer explicitly specifying type parameters even when they are equal to the default, you can skip this rule. diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md index a299b109603a..7605273f27ba 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-argument.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-argument.md @@ -78,6 +78,16 @@ declare function foo(arg1: unknown, arg2: Set, arg3: unknown[]): void; foo(1 as any, new Set(), [] as any[]); ``` +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + ## Related To - [`no-explicit-any`](./no-explicit-any.md) +- [`no-unsafe-assignment`](./no-unsafe-assignment.md) +- [`no-unsafe-call`](./no-unsafe-call.md) +- [`no-unsafe-member-access`](./no-unsafe-member-access.md) +- [`no-unsafe-return`](./no-unsafe-return.md) diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md b/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md index d5a216eff091..c506ea1bcba7 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-assignment.md @@ -81,6 +81,16 @@ const x: unknown[] = y as any[]; const x: Set = y as Set; ``` +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + ## Related To - [`no-explicit-any`](./no-explicit-any.md) +- [`no-unsafe-argument`](./no-unsafe-argument.md) +- [`no-unsafe-call`](./no-unsafe-call.md) +- [`no-unsafe-member-access`](./no-unsafe-member-access.md) +- [`no-unsafe-return`](./no-unsafe-return.md) diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-call.md b/packages/eslint-plugin/docs/rules/no-unsafe-call.md index 8fddb2774b61..140c92a5ed33 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-call.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-call.md @@ -53,6 +53,16 @@ new Map(); String.raw`foo`; ``` +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + ## Related To - [`no-explicit-any`](./no-explicit-any.md) +- [`no-unsafe-argument`](./no-unsafe-argument.md) +- [`no-unsafe-assignment`](./no-unsafe-assignment.md) +- [`no-unsafe-member-access`](./no-unsafe-member-access.md) +- [`no-unsafe-return`](./no-unsafe-return.md) diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md b/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md index 9c917aa3ee0c..441df05a2d47 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-declaration-merging.md @@ -49,6 +49,11 @@ namespace Qux {} function Qux() {} ``` +## When Not To Use It + +If your project intentionally defines classes and interfaces with unsafe declaration merging patterns, this rule might not be for you. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + ## Further Reading - [Declaration Merging](https://www.typescriptlang.org/docs/handbook/declaration-merging.html) diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md b/packages/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md index 5db56d69b32d..008d355d4e2a 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-enum-comparison.md @@ -77,3 +77,6 @@ vegetable === Vegetable.Asparagus; ## When Not To Use It If you don't mind number and/or literal string constants being compared against enums, you likely don't need this rule. + +Separately, in the rare case of relying on an third party enums that are only imported as `type`s, it may be difficult to adhere to this rule. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. 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 448ed7c9ee03..9ca36ee3566d 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-member-access.md @@ -59,6 +59,16 @@ arr[idx]; arr[idx++]; ``` +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + ## Related To - [`no-explicit-any`](./no-explicit-any.md) +- [`no-unsafe-argument`](./no-unsafe-argument.md) +- [`no-unsafe-assignment`](./no-unsafe-assignment.md) +- [`no-unsafe-call`](./no-unsafe-call.md) +- [`no-unsafe-return`](./no-unsafe-return.md) diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-return.md b/packages/eslint-plugin/docs/rules/no-unsafe-return.md index cb2d6f120f22..1137264d5f41 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-return.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-return.md @@ -98,6 +98,16 @@ function foo2(): unknown[] { } ``` +## When Not To Use It + +If your codebase has many existing `any`s or areas of unsafe code, it may be difficult to enable this rule. +It may be easier to skip the `no-unsafe-*` rules pending increasing type safety in unsafe areas of your project. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. + ## Related To - [`no-explicit-any`](./no-explicit-any.md) +- [`no-unsafe-argument`](./no-unsafe-argument.md) +- [`no-unsafe-assignment`](./no-unsafe-assignment.md) +- [`no-unsafe-call`](./no-unsafe-call.md) +- [`no-unsafe-member-access`](./no-unsafe-member-access.md) diff --git a/packages/eslint-plugin/docs/rules/no-unsafe-unary-minus.md b/packages/eslint-plugin/docs/rules/no-unsafe-unary-minus.md index 94745d2c71c9..a215f8e19aa0 100644 --- a/packages/eslint-plugin/docs/rules/no-unsafe-unary-minus.md +++ b/packages/eslint-plugin/docs/rules/no-unsafe-unary-minus.md @@ -48,3 +48,5 @@ declare const d: any; declare const e: 1 | 2; -e; ``` + + 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 9358e954b3ff..1720a223de56 100644 --- a/packages/eslint-plugin/docs/rules/no-useless-empty-export.md +++ b/packages/eslint-plugin/docs/rules/no-useless-empty-export.md @@ -41,3 +41,7 @@ export const value = 'Hello, world!'; ```ts import 'some-other-module'; ``` + +## When Not To Use It + +If you don't mind an empty `export {}` at the bottom of files, you likely don't need this rule. diff --git a/packages/eslint-plugin/docs/rules/no-var-requires.md b/packages/eslint-plugin/docs/rules/no-var-requires.md index 7230e4e8aebc..f4605ac335bd 100644 --- a/packages/eslint-plugin/docs/rules/no-var-requires.md +++ b/packages/eslint-plugin/docs/rules/no-var-requires.md @@ -30,7 +30,8 @@ import foo from 'foo'; ## When Not To Use It -If you don't care about using newer module syntax, then you will not need this rule. +If your project frequently uses older CommonJS `require`s, then this rule might not be applicable to you. +If only a subset of your project uses `require`s then you might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. ## Related To 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 8f068f062e66..0dc6527ff0d3 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 @@ -38,4 +38,4 @@ const alsoDefinitely = maybe!; ## When Not To Use It -If you don't mind having unnecessarily verbose type casts, you can avoid this rule. +If you don't mind having unnecessarily verbose type assertions, you can avoid this rule. diff --git a/packages/eslint-plugin/docs/rules/parameter-properties.md b/packages/eslint-plugin/docs/rules/parameter-properties.md index 6d970076957c..830e2a5250bb 100644 --- a/packages/eslint-plugin/docs/rules/parameter-properties.md +++ b/packages/eslint-plugin/docs/rules/parameter-properties.md @@ -482,4 +482,7 @@ class Foo { ## When Not To Use It -If you don't care about the using parameter properties in constructors, then you will not need this rule. +If you don't care about which style of parameter properties in constructors is used in your classes, then you will not need this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/packages/eslint-plugin/docs/rules/prefer-as-const.md b/packages/eslint-plugin/docs/rules/prefer-as-const.md index 628c573044cb..7bd979a84f72 100644 --- a/packages/eslint-plugin/docs/rules/prefer-as-const.md +++ b/packages/eslint-plugin/docs/rules/prefer-as-const.md @@ -41,4 +41,7 @@ let foo = { bar: 'baz' }; ## When Not To Use It -If you are using TypeScript < 3.4 +If you don't care about which style of literals assertions is used in your code, then you will not need this rule. + +However, keep in mind that inconsistent style can harm readability in a project. +We recommend picking a single option for this rule that works best for your project. diff --git a/packages/eslint-plugin/docs/rules/prefer-for-of.md b/packages/eslint-plugin/docs/rules/prefer-for-of.md index 83b7846acb0a..873d28bd7f0f 100644 --- a/packages/eslint-plugin/docs/rules/prefer-for-of.md +++ b/packages/eslint-plugin/docs/rules/prefer-for-of.md @@ -41,6 +41,4 @@ for (let i = 0; i < array.length; i++) { } ``` -## When Not To Use It - -If you transpile for browsers that do not support for-of loops, you may wish to use traditional for loops that produce more compact code. + diff --git a/packages/eslint-plugin/docs/rules/prefer-function-type.md b/packages/eslint-plugin/docs/rules/prefer-function-type.md index a8aca65f296b..c3e84ac491c1 100644 --- a/packages/eslint-plugin/docs/rules/prefer-function-type.md +++ b/packages/eslint-plugin/docs/rules/prefer-function-type.md @@ -84,7 +84,7 @@ type Intersection = ((data: string) => number) & ((id: number) => string); ## When Not To Use It -If you specifically want to use an interface or type literal with a single call signature for stylistic reasons, you can disable this rule. +If you specifically want to use an interface or type literal with a single call signature for stylistic reasons, you can avoid this rule. This rule has a known edge case of sometimes triggering on global augmentations such as `interface Function`. These edge cases are rare and often symptomatic of odd code. diff --git a/packages/eslint-plugin/docs/rules/prefer-includes.md b/packages/eslint-plugin/docs/rules/prefer-includes.md index 793014008beb..9a5db1fbf894 100644 --- a/packages/eslint-plugin/docs/rules/prefer-includes.md +++ b/packages/eslint-plugin/docs/rules/prefer-includes.md @@ -72,6 +72,4 @@ declare const mismatchExample: { mismatchExample.indexOf(value) >= 0; ``` -## When Not To Use It - -If you don't want to suggest `includes`, you can safely turn this rule off. + 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 ea276761c9ed..3684b84d5446 100644 --- a/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md +++ b/packages/eslint-plugin/docs/rules/prefer-literal-enum-member.md @@ -98,4 +98,4 @@ enum Foo { ## When Not To Use It -If you want use anything other than simple literals as an enum value. +If you want use anything other than simple literals as an enum value, this rule might not be for you. diff --git a/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md b/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md index f25b124c776a..97af2be93fa6 100644 --- a/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md +++ b/packages/eslint-plugin/docs/rules/prefer-namespace-keyword.md @@ -38,7 +38,7 @@ declare module 'foo' {} ## When Not To Use It -If you are using the ES2015 module syntax, then you will not need this rule. +If you are not using TypeScript's older `module`/`namespace` keywords, then you will not need this rule. ## Further Reading diff --git a/packages/eslint-plugin/docs/rules/prefer-optional-chain.md b/packages/eslint-plugin/docs/rules/prefer-optional-chain.md index 0c73e7d22c33..d09d5b046793 100644 --- a/packages/eslint-plugin/docs/rules/prefer-optional-chain.md +++ b/packages/eslint-plugin/docs/rules/prefer-optional-chain.md @@ -254,7 +254,8 @@ thing2 && thing2.toString(); ## When Not To Use It -If you don't mind using more explicit `&&`s/`||`s, you don't need this rule. +If your project is not accurately typed, such as if it's in the process of being converted to TypeScript or is susceptible to [trade-offs in control flow analysis](https://github.com/Microsoft/TypeScript/issues/9998), it may be difficult to enable this rule for particularly non-type-safe areas of code. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. ## Further Reading 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 11b1b15503ee..0284cb96e436 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly-parameter-types.md @@ -380,3 +380,7 @@ type MyType = { }; function foo(arg: MyType) {} ``` + +## When Not To Use It + +If your project does not attempt to enforce strong immutability guarantees of parameters, you can avoid this rule. diff --git a/packages/eslint-plugin/docs/rules/prefer-readonly.md b/packages/eslint-plugin/docs/rules/prefer-readonly.md index 7018bca3fa23..3843ddbc7416 100644 --- a/packages/eslint-plugin/docs/rules/prefer-readonly.md +++ b/packages/eslint-plugin/docs/rules/prefer-readonly.md @@ -93,3 +93,7 @@ class Container { private neverModifiedPrivate = 'unchanged'; } ``` + +## When Not To Use It + +If you aren't trying to enforce strong immutability guarantees, this rule may be too restrictive for your project. 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 520a25a653b5..5419248f8b5e 100644 --- a/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md +++ b/packages/eslint-plugin/docs/rules/prefer-reduce-type-parameter.md @@ -55,4 +55,6 @@ It will suggest instead pass the asserted type to `Array#reduce` as a generic ty ## When Not To Use It -If you don't want to use typechecking in your linting, you can't use this rule. +This rule can sometimes be difficult to work around when creating objects using a `.reduce`. +See [[prefer-reduce-type-parameter] unfixable reporting #3440](https://github.com/typescript-eslint/typescript-eslint/issues/3440) for more details. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. 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 573ce53ed09d..8b2f556ddf30 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 @@ -54,4 +54,5 @@ foo.endsWith('bar'); ## When Not To Use It -If you don't mind that style, you can turn this rule off safely. +If you don't mind which style of string checking is used, you can turn this rule off safely. +However, keep in mind that inconsistent style can harm readability in a project. 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 8cc2abb23055..1eb824041fd3 100644 --- a/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md +++ b/packages/eslint-plugin/docs/rules/prefer-ts-expect-error.md @@ -63,6 +63,7 @@ const isOptionEnabled = (key: string): boolean => { ## When Not To Use It If you are compiling against multiple versions of TypeScript and using `@ts-ignore` to ignore version-specific type errors, this rule might get in your way. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. ## Further Reading diff --git a/packages/eslint-plugin/docs/rules/promise-function-async.md b/packages/eslint-plugin/docs/rules/promise-function-async.md index f3095ed1808c..a11dfdea3ce3 100644 --- a/packages/eslint-plugin/docs/rules/promise-function-async.md +++ b/packages/eslint-plugin/docs/rules/promise-function-async.md @@ -57,3 +57,8 @@ async function functionReturnsUnionWithPromiseImplicitly(p: boolean) { return p ? 'value' : Promise.resolve('value'); } ``` + +## When Not To Use It + +This rule can be difficult to enable on projects that use APIs which require functions to always be `async`. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) along with filing issues on your dependencies for those specific situations instead of completely disabling this rule. 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 4335d546cc3c..d97e78e9aa0a 100644 --- a/packages/eslint-plugin/docs/rules/require-array-sort-compare.md +++ b/packages/eslint-plugin/docs/rules/require-array-sort-compare.md @@ -75,4 +75,4 @@ const three = '3'; ## When Not To Use It -If you understand the language specification enough, and/or only ever sort arrays in a string-like manner, you can turn this rule off safely. +If you intentionally want your arrays to be always sorted in a string-like manner, you can turn this rule off safely. diff --git a/packages/eslint-plugin/docs/rules/restrict-plus-operands.md b/packages/eslint-plugin/docs/rules/restrict-plus-operands.md index e88e20644b8a..1a1c76495433 100644 --- a/packages/eslint-plugin/docs/rules/restrict-plus-operands.md +++ b/packages/eslint-plugin/docs/rules/restrict-plus-operands.md @@ -196,7 +196,7 @@ bar += 'test'; ## When Not To Use It -If you don't mind `"[object Object]"` in your strings, then you will not need this rule. +If you don't mind a risk of `"[object Object]"` or incorrect type coercions in your values, then you will not need this rule. ## Related To diff --git a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md index 5124016b5307..e7e295c443a9 100644 --- a/packages/eslint-plugin/docs/rules/restrict-template-expressions.md +++ b/packages/eslint-plugin/docs/rules/restrict-template-expressions.md @@ -111,6 +111,10 @@ const arg = 'something'; const msg1 = typeof arg === 'string' ? arg : `arg = ${arg}`; ``` +## When Not To Use It + +If you're not worried about incorrectly stringifying non-string values in template literals, then you likely don't need this rule. + ## Related To - [`no-base-to-string`](./no-base-to-string.md) diff --git a/packages/eslint-plugin/docs/rules/sort-type-constituents.md b/packages/eslint-plugin/docs/rules/sort-type-constituents.md index 025e31ccad4f..c767bff5edd5 100644 --- a/packages/eslint-plugin/docs/rules/sort-type-constituents.md +++ b/packages/eslint-plugin/docs/rules/sort-type-constituents.md @@ -99,3 +99,9 @@ The ordering of groups is determined by this option. - `tuple` - Tuple types (`[A, B, C]`) - `union` - Union types (`A | B`) - `nullish` - `null` and `undefined` + +## When Not To Use It + +This rule is purely a stylistic rule for maintaining consistency in your project. +You can turn it off if you don't want to keep a consistent, predictable order for intersection and union types. +However, keep in mind that inconsistent style can harm readability in a project. diff --git a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md index 45a7f8f94962..f0f702d03d51 100644 --- a/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md +++ b/packages/eslint-plugin/docs/rules/strict-boolean-expressions.md @@ -178,6 +178,13 @@ This rule provides following fixes and suggestions for particular types in boole - `any` and `unknown` - Provides following suggestions: - Explicitly cast value to a boolean (`value` β†’ `Boolean(value)`) +## When Not To Use It + +If your project isn't likely to experience bugs from falsy non-boolean values being used in logical conditions, you can skip enabling this rule. + +Otherwise, this rule can be quite strict around requiring exact comparisons in logical checks. +If you prefer more succinct checks over more precise boolean logic, this rule might not be for you. + ## Related To - [no-unnecessary-condition](./no-unnecessary-condition.md) - Similar rule which reports always-truthy and always-falsy values in conditions diff --git a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md index 267a2199ed11..b362e97e1cf3 100644 --- a/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md +++ b/packages/eslint-plugin/docs/rules/switch-exhaustiveness-check.md @@ -204,4 +204,4 @@ Since `value` is a non-union type it requires the switch case to have a default ## When Not To Use It -If you don't frequently `switch` over union types or enums with many parts, or intentionally wish to leave out some parts. +If you don't frequently `switch` over union types or enums with many parts, or intentionally wish to leave out some parts, this rule may not be for you. diff --git a/packages/eslint-plugin/docs/rules/triple-slash-reference.md b/packages/eslint-plugin/docs/rules/triple-slash-reference.md index 538c319059ed..40509d8fe235 100644 --- a/packages/eslint-plugin/docs/rules/triple-slash-reference.md +++ b/packages/eslint-plugin/docs/rules/triple-slash-reference.md @@ -50,9 +50,12 @@ import * as foo from 'foo'; import foo = require('foo'); ``` -## When To Use It +## When Not To Use It -If you want to ban use of one or all of the triple slash reference directives, or any time you might use triple-slash type reference directives and ES6 import declarations in the same file. +Most modern TypeScript projects generally use `import` statements to bring in types. +It's rare to need a `///` triple-slash reference outside of auto-generated code. +If your project is a rare one with one of those use cases, this rule might not be for you. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. ## When Not To Use It diff --git a/packages/eslint-plugin/docs/rules/unbound-method.md b/packages/eslint-plugin/docs/rules/unbound-method.md index f112947805d1..331394884211 100644 --- a/packages/eslint-plugin/docs/rules/unbound-method.md +++ b/packages/eslint-plugin/docs/rules/unbound-method.md @@ -98,6 +98,8 @@ log(); ## When Not To Use It -If your code intentionally waits to bind methods after use, such as by passing a `scope: this` along with the method, you can disable this rule. +If your project dynamically changes `this` scopes around in a way TypeScript has difficulties modeling, this rule may not be viable to use. +One likely difficult pattern is if your code intentionally waits to bind methods after use, such as by passing a `scope: this` along with the method. +You might consider using [ESLint disable comments](https://eslint.org/docs/latest/use/configure/rules#using-configuration-comments-1) for those specific situations instead of completely disabling this rule. If you're wanting to use `toBeCalled` and similar matches in `jest` tests, you can disable this rule for your test files in favor of [`eslint-plugin-jest`'s version of this rule](https://github.com/jest-community/eslint-plugin-jest/blob/main/docs/rules/unbound-method.md). diff --git a/packages/eslint-plugin/docs/rules/unified-signatures.md b/packages/eslint-plugin/docs/rules/unified-signatures.md index 26f94da8c7f3..54f04d2385ec 100644 --- a/packages/eslint-plugin/docs/rules/unified-signatures.md +++ b/packages/eslint-plugin/docs/rules/unified-signatures.md @@ -66,3 +66,12 @@ function f(a: string): void; function f(a: number): void; function f(b: string): void; ``` + +## When Not To Use It + +This is purely a stylistic rule to help with readability of function signature overloads. +You can turn it off if you don't want to consistently keep them next to each other and unified. + +## Related To + +- [`adjacent-overload-signatures`](./adjacent-overload-signatures.md) diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 0b429e0c4602..61a13aefcc98 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/eslint-plugin", - "version": "6.13.1", + "version": "6.13.2", "description": "TypeScript plugin for ESLint", "files": [ "dist", @@ -50,17 +50,17 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate:breaking-changes": "yarn tsx tools/generate-breaking-changes.mts", "generate:configs": "yarn tsx tools/generate-configs.ts", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest --coverage --logHeapUsage", "test-single": "jest --no-coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "6.13.1", - "@typescript-eslint/type-utils": "6.13.1", - "@typescript-eslint/utils": "6.13.1", - "@typescript-eslint/visitor-keys": "6.13.1", + "@typescript-eslint/scope-manager": "6.13.2", + "@typescript-eslint/type-utils": "6.13.2", + "@typescript-eslint/utils": "6.13.2", + "@typescript-eslint/visitor-keys": "6.13.2", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -73,8 +73,8 @@ "@types/debug": "*", "@types/marked": "*", "@types/natural-compare": "*", - "@typescript-eslint/rule-schema-to-typescript-types": "6.13.1", - "@typescript-eslint/rule-tester": "6.13.1", + "@typescript-eslint/rule-schema-to-typescript-types": "6.13.2", + "@typescript-eslint/rule-tester": "6.13.2", "ajv": "^6.12.6", "chalk": "^5.3.0", "cross-fetch": "*", diff --git a/packages/eslint-plugin/src/rules/consistent-type-exports.ts b/packages/eslint-plugin/src/rules/consistent-type-exports.ts index dc0f410f681b..127dde8831df 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-exports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-exports.ts @@ -109,6 +109,7 @@ export default createRule({ ExportNamedDeclaration(node: TSESTree.ExportNamedDeclaration): void { // Coerce the source into a string for use as a lookup entry. const source = getSourceFromExport(node) ?? 'undefined'; + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition const sourceExports = (sourceExportsMap[source] ||= { source, reportValueExports: [], diff --git a/packages/eslint-plugin/src/rules/consistent-type-imports.ts b/packages/eslint-plugin/src/rules/consistent-type-imports.ts index ee69229e766c..fd452d750b66 100644 --- a/packages/eslint-plugin/src/rules/consistent-type-imports.ts +++ b/packages/eslint-plugin/src/rules/consistent-type-imports.ts @@ -119,6 +119,7 @@ export default createRule({ ImportDeclaration(node): void { const source = node.source.value; // sourceImports is the object containing all the specifics for a particular import source, type or value + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition sourceImportsMap[source] ??= { source, reportValueImports: [], // if there is a mismatch where type importKind but value specifiers @@ -194,8 +195,9 @@ export default createRule({ } } if (ref.isValueReference) { - let parent: TSESTree.Node | undefined = - ref.identifier.parent; + let parent = ref.identifier.parent as + | TSESTree.Node + | undefined; let child: TSESTree.Node = ref.identifier; while (parent) { switch (parent.type) { diff --git a/packages/eslint-plugin/src/rules/no-extra-parens.ts b/packages/eslint-plugin/src/rules/no-extra-parens.ts index c938dfe4896d..279ea3840473 100644 --- a/packages/eslint-plugin/src/rules/no-extra-parens.ts +++ b/packages/eslint-plugin/src/rules/no-extra-parens.ts @@ -277,6 +277,7 @@ export default createRule({ } }, }; + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (rules.ForInStatement && rules.ForOfStatement) { overrides.ForInStatement = function (node): void { if (isTypeAssertion(node.right)) { diff --git a/packages/eslint-plugin/src/rules/no-shadow.ts b/packages/eslint-plugin/src/rules/no-shadow.ts index b97971339617..c1e637962a5f 100644 --- a/packages/eslint-plugin/src/rules/no-shadow.ts +++ b/packages/eslint-plugin/src/rules/no-shadow.ts @@ -412,7 +412,7 @@ export default createRule({ return false; } - let node: TSESTree.Node | undefined = outerDef.name; + let node = outerDef.name as TSESTree.Node | undefined; const location = callExpression.range[1]; while (node) { diff --git a/packages/eslint-plugin/src/rules/prefer-readonly.ts b/packages/eslint-plugin/src/rules/prefer-readonly.ts index d34a57b47679..be92e541781c 100644 --- a/packages/eslint-plugin/src/rules/prefer-readonly.ts +++ b/packages/eslint-plugin/src/rules/prefer-readonly.ts @@ -105,7 +105,7 @@ export default createRule({ function isDestructuringAssignment( node: ts.PropertyAccessExpression, ): boolean { - let current: ts.Node = node.parent; + let current = node.parent as ts.Node | undefined; while (current) { const parent = current.parent; diff --git a/packages/eslint-plugin/src/rules/return-await.ts b/packages/eslint-plugin/src/rules/return-await.ts index 4cc53535378d..fa3c6d5479e0 100644 --- a/packages/eslint-plugin/src/rules/return-await.ts +++ b/packages/eslint-plugin/src/rules/return-await.ts @@ -71,7 +71,7 @@ export default createRule({ } function inTry(node: ts.Node): boolean { - let ancestor = node.parent; + let ancestor = node.parent as ts.Node | undefined; while (ancestor && !ts.isFunctionLike(ancestor)) { if (ts.isTryStatement(ancestor)) { @@ -85,7 +85,7 @@ export default createRule({ } function inCatch(node: ts.Node): boolean { - let ancestor = node.parent; + let ancestor = node.parent as ts.Node | undefined; while (ancestor && !ts.isFunctionLike(ancestor)) { if (ts.isCatchClause(ancestor)) { @@ -99,7 +99,7 @@ export default createRule({ } function isReturnPromiseInFinally(node: ts.Node): boolean { - let ancestor = node.parent; + let ancestor = node.parent as ts.Node | undefined; while (ancestor && !ts.isFunctionLike(ancestor)) { if ( @@ -116,7 +116,7 @@ export default createRule({ } function hasFinallyBlock(node: ts.Node): boolean { - let ancestor = node.parent; + let ancestor = node.parent as ts.Node | undefined; while (ancestor && !ts.isFunctionLike(ancestor)) { if (ts.isTryStatement(ancestor)) { diff --git a/packages/eslint-plugin/src/rules/unified-signatures.ts b/packages/eslint-plugin/src/rules/unified-signatures.ts index e6237dc8667d..0d4b8e8035d3 100644 --- a/packages/eslint-plugin/src/rules/unified-signatures.ts +++ b/packages/eslint-plugin/src/rules/unified-signatures.ts @@ -172,12 +172,12 @@ export default createRule({ const isTypeParameter = getIsTypeParameter(typeParameters); for (const overloads of signatures) { forEachPair(overloads, (a, b) => { - const signature0 = (a as MethodDefinition).value ?? a; - const signature1 = (b as MethodDefinition).value ?? b; + const signature0 = (a as Partial).value ?? a; + const signature1 = (b as Partial).value ?? b; const unify = compareSignatures( - signature0, - signature1, + signature0 as SignatureDefinition, + signature1 as SignatureDefinition, isTypeParameter, ); if (unify !== undefined) { diff --git a/packages/eslint-plugin/src/util/getThisExpression.ts b/packages/eslint-plugin/src/util/getThisExpression.ts index 7a5bcd6ebfd5..196254c35f96 100644 --- a/packages/eslint-plugin/src/util/getThisExpression.ts +++ b/packages/eslint-plugin/src/util/getThisExpression.ts @@ -4,7 +4,7 @@ import { AST_NODE_TYPES } from '@typescript-eslint/utils'; export function getThisExpression( node: TSESTree.Node, ): TSESTree.ThisExpression | undefined { - while (node) { + while (true) { if (node.type === AST_NODE_TYPES.CallExpression) { node = node.callee; } else if (node.type === AST_NODE_TYPES.ThisExpression) { diff --git a/packages/eslint-plugin/tests/docs.test.ts b/packages/eslint-plugin/tests/docs.test.ts index ce9f3115a02f..cc65cb32f4a7 100644 --- a/packages/eslint-plugin/tests/docs.test.ts +++ b/packages/eslint-plugin/tests/docs.test.ts @@ -8,13 +8,20 @@ import rules from '../src/rules'; const docsRoot = path.resolve(__dirname, '../docs/rules'); const rulesData = Object.entries(rules); -function parseMarkdownFile(filePath: string): marked.TokensList { - const file = fs.readFileSync(filePath, 'utf-8'); +interface ParsedMarkdownFile { + fullText: string; + tokens: marked.TokensList; +} + +function parseMarkdownFile(filePath: string): ParsedMarkdownFile { + const fullText = fs.readFileSync(filePath, 'utf-8'); - return marked.lexer(file, { + const tokens = marked.lexer(fullText, { gfm: true, silent: false, }); + + return { fullText, tokens }; } type TokenType = marked.Token['type']; @@ -63,7 +70,7 @@ describe('Validating rule docs', () => { describe(`${ruleName}.md`, () => { const filePath = path.join(docsRoot, `${ruleName}.md`); - const tokens = parseMarkdownFile(filePath); + const { fullText, tokens } = parseMarkdownFile(filePath); test(`${ruleName}.md must start with frontmatter description`, () => { expect(tokens[0]).toMatchObject({ @@ -91,31 +98,53 @@ describe('Validating rule docs', () => { }); }); - test(`headers must be title-cased`, () => { - // Get all H2 headers objects as the other levels are variable by design. - const headers = tokens.filter(tokenIsH2); + test(`headings must be title-cased`, () => { + // Get all H2 headings objects as the other levels are variable by design. + const headings = tokens.filter(tokenIsH2); - headers.forEach(header => - expect(header.text).toBe(titleCase(header.text)), + headings.forEach(heading => + expect(heading.text).toBe(titleCase(heading.text)), ); }); + const requiredHeadings = ['When Not To Use It']; const importantHeadings = new Set([ + ...requiredHeadings, 'How to Use', 'Options', 'Related To', - 'When Not To Use It', ]); test('important headings must be h2s', () => { - const headers = tokens.filter(tokenIsHeading); + const headings = tokens.filter(tokenIsHeading); - for (const header of headers) { - if (importantHeadings.has(header.raw.replace(/#/g, '').trim())) { - expect(header.depth).toBe(2); + for (const heading of headings) { + if (importantHeadings.has(heading.raw.replace(/#/g, '').trim())) { + expect(heading.depth).toBe(2); } } }); + + if (!rules[ruleName as keyof typeof rules].meta.docs?.extendsBaseRule) { + test('must include required headings', () => { + const headingTexts = new Set( + tokens.filter(tokenIsH2).map(token => token.text), + ); + + for (const requiredHeading of requiredHeadings) { + const omissionComment = ``; + + if ( + !headingTexts.has(requiredHeading) && + !fullText.includes(omissionComment) + ) { + throw new Error( + `Expected a '${requiredHeading}' heading or comment like ${omissionComment}.`, + ); + } + } + }); + } }); } }); diff --git a/packages/integration-tests/CHANGELOG.md b/packages/integration-tests/CHANGELOG.md index cd58f2cbaa05..197477e27891 100644 --- a/packages/integration-tests/CHANGELOG.md +++ b/packages/integration-tests/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/integration-tests + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **Note:** Version bump only for package @typescript-eslint/integration-tests diff --git a/packages/integration-tests/package.json b/packages/integration-tests/package.json index 9d042d89b813..93683bbf9acd 100644 --- a/packages/integration-tests/package.json +++ b/packages/integration-tests/package.json @@ -1,10 +1,10 @@ { "name": "@typescript-eslint/integration-tests", - "version": "6.13.1", + "version": "6.13.2", "private": true, "scripts": { "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest --no-coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, diff --git a/packages/parser/CHANGELOG.md b/packages/parser/CHANGELOG.md index 1745c51c134b..71dfe635a5ef 100644 --- a/packages/parser/CHANGELOG.md +++ b/packages/parser/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/parser + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **Note:** Version bump only for package @typescript-eslint/parser diff --git a/packages/parser/package.json b/packages/parser/package.json index 525a45f0b95d..ac476948aaa3 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/parser", - "version": "6.13.1", + "version": "6.13.2", "description": "An ESLint custom parser which leverages TypeScript ESTree", "files": [ "dist", @@ -43,7 +43,7 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, @@ -51,10 +51,10 @@ "eslint": "^7.0.0 || ^8.0.0" }, "dependencies": { - "@typescript-eslint/scope-manager": "6.13.1", - "@typescript-eslint/types": "6.13.1", - "@typescript-eslint/typescript-estree": "6.13.1", - "@typescript-eslint/visitor-keys": "6.13.1", + "@typescript-eslint/scope-manager": "6.13.2", + "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/typescript-estree": "6.13.2", + "@typescript-eslint/visitor-keys": "6.13.2", "debug": "^4.3.4" }, "devDependencies": { diff --git a/packages/repo-tools/CHANGELOG.md b/packages/repo-tools/CHANGELOG.md index 03511b2b0cb6..4be2f2cd7569 100644 --- a/packages/repo-tools/CHANGELOG.md +++ b/packages/repo-tools/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/repo-tools + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **Note:** Version bump only for package @typescript-eslint/repo-tools diff --git a/packages/repo-tools/package.json b/packages/repo-tools/package.json index 5d7bc098ca5a..6983d1967aeb 100644 --- a/packages/repo-tools/package.json +++ b/packages/repo-tools/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/repo-tools", - "version": "6.13.1", + "version": "6.13.2", "private": true, "scripts": { "//": "NOTE: intentionally no build step in this package", @@ -8,7 +8,7 @@ "generate-contributors": "tsx ./src/generate-contributors.ts", "generate-sponsors": "tsx ./src/generate-sponsors.ts", "generate-lib": "tsx ./src/generate-lib.ts", - "lint": "nx lint", + "lint": "npx nx lint", "postinstall-script": "tsx ./src/postinstall.mts", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" diff --git a/packages/rule-schema-to-typescript-types/CHANGELOG.md b/packages/rule-schema-to-typescript-types/CHANGELOG.md index 4ca2cecc2aaa..226d36b0cc69 100644 --- a/packages/rule-schema-to-typescript-types/CHANGELOG.md +++ b/packages/rule-schema-to-typescript-types/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/rule-schema-to-typescript-types + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **Note:** Version bump only for package @typescript-eslint/rule-schema-to-typescript-types diff --git a/packages/rule-schema-to-typescript-types/package.json b/packages/rule-schema-to-typescript-types/package.json index 834243c2834c..854c47b43c8f 100644 --- a/packages/rule-schema-to-typescript-types/package.json +++ b/packages/rule-schema-to-typescript-types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-schema-to-typescript-types", - "version": "6.13.1", + "version": "6.13.2", "private": true, "type": "commonjs", "exports": { @@ -27,15 +27,15 @@ "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", "generate-contributors": "tsx ./src/generate-contributors.ts", "generate-sponsors": "tsx ./src/generate-sponsors.ts", - "lint": "nx lint", + "lint": "npx nx lint", "postinstall-script": "tsx ./src/postinstall.ts", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { "@prettier/sync": "*", - "@typescript-eslint/type-utils": "6.13.1", - "@typescript-eslint/utils": "6.13.1", + "@typescript-eslint/type-utils": "6.13.2", + "@typescript-eslint/utils": "6.13.2", "natural-compare": "^1.4.0", "prettier": "^3.0.3" }, diff --git a/packages/rule-tester/CHANGELOG.md b/packages/rule-tester/CHANGELOG.md index f7e46b2adfdb..4007f7a08829 100644 --- a/packages/rule-tester/CHANGELOG.md +++ b/packages/rule-tester/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/rule-tester + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **Note:** Version bump only for package @typescript-eslint/rule-tester diff --git a/packages/rule-tester/package.json b/packages/rule-tester/package.json index 88b72ecd80e4..7667b45747cc 100644 --- a/packages/rule-tester/package.json +++ b/packages/rule-tester/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/rule-tester", - "version": "6.13.1", + "version": "6.13.2", "description": "Tooling to test ESLint rules", "files": [ "dist", @@ -39,7 +39,7 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "pretest-eslint-base": "tsc -b tsconfig.build.json", "test-eslint-base": "mocha --require source-map-support/register ./tests/eslint-base/eslint-base.test.js", "test": "jest --coverage", @@ -47,8 +47,8 @@ }, "//": "NOTE - AJV is out-of-date, but it's intentionally synced with ESLint - https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/package.json#L70", "dependencies": { - "@typescript-eslint/typescript-estree": "6.13.1", - "@typescript-eslint/utils": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.2", + "@typescript-eslint/utils": "6.13.2", "ajv": "^6.10.0", "lodash.merge": "4.6.2", "semver": "^7.5.4" @@ -59,7 +59,7 @@ }, "devDependencies": { "@types/lodash.merge": "4.6.9", - "@typescript-eslint/parser": "6.13.1", + "@typescript-eslint/parser": "6.13.2", "chai": "^4.3.7", "mocha": "^10.0.0", "sinon": "^16.0.0", diff --git a/packages/rule-tester/src/RuleTester.ts b/packages/rule-tester/src/RuleTester.ts index 181372318120..ad28d93a1478 100644 --- a/packages/rule-tester/src/RuleTester.ts +++ b/packages/rule-tester/src/RuleTester.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unnecessary-condition */ // Forked from https://github.com/eslint/eslint/blob/ad9dd6a933fd098a0d99c6a9aa059850535c23ee/lib/rule-tester/rule-tester.js import assert from 'node:assert'; diff --git a/packages/scope-manager/CHANGELOG.md b/packages/scope-manager/CHANGELOG.md index b4d559ea5053..0f177b831583 100644 --- a/packages/scope-manager/CHANGELOG.md +++ b/packages/scope-manager/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/scope-manager + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **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 4df4583a9d37..aeda1419f32a 100644 --- a/packages/scope-manager/package.json +++ b/packages/scope-manager/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/scope-manager", - "version": "6.13.1", + "version": "6.13.2", "description": "TypeScript scope analyser for ESLint", "files": [ "dist", @@ -34,23 +34,23 @@ "estree" ], "scripts": { - "build": "nx build", - "clean": "nx clean", - "clean-fixtures": "nx clean-fixtures", + "build": "npx nx build", + "clean": "npx nx clean", + "clean-fixtures": "npx nx clean-fixtures", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "generate-lib": "nx generate-lib", - "lint": "nx lint", - "test": "nx test --code-coverage", - "typecheck": "nx typecheck" + "generate-lib": "npx nx generate-lib", + "lint": "npx nx lint", + "test": "npx nx test --code-coverage", + "typecheck": "npx nx typecheck" }, "dependencies": { - "@typescript-eslint/types": "6.13.1", - "@typescript-eslint/visitor-keys": "6.13.1" + "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/visitor-keys": "6.13.2" }, "devDependencies": { "@prettier/sync": "*", "@types/glob": "*", - "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.2", "glob": "*", "jest-specific-snapshot": "*", "make-dir": "*", diff --git a/packages/scope-manager/src/referencer/Referencer.ts b/packages/scope-manager/src/referencer/Referencer.ts index 38e4a0d2adac..f5d36f2fa0ba 100644 --- a/packages/scope-manager/src/referencer/Referencer.ts +++ b/packages/scope-manager/src/referencer/Referencer.ts @@ -88,6 +88,7 @@ class Referencer extends Visitor { private populateGlobalsFromLib(globalScope: GlobalScope): void { for (const lib of this.#lib) { const variables = TSLibraries[lib]; + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition /* istanbul ignore if */ if (!variables) { throw new Error(`Invalid value for lib provided: ${lib}`); } diff --git a/packages/scope-manager/src/referencer/TypeVisitor.ts b/packages/scope-manager/src/referencer/TypeVisitor.ts index 2bb922be4023..786b1059b5a1 100644 --- a/packages/scope-manager/src/referencer/TypeVisitor.ts +++ b/packages/scope-manager/src/referencer/TypeVisitor.ts @@ -53,6 +53,7 @@ class TypeVisitor extends Visitor { }); // there are a few special cases where the type annotation is owned by the parameter, not the pattern + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (!didVisitAnnotation && 'typeAnnotation' in param) { this.visit(param.typeAnnotation); } diff --git a/packages/type-utils/CHANGELOG.md b/packages/type-utils/CHANGELOG.md index 86b2f5d5f981..9920a3986800 100644 --- a/packages/type-utils/CHANGELOG.md +++ b/packages/type-utils/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/type-utils + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **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 cf40c2d87913..c2599f50edf0 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/type-utils", - "version": "6.13.1", + "version": "6.13.2", "description": "Type utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -40,18 +40,18 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/typescript-estree": "6.13.1", - "@typescript-eslint/utils": "6.13.1", + "@typescript-eslint/typescript-estree": "6.13.2", + "@typescript-eslint/utils": "6.13.2", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, "devDependencies": { - "@typescript-eslint/parser": "6.13.1", + "@typescript-eslint/parser": "6.13.2", "ajv": "^6.10.0", "downlevel-dts": "*", "jest": "29.7.0", diff --git a/packages/type-utils/src/getTypeArguments.ts b/packages/type-utils/src/getTypeArguments.ts index 06b85cead688..4189cd20eec2 100644 --- a/packages/type-utils/src/getTypeArguments.ts +++ b/packages/type-utils/src/getTypeArguments.ts @@ -8,6 +8,7 @@ export function getTypeArguments( checker: ts.TypeChecker, ): readonly ts.Type[] { // getTypeArguments was only added in TS3.7 + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (checker.getTypeArguments) { return checker.getTypeArguments(type); } diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 31bd17ae3404..d4ec0d74c791 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/types + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) diff --git a/packages/types/package.json b/packages/types/package.json index 326d04f3bfb1..647e4cb1b309 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/types", - "version": "6.13.1", + "version": "6.13.2", "description": "Types for the TypeScript-ESTree AST spec", "files": [ "dist", @@ -41,8 +41,8 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf src/generated && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "generate-lib": "nx run scope-manager:generate-lib", - "lint": "nx lint", + "generate-lib": "npx nx run scope-manager:generate-lib", + "lint": "npx nx lint", "typecheck": "tsc -p tsconfig.json --noEmit" }, "nx": { diff --git a/packages/typescript-estree/CHANGELOG.md b/packages/typescript-estree/CHANGELOG.md index 8903add9e001..d1c2e2f28bd5 100644 --- a/packages/typescript-estree/CHANGELOG.md +++ b/packages/typescript-estree/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/typescript-estree + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index 743c4b2ba4b8..2415d15a39b3 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/typescript-estree", - "version": "6.13.1", + "version": "6.13.2", "description": "A parser that converts TypeScript source code into an ESTree compatible form", "files": [ "dist", @@ -47,13 +47,13 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest --coverage --runInBand --verbose", "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.13.1", - "@typescript-eslint/visitor-keys": "6.13.1", + "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/visitor-keys": "6.13.2", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 4be5c8783b6d..5dcde889e8dd 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unnecessary-condition */ // There's lots of funny stuff due to the typing of ts.Node /* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-member-access */ import * as ts from 'typescript'; diff --git a/packages/typescript-estree/src/create-program/shared.ts b/packages/typescript-estree/src/create-program/shared.ts index 8966093372ed..84784797051a 100644 --- a/packages/typescript-estree/src/create-program/shared.ts +++ b/packages/typescript-estree/src/create-program/shared.ts @@ -55,6 +55,7 @@ type CanonicalPath = string & { __brand: unknown }; // typescript doesn't provide a ts.sys implementation for browser environments const useCaseSensitiveFileNames = + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition ts.sys !== undefined ? ts.sys.useCaseSensitiveFileNames : true; const correctPathCasing = useCaseSensitiveFileNames ? (filePath: string): string => filePath @@ -118,6 +119,7 @@ function getAstFromProgram( */ function createHash(content: string): string { // No ts.sys in browser environments. + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (ts.sys?.createHash) { return ts.sys.createHash(content); } diff --git a/packages/typescript-estree/src/create-program/useProvidedPrograms.ts b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts index c2b67e795750..6c6e770bd20c 100644 --- a/packages/typescript-estree/src/create-program/useProvidedPrograms.ts +++ b/packages/typescript-estree/src/create-program/useProvidedPrograms.ts @@ -56,6 +56,7 @@ function createProgramFromConfigFile( configFile: string, projectDirectory?: string, ): ts.Program { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (ts.sys === undefined) { throw new Error( '`createProgramFromConfigFile` is only supported in a Node-like environment.', diff --git a/packages/typescript-estree/src/node-utils.ts b/packages/typescript-estree/src/node-utils.ts index 219f850aa03d..a131e8043e34 100644 --- a/packages/typescript-estree/src/node-utils.ts +++ b/packages/typescript-estree/src/node-utils.ts @@ -430,7 +430,7 @@ export function findFirstMatchingAncestor( if (predicate(current)) { return current; } - current = current.parent; + current = current.parent as ts.Node | undefined; } return undefined; } diff --git a/packages/typescript-estree/src/parseSettings/createParseSettings.ts b/packages/typescript-estree/src/parseSettings/createParseSettings.ts index 50c39898f491..6b3429571014 100644 --- a/packages/typescript-estree/src/parseSettings/createParseSettings.ts +++ b/packages/typescript-estree/src/parseSettings/createParseSettings.ts @@ -25,12 +25,15 @@ let TSSERVER_PROJECT_SERVICE: TypeScriptProjectService | null = null; // NOTE - we intentionally use "unnecessary" `?.` here because in TS<5.3 this enum doesn't exist // This object exists so we can centralize these for tracking and so we don't proliferate these across the file +// https://github.com/microsoft/TypeScript/issues/56579 +/* eslint-disable @typescript-eslint/no-unnecessary-condition */ const JSDocParsingMode = { ParseAll: ts.JSDocParsingMode?.ParseAll, ParseNone: ts.JSDocParsingMode?.ParseNone, ParseForTypeErrors: ts.JSDocParsingMode?.ParseForTypeErrors, ParseForTypeInfo: ts.JSDocParsingMode?.ParseForTypeInfo, } as const; +/* eslint-enable @typescript-eslint/no-unnecessary-condition */ export function createParseSettings( code: ts.SourceFile | string, diff --git a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts index f860ae6f1004..422499683435 100644 --- a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts +++ b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts @@ -33,6 +33,8 @@ export function warnAboutTSVersion( if ( passedLoggerFn || + // See https://github.com/typescript-eslint/typescript-eslint/issues/7896 + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition (typeof process === 'undefined' ? false : process.stdout?.isTTY) ) { const border = '============='; diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md index 49d86902638c..96adb483074a 100644 --- a/packages/utils/CHANGELOG.md +++ b/packages/utils/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/utils + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **Note:** Version bump only for package @typescript-eslint/utils diff --git a/packages/utils/package.json b/packages/utils/package.json index 497b7b514980..9e85b50377ae 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/utils", - "version": "6.13.1", + "version": "6.13.2", "description": "Utilities for working with TypeScript + ESLint together", "files": [ "dist", @@ -60,7 +60,7 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, @@ -68,16 +68,16 @@ "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "6.13.1", - "@typescript-eslint/types": "6.13.1", - "@typescript-eslint/typescript-estree": "6.13.1", + "@typescript-eslint/scope-manager": "6.13.2", + "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/typescript-estree": "6.13.2", "semver": "^7.5.4" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0" }, "devDependencies": { - "@typescript-eslint/parser": "6.13.1", + "@typescript-eslint/parser": "6.13.2", "downlevel-dts": "*", "jest": "29.7.0", "prettier": "^3.0.3", diff --git a/packages/utils/src/eslint-utils/context.ts b/packages/utils/src/eslint-utils/context.ts index 93e8283a7b61..28ddb3cc154e 100644 --- a/packages/utils/src/eslint-utils/context.ts +++ b/packages/utils/src/eslint-utils/context.ts @@ -1,6 +1,6 @@ // Wrappers around ESLint's deprecation of existing methods // We'll be able to drop them once we no longer support ESLint <8.40.0. -/* eslint-disable deprecation/deprecation */ +/* eslint-disable @typescript-eslint/no-unnecessary-condition, deprecation/deprecation */ import type { Scope, SourceCode } from '../ts-eslint'; import type { RuleContext } from '../ts-eslint/Rule'; import type { TSESTree } from '../ts-estree'; diff --git a/packages/utils/src/eslint-utils/getParserServices.ts b/packages/utils/src/eslint-utils/getParserServices.ts index 6d36e26b4db9..485860036c63 100644 --- a/packages/utils/src/eslint-utils/getParserServices.ts +++ b/packages/utils/src/eslint-utils/getParserServices.ts @@ -69,7 +69,7 @@ function getParserServices( if ( // eslint-disable-next-line deprecation/deprecation -- TODO - support for ESLint v9 with backwards-compatible support for ESLint v8 context.parserServices?.esTreeNodeToTSNodeMap == null || - // eslint-disable-next-line deprecation/deprecation -- TODO - support for ESLint v9 with backwards-compatible support for ESLint v8 + // eslint-disable-next-line deprecation/deprecation, @typescript-eslint/no-unnecessary-condition -- TODO - support for ESLint v9 with backwards-compatible support for ESLint v8 context.parserServices.tsNodeToESTreeNodeMap == null ) { throw new Error(ERROR_MESSAGE); diff --git a/packages/visitor-keys/CHANGELOG.md b/packages/visitor-keys/CHANGELOG.md index e0d38fd4599c..a2385637b247 100644 --- a/packages/visitor-keys/CHANGELOG.md +++ b/packages/visitor-keys/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/visitor-keys + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) **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 c26a01434e5a..70ec6bf19226 100644 --- a/packages/visitor-keys/package.json +++ b/packages/visitor-keys/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/visitor-keys", - "version": "6.13.1", + "version": "6.13.2", "description": "Visitor keys used to help traverse the TypeScript-ESTree AST", "files": [ "dist", @@ -40,12 +40,12 @@ "clean": "tsc -b tsconfig.build.json --clean", "postclean": "rimraf dist && rimraf _ts3.4 && rimraf _ts4.3 && rimraf coverage", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "test": "jest --coverage", "typecheck": "tsc -p tsconfig.json --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/types": "6.13.2", "eslint-visitor-keys": "^3.4.1" }, "devDependencies": { diff --git a/packages/website-eslint/CHANGELOG.md b/packages/website-eslint/CHANGELOG.md index c3b22f99a0cd..cff1477f20d7 100644 --- a/packages/website-eslint/CHANGELOG.md +++ b/packages/website-eslint/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package @typescript-eslint/website-eslint + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) diff --git a/packages/website-eslint/package.json b/packages/website-eslint/package.json index a831aa6ddc16..92a88a927fb2 100644 --- a/packages/website-eslint/package.json +++ b/packages/website-eslint/package.json @@ -1,6 +1,6 @@ { "name": "@typescript-eslint/website-eslint", - "version": "6.13.1", + "version": "6.13.2", "private": true, "description": "ESLint which works in browsers.", "files": [ @@ -19,20 +19,20 @@ "scripts": { "build": "yarn tsx ./build.ts", "format": "prettier --write \"./**/*.{ts,mts,cts,tsx,js,mjs,cjs,jsx,json,md,css}\" --ignore-path ../../.prettierignore", - "lint": "nx lint", + "lint": "npx nx lint", "typecheck": "tsc --noEmit" }, "dependencies": { - "@typescript-eslint/types": "6.13.1", - "@typescript-eslint/utils": "6.13.1" + "@typescript-eslint/types": "6.13.2", + "@typescript-eslint/utils": "6.13.2" }, "devDependencies": { "@eslint/js": "8.53.0", - "@typescript-eslint/eslint-plugin": "6.13.1", - "@typescript-eslint/parser": "6.13.1", - "@typescript-eslint/scope-manager": "6.13.1", - "@typescript-eslint/typescript-estree": "6.13.1", - "@typescript-eslint/visitor-keys": "6.13.1", + "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/parser": "6.13.2", + "@typescript-eslint/scope-manager": "6.13.2", + "@typescript-eslint/typescript-estree": "6.13.2", + "@typescript-eslint/visitor-keys": "6.13.2", "esbuild": "~0.19.0", "eslint": "*", "esquery": "*", diff --git a/packages/website/CHANGELOG.md b/packages/website/CHANGELOG.md index 5043de5df09e..da0ec6edf68c 100644 --- a/packages/website/CHANGELOG.md +++ b/packages/website/CHANGELOG.md @@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [6.13.2](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.1...v6.13.2) (2023-12-04) + +**Note:** Version bump only for package website + +You can read about our [versioning strategy](https://main--typescript-eslint.netlify.app/users/versioning) and [releases](https://main--typescript-eslint.netlify.app/users/releases) on our website. + + + + + ## [6.13.1](https://github.com/typescript-eslint/typescript-eslint/compare/v6.13.0...v6.13.1) (2023-11-28) diff --git a/packages/website/package.json b/packages/website/package.json index 92e9843191d0..f9fa10f306ef 100644 --- a/packages/website/package.json +++ b/packages/website/package.json @@ -1,6 +1,6 @@ { "name": "website", - "version": "6.13.1", + "version": "6.13.2", "private": true, "scripts": { "build": "docusaurus build", @@ -9,9 +9,9 @@ "generate-website-dts": "tsx ./tools/generate-website-dts.ts", "stylelint": "stylelint \"src/**/*.css\"", "stylelint:fix": "stylelint \"src/**/*.css\" --fix", - "lint": "nx lint", + "lint": "npx nx lint", "serve": "docusaurus serve", - "start": "nx start", + "start": "npx nx start", "swizzle": "docusaurus swizzle", "typecheck": "tsc -b ./tsconfig.json" }, @@ -24,8 +24,8 @@ "@docusaurus/theme-common": "~2.4.1", "@mdx-js/react": "1.6.22", "@prettier/sync": "*", - "@typescript-eslint/parser": "6.13.1", - "@typescript-eslint/website-eslint": "6.13.1", + "@typescript-eslint/parser": "6.13.2", + "@typescript-eslint/website-eslint": "6.13.2", "clsx": "^2.0.0", "eslint": "*", "json-schema": "^0.4.0", @@ -50,9 +50,9 @@ "@types/react": "*", "@types/react-helmet": "^6.1.6", "@types/react-router-dom": "^5.3.3", - "@typescript-eslint/eslint-plugin": "6.13.1", - "@typescript-eslint/rule-schema-to-typescript-types": "6.13.1", - "@typescript-eslint/types": "6.13.1", + "@typescript-eslint/eslint-plugin": "6.13.2", + "@typescript-eslint/rule-schema-to-typescript-types": "6.13.2", + "@typescript-eslint/types": "6.13.2", "copy-webpack-plugin": "^11.0.0", "cross-fetch": "*", "globby": "^11.1.0", diff --git a/packages/website/plugins/generated-rule-docs.ts b/packages/website/plugins/generated-rule-docs.ts index 7823f2d84486..816df1635a4f 100644 --- a/packages/website/plugins/generated-rule-docs.ts +++ b/packages/website/plugins/generated-rule-docs.ts @@ -52,9 +52,8 @@ export const generatedRuleDocs: Plugin = () => { return; } - const rule = pluginRules[file.stem]; - const meta = rule?.meta; - if (!meta?.docs) { + const rule = file.stem in pluginRules ? pluginRules[file.stem] : undefined; + if (!rule?.meta.docs) { return; } @@ -72,7 +71,7 @@ export const generatedRuleDocs: Plugin = () => { { children: [ { - children: meta.docs.description + children: rule.meta.docs.description .split(/`(.+?)`/) .map((value, index, array) => ({ type: index % 2 === 0 ? 'text' : 'inlineCode', @@ -90,7 +89,7 @@ export const generatedRuleDocs: Plugin = () => { ); // 3. Add a notice about formatting rules being 🀒 - if (meta.type === 'layout') { + if (rule.meta.type === 'layout') { const warningNode = { value: ` @@ -150,7 +149,7 @@ export const generatedRuleDocs: Plugin = () => { } insertIfMissing('Options'); - if (meta.docs.extendsBaseRule) { + if (rule.meta.docs.extendsBaseRule) { insertIfMissing('How to Use'); } return [headingIndices[0], headingIndices[1]]; @@ -158,10 +157,10 @@ export const generatedRuleDocs: Plugin = () => { let eslintrc: string; - if (meta.docs.extendsBaseRule) { + if (rule.meta.docs.extendsBaseRule) { const extendsBaseRuleName = - typeof meta.docs.extendsBaseRule === 'string' - ? meta.docs.extendsBaseRule + typeof rule.meta.docs.extendsBaseRule === 'string' + ? rule.meta.docs.extendsBaseRule : file.stem; children.splice(optionsH2Index + 1, 0, { @@ -257,9 +256,9 @@ export const generatedRuleDocs: Plugin = () => { optionsH2Index += 2; - const hasNoConfig = Array.isArray(meta.schema) - ? meta.schema.length === 0 - : Object.keys(meta.schema).length === 0; + const hasNoConfig = Array.isArray(rule.meta.schema) + ? rule.meta.schema.length === 0 + : Object.keys(rule.meta.schema).length === 0; if (hasNoConfig) { children.splice(optionsH2Index + 1, 0, { children: [ @@ -390,7 +389,7 @@ export const generatedRuleDocs: Plugin = () => { ); // 6. Also add a notice about coming from ESLint core for extension rules - if (meta.docs.extendsBaseRule) { + if (rule.meta.docs.extendsBaseRule) { children.push({ children: [ { @@ -405,9 +404,9 @@ export const generatedRuleDocs: Plugin = () => { type: 'link', title: null, url: `https://github.com/eslint/eslint/blob/main/docs/src/rules/${ - meta.docs.extendsBaseRule === true + rule.meta.docs.extendsBaseRule === true ? file.stem - : meta.docs.extendsBaseRule + : rule.meta.docs.extendsBaseRule }.md`, children: [ { diff --git a/packages/website/src/components/ErrorsViewer.tsx b/packages/website/src/components/ErrorsViewer.tsx index 1ea30d5f623f..9e1a57d7cb0d 100644 --- a/packages/website/src/components/ErrorsViewer.tsx +++ b/packages/website/src/components/ErrorsViewer.tsx @@ -115,7 +115,7 @@ export function ErrorViewer({

{title}

-            {type === 'danger' ? value?.stack : value.message}
+            {type === 'danger' ? value.stack : value.message}
           
diff --git a/packages/website/src/components/OptionsSelector.tsx b/packages/website/src/components/OptionsSelector.tsx index 00870a850c35..b881319e58ab 100644 --- a/packages/website/src/components/OptionsSelector.tsx +++ b/packages/website/src/components/OptionsSelector.tsx @@ -57,7 +57,7 @@ function OptionsSelectorContent({ value={state.ts} disabled={!tsVersions.length} onChange={(ts): void => setState({ ts })} - options={(tsVersions.length && tsVersions) || [state.ts]} + options={tsVersions.length ? tsVersions : [state.ts]} /> {process.env.ESLINT_VERSION} diff --git a/packages/website/src/components/Playground.tsx b/packages/website/src/components/Playground.tsx index 1f89c699ec68..135684d143c2 100644 --- a/packages/website/src/components/Playground.tsx +++ b/packages/website/src/components/Playground.tsx @@ -1,3 +1,5 @@ +// See https://github.com/typescript-eslint/typescript-eslint/issues/7630. +/* eslint-disable @typescript-eslint/no-unnecessary-condition */ import { useWindowSize } from '@docusaurus/theme-common'; import clsx from 'clsx'; import type * as ESQuery from 'esquery'; diff --git a/packages/website/src/components/RulesTable/index.tsx b/packages/website/src/components/RulesTable/index.tsx index b153eebfe779..ea0dd98cf5cc 100644 --- a/packages/website/src/components/RulesTable/index.tsx +++ b/packages/website/src/components/RulesTable/index.tsx @@ -231,7 +231,7 @@ export default function RulesTable(): React.JSX.Element { setMode={(newMode): void => changeFilter('typeInformation', newMode) } - label={`${TYPE_INFORMATION_EMOJI} requires type information`} + label={`${TYPE_INFORMATION_EMOJI} type checked`} /> (value: T, filter?: ESQuery.Selector): T | T[] { try { + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (window.esquery && filter) { // @ts-expect-error - esquery requires js ast types return window.esquery.match(value, filter); diff --git a/packages/website/src/components/ast/DataRenderer.tsx b/packages/website/src/components/ast/DataRenderer.tsx index 8562b1f4ae38..75a8e010dcc0 100644 --- a/packages/website/src/components/ast/DataRenderer.tsx +++ b/packages/website/src/components/ast/DataRenderer.tsx @@ -115,7 +115,7 @@ function RenderExpandableObject({
{data.map((dataElement, index) => ( , ): { key: string[]; - value: object; + value: unknown; } | null { const children = Object.entries(iter); for (const [name, child] of children) { @@ -73,7 +73,7 @@ export function findSelectionPath( ): { path: string[]; node: object | null } { const nodePath = ['ast']; const visited = new Set(); - let currentNode: object | null = node; + let currentNode: unknown = node; while (currentNode) { // infinite loop guard if (visited.has(currentNode)) { diff --git a/packages/website/src/components/ast/tsUtils.ts b/packages/website/src/components/ast/tsUtils.ts index 6d4232a58c78..233a606ed3ca 100644 --- a/packages/website/src/components/ast/tsUtils.ts +++ b/packages/website/src/components/ast/tsUtils.ts @@ -65,7 +65,7 @@ export function tsEnumToString( type: keyof TsParsedEnums, value: number, ): string | undefined { - return getTsEnum(type)?.[value]; + return getTsEnum(type)[value]; } /** @@ -75,12 +75,8 @@ export function tsEnumFlagToString( type: keyof TsParsedEnums, value: number, ): string | undefined { - const allFlags = getTsEnum(type); - if (allFlags) { - return Object.entries(allFlags) - .filter(([f]) => (Number(f) & value) !== 0) - .map(([, name]) => `${type}.${name}`) - .join('\n'); - } - return ''; + return Object.entries(getTsEnum(type)) + .filter(([f]) => (Number(f) & value) !== 0) + .map(([, name]) => `${type}.${name}`) + .join('\n'); } diff --git a/packages/website/src/components/config/ConfigEditor.tsx b/packages/website/src/components/config/ConfigEditor.tsx index f34b7662413e..a326a5be2077 100644 --- a/packages/website/src/components/config/ConfigEditor.tsx +++ b/packages/website/src/components/config/ConfigEditor.tsx @@ -62,7 +62,7 @@ function ConfigEditorField({ {item.label &&
} {item.label && {item.label}} - {(item.type === 'boolean' && ( + {item.type === 'boolean' ? ( - )) || - (item.type === 'string' && item.enum && ( + ) : ( + item.enum && ( onChange(item.key, value)} /> - ))} + ) + )} ); } diff --git a/packages/website/src/components/config/ConfigTypeScript.tsx b/packages/website/src/components/config/ConfigTypeScript.tsx index b367af6fafb7..fb41fafc1976 100644 --- a/packages/website/src/components/config/ConfigTypeScript.tsx +++ b/packages/website/src/components/config/ConfigTypeScript.tsx @@ -35,6 +35,7 @@ function ConfigTypeScript(props: ConfigTypeScriptProps): React.JSX.Element { getTypescriptOptions().reduce>( (group, item) => { const category = item.category!.message; + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition group[category] ??= { heading: category, fields: [], diff --git a/packages/website/src/components/editor/LoadedEditor.tsx b/packages/website/src/components/editor/LoadedEditor.tsx index 58ff7d3cd305..f5bc9d244bf1 100644 --- a/packages/website/src/components/editor/LoadedEditor.tsx +++ b/packages/website/src/components/editor/LoadedEditor.tsx @@ -267,7 +267,7 @@ export const LoadedEditor: React.FC = ({ return debounce(() => editor.layout(), 1); }, [editor]); - const container = editor.getContainerDomNode?.() ?? editor.getDomNode(); + const container = editor.getContainerDomNode(); useResizeObserver(container, () => { resize(); diff --git a/packages/website/src/components/lib/jsonSchema.ts b/packages/website/src/components/lib/jsonSchema.ts index 6ea3d4bbc2a5..e5c5801583dd 100644 --- a/packages/website/src/components/lib/jsonSchema.ts +++ b/packages/website/src/components/lib/jsonSchema.ts @@ -50,7 +50,7 @@ export function getRuleJsonSchemaWithErrorLevel( }; } // example: naming-convention rule - if (typeof ruleSchema.items === 'object' && ruleSchema.items) { + if (typeof ruleSchema.items === 'object') { return { ...ruleSchema, type: 'array', diff --git a/packages/website/src/components/lib/markdown.ts b/packages/website/src/components/lib/markdown.ts index 682378c5a5a6..7e9faaccc02b 100644 --- a/packages/website/src/components/lib/markdown.ts +++ b/packages/website/src/components/lib/markdown.ts @@ -66,8 +66,8 @@ export function createMarkdownParams(state: ConfigModel): string { title: `Bug: [${onlyRuleName}] `, 'playground-link': document.location.toString(), 'repro-code': state.code, - 'eslint-config': `module.exports = ${state.eslintrc ?? '{}'}`, - 'typescript-config': state.tsconfig ?? '{}', + 'eslint-config': `module.exports = ${state.eslintrc}`, + 'typescript-config': state.tsconfig, versions: generateVersionsTable(state.ts), }; diff --git a/packages/website/src/components/linter/config.ts b/packages/website/src/components/linter/config.ts index 4ae0a5987b6f..8262487369c1 100644 --- a/packages/website/src/components/linter/config.ts +++ b/packages/website/src/components/linter/config.ts @@ -17,6 +17,8 @@ export const defaultParseSettings: ParseSettings = { EXPERIMENTAL_useSourceOfProjectReferenceRedirect: false, extraFileExtensions: [], filePath: '', + // JSDocParsingMode was added in TS 5.3. + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition jsDocParsingMode: window.ts?.JSDocParsingMode?.ParseAll, jsx: true, loc: true, diff --git a/packages/website/src/components/linter/createLinter.ts b/packages/website/src/components/linter/createLinter.ts index 7f3f8541e787..3e015053d136 100644 --- a/packages/website/src/components/linter/createLinter.ts +++ b/packages/website/src/components/linter/createLinter.ts @@ -76,29 +76,27 @@ export function createLinter( const triggerLint = (filename: string): void => { console.info('[Editor] linting triggered for file', filename); const code = system.readFile(filename) ?? '\n'; - if (code != null) { - try { - const messages = linter.verify(code, eslintConfig, filename); - onLint.trigger(filename, messages); - } catch (e) { - const lintMessage: Linter.LintMessage = { - source: 'eslint', - ruleId: '', - severity: 2, - nodeType: '', - column: 1, - line: 1, - message: String(e instanceof Error ? e.stack : e), - }; - if (typeof e === 'object' && e && 'currentNode' in e) { - const node = e.currentNode as TSESTree.Node; - lintMessage.column = node.loc.start.column + 1; - lintMessage.line = node.loc.start.line; - lintMessage.endColumn = node.loc.end.column + 1; - lintMessage.endLine = node.loc.end.line; - } - onLint.trigger(filename, [lintMessage]); + try { + const messages = linter.verify(code, eslintConfig, filename); + onLint.trigger(filename, messages); + } catch (e) { + const lintMessage: Linter.LintMessage = { + source: 'eslint', + ruleId: '', + severity: 2, + nodeType: '', + column: 1, + line: 1, + message: String(e instanceof Error ? e.stack : e), + }; + if (typeof e === 'object' && e && 'currentNode' in e) { + const node = e.currentNode as TSESTree.Node; + lintMessage.column = node.loc.start.column + 1; + lintMessage.line = node.loc.start.line; + lintMessage.endColumn = node.loc.end.column + 1; + lintMessage.endLine = node.loc.end.line; } + onLint.trigger(filename, [lintMessage]); } }; diff --git a/packages/website/src/components/linter/utils.ts b/packages/website/src/components/linter/utils.ts index 6546aa697a74..4d01c8708dd5 100644 --- a/packages/website/src/components/linter/utils.ts +++ b/packages/website/src/components/linter/utils.ts @@ -92,6 +92,7 @@ export function parseMarkers( ? 'TypeScript' : marker.owner; + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition if (!result[group]) { result[group] = { group: group, diff --git a/packages/website/src/components/typeDetails/TypeInfo.tsx b/packages/website/src/components/typeDetails/TypeInfo.tsx index 87084650d124..aabac949da07 100644 --- a/packages/website/src/components/typeDetails/TypeInfo.tsx +++ b/packages/website/src/components/typeDetails/TypeInfo.tsx @@ -67,7 +67,7 @@ export function TypeInfo({ onHoverNode, }: TypeInfoProps): React.JSX.Element { const computed = useMemo(() => { - if (!typeChecker || !value) { + if (!typeChecker) { return undefined; } const info: InfoModel = {}; diff --git a/packages/website/src/components/typeDetails/TypesDetails.tsx b/packages/website/src/components/typeDetails/TypesDetails.tsx index 9155918e5b50..fb5147413f68 100644 --- a/packages/website/src/components/typeDetails/TypesDetails.tsx +++ b/packages/website/src/components/typeDetails/TypesDetails.tsx @@ -51,17 +51,15 @@ export function TypesDetails({
- {selectedNode && ( - -
- -
-
- )} + +
+ +
+
); } diff --git a/packages/website/src/theme/CodeBlock/Content/String.tsx b/packages/website/src/theme/CodeBlock/Content/String.tsx index e6db6b72a311..6895cab853e2 100644 --- a/packages/website/src/theme/CodeBlock/Content/String.tsx +++ b/packages/website/src/theme/CodeBlock/Content/String.tsx @@ -52,7 +52,12 @@ export default function CodeBlockString({ const copiedCode = code .split('\n') - .filter((c, i) => !lineClassNames[i]?.includes('code-block-removed-line')) + .filter( + (c, i) => + !(lineClassNames[i] as string[] | undefined)?.includes( + 'code-block-removed-line', + ), + ) .join('\n'); const eslintrcHash = parseEslintrc(metastring); diff --git a/yarn.lock b/yarn.lock index 8a92f0ae534c..e74659c009be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -234,13 +234,13 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:*, @babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.22.5, @babel/code-frame@npm:^7.8.3": - version: 7.22.13 - resolution: "@babel/code-frame@npm:7.22.13" +"@babel/code-frame@npm:*, @babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.10.4, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.16.0, @babel/code-frame@npm:^7.22.13, @babel/code-frame@npm:^7.8.3": + version: 7.23.4 + resolution: "@babel/code-frame@npm:7.23.4" dependencies: - "@babel/highlight": ^7.22.13 + "@babel/highlight": ^7.23.4 chalk: ^2.4.2 - checksum: 22e342c8077c8b77eeb11f554ecca2ba14153f707b85294fcf6070b6f6150aae88a7b7436dd88d8c9289970585f3fe5b9b941c5aa3aa26a6d5a8ef3f292da058 + checksum: 29999d08c3dbd803f3c296dae7f4f40af1f9e381d6bbc76e5a75327c4b8b023bcb2e209843d292f5d71c3b5c845df1da959d415ed862d6a68e0ad6c5c9622d37 languageName: node linkType: hard @@ -251,26 +251,26 @@ __metadata: languageName: node linkType: hard -"@babel/core@npm:*, @babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.15.5, @babel/core@npm:^7.18.6, @babel/core@npm:^7.22.8, @babel/core@npm:^7.22.9": - version: 7.22.20 - resolution: "@babel/core@npm:7.22.20" +"@babel/core@npm:*, @babel/core@npm:^7.11.1, @babel/core@npm:^7.11.6, @babel/core@npm:^7.12.3, @babel/core@npm:^7.15.5, @babel/core@npm:^7.18.6, @babel/core@npm:^7.22.9, @babel/core@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/core@npm:7.23.3" dependencies: "@ampproject/remapping": ^2.2.0 "@babel/code-frame": ^7.22.13 - "@babel/generator": ^7.22.15 + "@babel/generator": ^7.23.3 "@babel/helper-compilation-targets": ^7.22.15 - "@babel/helper-module-transforms": ^7.22.20 - "@babel/helpers": ^7.22.15 - "@babel/parser": ^7.22.16 + "@babel/helper-module-transforms": ^7.23.3 + "@babel/helpers": ^7.23.2 + "@babel/parser": ^7.23.3 "@babel/template": ^7.22.15 - "@babel/traverse": ^7.22.20 - "@babel/types": ^7.22.19 - convert-source-map: ^1.7.0 + "@babel/traverse": ^7.23.3 + "@babel/types": ^7.23.3 + convert-source-map: ^2.0.0 debug: ^4.1.0 gensync: ^1.0.0-beta.2 json5: ^2.2.3 semver: ^6.3.1 - checksum: 73663a079194b5dc406b2e2e5e50db81977d443e4faf7ef2c27e5836cd9a359e81e551115193dc9b1a93471275351a972e54904f4d3aa6cb156f51e26abf6765 + checksum: d306c1fa68972f4e085e9e7ad165aee80eb801ef331f6f07808c86309f03534d638b82ad00a3bc08f4d3de4860ccd38512b2790a39e6acc2caf9ea21e526afe7 languageName: node linkType: hard @@ -298,9 +298,9 @@ __metadata: languageName: node linkType: hard -"@babel/eslint-parser@npm:*, @babel/eslint-parser@npm:^7.22.7": - version: 7.22.15 - resolution: "@babel/eslint-parser@npm:7.22.15" +"@babel/eslint-parser@npm:*, @babel/eslint-parser@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/eslint-parser@npm:7.23.3" dependencies: "@nicolo-ribaudo/eslint-scope-5-internals": 5.1.1-v1 eslint-visitor-keys: ^2.1.0 @@ -308,19 +308,19 @@ __metadata: peerDependencies: "@babel/core": ^7.11.0 eslint: ^7.5.0 || ^8.0.0 - checksum: efdc749164a40de1b68e3ed395f441dfb7864c85d0a2ee3e4bc4f06dd0b7f675acb9be97cdc9025b88b3e80d38749a2b30e392ce7f6a79313c3aaf82ba8ccd68 + checksum: 9573daebe21af5123c302c307be80cacf1c2bf236a9497068a14726d3944ef55e1282519d0ccf51882dfc369359a3442299c98cb22a419e209924db39d4030fd languageName: node linkType: hard -"@babel/generator@npm:^7.12.5, @babel/generator@npm:^7.18.7, @babel/generator@npm:^7.22.15, @babel/generator@npm:^7.7.2": - version: 7.22.15 - resolution: "@babel/generator@npm:7.22.15" +"@babel/generator@npm:^7.12.5, @babel/generator@npm:^7.18.7, @babel/generator@npm:^7.23.3, @babel/generator@npm:^7.7.2": + version: 7.23.3 + resolution: "@babel/generator@npm:7.23.3" dependencies: - "@babel/types": ^7.22.15 + "@babel/types": ^7.23.3 "@jridgewell/gen-mapping": ^0.3.2 "@jridgewell/trace-mapping": ^0.3.17 jsesc: ^2.5.1 - checksum: 5b2a3ccdc3634f6ea86e0a442722bcd430238369432d31f15b428a4ee8013c2f4f917b5b135bf4fc1d0a3e2f87f10fd4ce5d07955ecc2d3b9400a05c2a481374 + checksum: b6e71cca852d4e1aa01a28a30b8c74ffc3b8d56ccb7ae3ee783028ee015f63ad861a2e386c3eb490a9a8634db485a503a33521680f4af510151e90346c46da17 languageName: node linkType: hard @@ -409,13 +409,13 @@ __metadata: languageName: node linkType: hard -"@babel/helper-function-name@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-function-name@npm:7.22.5" +"@babel/helper-function-name@npm:^7.22.5, @babel/helper-function-name@npm:^7.23.0": + version: 7.23.0 + resolution: "@babel/helper-function-name@npm:7.23.0" dependencies: - "@babel/template": ^7.22.5 - "@babel/types": ^7.22.5 - checksum: 6b1f6ce1b1f4e513bf2c8385a557ea0dd7fa37971b9002ad19268ca4384bbe90c09681fe4c076013f33deabc63a53b341ed91e792de741b4b35e01c00238177a + "@babel/template": ^7.22.15 + "@babel/types": ^7.23.0 + checksum: e44542257b2d4634a1f979244eb2a4ad8e6d75eb6761b4cfceb56b562f7db150d134bc538c8e6adca3783e3bc31be949071527aa8e3aab7867d1ad2d84a26e10 languageName: node linkType: hard @@ -446,9 +446,9 @@ __metadata: languageName: node linkType: hard -"@babel/helper-module-transforms@npm:^7.12.1, @babel/helper-module-transforms@npm:^7.22.20, @babel/helper-module-transforms@npm:^7.22.5": - version: 7.22.20 - resolution: "@babel/helper-module-transforms@npm:7.22.20" +"@babel/helper-module-transforms@npm:^7.12.1, @babel/helper-module-transforms@npm:^7.22.5, @babel/helper-module-transforms@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/helper-module-transforms@npm:7.23.3" dependencies: "@babel/helper-environment-visitor": ^7.22.20 "@babel/helper-module-imports": ^7.22.15 @@ -457,7 +457,7 @@ __metadata: "@babel/helper-validator-identifier": ^7.22.20 peerDependencies: "@babel/core": ^7.0.0 - checksum: 8fce25362df8711bd4620f41c5c18769edfeafe7f8f1dae9691966ef368e57f9da68dfa1707cd63c834c89dc4eaa82c26f12ea33e88fd262ac62844b11dcc389 + checksum: 5d0895cfba0e16ae16f3aa92fee108517023ad89a855289c4eb1d46f7aef4519adf8e6f971e1d55ac20c5461610e17213f1144097a8f932e768a9132e2278d71 languageName: node linkType: hard @@ -537,14 +537,14 @@ __metadata: languageName: node linkType: hard -"@babel/helper-string-parser@npm:^7.22.5": - version: 7.22.5 - resolution: "@babel/helper-string-parser@npm:7.22.5" - checksum: 836851ca5ec813077bbb303acc992d75a360267aa3b5de7134d220411c852a6f17de7c0d0b8c8dcc0f567f67874c00f4528672b2a4f1bc978a3ada64c8c78467 +"@babel/helper-string-parser@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/helper-string-parser@npm:7.23.4" + checksum: c0641144cf1a7e7dc93f3d5f16d5327465b6cf5d036b48be61ecba41e1eece161b48f46b7f960951b67f8c3533ce506b16dece576baef4d8b3b49f8c65410f90 languageName: node linkType: hard -"@babel/helper-validator-identifier@npm:^7.22.19, @babel/helper-validator-identifier@npm:^7.22.20, @babel/helper-validator-identifier@npm:^7.22.5": +"@babel/helper-validator-identifier@npm:^7.22.20, @babel/helper-validator-identifier@npm:^7.22.5": version: 7.22.20 resolution: "@babel/helper-validator-identifier@npm:7.22.20" checksum: 136412784d9428266bcdd4d91c32bcf9ff0e8d25534a9d94b044f77fe76bc50f941a90319b05aafd1ec04f7d127cd57a179a3716009ff7f3412ef835ada95bdc @@ -569,34 +569,34 @@ __metadata: languageName: node linkType: hard -"@babel/helpers@npm:^7.12.5, @babel/helpers@npm:^7.22.15": - version: 7.22.15 - resolution: "@babel/helpers@npm:7.22.15" +"@babel/helpers@npm:^7.12.5, @babel/helpers@npm:^7.23.2": + version: 7.23.2 + resolution: "@babel/helpers@npm:7.23.2" dependencies: "@babel/template": ^7.22.15 - "@babel/traverse": ^7.22.15 - "@babel/types": ^7.22.15 - checksum: 49f61a93cbae4df3328bda67af5db743fead659ae4242571226c3596b7df78546189cdf991fed1eca33b559de8abf396a90a001f474a1bab351418f07b7ae6ef + "@babel/traverse": ^7.23.2 + "@babel/types": ^7.23.0 + checksum: aaf4828df75ec460eaa70e5c9f66e6dadc28dae3728ddb7f6c13187dbf38030e142194b83d81aa8a31bbc35a5529a5d7d3f3cf59d5d0b595f5dd7f9d8f1ced8e languageName: node linkType: hard -"@babel/highlight@npm:^7.22.13": - version: 7.22.13 - resolution: "@babel/highlight@npm:7.22.13" +"@babel/highlight@npm:^7.23.4": + version: 7.23.4 + resolution: "@babel/highlight@npm:7.23.4" dependencies: - "@babel/helper-validator-identifier": ^7.22.5 + "@babel/helper-validator-identifier": ^7.22.20 chalk: ^2.4.2 js-tokens: ^4.0.0 - checksum: 7266d2bff8aa8fc78eb65b6e92a8211e12897a731126a282d2f9bb50d8fcaa4c1b02af2284f990ac7e3ab8d892d448a2cab8f5ed0ea8a90bce2c025b11ebe802 + checksum: 643acecdc235f87d925979a979b539a5d7d1f31ae7db8d89047269082694122d11aa85351304c9c978ceeb6d250591ccadb06c366f358ccee08bb9c122476b89 languageName: node linkType: hard -"@babel/parser@npm:*, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.7, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.8, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.22.16, @babel/parser@npm:^7.22.7": - version: 7.22.16 - resolution: "@babel/parser@npm:7.22.16" +"@babel/parser@npm:*, @babel/parser@npm:^7.1.0, @babel/parser@npm:^7.12.7, @babel/parser@npm:^7.14.7, @babel/parser@npm:^7.18.8, @babel/parser@npm:^7.20.7, @babel/parser@npm:^7.22.15, @babel/parser@npm:^7.23.3": + version: 7.23.4 + resolution: "@babel/parser@npm:7.23.4" bin: parser: ./bin/babel-parser.js - checksum: 944c756b5bdeb07b9fec16ecef6b3c61aff9d4c4b924abadcf01afa1840a740b8e2357ae00482b5b37daad6d2bfd848c947f27ad65138d687b6fdc924bc59edd + checksum: 1d90e17d966085b8ea12f357ffcc76568969364481254f0ae3e7ed579e9421d31c7fd3876ccb3b215a5b2ada48251b0c2d0f21ba225ee194f0e18295b49085f2 languageName: node linkType: hard @@ -1737,11 +1737,11 @@ __metadata: linkType: hard "@babel/runtime@npm:^7.1.2, @babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.10.3, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.12.1, @babel/runtime@npm:^7.12.13, @babel/runtime@npm:^7.12.5, @babel/runtime@npm:^7.18.6, @babel/runtime@npm:^7.22.6, @babel/runtime@npm:^7.23.2, @babel/runtime@npm:^7.7.2, @babel/runtime@npm:^7.8.4": - version: 7.23.2 - resolution: "@babel/runtime@npm:7.23.2" + version: 7.23.4 + resolution: "@babel/runtime@npm:7.23.4" dependencies: regenerator-runtime: ^0.14.0 - checksum: 6c4df4839ec75ca10175f636d6362f91df8a3137f86b38f6cd3a4c90668a0fe8e9281d320958f4fbd43b394988958585a17c3aab2a4ea6bf7316b22916a371fb + checksum: 8eb6a6b2367f7d60e7f7dd83f477cc2e2fdb169e5460694d7614ce5c730e83324bcf29251b70940068e757ad1ee56ff8073a372260d90cad55f18a825caf97cd languageName: node linkType: hard @@ -1756,32 +1756,32 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.12.9, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.8, @babel/traverse@npm:^7.22.15, @babel/traverse@npm:^7.22.20": - version: 7.22.20 - resolution: "@babel/traverse@npm:7.22.20" +"@babel/traverse@npm:^7.12.9, @babel/traverse@npm:^7.16.0, @babel/traverse@npm:^7.18.8, @babel/traverse@npm:^7.23.2, @babel/traverse@npm:^7.23.3": + version: 7.23.3 + resolution: "@babel/traverse@npm:7.23.3" dependencies: "@babel/code-frame": ^7.22.13 - "@babel/generator": ^7.22.15 + "@babel/generator": ^7.23.3 "@babel/helper-environment-visitor": ^7.22.20 - "@babel/helper-function-name": ^7.22.5 + "@babel/helper-function-name": ^7.23.0 "@babel/helper-hoist-variables": ^7.22.5 "@babel/helper-split-export-declaration": ^7.22.6 - "@babel/parser": ^7.22.16 - "@babel/types": ^7.22.19 + "@babel/parser": ^7.23.3 + "@babel/types": ^7.23.3 debug: ^4.1.0 globals: ^11.1.0 - checksum: 97da9afa7f8f505ce52c36ac2531129bc4a0e250880aaf9b467dc044f30a5bce2b756c1af4d961958bc225659546e811a7d536ab3d920fd60921087989b841b9 + checksum: f4e0c05f2f82368b9be7e1fed38cfcc2e1074967a8b76ac837b89661adbd391e99d0b1fd8c31215ffc3a04d2d5d7ee5e627914a09082db84ec5606769409fe2b languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.7, @babel/types@npm:^7.15.6, @babel/types@npm:^7.18.6, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.10, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.19, @babel/types@npm:^7.22.5, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": - version: 7.22.19 - resolution: "@babel/types@npm:7.22.19" +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.12.7, @babel/types@npm:^7.15.6, @babel/types@npm:^7.18.6, @babel/types@npm:^7.20.7, @babel/types@npm:^7.22.10, @babel/types@npm:^7.22.15, @babel/types@npm:^7.22.5, @babel/types@npm:^7.23.0, @babel/types@npm:^7.23.3, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": + version: 7.23.4 + resolution: "@babel/types@npm:7.23.4" dependencies: - "@babel/helper-string-parser": ^7.22.5 - "@babel/helper-validator-identifier": ^7.22.19 + "@babel/helper-string-parser": ^7.23.4 + "@babel/helper-validator-identifier": ^7.22.20 to-fast-properties: ^2.0.0 - checksum: 2d69740e69b55ba36ece0c17d5afb7b7213b34297157df39ef9ba24965aff677c56f014413052ecc5b2fbbf26910c63e5bb24a969df84d7a17153750cf75915e + checksum: 8a1ab20da663d202b1c090fdef4b157d3c7d8cb1cf60ea548f887d7b674935371409804d6cba52f870c22ced7685fcb41b0578d3edde720990de00cbb328da54 languageName: node linkType: hard @@ -5824,10 +5824,10 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-internal@workspace:packages/eslint-plugin-internal" dependencies: "@prettier/sync": "*" - "@typescript-eslint/rule-tester": 6.13.1 - "@typescript-eslint/scope-manager": 6.13.1 - "@typescript-eslint/type-utils": 6.13.1 - "@typescript-eslint/utils": 6.13.1 + "@typescript-eslint/rule-tester": 6.13.2 + "@typescript-eslint/scope-manager": 6.13.2 + "@typescript-eslint/type-utils": 6.13.2 + "@typescript-eslint/utils": 6.13.2 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5839,8 +5839,8 @@ __metadata: resolution: "@typescript-eslint/eslint-plugin-tslint@workspace:packages/eslint-plugin-tslint" dependencies: "@types/lodash": "*" - "@typescript-eslint/parser": 6.13.1 - "@typescript-eslint/utils": 6.13.1 + "@typescript-eslint/parser": 6.13.2 + "@typescript-eslint/utils": 6.13.2 jest: 29.7.0 prettier: ^3.0.3 rimraf: "*" @@ -5851,7 +5851,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/eslint-plugin@6.13.1, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": +"@typescript-eslint/eslint-plugin@6.13.2, @typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin": version: 0.0.0-use.local resolution: "@typescript-eslint/eslint-plugin@workspace:packages/eslint-plugin" dependencies: @@ -5860,12 +5860,12 @@ __metadata: "@types/debug": "*" "@types/marked": "*" "@types/natural-compare": "*" - "@typescript-eslint/rule-schema-to-typescript-types": 6.13.1 - "@typescript-eslint/rule-tester": 6.13.1 - "@typescript-eslint/scope-manager": 6.13.1 - "@typescript-eslint/type-utils": 6.13.1 - "@typescript-eslint/utils": 6.13.1 - "@typescript-eslint/visitor-keys": 6.13.1 + "@typescript-eslint/rule-schema-to-typescript-types": 6.13.2 + "@typescript-eslint/rule-tester": 6.13.2 + "@typescript-eslint/scope-manager": 6.13.2 + "@typescript-eslint/type-utils": 6.13.2 + "@typescript-eslint/utils": 6.13.2 + "@typescript-eslint/visitor-keys": 6.13.2 ajv: ^6.12.6 chalk: ^5.3.0 cross-fetch: "*" @@ -5904,15 +5904,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/parser@6.13.1, @typescript-eslint/parser@workspace:packages/parser": +"@typescript-eslint/parser@6.13.2, @typescript-eslint/parser@workspace:packages/parser": version: 0.0.0-use.local resolution: "@typescript-eslint/parser@workspace:packages/parser" dependencies: "@types/glob": "*" - "@typescript-eslint/scope-manager": 6.13.1 - "@typescript-eslint/types": 6.13.1 - "@typescript-eslint/typescript-estree": 6.13.1 - "@typescript-eslint/visitor-keys": 6.13.1 + "@typescript-eslint/scope-manager": 6.13.2 + "@typescript-eslint/types": 6.13.2 + "@typescript-eslint/typescript-estree": 6.13.2 + "@typescript-eslint/visitor-keys": 6.13.2 debug: ^4.3.4 downlevel-dts: "*" glob: "*" @@ -5943,26 +5943,26 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/rule-schema-to-typescript-types@6.13.1, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": +"@typescript-eslint/rule-schema-to-typescript-types@6.13.2, @typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-schema-to-typescript-types@workspace:packages/rule-schema-to-typescript-types" dependencies: "@prettier/sync": "*" - "@typescript-eslint/type-utils": 6.13.1 - "@typescript-eslint/utils": 6.13.1 + "@typescript-eslint/type-utils": 6.13.2 + "@typescript-eslint/utils": 6.13.2 natural-compare: ^1.4.0 prettier: ^3.0.3 languageName: unknown linkType: soft -"@typescript-eslint/rule-tester@6.13.1, @typescript-eslint/rule-tester@workspace:packages/rule-tester": +"@typescript-eslint/rule-tester@6.13.2, @typescript-eslint/rule-tester@workspace:packages/rule-tester": version: 0.0.0-use.local resolution: "@typescript-eslint/rule-tester@workspace:packages/rule-tester" dependencies: "@types/lodash.merge": 4.6.9 - "@typescript-eslint/parser": 6.13.1 - "@typescript-eslint/typescript-estree": 6.13.1 - "@typescript-eslint/utils": 6.13.1 + "@typescript-eslint/parser": 6.13.2 + "@typescript-eslint/typescript-estree": 6.13.2 + "@typescript-eslint/utils": 6.13.2 ajv: ^6.10.0 chai: ^4.3.7 lodash.merge: 4.6.2 @@ -5976,15 +5976,15 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/scope-manager@6.13.1, @typescript-eslint/scope-manager@workspace:packages/scope-manager": +"@typescript-eslint/scope-manager@6.13.2, @typescript-eslint/scope-manager@workspace:packages/scope-manager": version: 0.0.0-use.local resolution: "@typescript-eslint/scope-manager@workspace:packages/scope-manager" dependencies: "@prettier/sync": "*" "@types/glob": "*" - "@typescript-eslint/types": 6.13.1 - "@typescript-eslint/typescript-estree": 6.13.1 - "@typescript-eslint/visitor-keys": 6.13.1 + "@typescript-eslint/types": 6.13.2 + "@typescript-eslint/typescript-estree": 6.13.2 + "@typescript-eslint/visitor-keys": 6.13.2 glob: "*" jest-specific-snapshot: "*" make-dir: "*" @@ -6003,13 +6003,13 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/type-utils@6.13.1, @typescript-eslint/type-utils@workspace:packages/type-utils": +"@typescript-eslint/type-utils@6.13.2, @typescript-eslint/type-utils@workspace:packages/type-utils": version: 0.0.0-use.local resolution: "@typescript-eslint/type-utils@workspace:packages/type-utils" dependencies: - "@typescript-eslint/parser": 6.13.1 - "@typescript-eslint/typescript-estree": 6.13.1 - "@typescript-eslint/utils": 6.13.1 + "@typescript-eslint/parser": 6.13.2 + "@typescript-eslint/typescript-estree": 6.13.2 + "@typescript-eslint/utils": 6.13.2 ajv: ^6.10.0 debug: ^4.3.4 downlevel-dts: "*" @@ -6026,7 +6026,7 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/types@6.13.1, @typescript-eslint/types@workspace:packages/types": +"@typescript-eslint/types@6.13.2, @typescript-eslint/types@workspace:packages/types": version: 0.0.0-use.local resolution: "@typescript-eslint/types@workspace:packages/types" dependencies: @@ -6051,11 +6051,11 @@ __metadata: dependencies: "@actions/core": ^1.10.0 "@actions/github": ^6.0.0 - "@babel/code-frame": ^7.22.5 - "@babel/core": ^7.22.8 - "@babel/eslint-parser": ^7.22.7 - "@babel/parser": ^7.22.7 - "@babel/types": ^7.22.5 + "@babel/code-frame": ^7.22.13 + "@babel/core": ^7.23.3 + "@babel/eslint-parser": ^7.23.3 + "@babel/parser": ^7.23.3 + "@babel/types": ^7.23.3 "@nx/eslint": 17.1.2 "@nx/jest": 17.1.2 "@nx/workspace": 17.1.2 @@ -6115,14 +6115,14 @@ __metadata: languageName: unknown linkType: soft -"@typescript-eslint/typescript-estree@6.13.1, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": +"@typescript-eslint/typescript-estree@6.13.2, @typescript-eslint/typescript-estree@workspace:packages/typescript-estree": version: 0.0.0-use.local resolution: "@typescript-eslint/typescript-estree@workspace:packages/typescript-estree" dependencies: "@babel/code-frame": "*" "@babel/parser": "*" - "@typescript-eslint/types": 6.13.1 - "@typescript-eslint/visitor-keys": 6.13.1 + "@typescript-eslint/types": 6.13.2 + "@typescript-eslint/visitor-keys": 6.13.2 debug: ^4.3.4 glob: "*" globby: ^11.1.0 @@ -6160,17 +6160,17 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/utils@6.13.1, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": +"@typescript-eslint/utils@6.13.2, @typescript-eslint/utils@^6.0.0, @typescript-eslint/utils@workspace:packages/utils": version: 0.0.0-use.local resolution: "@typescript-eslint/utils@workspace:packages/utils" dependencies: "@eslint-community/eslint-utils": ^4.4.0 "@types/json-schema": ^7.0.12 "@types/semver": ^7.5.0 - "@typescript-eslint/parser": 6.13.1 - "@typescript-eslint/scope-manager": 6.13.1 - "@typescript-eslint/types": 6.13.1 - "@typescript-eslint/typescript-estree": 6.13.1 + "@typescript-eslint/parser": 6.13.2 + "@typescript-eslint/scope-manager": 6.13.2 + "@typescript-eslint/types": 6.13.2 + "@typescript-eslint/typescript-estree": 6.13.2 downlevel-dts: "*" jest: 29.7.0 prettier: ^3.0.3 @@ -6200,12 +6200,12 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/visitor-keys@6.13.1, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": +"@typescript-eslint/visitor-keys@6.13.2, @typescript-eslint/visitor-keys@workspace:packages/visitor-keys": version: 0.0.0-use.local resolution: "@typescript-eslint/visitor-keys@workspace:packages/visitor-keys" dependencies: "@types/eslint-visitor-keys": "*" - "@typescript-eslint/types": 6.13.1 + "@typescript-eslint/types": 6.13.2 downlevel-dts: "*" eslint-visitor-keys: ^3.4.1 jest: 29.7.0 @@ -6225,18 +6225,18 @@ __metadata: languageName: node linkType: hard -"@typescript-eslint/website-eslint@6.13.1, @typescript-eslint/website-eslint@workspace:packages/website-eslint": +"@typescript-eslint/website-eslint@6.13.2, @typescript-eslint/website-eslint@workspace:packages/website-eslint": version: 0.0.0-use.local resolution: "@typescript-eslint/website-eslint@workspace:packages/website-eslint" dependencies: "@eslint/js": 8.53.0 - "@typescript-eslint/eslint-plugin": 6.13.1 - "@typescript-eslint/parser": 6.13.1 - "@typescript-eslint/scope-manager": 6.13.1 - "@typescript-eslint/types": 6.13.1 - "@typescript-eslint/typescript-estree": 6.13.1 - "@typescript-eslint/utils": 6.13.1 - "@typescript-eslint/visitor-keys": 6.13.1 + "@typescript-eslint/eslint-plugin": 6.13.2 + "@typescript-eslint/parser": 6.13.2 + "@typescript-eslint/scope-manager": 6.13.2 + "@typescript-eslint/types": 6.13.2 + "@typescript-eslint/typescript-estree": 6.13.2 + "@typescript-eslint/utils": 6.13.2 + "@typescript-eslint/visitor-keys": 6.13.2 esbuild: ~0.19.0 eslint: "*" esquery: "*" @@ -20968,11 +20968,11 @@ __metadata: "@types/react": "*" "@types/react-helmet": ^6.1.6 "@types/react-router-dom": ^5.3.3 - "@typescript-eslint/eslint-plugin": 6.13.1 - "@typescript-eslint/parser": 6.13.1 - "@typescript-eslint/rule-schema-to-typescript-types": 6.13.1 - "@typescript-eslint/types": 6.13.1 - "@typescript-eslint/website-eslint": 6.13.1 + "@typescript-eslint/eslint-plugin": 6.13.2 + "@typescript-eslint/parser": 6.13.2 + "@typescript-eslint/rule-schema-to-typescript-types": 6.13.2 + "@typescript-eslint/types": 6.13.2 + "@typescript-eslint/website-eslint": 6.13.2 clsx: ^2.0.0 copy-webpack-plugin: ^11.0.0 cross-fetch: "*"