Skip to content

Commit 25f21a1

Browse files
committed
fix: Integration test failures
Fixes typescript-eslint#10992
1 parent 5b187f4 commit 25f21a1

File tree

4 files changed

+32
-10
lines changed

4 files changed

+32
-10
lines changed

packages/integration-tests/fixtures/flat-config-types-@types__eslint-v8/eslint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ function _otherCases() {
5252
jestPlugin.configs['flat/recommended'],
5353
);
5454
tseslint.config(
55+
// @ts-expect-error
5556
compat.config(deprecationPlugin.configs.recommended),
5657
...compat.config(jestPlugin.configs.recommended),
5758
);
5859
tseslint.config(
5960
// @ts-expect-error
6061
deprecationPlugin.configs.recommended,
61-
// this should error but doesn't because there are no types exported from the jest plugin
6262
jestPlugin.configs.recommended,
6363
);
6464
}

packages/integration-tests/fixtures/flat-config-types-@types__eslint-v9/eslint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ function _otherCases() {
5252
jestPlugin.configs['flat/recommended'],
5353
);
5454
tseslint.config(
55+
// @ts-expect-error
5556
compat.config(deprecationPlugin.configs.recommended),
5657
...compat.config(jestPlugin.configs.recommended),
5758
);
5859
tseslint.config(
5960
// @ts-expect-error
6061
deprecationPlugin.configs.recommended,
61-
// this should error but doesn't because there are no types exported from the jest plugin
6262
jestPlugin.configs.recommended,
6363
);
6464
}

packages/integration-tests/tests/__snapshots__/flat-config-types-@types__eslint-v8.test.ts.snap

+15-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`flat-config-types-@types__eslint-v8 eslint should work successfully 1`] = `
44
[
55
{
6-
"errorCount": 2,
6+
"errorCount": 3,
77
"fatalErrorCount": 0,
88
"filePath": "<root>/eslint.config.js",
99
"fixableErrorCount": 0,
@@ -23,8 +23,19 @@ exports[`flat-config-types-@types__eslint-v8 eslint should work successfully 1`]
2323
{
2424
"column": 5,
2525
"endColumn": 24,
26-
"endLine": 59,
27-
"line": 59,
26+
"endLine": 55,
27+
"line": 55,
28+
"message": "Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer.",
29+
"messageId": "tsDirectiveCommentRequiresDescription",
30+
"nodeType": "Line",
31+
"ruleId": "@typescript-eslint/ban-ts-comment",
32+
"severity": 2,
33+
},
34+
{
35+
"column": 5,
36+
"endColumn": 24,
37+
"endLine": 60,
38+
"line": 60,
2839
"message": "Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer.",
2940
"messageId": "tsDirectiveCommentRequiresDescription",
3041
"nodeType": "Line",
@@ -86,13 +97,13 @@ function _otherCases() {
8697
jestPlugin.configs['flat/recommended'],
8798
)
8899
tseslint.config(
100+
// @ts-expect-error
89101
compat.config(deprecationPlugin.configs.recommended),
90102
...compat.config(jestPlugin.configs.recommended),
91103
)
92104
tseslint.config(
93105
// @ts-expect-error
94106
deprecationPlugin.configs.recommended,
95-
// this should error but doesn't because there are no types exported from the jest plugin
96107
jestPlugin.configs.recommended,
97108
)
98109
}

packages/integration-tests/tests/__snapshots__/flat-config-types-@types__eslint-v9.test.ts.snap

+15-4
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
exports[`flat-config-types-@types__eslint-v9 eslint should work successfully 1`] = `
44
[
55
{
6-
"errorCount": 2,
6+
"errorCount": 3,
77
"fatalErrorCount": 0,
88
"filePath": "<root>/eslint.config.js",
99
"fixableErrorCount": 0,
@@ -23,8 +23,19 @@ exports[`flat-config-types-@types__eslint-v9 eslint should work successfully 1`]
2323
{
2424
"column": 5,
2525
"endColumn": 24,
26-
"endLine": 59,
27-
"line": 59,
26+
"endLine": 55,
27+
"line": 55,
28+
"message": "Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer.",
29+
"messageId": "tsDirectiveCommentRequiresDescription",
30+
"nodeType": "Line",
31+
"ruleId": "@typescript-eslint/ban-ts-comment",
32+
"severity": 2,
33+
},
34+
{
35+
"column": 5,
36+
"endColumn": 24,
37+
"endLine": 60,
38+
"line": 60,
2839
"message": "Include a description after the "@ts-expect-error" directive to explain why the @ts-expect-error is necessary. The description must be 3 characters or longer.",
2940
"messageId": "tsDirectiveCommentRequiresDescription",
3041
"nodeType": "Line",
@@ -86,13 +97,13 @@ function _otherCases() {
8697
jestPlugin.configs['flat/recommended'],
8798
)
8899
tseslint.config(
100+
// @ts-expect-error
89101
compat.config(deprecationPlugin.configs.recommended),
90102
...compat.config(jestPlugin.configs.recommended),
91103
)
92104
tseslint.config(
93105
// @ts-expect-error
94106
deprecationPlugin.configs.recommended,
95-
// this should error but doesn't because there are no types exported from the jest plugin
96107
jestPlugin.configs.recommended,
97108
)
98109
}

0 commit comments

Comments
 (0)