Skip to content

Commit 5f69495

Browse files
michaelfaithMichaelDeBoey
authored andcommitted
feat!: drop typescript-eslint v5 support (#297)
BREAKING CHANGE: typescript-eslint needs to be ^8.0.0
1 parent 7aa5f28 commit 5f69495

File tree

6 files changed

+15
-12
lines changed

6 files changed

+15
-12
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@
5959
"@eslint-community/eslint-plugin-mysticatea": "^15.8.0",
6060
"@types/eslint": "^9.6.1",
6161
"@types/estree": "^1.0.8",
62-
"@typescript-eslint/parser": "^5.62.0",
63-
"@typescript-eslint/types": "^5.62.0",
62+
"@typescript-eslint/parser": "^8.52.0",
63+
"@typescript-eslint/types": "^8.52.0",
6464
"c8": "^8.0.1",
6565
"dot-prop": "^7.2.0",
6666
"eslint": "^8.57.1",

src/is-parenthesized.mjs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@ function getParentSyntaxParen(node, sourceCode) {
2626
case "NewExpression":
2727
if (parent.arguments.length === 1 && parent.arguments[0] === node) {
2828
return sourceCode.getTokenAfter(
29-
// @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/pull/5384
30-
parent.typeArguments ||
31-
/** @type {RuleNode} */ (
32-
/** @type {unknown} */ (
33-
/** @type {TSNewExpression | TSCallExpression} */ (
34-
parent
35-
).typeParameters
36-
)
37-
) ||
38-
parent.callee,
29+
"typeArguments" in parent && parent.typeArguments
30+
? /** @type {RuleNode} */ (
31+
/** @type {unknown} */ (
32+
/** @type {TSNewExpression | TSCallExpression} */ (
33+
parent
34+
).typeArguments
35+
)
36+
)
37+
: parent.callee,
3938
isOpeningParenToken,
4039
)
4140
}

test/get-static-value.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line @eslint-community/mysticatea/node/no-missing-import -- Will be addressed in the next change migrating to flat config
12
import tsParser from "@typescript-eslint/parser"
23
import assert from "assert"
34
import eslint from "eslint"

test/has-side-effect.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line @eslint-community/mysticatea/node/no-missing-import -- Will be addressed in the next change migrating to flat config
12
import tsParser from "@typescript-eslint/parser"
23
import assert from "assert"
34
import { getProperty } from "dot-prop"

test/is-parenthesized.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line @eslint-community/mysticatea/node/no-missing-import -- Will be addressed in the next change migrating to flat config
12
import tsParser from "@typescript-eslint/parser"
23
import assert from "assert"
34
import { getProperty } from "dot-prop"

test/reference-tracker.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// eslint-disable-next-line @eslint-community/mysticatea/node/no-missing-import -- Will be addressed in the next change migrating to flat config
12
import tsParser from "@typescript-eslint/parser"
23
import assert from "assert"
34
import eslint from "eslint"

0 commit comments

Comments
 (0)