Skip to content

Commit

Permalink
refactor: break utils up a bit and remove old/outdated types (#1127)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
G-Rath committed May 28, 2022
1 parent 963c536 commit 0b2d64d
Show file tree
Hide file tree
Showing 10 changed files with 611 additions and 679 deletions.
4 changes: 2 additions & 2 deletions src/rules/__tests__/no-deprecated-functions.test.ts
@@ -1,8 +1,8 @@
import { TSESLint } from '@typescript-eslint/utils';
import { JestVersion, detectJestVersion } from '../detectJestVersion';
import rule from '../no-deprecated-functions';
import { JestVersion, detectJestVersion } from '../utils/detectJestVersion';

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

const detectJestVersionMock = detectJestVersion as jest.MockedFunction<
typeof detectJestVersion
Expand Down
8 changes: 6 additions & 2 deletions src/rules/no-deprecated-functions.ts
@@ -1,6 +1,10 @@
import { AST_NODE_TYPES, TSESTree } from '@typescript-eslint/utils';
import { JestVersion, detectJestVersion } from './detectJestVersion';
import { createRule, getNodeName } from './utils';
import {
JestVersion,
createRule,
detectJestVersion,
getNodeName,
} from './utils';

interface ContextSettings {
jest?: EslintPluginJestSettings;
Expand Down

0 comments on commit 0b2d64d

Please sign in to comment.