Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BREAKING CHANGE: Moving to latest version of @typescript-eslint/utils #13

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"url": "https://github.com/cartant/eslint-etc/issues"
},
"dependencies": {
"@typescript-eslint/experimental-utils": "^5.0.0",
"@typescript-eslint/utils": "^7.0.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this point, any reason not to go to v8 (and eslint v9)?

"tsutils": "^3.17.1",
"tsutils-etc": "^1.4.1"
},
Expand Down
2 changes: 1 addition & 1 deletion source/create-rule-tester.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { TSESLint as eslint } from "@typescript-eslint/experimental-utils";
import { TSESLint as eslint } from "@typescript-eslint/utils";
import { resolve } from "path";

export function createRuleTester({
Expand Down
2 changes: 1 addition & 1 deletion source/find-parent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { TSESTree as es } from "@typescript-eslint/experimental-utils";
import { TSESTree as es } from "@typescript-eslint/utils";
import { getParent } from "./get-parent";

type Predicate = (type: string) => "break" | "continue" | "return";
Expand Down
2 changes: 1 addition & 1 deletion source/from-fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { TSESLint as eslint } from "@typescript-eslint/experimental-utils";
import { TSESLint as eslint } from "@typescript-eslint/utils";

export function fromFixture<TMessageIds extends string>(
fixture: string,
Expand Down
2 changes: 1 addition & 1 deletion source/get-loc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
/* eslint sort-keys: "off" */

import { TSESTree as es } from "@typescript-eslint/experimental-utils";
import { TSESTree as es } from "@typescript-eslint/utils";
import * as ts from "typescript";

export function getLoc(node: ts.Node): es.SourceLocation {
Expand Down
2 changes: 1 addition & 1 deletion source/get-parent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { TSESTree as es } from "@typescript-eslint/experimental-utils";
import { TSESTree as es } from "@typescript-eslint/utils";

export function getParent(node: es.Node): es.Node | undefined {
return (node as any).parent;
Expand Down
2 changes: 1 addition & 1 deletion source/get-parser-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { ESLintUtils } from "@typescript-eslint/experimental-utils";
import { ESLintUtils } from "@typescript-eslint/utils";

const { getParserServices } = ESLintUtils;
export { getParserServices };
2 changes: 1 addition & 1 deletion source/get-type-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ESLintUtils,
TSESLint,
TSESTree as es,
} from "@typescript-eslint/experimental-utils";
} from "@typescript-eslint/utils";
import * as tsutils from "tsutils-etc";
import * as ts from "typescript";
import { isArrowFunctionExpression, isFunctionDeclaration } from "./is";
Expand Down
2 changes: 1 addition & 1 deletion source/is-import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { TSESLint } from "@typescript-eslint/experimental-utils";
import { TSESLint } from "@typescript-eslint/utils";

export function isImport(
scope: TSESLint.Scope.Scope,
Expand Down
2 changes: 1 addition & 1 deletion source/is.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* can be found in the LICENSE file at https://github.com/cartant/eslint-etc
*/

import { TSESTree as es } from "@typescript-eslint/experimental-utils";
import { TSESTree as es } from "@typescript-eslint/utils";

export function hasTypeAnnotation<T extends es.Node>(
node: T
Expand Down
8 changes: 3 additions & 5 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"declaration": false,
"esModuleInterop": true,
"lib": ["esnext"],
"module": "commonjs",
"moduleResolution": "node",
"module": "node16",
"moduleResolution": "node16",
"outDir": "build",
"paths": {},
"removeComments": true,
Expand All @@ -15,7 +15,5 @@
"target": "es2018"
},
"exclude": [],
"include": [
"source/**/*.ts"
]
"include": ["source/**/*.ts"]
}
88 changes: 81 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
"@typescript-eslint/eslint-plugin" "^5.0.0"
eslint-plugin-import "^2.20.2"

"@eslint-community/eslint-utils@^4.4.0":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59"
integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==
dependencies:
eslint-visitor-keys "^3.3.0"

"@eslint/eslintrc@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f"
Expand Down Expand Up @@ -130,13 +137,6 @@
semver "^7.3.7"
tsutils "^3.21.0"

"@typescript-eslint/experimental-utils@^5.0.0":
version "5.30.6"
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.30.6.tgz#fe30d2800aedcad7465d9260b66068337df71612"
integrity sha512-bqvT+0L8IjtW7MCrMgm9oVNxs4g7mESro1mm5c1/SNfTnHuFTf9OUX1WzVkTz75M9cp//UrTrSmGvK48NEKshQ==
dependencies:
"@typescript-eslint/utils" "5.30.6"

"@typescript-eslint/parser@^5.0.0":
version "5.30.6"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.30.6.tgz#add440db038fa9d777e4ebdaf66da9e7fb7abe92"
Expand All @@ -155,6 +155,14 @@
"@typescript-eslint/types" "5.30.6"
"@typescript-eslint/visitor-keys" "5.30.6"

"@typescript-eslint/[email protected]":
version "7.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-7.9.0.tgz#1dd3e63a4411db356a9d040e75864851b5f2619b"
integrity sha512-ZwPK4DeCDxr3GJltRz5iZejPFAAr4Wk3+2WIBaj1L5PYK5RgxExu/Y68FFVclN0y6GGwH8q+KgKRCvaTmFBbgQ==
dependencies:
"@typescript-eslint/types" "7.9.0"
"@typescript-eslint/visitor-keys" "7.9.0"

"@typescript-eslint/[email protected]":
version "5.30.6"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.30.6.tgz#a64aa9acbe609ab77f09f53434a6af2b9685f3af"
Expand All @@ -169,6 +177,11 @@
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.30.6.tgz#86369d0a7af8c67024115ac1da3e8fb2d38907e1"
integrity sha512-HdnP8HioL1F7CwVmT4RaaMX57RrfqsOMclZc08wGMiDYJBsLGBM7JwXM4cZJmbWLzIR/pXg1kkrBBVpxTOwfUg==

"@typescript-eslint/[email protected]":
version "7.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-7.9.0.tgz#b58e485e4bfba055659c7e683ad4f5f0821ae2ec"
integrity sha512-oZQD9HEWQanl9UfsbGVcZ2cGaR0YT5476xfWE0oE5kQa2sNK2frxOlkeacLOTh9po4AlUT5rtkGyYM5kew0z5w==

"@typescript-eslint/[email protected]":
version "5.30.6"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.6.tgz#a84a0d6a486f9b54042da1de3d671a2c9f14484e"
Expand All @@ -182,6 +195,20 @@
semver "^7.3.7"
tsutils "^3.21.0"

"@typescript-eslint/[email protected]":
version "7.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.9.0.tgz#3395e27656060dc313a6b406c3a298b729685e07"
integrity sha512-zBCMCkrb2YjpKV3LA0ZJubtKCDxLttxfdGmwZvTqqWevUPN0FZvSI26FalGFFUZU/9YQK/A4xcQF9o/VVaCKAg==
dependencies:
"@typescript-eslint/types" "7.9.0"
"@typescript-eslint/visitor-keys" "7.9.0"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
minimatch "^9.0.4"
semver "^7.6.0"
ts-api-utils "^1.3.0"

"@typescript-eslint/[email protected]":
version "5.30.6"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.30.6.tgz#1de2da14f678e7d187daa6f2e4cdb558ed0609dc"
Expand All @@ -194,6 +221,16 @@
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"

"@typescript-eslint/utils@^7.0.0":
version "7.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-7.9.0.tgz#1b96a34eefdca1c820cb1bbc2751d848b4540899"
integrity sha512-5KVRQCzZajmT4Ep+NEgjXCvjuypVvYHUW7RHlXzNPuak2oWpVoD1jf5xCP0dPAuNIchjC7uQyvbdaSTFaLqSdA==
dependencies:
"@eslint-community/eslint-utils" "^4.4.0"
"@typescript-eslint/scope-manager" "7.9.0"
"@typescript-eslint/types" "7.9.0"
"@typescript-eslint/typescript-estree" "7.9.0"

"@typescript-eslint/[email protected]":
version "5.30.6"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.6.tgz#94dd10bb481c8083378d24de1742a14b38a2678c"
Expand All @@ -202,6 +239,14 @@
"@typescript-eslint/types" "5.30.6"
eslint-visitor-keys "^3.3.0"

"@typescript-eslint/[email protected]":
version "7.9.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.9.0.tgz#82162656e339c3def02895f5c8546f6888d9b9ea"
integrity sha512-iESPx2TNLDNGQLyjKhUvIKprlP49XNEK+MvIf9nIO7ZZaZdbnfWKHnXAgufpxqfA0YryH8XToi4+CjBgVnFTSQ==
dependencies:
"@typescript-eslint/types" "7.9.0"
eslint-visitor-keys "^3.4.3"

"@ungap/[email protected]":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44"
Expand Down Expand Up @@ -336,6 +381,13 @@ brace-expansion@^1.1.7:
balanced-match "^1.0.0"
concat-map "0.0.1"

brace-expansion@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
dependencies:
balanced-match "^1.0.0"

braces@^3.0.2, braces@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
Expand Down Expand Up @@ -702,6 +754,11 @@ eslint-visitor-keys@^3.3.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==

eslint-visitor-keys@^3.4.3:
version "3.4.3"
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800"
integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==

eslint@^8.0.0:
version "8.19.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.19.0.tgz#7342a3cbc4fbc5c106a1eefe0fd0b50b6b1a7d28"
Expand Down Expand Up @@ -1401,6 +1458,13 @@ minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2:
dependencies:
brace-expansion "^1.1.7"

minimatch@^9.0.4:
version "9.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.4.tgz#8e49c731d1749cbec05050ee5145147b32496a51"
integrity sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==
dependencies:
brace-expansion "^2.0.1"

minimist@^1.2.0, minimist@^1.2.6:
version "1.2.6"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
Expand Down Expand Up @@ -1755,6 +1819,11 @@ semver@^7.3.7:
dependencies:
lru-cache "^6.0.0"

semver@^7.6.0:
version "7.6.2"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13"
integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==

[email protected]:
version "6.0.0"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8"
Expand Down Expand Up @@ -1925,6 +1994,11 @@ to-regex-range@^5.0.1:
dependencies:
is-number "^7.0.0"

ts-api-utils@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.3.0.tgz#4b490e27129f1e8e686b45cc4ab63714dc60eea1"
integrity sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==

tsconfig-paths@^3.14.1:
version "3.14.1"
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a"
Expand Down