Skip to content

Commit 0b2d64d

Browse files
authored
refactor: break utils up a bit and remove old/outdated types (#1127)
* refactor: move `detectJestVersion` into `utils` folder * refactor: remove inaccurate types and unused property enums * refactor: move `expect` parsing utils into `parseExpectCall` file * refactor: move type cast and assertion utils into their own file * refactor: finish moving rest of utils into subfolder
1 parent 963c536 commit 0b2d64d

10 files changed

+611
-679
lines changed

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { TSESLint } from '@typescript-eslint/utils';
2-
import { JestVersion, detectJestVersion } from '../detectJestVersion';
32
import rule from '../no-deprecated-functions';
3+
import { JestVersion, detectJestVersion } from '../utils/detectJestVersion';
44

5-
jest.mock('../detectJestVersion');
5+
jest.mock('../utils/detectJestVersion');
66

77
const detectJestVersionMock = detectJestVersion as jest.MockedFunction<
88
typeof detectJestVersion

src/rules/no-deprecated-functions.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils';
2-
import { JestVersion, detectJestVersion } from './detectJestVersion';
3-
import { createRule, getNodeName } from './utils';
2+
import {
3+
JestVersion,
4+
createRule,
5+
detectJestVersion,
6+
getNodeName,
7+
} from './utils';
48

59
interface ContextSettings {
610
jest?: EslintPluginJestSettings;

0 commit comments

Comments
 (0)