Skip to content

Commit a058f22

Browse files
authored
chore: upgrade to typescript 5 (#1365)
1 parent e1965a2 commit a058f22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+123
-84
lines changed

.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ module.exports = {
3030
'@typescript-eslint/no-require-imports': 'error',
3131
'@typescript-eslint/ban-ts-comment': 'warn',
3232
'@typescript-eslint/ban-types': 'error',
33+
'@typescript-eslint/consistent-type-imports': [
34+
'error',
35+
{ disallowTypeAnnotations: false, fixStyle: 'inline-type-imports' },
36+
],
37+
'@typescript-eslint/no-import-type-side-effects': 'error',
3338
'@typescript-eslint/no-unused-vars': 'error',
3439
'eslint-comments/no-unused-disable': 'error',
3540
'eslint-plugin/require-meta-docs-description': [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
"semantic-release": "^20.0.0",
142142
"semver": "^7.3.5",
143143
"ts-node": "^10.2.1",
144-
"typescript": "^4.4.0"
144+
"typescript": "^5.0.4"
145145
},
146146
"peerDependencies": {
147147
"@typescript-eslint/eslint-plugin": "^5.0.0",

src/rules/__tests__/no-deprecated-functions.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import { TSESLint } from '@typescript-eslint/utils';
22
import rule from '../no-deprecated-functions';
3-
import { JestVersion, detectJestVersion } from '../utils/detectJestVersion';
3+
import {
4+
type JestVersion,
5+
detectJestVersion,
6+
} from '../utils/detectJestVersion';
47

58
jest.mock('../utils/detectJestVersion');
69

src/rules/__tests__/unbound-method.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from 'path';
2-
import { ESLintUtils, TSESLint } from '@typescript-eslint/utils';
2+
import { ESLintUtils, type TSESLint } from '@typescript-eslint/utils';
33
import dedent from 'dedent';
44
import type { MessageIds, Options } from '../unbound-method';
55

src/rules/consistent-test-it.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
import { AST_NODE_TYPES, TSESLint, TSESTree } from '@typescript-eslint/utils';
1+
import {
2+
AST_NODE_TYPES,
3+
type TSESLint,
4+
type TSESTree,
5+
} from '@typescript-eslint/utils';
26
import {
37
TestCaseName,
48
createRule,

src/rules/expect-expect.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* MIT license, Remco Haszing.
44
*/
55

6-
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils';
6+
import { AST_NODE_TYPES, type TSESTree } from '@typescript-eslint/utils';
77
import {
88
createRule,
99
getNodeName,

src/rules/max-expects.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AST_NODE_TYPES } from '@typescript-eslint/utils';
22
import {
3-
FunctionExpression,
3+
type FunctionExpression,
44
createRule,
55
isTypeOfJestFnCall,
66
parseJestFnCall,

src/rules/max-nested-describe.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils';
1+
import { AST_NODE_TYPES, type TSESTree } from '@typescript-eslint/utils';
22
import { createRule, isTypeOfJestFnCall } from './utils';
33

44
export default createRule({

src/rules/no-conditional-expect.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils';
1+
import { AST_NODE_TYPES, type TSESTree } from '@typescript-eslint/utils';
22
import {
3-
KnownCallExpression,
3+
type KnownCallExpression,
44
createRule,
55
getTestCallExpressionsFromDeclaredVariables,
66
isSupportedAccessor,

src/rules/no-deprecated-functions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils';
1+
import { AST_NODE_TYPES, type TSESTree } from '@typescript-eslint/utils';
22
import {
3-
JestVersion,
3+
type JestVersion,
44
createRule,
55
detectJestVersion,
66
getNodeName,

0 commit comments

Comments
 (0)