diff --git a/package-lock.json b/package-lock.json index 8c184b52..a3505e49 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,8 +21,8 @@ "@types/lodash": "4.14.182", "@types/minimist": "1.2.2", "@types/node": "14.14.31", - "@typescript-eslint/experimental-utils": "5.30.7", "@typescript-eslint/parser": "5.30.7", + "@typescript-eslint/utils": "5.30.7", "eslint": "8.47.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-import": "2.26.0", @@ -3261,21 +3261,6 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, - "node_modules/@typescript-eslint/experimental-utils": { - "version": "5.30.7", - "resolved": "https://repox.jfrog.io/repox/api/npm/npm/@typescript-eslint/experimental-utils/-/experimental-utils-5.30.7.tgz", - "integrity": "sha512-r218ZVL0zFBYzEq8/9K2ZhRgsmKUhm8xd3sWChgvTbmP98kHGuY83IUl64SS9fx9OSBM9vMLdzBfox4eDdm/ZQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/utils": "5.30.7" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - }, - "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" - } - }, "node_modules/@typescript-eslint/parser": { "version": "5.30.7", "resolved": "https://repox.jfrog.io/repox/api/npm/npm/@typescript-eslint/parser/-/parser-5.30.7.tgz", @@ -11847,15 +11832,6 @@ "integrity": "sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==", "dev": true }, - "@typescript-eslint/experimental-utils": { - "version": "5.30.7", - "resolved": "https://repox.jfrog.io/repox/api/npm/npm/@typescript-eslint/experimental-utils/-/experimental-utils-5.30.7.tgz", - "integrity": "sha512-r218ZVL0zFBYzEq8/9K2ZhRgsmKUhm8xd3sWChgvTbmP98kHGuY83IUl64SS9fx9OSBM9vMLdzBfox4eDdm/ZQ==", - "dev": true, - "requires": { - "@typescript-eslint/utils": "5.30.7" - } - }, "@typescript-eslint/parser": { "version": "5.30.7", "resolved": "https://repox.jfrog.io/repox/api/npm/npm/@typescript-eslint/parser/-/parser-5.30.7.tgz", diff --git a/package.json b/package.json index c0100ae8..b45e9c8f 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,8 @@ "@types/lodash": "4.14.182", "@types/minimist": "1.2.2", "@types/node": "14.14.31", - "@typescript-eslint/experimental-utils": "5.30.7", "@typescript-eslint/parser": "5.30.7", + "@typescript-eslint/utils": "5.30.7", "eslint": "8.47.0", "eslint-config-prettier": "8.5.0", "eslint-plugin-import": "2.26.0", diff --git a/src/index.ts b/src/index.ts index 9396e4b2..df1bc391 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESLint } from '@typescript-eslint/utils'; const sonarjsRules: string[] = [ 'cognitive-complexity', diff --git a/src/rules/cognitive-complexity.ts b/src/rules/cognitive-complexity.ts index d0316197..54f304f4 100644 --- a/src/rules/cognitive-complexity.ts +++ b/src/rules/cognitive-complexity.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S3776 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { isIfStatement, isLogicalExpression } from '../utils/nodes'; import { getFirstToken, diff --git a/src/rules/elseif-without-else.ts b/src/rules/elseif-without-else.ts index 097de22a..18cc2d54 100644 --- a/src/rules/elseif-without-else.ts +++ b/src/rules/elseif-without-else.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S126 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import docsUrl from '../utils/docs-url'; const rule: TSESLint.RuleModule = { diff --git a/src/rules/max-switch-cases.ts b/src/rules/max-switch-cases.ts index 9eb7d5d3..ae7b2c6c 100644 --- a/src/rules/max-switch-cases.ts +++ b/src/rules/max-switch-cases.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1479 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import docsUrl from '../utils/docs-url'; const DEFAULT_MAX_SWITCH_CASES = 30; diff --git a/src/rules/no-all-duplicated-branches.ts b/src/rules/no-all-duplicated-branches.ts index 24d00251..7d3f0e47 100644 --- a/src/rules/no-all-duplicated-branches.ts +++ b/src/rules/no-all-duplicated-branches.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S3923 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isIfStatement } from '../utils/nodes'; import { areEquivalent } from '../utils/equivalence'; import { collectIfBranches, collectSwitchBranches } from '../utils/conditions'; diff --git a/src/rules/no-collapsible-if.ts b/src/rules/no-collapsible-if.ts index 22094a31..a7d8bedf 100644 --- a/src/rules/no-collapsible-if.ts +++ b/src/rules/no-collapsible-if.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1066 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isIfStatement, isBlockStatement } from '../utils/nodes'; import { report, issueLocation } from '../utils/locations'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-collection-size-mischeck.ts b/src/rules/no-collection-size-mischeck.ts index 56ed746e..4e25548e 100644 --- a/src/rules/no-collection-size-mischeck.ts +++ b/src/rules/no-collection-size-mischeck.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S3981 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isRequiredParserServices, RequiredParserServices } from '../utils/parser-services'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-duplicate-string.ts b/src/rules/no-duplicate-string.ts index 30a421f7..3706731c 100644 --- a/src/rules/no-duplicate-string.ts +++ b/src/rules/no-duplicate-string.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1192 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import docsUrl from '../utils/docs-url'; import { issueLocation, report } from '../utils/locations'; diff --git a/src/rules/no-duplicated-branches.ts b/src/rules/no-duplicated-branches.ts index d2637f3e..f54006f9 100644 --- a/src/rules/no-duplicated-branches.ts +++ b/src/rules/no-duplicated-branches.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1871 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isIfStatement, isBlockStatement } from '../utils/nodes'; import { areEquivalent } from '../utils/equivalence'; import { collectIfBranches, takeWithoutBreak, collectSwitchBranches } from '../utils/conditions'; diff --git a/src/rules/no-element-overwrite.ts b/src/rules/no-element-overwrite.ts index 493fc3af..76fea1dc 100644 --- a/src/rules/no-element-overwrite.ts +++ b/src/rules/no-element-overwrite.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S4143 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { areEquivalent } from '../utils/equivalence'; import { isExpressionStatement, diff --git a/src/rules/no-empty-collection.ts b/src/rules/no-empty-collection.ts index 843193ef..b2b63021 100644 --- a/src/rules/no-empty-collection.ts +++ b/src/rules/no-empty-collection.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S4158 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { isIdentifier, findFirstMatchingAncestor, diff --git a/src/rules/no-extra-arguments.ts b/src/rules/no-extra-arguments.ts index 302826bd..389bc88f 100644 --- a/src/rules/no-extra-arguments.ts +++ b/src/rules/no-extra-arguments.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S930 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { isArrowFunctionExpression, isFunctionDeclaration, diff --git a/src/rules/no-gratuitous-expressions.ts b/src/rules/no-gratuitous-expressions.ts index 870e48ce..be742aa9 100644 --- a/src/rules/no-gratuitous-expressions.ts +++ b/src/rules/no-gratuitous-expressions.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S2589 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { report } from '../utils/locations'; import { isIdentifier, isIfStatement } from '../utils/nodes'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-identical-conditions.ts b/src/rules/no-identical-conditions.ts index 6a24488b..ad31c6af 100644 --- a/src/rules/no-identical-conditions.ts +++ b/src/rules/no-identical-conditions.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1862 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { areEquivalent } from '../utils/equivalence'; import { report, issueLocation } from '../utils/locations'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-identical-expressions.ts b/src/rules/no-identical-expressions.ts index fd9ab7b3..a94836c8 100644 --- a/src/rules/no-identical-expressions.ts +++ b/src/rules/no-identical-expressions.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1764 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isIdentifier, isLiteral } from '../utils/nodes'; import { areEquivalent } from '../utils/equivalence'; import { report, issueLocation, IssueLocation } from '../utils/locations'; diff --git a/src/rules/no-identical-functions.ts b/src/rules/no-identical-functions.ts index 34ce50f7..0d587488 100644 --- a/src/rules/no-identical-functions.ts +++ b/src/rules/no-identical-functions.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S4144 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { areEquivalent } from '../utils/equivalence'; import { getMainFunctionTokenLocation, report, issueLocation } from '../utils/locations'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-ignored-return.ts b/src/rules/no-ignored-return.ts index 98976dcb..201b109a 100644 --- a/src/rules/no-ignored-return.ts +++ b/src/rules/no-ignored-return.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S2201 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isRequiredParserServices, RequiredParserServices } from '../utils/parser-services'; import docsUrl from '../utils/docs-url'; import { getTypeFromTreeNode } from '../utils'; diff --git a/src/rules/no-inverted-boolean-check.ts b/src/rules/no-inverted-boolean-check.ts index 52c6154b..ca89520a 100644 --- a/src/rules/no-inverted-boolean-check.ts +++ b/src/rules/no-inverted-boolean-check.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1940 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isBinaryExpression } from '../utils/nodes'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-nested-switch.ts b/src/rules/no-nested-switch.ts index 43b42706..88d44f2f 100644 --- a/src/rules/no-nested-switch.ts +++ b/src/rules/no-nested-switch.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1821 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import docsUrl from '../utils/docs-url'; const rule: TSESLint.RuleModule = { diff --git a/src/rules/no-nested-template-literals.ts b/src/rules/no-nested-template-literals.ts index 7149dd8e..4b9cc9e0 100644 --- a/src/rules/no-nested-template-literals.ts +++ b/src/rules/no-nested-template-literals.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S4624 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { ancestorsChain } from '../utils'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-one-iteration-loop.ts b/src/rules/no-one-iteration-loop.ts index 7f5f97a4..e01030e5 100644 --- a/src/rules/no-one-iteration-loop.ts +++ b/src/rules/no-one-iteration-loop.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1751 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { Rule } from 'eslint'; import { isContinueStatement } from '../utils/nodes'; import docsUrl from '../utils/docs-url'; @@ -38,7 +38,7 @@ const rule: TSESLint.RuleModule = { url: docsUrl(__filename), }, }, - // @ts-ignore The typings of @typescript-eslint/experimental-utils does not contain the 'onX' methods. + // @ts-ignore The typings of @typescript-eslint/utils does not contain the 'onX' methods. create(context) { const loopingNodes: Set = new Set(); const loops: Set = new Set(); diff --git a/src/rules/no-redundant-boolean.ts b/src/rules/no-redundant-boolean.ts index 23741b72..51d751ca 100644 --- a/src/rules/no-redundant-boolean.ts +++ b/src/rules/no-redundant-boolean.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1125 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isBooleanLiteral, isIfStatement, isConditionalExpression } from '../utils/nodes'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-redundant-jump.ts b/src/rules/no-redundant-jump.ts index 4d9e1d56..b7d69110 100644 --- a/src/rules/no-redundant-jump.ts +++ b/src/rules/no-redundant-jump.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S3626 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import docsUrl from '../utils/docs-url'; const loops = 'WhileStatement, ForStatement, DoWhileStatement, ForInStatement, ForOfStatement'; diff --git a/src/rules/no-same-line-conditional.ts b/src/rules/no-same-line-conditional.ts index 3e1be58d..ec3cabb0 100644 --- a/src/rules/no-same-line-conditional.ts +++ b/src/rules/no-same-line-conditional.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S3972 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import docsUrl from '../utils/docs-url'; import { issueLocation, report } from '../utils/locations'; diff --git a/src/rules/no-small-switch.ts b/src/rules/no-small-switch.ts index 1937aa56..f468e371 100644 --- a/src/rules/no-small-switch.ts +++ b/src/rules/no-small-switch.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1301 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import docsUrl from '../utils/docs-url'; const rule: TSESLint.RuleModule = { diff --git a/src/rules/no-unused-collection.ts b/src/rules/no-unused-collection.ts index 949d83fe..a9786c84 100644 --- a/src/rules/no-unused-collection.ts +++ b/src/rules/no-unused-collection.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S4030 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { collectionConstructor, writingMethods } from '../utils/collections'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-use-of-empty-return-value.ts b/src/rules/no-use-of-empty-return-value.ts index 36991353..e60230b4 100644 --- a/src/rules/no-use-of-empty-return-value.ts +++ b/src/rules/no-use-of-empty-return-value.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S3699 -import { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isFunctionExpression, isArrowFunctionExpression, isBlockStatement } from '../utils/nodes'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/no-useless-catch.ts b/src/rules/no-useless-catch.ts index d4b651d7..bd51021f 100644 --- a/src/rules/no-useless-catch.ts +++ b/src/rules/no-useless-catch.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1940 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { isThrowStatement } from '../utils/nodes'; import { areEquivalent } from '../utils/equivalence'; import docsUrl from '../utils/docs-url'; diff --git a/src/rules/non-existent-operator.ts b/src/rules/non-existent-operator.ts index b7b99c69..07db1bd0 100644 --- a/src/rules/non-existent-operator.ts +++ b/src/rules/non-existent-operator.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S2757 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import docsUrl from '../utils/docs-url'; const rule: TSESLint.RuleModule = { diff --git a/src/rules/prefer-immediate-return.ts b/src/rules/prefer-immediate-return.ts index 2b6f1d08..bd2c75c2 100644 --- a/src/rules/prefer-immediate-return.ts +++ b/src/rules/prefer-immediate-return.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1488 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { isReturnStatement, isThrowStatement, diff --git a/src/rules/prefer-object-literal.ts b/src/rules/prefer-object-literal.ts index 8deea933..16734cf4 100644 --- a/src/rules/prefer-object-literal.ts +++ b/src/rules/prefer-object-literal.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S2428 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import { isModuleDeclaration, isVariableDeclaration, diff --git a/src/rules/prefer-single-boolean-return.ts b/src/rules/prefer-single-boolean-return.ts index ae81d70a..0ca92261 100644 --- a/src/rules/prefer-single-boolean-return.ts +++ b/src/rules/prefer-single-boolean-return.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ // https://sonarsource.github.io/rspec/#/rspec/S1126 -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isReturnStatement, isBlockStatement, diff --git a/src/rules/prefer-while.ts b/src/rules/prefer-while.ts index b587786f..3ed03e8a 100644 --- a/src/rules/prefer-while.ts +++ b/src/rules/prefer-while.ts @@ -19,7 +19,7 @@ */ // https://sonarsource.github.io/rspec/#/rspec/S1264 -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; import docsUrl from '../utils/docs-url'; const rule: TSESLint.RuleModule = { diff --git a/src/utils/conditions.ts b/src/utils/conditions.ts index 54e5f38f..aac3be0f 100644 --- a/src/utils/conditions.ts +++ b/src/utils/conditions.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESTree } from '@typescript-eslint/utils'; import { isIfStatement } from './nodes'; /** Returns a list of statements corresponding to a `if - else if - else` chain */ diff --git a/src/utils/equivalence.ts b/src/utils/equivalence.ts index 76318dc2..d020a10d 100644 --- a/src/utils/equivalence.ts +++ b/src/utils/equivalence.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; /** * Equivalence is implemented by comparing node types and their tokens. diff --git a/src/utils/jsx.ts b/src/utils/jsx.ts index af583144..52e1b66b 100644 --- a/src/utils/jsx.ts +++ b/src/utils/jsx.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESTree } from '@typescript-eslint/utils'; export function getJsxShortCircuitNodes(logicalExpression: TSESTree.LogicalExpression) { if (logicalExpression.parent?.type !== 'JSXExpressionContainer') { diff --git a/src/utils/locations.ts b/src/utils/locations.ts index 3be10879..cb846d76 100644 --- a/src/utils/locations.ts +++ b/src/utils/locations.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; type Writeable = { -readonly [P in keyof T]: T[P] }; export type MutableReportDescriptor = Writeable>; diff --git a/src/utils/nodes.ts b/src/utils/nodes.ts index 94e5d9e4..c98a60b0 100644 --- a/src/utils/nodes.ts +++ b/src/utils/nodes.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESTree } from '@typescript-eslint/utils'; const MODULE_DECLARATION_NODES = [ 'ImportDeclaration', diff --git a/src/utils/parser-services.ts b/src/utils/parser-services.ts index 57d3fd5f..c57297b9 100644 --- a/src/utils/parser-services.ts +++ b/src/utils/parser-services.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { ParserServices } from '@typescript-eslint/experimental-utils'; +import type { ParserServices } from '@typescript-eslint/utils'; export type RequiredParserServices = { [k in keyof ParserServices]: Exclude; diff --git a/src/utils/utils-ast.ts b/src/utils/utils-ast.ts index c7e939ed..b9d181af 100644 --- a/src/utils/utils-ast.ts +++ b/src/utils/utils-ast.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { TSESLint, TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESLint, TSESTree } from '@typescript-eslint/utils'; export function isIdentifier( node: TSESTree.Node, diff --git a/src/utils/utils-parent.ts b/src/utils/utils-parent.ts index 95ac03fc..e779863b 100644 --- a/src/utils/utils-parent.ts +++ b/src/utils/utils-parent.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESTree } from '@typescript-eslint/utils'; export function findFirstMatchingAncestor( node: TSESTree.Node, diff --git a/src/utils/utils-type.ts b/src/utils/utils-type.ts index b23f782d..48769e33 100644 --- a/src/utils/utils-type.ts +++ b/src/utils/utils-type.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import type { TSESTree } from '@typescript-eslint/experimental-utils'; +import type { TSESTree } from '@typescript-eslint/utils'; import { RequiredParserServices } from './parser-services'; export function getTypeFromTreeNode(node: TSESTree.Node, services: RequiredParserServices) { diff --git a/tests/rule-tester.ts b/tests/rule-tester.ts index a6890e6f..57941efd 100644 --- a/tests/rule-tester.ts +++ b/tests/rule-tester.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { ESLintUtils } from '@typescript-eslint/experimental-utils'; +import { ESLintUtils } from '@typescript-eslint/utils'; const { RuleTester } = ESLintUtils; diff --git a/tests/rules/cognitive-complexity.test.ts b/tests/rules/cognitive-complexity.test.ts index 940622af..2c53c1cc 100644 --- a/tests/rules/cognitive-complexity.test.ts +++ b/tests/rules/cognitive-complexity.test.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TSESLint } from '@typescript-eslint/experimental-utils'; +import { TSESLint } from '@typescript-eslint/utils'; import { ruleTester } from '../rule-tester'; import { IssueLocation } from '../../src/utils/locations'; import rule = require('../../src/rules/cognitive-complexity'); diff --git a/tests/rules/no-extra-arguments.test.ts b/tests/rules/no-extra-arguments.test.ts index a9bd4056..454a1f04 100644 --- a/tests/rules/no-extra-arguments.test.ts +++ b/tests/rules/no-extra-arguments.test.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TSESLint } from '@typescript-eslint/experimental-utils'; +import { TSESLint } from '@typescript-eslint/utils'; import { ruleTester, ruleTesterScript } from '../rule-tester'; import { IssueLocation } from '../../src/utils/locations'; import rule = require('../../src/rules/no-extra-arguments'); diff --git a/tests/rules/no-identical-functions.test.ts b/tests/rules/no-identical-functions.test.ts index 50e3c089..7bd86167 100644 --- a/tests/rules/no-identical-functions.test.ts +++ b/tests/rules/no-identical-functions.test.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TSESLint } from '@typescript-eslint/experimental-utils'; +import { TSESLint } from '@typescript-eslint/utils'; import { ruleTester } from '../rule-tester'; import { IssueLocation } from '../../src/utils/locations'; import rule = require('../../src/rules/no-identical-functions'); diff --git a/tests/rules/no-inverted-boolean-check.test.ts b/tests/rules/no-inverted-boolean-check.test.ts index 5c35af46..92064a74 100644 --- a/tests/rules/no-inverted-boolean-check.test.ts +++ b/tests/rules/no-inverted-boolean-check.test.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TSESLint } from '@typescript-eslint/experimental-utils'; +import { TSESLint } from '@typescript-eslint/utils'; import { ruleTester } from '../rule-tester'; import rule = require('../../src/rules/no-inverted-boolean-check'); diff --git a/tests/rules/no-use-of-empty-return-value.test.ts b/tests/rules/no-use-of-empty-return-value.test.ts index ea296848..ec0316d7 100644 --- a/tests/rules/no-use-of-empty-return-value.test.ts +++ b/tests/rules/no-use-of-empty-return-value.test.ts @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { TSESLint } from '@typescript-eslint/experimental-utils'; +import { TSESLint } from '@typescript-eslint/utils'; import { ruleTester } from '../rule-tester'; import rule = require('../../src/rules/no-use-of-empty-return-value'); diff --git a/tests/utils/parser-services.test.ts b/tests/utils/parser-services.test.ts index af48d978..e5048a78 100644 --- a/tests/utils/parser-services.test.ts +++ b/tests/utils/parser-services.test.ts @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import * as path from 'path'; -import type { TSESTree, TSESLint } from '@typescript-eslint/experimental-utils'; +import type { TSESTree, TSESLint } from '@typescript-eslint/utils'; import { isRequiredParserServices } from '../../src/utils/parser-services'; import { RuleTester } from '../rule-tester';