diff --git a/.eslintrc.js b/.eslintrc.js index 57a9f0a1b93f..9ea41ebe643d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,6 +9,7 @@ module.exports = { extends: [ './packages/eslint-config-fb-strict/index.js', 'plugin:import/errors', + 'plugin:import/typescript', 'prettier', 'prettier/flowtype', ], @@ -18,12 +19,14 @@ module.exports = { parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint/eslint-plugin'], rules: { - '@typescript-eslint/array-type': ['error', 'generic'], + '@typescript-eslint/array-type': ['error', {default: 'generic'}], '@typescript-eslint/ban-types': 'error', '@typescript-eslint/no-unused-vars': [ 'error', {argsIgnorePattern: '^_'}, ], + // Since we do `export =`. Remove for Jest 25 + 'import/default': 'off', 'import/order': 'error', 'no-dupe-class-members': 'off', 'no-unused-vars': 'off', @@ -108,10 +111,6 @@ module.exports = { 'no-console': 0, 'no-unused-vars': 2, 'prettier/prettier': 2, - }, - settings: { - 'import/resolver': { - 'eslint-import-resolver-typescript': true, - }, + 'sort-imports': [2, {ignoreDeclarationSort: true}], }, }; diff --git a/docs/TutorialReact.md b/docs/TutorialReact.md index fd92ccbf5f5c..99424c5063cf 100644 --- a/docs/TutorialReact.md +++ b/docs/TutorialReact.md @@ -253,7 +253,7 @@ export default class CheckboxWithLabel extends React.Component { ```javascript // __tests__/CheckboxWithLabel-test.js import React from 'react'; -import {render, fireEvent, cleanup} from '@testing-library/react'; +import {cleanup, fireEvent, render} from '@testing-library/react'; import CheckboxWithLabel from '../CheckboxWithLabel'; // automatically unmount and cleanup DOM after the test is finished. diff --git a/e2e/Utils.ts b/e2e/Utils.ts index e13731358ea8..1094ce358005 100644 --- a/e2e/Utils.ts +++ b/e2e/Utils.ts @@ -10,7 +10,7 @@ import * as fs from 'fs'; import * as path from 'path'; import {Config} from '@jest/types'; -import {sync as spawnSync, ExecaReturns} from 'execa'; +import {ExecaReturns, sync as spawnSync} from 'execa'; import {createDirectory} from 'jest-util'; import rimraf from 'rimraf'; diff --git a/examples/react-testing-library/__tests__/CheckboxWithLabel-test.js b/examples/react-testing-library/__tests__/CheckboxWithLabel-test.js index 190e3fec0d34..8b3227003bb7 100644 --- a/examples/react-testing-library/__tests__/CheckboxWithLabel-test.js +++ b/examples/react-testing-library/__tests__/CheckboxWithLabel-test.js @@ -1,7 +1,7 @@ // Copyright 2004-present Facebook. All Rights Reserved. import React from 'react'; -import {render, fireEvent, cleanup} from '@testing-library/react'; +import {cleanup, fireEvent, render} from '@testing-library/react'; import CheckboxWithLabel from '../CheckboxWithLabel'; // automatically unmount and cleanup DOM after the test is finished. diff --git a/package.json b/package.json index 4cb7378f3ac4..fe7b1c2e6eee 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "@types/babel__template": "^7.0.0", "@types/jest": "24.0.2", "@types/node": "*", - "@typescript-eslint/eslint-plugin": "^1.10.2", - "@typescript-eslint/parser": "^1.10.2", + "@typescript-eslint/eslint-plugin": "^2.0.0", + "@typescript-eslint/parser": "^2.0.0", "ansi-regex": "^4.0.0", "ansi-styles": "^3.2.0", "babel-eslint": "^10.0.2", @@ -28,7 +28,6 @@ "debug": "^4.0.1", "eslint": "^5.6.0", "eslint-config-prettier": "^5.0.0", - "eslint-import-resolver-typescript": "^1.1.1", "eslint-plugin-babel": "^5.1.0", "eslint-plugin-flowtype": "^2.35.0", "eslint-plugin-import": "^2.6.0", diff --git a/packages/babel-jest/src/index.ts b/packages/babel-jest/src/index.ts index e5d84504cb9d..d21e2483455a 100644 --- a/packages/babel-jest/src/index.ts +++ b/packages/babel-jest/src/index.ts @@ -11,10 +11,10 @@ import * as path from 'path'; import {Transformer} from '@jest/transform'; import {Config} from '@jest/types'; import { - loadPartialConfig, PartialConfig, TransformOptions, transformSync as babelTransform, + loadPartialConfig, } from '@babel/core'; import chalk from 'chalk'; import slash from 'slash'; diff --git a/packages/expect/src/index.ts b/packages/expect/src/index.ts index e3fbcc70282c..72a75dd53d7c 100644 --- a/packages/expect/src/index.ts +++ b/packages/expect/src/index.ts @@ -9,15 +9,15 @@ import * as matcherUtils from 'jest-matcher-utils'; import { AsyncExpectationResult, - SyncExpectationResult, + Expect, ExpectationResult, - Matchers as MatcherInterface, MatcherState as JestMatcherState, + Matchers as MatcherInterface, MatchersObject, + PromiseMatcherFn, RawMatcherFn, + SyncExpectationResult, ThrowingMatcherFn, - PromiseMatcherFn, - Expect, } from './types'; import {iterableEquality, subsetEquality} from './utils'; @@ -35,16 +35,16 @@ import { objectContaining, objectNotContaining, stringContaining, - stringNotContaining, stringMatching, + stringNotContaining, stringNotMatching, } from './asymmetricMatchers'; import { INTERNAL_MATCHER_FLAG, - getState, - setState, getMatchers, + getState, setMatchers, + setState, } from './jestMatchersObject'; import extractExpectedAssertionsErrors from './extractExpectedAssertionsErrors'; diff --git a/packages/expect/src/matchers.ts b/packages/expect/src/matchers.ts index 828d6b2c64d4..c9ee95c4f670 100644 --- a/packages/expect/src/matchers.ts +++ b/packages/expect/src/matchers.ts @@ -10,6 +10,7 @@ import getType, {isPrimitive} from 'jest-get-type'; import { DIM_COLOR, EXPECTED_COLOR, + MatcherHintOptions, RECEIVED_COLOR, SUGGEST_TO_CONTAIN_EQUAL, ensureExpectedIsNonNegativeInteger, @@ -19,13 +20,12 @@ import { matcherErrorMessage, matcherHint, printDiffOrStringify, - printReceived, printExpected, + printReceived, printWithType, stringify, - MatcherHintOptions, } from 'jest-matcher-utils'; -import {MatchersObject, MatcherState} from './types'; +import {MatcherState, MatchersObject} from './types'; import { printExpectedConstructorName, printExpectedConstructorNameNot, diff --git a/packages/expect/src/spyMatchers.ts b/packages/expect/src/spyMatchers.ts index 86425155357d..476107ca83c0 100644 --- a/packages/expect/src/spyMatchers.ts +++ b/packages/expect/src/spyMatchers.ts @@ -7,21 +7,21 @@ import getType, {isPrimitive} from 'jest-get-type'; import { + DIM_COLOR, + EXPECTED_COLOR, + MatcherHintOptions, + RECEIVED_COLOR, diff, ensureExpectedIsNumber, ensureNoExpected, - DIM_COLOR, - EXPECTED_COLOR, matcherErrorMessage, matcherHint, - MatcherHintOptions, printExpected, printReceived, printWithType, - RECEIVED_COLOR, stringify, } from 'jest-matcher-utils'; -import {MatchersObject, MatcherState, SyncExpectationResult} from './types'; +import {MatcherState, MatchersObject, SyncExpectationResult} from './types'; import {equals} from './jasmineUtils'; import {iterableEquality} from './utils'; diff --git a/packages/expect/src/toThrowMatchers.ts b/packages/expect/src/toThrowMatchers.ts index 7d84c2e808af..0262f533df43 100644 --- a/packages/expect/src/toThrowMatchers.ts +++ b/packages/expect/src/toThrowMatchers.ts @@ -9,6 +9,7 @@ import {formatStackTrace, separateMessageFromStack} from 'jest-message-util'; import { EXPECTED_COLOR, + MatcherHintOptions, RECEIVED_COLOR, matcherErrorMessage, matcherHint, @@ -16,7 +17,6 @@ import { printExpected, printReceived, printWithType, - MatcherHintOptions, } from 'jest-matcher-utils'; import { printExpectedConstructorName, @@ -27,8 +27,8 @@ import { printReceivedStringContainExpectedSubstring, } from './print'; import { - MatchersObject, MatcherState, + MatchersObject, RawMatcherFn, SyncExpectationResult, } from './types'; diff --git a/packages/jest-circus/src/__mocks__/testUtils.ts b/packages/jest-circus/src/__mocks__/testUtils.ts index ecb0c519f548..12c2da24e110 100644 --- a/packages/jest-circus/src/__mocks__/testUtils.ts +++ b/packages/jest-circus/src/__mocks__/testUtils.ts @@ -9,7 +9,7 @@ import * as fs from 'fs'; import {tmpdir} from 'os'; import * as path from 'path'; import {createHash} from 'crypto'; -import {sync as spawnSync, ExecaReturns} from 'execa'; +import {ExecaReturns, sync as spawnSync} from 'execa'; import {skipSuiteOnWindows} from '@jest/test-utils'; const CIRCUS_PATH = require.resolve('../../build'); diff --git a/packages/jest-circus/src/__tests__/hooksError.test.ts b/packages/jest-circus/src/__tests__/hooksError.test.ts index 5b39df11a43b..7781d7604123 100644 --- a/packages/jest-circus/src/__tests__/hooksError.test.ts +++ b/packages/jest-circus/src/__tests__/hooksError.test.ts @@ -5,12 +5,12 @@ * LICENSE file in the root directory of this source tree. */ +import {Circus} from '@jest/types'; import circus from '../'; -import {HookType} from '../types'; describe.each(['beforeEach', 'beforeAll', 'afterEach', 'afterAll'])( '%s hooks error throwing', - (fn: HookType) => { + (fn: Circus.HookType) => { test.each([ ['String'], [1], diff --git a/packages/jest-circus/src/eventHandler.ts b/packages/jest-circus/src/eventHandler.ts index bcbd151709e1..29dd7d8a2796 100644 --- a/packages/jest-circus/src/eventHandler.ts +++ b/packages/jest-circus/src/eventHandler.ts @@ -10,11 +10,11 @@ import {TEST_TIMEOUT_SYMBOL} from './types'; import { addErrorToEachTestUnderDescribe, - makeDescribe, + describeBlockHasTests, getTestDuration, invariant, + makeDescribe, makeTest, - describeBlockHasTests, } from './utils'; import { injectGlobalErrorHandlers, diff --git a/packages/jest-circus/src/formatNodeAssertErrors.ts b/packages/jest-circus/src/formatNodeAssertErrors.ts index 498688538195..c1b22076a09d 100644 --- a/packages/jest-circus/src/formatNodeAssertErrors.ts +++ b/packages/jest-circus/src/formatNodeAssertErrors.ts @@ -8,10 +8,10 @@ import {AssertionError} from 'assert'; import {Circus} from '@jest/types'; import { + DiffOptions, diff, printExpected, printReceived, - DiffOptions, } from 'jest-matcher-utils'; import chalk from 'chalk'; import prettyFormat from 'pretty-format'; diff --git a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts index eba12e58e12c..2380e616dd68 100644 --- a/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts +++ b/packages/jest-circus/src/legacy-code-todo-rewrite/jestAdapterInit.ts @@ -18,10 +18,10 @@ import { } from 'jest-snapshot'; import throat from 'throat'; import { + ROOT_DESCRIBE_BLOCK_NAME, addEventHandler, dispatch, getState as getRunnerState, - ROOT_DESCRIBE_BLOCK_NAME, } from '../state'; import {getTestID} from '../utils'; import run from '../run'; diff --git a/packages/jest-circus/src/legacy-code-todo-rewrite/jestExpect.ts b/packages/jest-circus/src/legacy-code-todo-rewrite/jestExpect.ts index a78f4da4f4ae..440c16dd49c4 100644 --- a/packages/jest-circus/src/legacy-code-todo-rewrite/jestExpect.ts +++ b/packages/jest-circus/src/legacy-code-todo-rewrite/jestExpect.ts @@ -9,10 +9,10 @@ import expect from 'expect'; import { addSerializer, - toMatchSnapshot, toMatchInlineSnapshot, - toThrowErrorMatchingSnapshot, + toMatchSnapshot, toThrowErrorMatchingInlineSnapshot, + toThrowErrorMatchingSnapshot, } from 'jest-snapshot'; export default (config: {expand: boolean}) => { diff --git a/packages/jest-circus/src/run.ts b/packages/jest-circus/src/run.ts index f289a7501d24..5f99ac2ccb24 100644 --- a/packages/jest-circus/src/run.ts +++ b/packages/jest-circus/src/run.ts @@ -8,7 +8,7 @@ import {Circus} from '@jest/types'; import {RETRY_TIMES} from './types'; -import {getState, dispatch} from './state'; +import {dispatch, getState} from './state'; import { callAsyncCircusFn, getAllHooksForDescribe, diff --git a/packages/jest-cli/src/index.ts b/packages/jest-cli/src/index.ts index 03b9e0a4d8bc..a03c03018a7a 100644 --- a/packages/jest-cli/src/index.ts +++ b/packages/jest-cli/src/index.ts @@ -7,11 +7,11 @@ // TODO: remove @jest/core exports for the next major import { - getVersion, - runCLI, SearchSource, TestScheduler, TestWatcher, + getVersion, + runCLI, } from '@jest/core'; import {run} from './cli'; diff --git a/packages/jest-cli/src/init/index.ts b/packages/jest-cli/src/init/index.ts index 0b870b86bcae..582b5260dad8 100644 --- a/packages/jest-cli/src/init/index.ts +++ b/packages/jest-cli/src/init/index.ts @@ -11,8 +11,8 @@ import chalk from 'chalk'; import prompts from 'prompts'; import {sync as realpath} from 'realpath-native'; import defaultQuestions, {testScriptQuestion} from './questions'; -import {NotFoundPackageJsonError, MalformedPackageJsonError} from './errors'; -import {PACKAGE_JSON, JEST_CONFIG} from './constants'; +import {MalformedPackageJsonError, NotFoundPackageJsonError} from './errors'; +import {JEST_CONFIG, PACKAGE_JSON} from './constants'; import generateConfigFile from './generate_config_file'; import modifyPackageJson from './modify_package_json'; import {ProjectPackageJson} from './types'; diff --git a/packages/jest-config/src/ReporterValidationErrors.ts b/packages/jest-config/src/ReporterValidationErrors.ts index 3a658382d993..f33fc29724ca 100644 --- a/packages/jest-config/src/ReporterValidationErrors.ts +++ b/packages/jest-config/src/ReporterValidationErrors.ts @@ -9,7 +9,7 @@ import {Config} from '@jest/types'; import {ValidationError} from 'jest-validate'; import chalk from 'chalk'; import getType from 'jest-get-type'; -import {DOCUMENTATION_NOTE, BULLET} from './utils'; +import {BULLET, DOCUMENTATION_NOTE} from './utils'; const validReporterTypes = ['array', 'string']; const ERROR = `${BULLET}Reporter Validation Error`; diff --git a/packages/jest-config/src/normalize.ts b/packages/jest-config/src/normalize.ts index bd1feeebbdd2..bc798f9bac3a 100644 --- a/packages/jest-config/src/normalize.ts +++ b/packages/jest-config/src/normalize.ts @@ -22,14 +22,14 @@ import getMaxWorkers from './getMaxWorkers'; import { BULLET, DOCUMENTATION_NOTE, - replaceRootDirInPath, _replaceRootDirTags, escapeGlobCharacters, - getTestEnvironment, getRunner, + getSequencer, + getTestEnvironment, getWatchPlugin, + replaceRootDirInPath, resolve, - getSequencer, } from './utils'; import {DEFAULT_JS_PATTERN, DEFAULT_REPORTER_LABEL} from './constants'; import {validateReporters} from './ReporterValidationErrors'; diff --git a/packages/jest-console/src/BufferedConsole.ts b/packages/jest-console/src/BufferedConsole.ts index a8ed338b0b01..1b6f04d72a49 100644 --- a/packages/jest-console/src/BufferedConsole.ts +++ b/packages/jest-console/src/BufferedConsole.ts @@ -9,7 +9,7 @@ import assert from 'assert'; import {Console} from 'console'; import {format} from 'util'; import chalk from 'chalk'; -import {getCallsite, SourceMapRegistry} from '@jest/source-map'; +import {SourceMapRegistry, getCallsite} from '@jest/source-map'; import { ConsoleBuffer, LogCounters, diff --git a/packages/jest-core/src/SearchSource.ts b/packages/jest-core/src/SearchSource.ts index dfadd7b70d0d..4159137df91b 100644 --- a/packages/jest-core/src/SearchSource.ts +++ b/packages/jest-core/src/SearchSource.ts @@ -16,7 +16,7 @@ import {escapePathForRegex} from 'jest-regex-util'; import {replaceRootDirInPath} from 'jest-config'; import {buildSnapshotResolver} from 'jest-snapshot'; import {replacePathSepForGlob, testPathPatternToRegExp} from 'jest-util'; -import {TestPathCases, Filter, Stats} from './types'; +import {Filter, Stats, TestPathCases} from './types'; export type SearchResult = { noSCM?: boolean; diff --git a/packages/jest-core/src/TestScheduler.ts b/packages/jest-core/src/TestScheduler.ts index bce8ca39125d..9b60df493e3c 100644 --- a/packages/jest-core/src/TestScheduler.ts +++ b/packages/jest-core/src/TestScheduler.ts @@ -15,18 +15,18 @@ import { CoverageReporter, DefaultReporter, NotifyReporter, + Reporter, SummaryReporter, VerboseReporter, - Reporter, } from '@jest/reporters'; import exit from 'exit'; import { - addResult, AggregatedResult, - buildFailureTestResult, - makeEmptyAggregatedTestResult, SerializableError, TestResult, + addResult, + buildFailureTestResult, + makeEmptyAggregatedTestResult, } from '@jest/test-result'; import ReporterDispatcher from './ReporterDispatcher'; import TestWatcher from './TestWatcher'; diff --git a/packages/jest-core/src/getChangedFilesPromise.ts b/packages/jest-core/src/getChangedFilesPromise.ts index eec8f482836f..43e79e448e59 100644 --- a/packages/jest-core/src/getChangedFilesPromise.ts +++ b/packages/jest-core/src/getChangedFilesPromise.ts @@ -6,7 +6,7 @@ */ import {Config} from '@jest/types'; -import {getChangedFilesForRoots, ChangedFilesPromise} from 'jest-changed-files'; +import {ChangedFilesPromise, getChangedFilesForRoots} from 'jest-changed-files'; import {formatExecError} from 'jest-message-util'; import chalk from 'chalk'; diff --git a/packages/jest-core/src/lib/watch_plugins_helpers.ts b/packages/jest-core/src/lib/watch_plugins_helpers.ts index db43a6655026..e9fbac71bffa 100644 --- a/packages/jest-core/src/lib/watch_plugins_helpers.ts +++ b/packages/jest-core/src/lib/watch_plugins_helpers.ts @@ -6,7 +6,7 @@ */ import {Config} from '@jest/types'; -import {WatchPlugin, UsageData} from 'jest-watcher'; +import {UsageData, WatchPlugin} from 'jest-watcher'; export const filterInteractivePlugins = ( watchPlugins: Array, diff --git a/packages/jest-core/src/runJest.ts b/packages/jest-core/src/runJest.ts index 6600fc19ef1a..191845fe6db3 100644 --- a/packages/jest-core/src/runJest.ts +++ b/packages/jest-core/src/runJest.ts @@ -30,7 +30,7 @@ import TestScheduler, {TestSchedulerContext} from './TestScheduler'; import FailedTestsCache from './FailedTestsCache'; import collectNodeHandles from './collectHandles'; import TestWatcher from './TestWatcher'; -import {TestRunData, Filter} from './types'; +import {Filter, TestRunData} from './types'; const getTestPaths = async ( globalConfig: Config.GlobalConfig, diff --git a/packages/jest-core/src/watch.ts b/packages/jest-core/src/watch.ts index 23bd1c2ba38f..b8944a32acf7 100644 --- a/packages/jest-core/src/watch.ts +++ b/packages/jest-core/src/watch.ts @@ -19,8 +19,8 @@ import Resolver from 'jest-resolve'; import {Config} from '@jest/types'; import { AllowedConfigOptions, - KEYS, JestHook, + KEYS, WatchPlugin, WatchPluginClass, } from 'jest-watcher'; @@ -38,8 +38,8 @@ import UpdateSnapshotsPlugin from './plugins/update_snapshots'; import UpdateSnapshotsInteractivePlugin from './plugins/update_snapshots_interactive'; import QuitPlugin from './plugins/quit'; import { - getSortedUsageRows, filterInteractivePlugins, + getSortedUsageRows, } from './lib/watch_plugins_helpers'; import activeFilters from './lib/active_filters_message'; import {Filter} from './types'; diff --git a/packages/jest-diff/src/diffStrings.ts b/packages/jest-diff/src/diffStrings.ts index ffbb6223377d..9003f8575cac 100644 --- a/packages/jest-diff/src/diffStrings.ts +++ b/packages/jest-diff/src/diffStrings.ts @@ -7,7 +7,7 @@ import diffSequences from 'diff-sequences'; -import {Diff, DIFF_EQUAL, DIFF_DELETE, DIFF_INSERT} from './cleanupSemantic'; +import {DIFF_DELETE, DIFF_EQUAL, DIFF_INSERT, Diff} from './cleanupSemantic'; const diffStrings = (a: string, b: string): Array => { const isCommon = (aIndex: number, bIndex: number) => a[aIndex] === b[bIndex]; diff --git a/packages/jest-diff/src/getAlignedDiffs.ts b/packages/jest-diff/src/getAlignedDiffs.ts index 57dd52040a92..e653482e3880 100644 --- a/packages/jest-diff/src/getAlignedDiffs.ts +++ b/packages/jest-diff/src/getAlignedDiffs.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Diff, DIFF_DELETE, DIFF_INSERT} from './cleanupSemantic'; +import {DIFF_DELETE, DIFF_INSERT, Diff} from './cleanupSemantic'; import {MULTILINE_REGEXP, getHighlightedString} from './printDiffs'; // Encapsulate change lines until either a common newline or the end. diff --git a/packages/jest-diff/src/printDiffs.ts b/packages/jest-diff/src/printDiffs.ts index aa2eec6729ae..de210cf950a5 100644 --- a/packages/jest-diff/src/printDiffs.ts +++ b/packages/jest-diff/src/printDiffs.ts @@ -8,11 +8,11 @@ import chalk from 'chalk'; import { - cleanupSemantic, - DIFF_EQUAL, DIFF_DELETE, + DIFF_EQUAL, DIFF_INSERT, Diff, + cleanupSemantic, } from './cleanupSemantic'; import diffStrings from './diffStrings'; import getAlignedDiffs from './getAlignedDiffs'; diff --git a/packages/jest-environment-jsdom/src/index.ts b/packages/jest-environment-jsdom/src/index.ts index 5e362f9244f6..013ae529c1eb 100644 --- a/packages/jest-environment-jsdom/src/index.ts +++ b/packages/jest-environment-jsdom/src/index.ts @@ -6,11 +6,11 @@ */ import {Script} from 'vm'; -import {Global, Config} from '@jest/types'; +import {Config, Global} from '@jest/types'; import {installCommonGlobals} from 'jest-util'; import mock, {ModuleMocker} from 'jest-mock'; import {JestFakeTimers as FakeTimers} from '@jest/fake-timers'; -import {JestEnvironment, EnvironmentContext} from '@jest/environment'; +import {EnvironmentContext, JestEnvironment} from '@jest/environment'; import {JSDOM, VirtualConsole} from 'jsdom'; // The `Window` interface does not have an `Error.stackTraceLimit` property, but diff --git a/packages/jest-environment-node/src/index.ts b/packages/jest-environment-node/src/index.ts index bc82af123b5e..a32d9b510acf 100644 --- a/packages/jest-environment-node/src/index.ts +++ b/packages/jest-environment-node/src/index.ts @@ -5,8 +5,8 @@ * LICENSE file in the root directory of this source tree. */ -import vm, {Script, Context} from 'vm'; -import {Global, Config} from '@jest/types'; +import vm, {Context, Script} from 'vm'; +import {Config, Global} from '@jest/types'; import {ModuleMocker} from 'jest-mock'; import {installCommonGlobals} from 'jest-util'; import {JestFakeTimers as FakeTimers} from '@jest/fake-timers'; diff --git a/packages/jest-fake-timers/src/jestFakeTimers.ts b/packages/jest-fake-timers/src/jestFakeTimers.ts index 11e20e7b7ebb..457d85fdf166 100644 --- a/packages/jest-fake-timers/src/jestFakeTimers.ts +++ b/packages/jest-fake-timers/src/jestFakeTimers.ts @@ -6,7 +6,7 @@ */ import {ModuleMocker} from 'jest-mock'; -import {formatStackTrace, StackTraceConfig} from 'jest-message-util'; +import {StackTraceConfig, formatStackTrace} from 'jest-message-util'; type Callback = (...args: Array) => void; diff --git a/packages/jest-haste-map/src/ModuleMap.ts b/packages/jest-haste-map/src/ModuleMap.ts index 1988285f29e3..73c904332bf5 100644 --- a/packages/jest-haste-map/src/ModuleMap.ts +++ b/packages/jest-haste-map/src/ModuleMap.ts @@ -9,10 +9,10 @@ import {Config} from '@jest/types'; import { DuplicatesSet, HTypeValue, + MockData, + ModuleMapData, ModuleMetaData, RawModuleMap, - ModuleMapData, - MockData, } from './types'; import * as fastPath from './lib/fast_path'; diff --git a/packages/jest-haste-map/src/crawlers/node.ts b/packages/jest-haste-map/src/crawlers/node.ts index 24ac5d15584a..6e6b6b5d4c9d 100644 --- a/packages/jest-haste-map/src/crawlers/node.ts +++ b/packages/jest-haste-map/src/crawlers/node.ts @@ -11,10 +11,10 @@ import {spawn} from 'child_process'; import H from '../constants'; import * as fastPath from '../lib/fast_path'; import { - IgnoreMatcher, - InternalHasteMap, CrawlerOptions, FileData, + IgnoreMatcher, + InternalHasteMap, } from '../types'; type Result = Array<[/* id */ string, /* mtime */ number, /* size */ number]>; diff --git a/packages/jest-haste-map/src/crawlers/watchman.ts b/packages/jest-haste-map/src/crawlers/watchman.ts index 8af44ff55a3e..6db50b6e5643 100644 --- a/packages/jest-haste-map/src/crawlers/watchman.ts +++ b/packages/jest-haste-map/src/crawlers/watchman.ts @@ -12,10 +12,10 @@ import * as fastPath from '../lib/fast_path'; import normalizePathSep from '../lib/normalizePathSep'; import H from '../constants'; import { - InternalHasteMap, CrawlerOptions, - FileMetaData, FileData, + FileMetaData, + InternalHasteMap, } from '../types'; type WatchmanRoots = Map>; diff --git a/packages/jest-haste-map/src/index.ts b/packages/jest-haste-map/src/index.ts index 86b6ac9fff2b..3ddac89a386e 100644 --- a/packages/jest-haste-map/src/index.ts +++ b/packages/jest-haste-map/src/index.ts @@ -33,18 +33,18 @@ import FSEventsWatcher from './lib/FSEventsWatcher'; import * as fastPath from './lib/fast_path'; import { ChangeEvent, + CrawlerOptions, EventsQueue, + FileData, FileMetaData, - HasteMap as InternalHasteMapObject, HasteRegExp, InternalHasteMap, + HasteMap as InternalHasteMapObject, Mapper, MockData, ModuleMapData, ModuleMetaData, WorkerMetadata, - CrawlerOptions, - FileData, } from './types'; type HType = typeof H; diff --git a/packages/jest-jasmine2/src/assertionErrorMessage.ts b/packages/jest-jasmine2/src/assertionErrorMessage.ts index 6dbb8959654f..4637faef2949 100644 --- a/packages/jest-jasmine2/src/assertionErrorMessage.ts +++ b/packages/jest-jasmine2/src/assertionErrorMessage.ts @@ -6,10 +6,10 @@ */ import { + DiffOptions, diff, - printReceived, printExpected, - DiffOptions, + printReceived, } from 'jest-matcher-utils'; import chalk from 'chalk'; import {AssertionErrorWithStack} from './types'; diff --git a/packages/jest-jasmine2/src/jasmine/Env.ts b/packages/jest-jasmine2/src/jasmine/Env.ts index 5515b3c368bc..6ff8da163bcf 100644 --- a/packages/jest-jasmine2/src/jasmine/Env.ts +++ b/packages/jest-jasmine2/src/jasmine/Env.ts @@ -41,7 +41,7 @@ import queueRunner, { import treeProcessor, {TreeNode} from '../treeProcessor'; import isError from '../isError'; import assertionErrorMessage from '../assertionErrorMessage'; -import {Jasmine, AssertionErrorWithStack, Reporter, Spy} from '../types'; +import {AssertionErrorWithStack, Jasmine, Reporter, Spy} from '../types'; import Spec, {SpecResult} from './Spec'; import Suite from './Suite'; diff --git a/packages/jest-jasmine2/src/jasmineAsyncInstall.ts b/packages/jest-jasmine2/src/jasmineAsyncInstall.ts index ced53dd78993..85e1975ba7d4 100644 --- a/packages/jest-jasmine2/src/jasmineAsyncInstall.ts +++ b/packages/jest-jasmine2/src/jasmineAsyncInstall.ts @@ -10,7 +10,7 @@ * returning a promise from `it/test` and `before/afterEach/All` blocks. */ -import {Global, Config} from '@jest/types'; +import {Config, Global} from '@jest/types'; import co from 'co'; import isGeneratorFn from 'is-generator-fn'; import throat from 'throat'; diff --git a/packages/jest-jasmine2/src/jestExpect.ts b/packages/jest-jasmine2/src/jestExpect.ts index 254e95701de3..6d1cc2422e96 100644 --- a/packages/jest-jasmine2/src/jestExpect.ts +++ b/packages/jest-jasmine2/src/jestExpect.ts @@ -9,12 +9,12 @@ import expect, {MatcherState} from 'expect'; import {Global} from '@jest/types'; import { addSerializer, - toMatchSnapshot, toMatchInlineSnapshot, - toThrowErrorMatchingSnapshot, + toMatchSnapshot, toThrowErrorMatchingInlineSnapshot, + toThrowErrorMatchingSnapshot, } from 'jest-snapshot'; -import {RawMatcherFn, Jasmine} from './types'; +import {Jasmine, RawMatcherFn} from './types'; declare const global: Global.Global; diff --git a/packages/jest-jasmine2/src/setup_jest_globals.ts b/packages/jest-jasmine2/src/setup_jest_globals.ts index e66580c8bba6..94d8ee2a08aa 100644 --- a/packages/jest-jasmine2/src/setup_jest_globals.ts +++ b/packages/jest-jasmine2/src/setup_jest_globals.ts @@ -9,9 +9,9 @@ import {Config, Global} from '@jest/types'; import {Plugin} from 'pretty-format'; import {extractExpectedAssertionsErrors, getState, setState} from 'expect'; import { - buildSnapshotResolver, SnapshotState, addSerializer, + buildSnapshotResolver, } from 'jest-snapshot'; import JasmineSpec, {Attributes, SpecResult} from './jasmine/Spec'; import {Jasmine} from './types'; diff --git a/packages/jest-matcher-utils/src/__tests__/index.test.ts b/packages/jest-matcher-utils/src/__tests__/index.test.ts index 22e8d24fb749..2178cecae6cc 100644 --- a/packages/jest-matcher-utils/src/__tests__/index.test.ts +++ b/packages/jest-matcher-utils/src/__tests__/index.test.ts @@ -8,14 +8,14 @@ import chalk from 'chalk'; import { + MatcherHintOptions, diff, - ensureNumbers, ensureNoExpected, + ensureNumbers, getLabelPrinter, matcherHint, pluralize, stringify, - MatcherHintOptions, } from '../'; describe('.stringify()', () => { diff --git a/packages/jest-reporters/src/Status.ts b/packages/jest-reporters/src/Status.ts index c6a279c48f25..d5d926c86a6e 100644 --- a/packages/jest-reporters/src/Status.ts +++ b/packages/jest-reporters/src/Status.ts @@ -12,9 +12,9 @@ import stringLength from 'string-length'; import {ReporterOnStartOptions} from './types'; import { getSummary, + printDisplayName, trimAndFormatPath, wrapAnsiString, - printDisplayName, } from './utils'; const RUNNING_TEXT = ' RUNS '; diff --git a/packages/jest-reporters/src/__tests__/utils.test.js b/packages/jest-reporters/src/__tests__/utils.test.js index cc93b0a4d846..c8e58ced550a 100644 --- a/packages/jest-reporters/src/__tests__/utils.test.js +++ b/packages/jest-reporters/src/__tests__/utils.test.js @@ -8,7 +8,7 @@ import path from 'path'; import chalk from 'chalk'; import stripAnsi from 'strip-ansi'; -import {trimAndFormatPath, wrapAnsiString, printDisplayName} from '../utils'; +import {printDisplayName, trimAndFormatPath, wrapAnsiString} from '../utils'; describe('wrapAnsiString()', () => { it('wraps a long string containing ansi chars', () => { diff --git a/packages/jest-reporters/src/base_reporter.ts b/packages/jest-reporters/src/base_reporter.ts index 5bce49df154e..0224a65e2378 100644 --- a/packages/jest-reporters/src/base_reporter.ts +++ b/packages/jest-reporters/src/base_reporter.ts @@ -7,7 +7,7 @@ import {AggregatedResult, TestResult} from '@jest/test-result'; import {preRunMessage} from 'jest-util'; -import {ReporterOnStartOptions, Context, Test, Reporter} from './types'; +import {Context, Reporter, ReporterOnStartOptions, Test} from './types'; const {remove: preRunMessageRemove} = preRunMessage; diff --git a/packages/jest-reporters/src/coverage_reporter.ts b/packages/jest-reporters/src/coverage_reporter.ts index e767f7d3cdfb..5bff6fc0297b 100644 --- a/packages/jest-reporters/src/coverage_reporter.ts +++ b/packages/jest-reporters/src/coverage_reporter.ts @@ -14,16 +14,16 @@ import istanbulReports from 'istanbul-reports'; import chalk from 'chalk'; import istanbulCoverage, { CoverageMap, - FileCoverage, CoverageSummary, CoverageSummaryData, + FileCoverage, } from 'istanbul-lib-coverage'; import libSourceMaps, {MapStore} from 'istanbul-lib-source-maps'; import Worker from 'jest-worker'; import glob from 'glob'; import {RawSourceMap} from 'source-map'; import BaseReporter from './base_reporter'; -import {Context, Test, CoverageWorker, CoverageReporterOptions} from './types'; +import {Context, CoverageReporterOptions, CoverageWorker, Test} from './types'; const FAIL_COLOR = chalk.bold.red; const RUNNING_TEST_COLOR = chalk.bold.dim; diff --git a/packages/jest-reporters/src/default_reporter.ts b/packages/jest-reporters/src/default_reporter.ts index 1946f9c2a9f4..c141434d5776 100644 --- a/packages/jest-reporters/src/default_reporter.ts +++ b/packages/jest-reporters/src/default_reporter.ts @@ -9,7 +9,7 @@ import {Config} from '@jest/types'; import {AggregatedResult, TestResult} from '@jest/test-result'; import {clearLine, getConsoleOutput, isInteractive} from 'jest-util'; import chalk from 'chalk'; -import {Test, ReporterOnStartOptions} from './types'; +import {ReporterOnStartOptions, Test} from './types'; import BaseReporter from './base_reporter'; import Status from './Status'; import getResultHeader from './get_result_header'; diff --git a/packages/jest-reporters/src/generateEmptyCoverage.ts b/packages/jest-reporters/src/generateEmptyCoverage.ts index ba0b0c7f1a8e..2b3bd795faed 100644 --- a/packages/jest-reporters/src/generateEmptyCoverage.ts +++ b/packages/jest-reporters/src/generateEmptyCoverage.ts @@ -8,7 +8,7 @@ import {Config} from '@jest/types'; import {readInitialCoverage} from 'istanbul-lib-instrument'; import {createFileCoverage} from 'istanbul-lib-coverage'; -import {shouldInstrument, ScriptTransformer} from '@jest/transform'; +import {ScriptTransformer, shouldInstrument} from '@jest/transform'; export type CoverageWorkerResult = { coverage: any; diff --git a/packages/jest-reporters/src/notify_reporter.ts b/packages/jest-reporters/src/notify_reporter.ts index 046200aab357..5829c369763c 100644 --- a/packages/jest-reporters/src/notify_reporter.ts +++ b/packages/jest-reporters/src/notify_reporter.ts @@ -11,7 +11,7 @@ import exit from 'exit'; import {Config} from '@jest/types'; import {AggregatedResult} from '@jest/test-result'; import {notify} from 'node-notifier'; -import {TestSchedulerContext, Context} from './types'; +import {Context, TestSchedulerContext} from './types'; import BaseReporter from './base_reporter'; const isDarwin = process.platform === 'darwin'; diff --git a/packages/jest-reporters/src/types.ts b/packages/jest-reporters/src/types.ts index a5029660ef29..5e603cf9e41a 100644 --- a/packages/jest-reporters/src/types.ts +++ b/packages/jest-reporters/src/types.ts @@ -12,7 +12,7 @@ import { TestResult, } from '@jest/test-result'; import {JestEnvironment as Environment} from '@jest/environment'; -import {ModuleMap, FS as HasteFS} from 'jest-haste-map'; +import {FS as HasteFS, ModuleMap} from 'jest-haste-map'; import HasteResolver from 'jest-resolve'; import Runtime from 'jest-runtime'; import {worker} from './coverage_worker'; diff --git a/packages/jest-resolve-dependencies/src/index.ts b/packages/jest-resolve-dependencies/src/index.ts index 490065b10322..dd9f075180de 100644 --- a/packages/jest-resolve-dependencies/src/index.ts +++ b/packages/jest-resolve-dependencies/src/index.ts @@ -8,7 +8,7 @@ import {Config} from '@jest/types'; import {FS as HasteFS} from 'jest-haste-map'; // eslint-disable-line import/no-extraneous-dependencies import Resolver from 'jest-resolve'; // eslint-disable-line import/no-extraneous-dependencies -import {isSnapshotPath, SnapshotResolver} from 'jest-snapshot'; +import {SnapshotResolver, isSnapshotPath} from 'jest-snapshot'; namespace DependencyResolver { export type ResolvedModule = { diff --git a/packages/jest-runner/src/__tests__/testRunner.test.js b/packages/jest-runner/src/__tests__/testRunner.test.ts similarity index 52% rename from packages/jest-runner/src/__tests__/testRunner.test.js rename to packages/jest-runner/src/__tests__/testRunner.test.ts index 99f1425a0c05..6a13db1b9c09 100644 --- a/packages/jest-runner/src/__tests__/testRunner.test.js +++ b/packages/jest-runner/src/__tests__/testRunner.test.ts @@ -25,7 +25,7 @@ jest.mock('jest-worker', () => jest.mock('../testWorker', () => {}); -test('injects the serializable module map into each worker in watch mode', () => { +test('injects the serializable module map into each worker in watch mode', async () => { const globalConfig = {maxWorkers: 2, watch: true}; const config = {rootDir: '/path/'}; const serializableModuleMap = jest.fn(); @@ -34,52 +34,49 @@ test('injects the serializable module map into each worker in watch mode', () => config, moduleMap: {toJSON: () => serializableModuleMap}, }; - return new TestRunner(globalConfig) - .runTests( - [{context, path: './file.test.js'}, {context, path: './file2.test.js'}], - new TestWatcher({isWatchMode: globalConfig.watch}), - () => {}, - () => {}, - () => {}, - {serial: false}, - ) - .then(() => { - expect(mockWorkerFarm.worker.mock.calls).toEqual([ - [ - { - config, - context: runContext, - globalConfig, - path: './file.test.js', - }, - ], - [ - { - config, - context: runContext, - globalConfig, - path: './file2.test.js', - }, - ], - ]); - }); + + await new TestRunner(globalConfig).runTests( + [{context, path: './file.test.js'}, {context, path: './file2.test.js'}], + new TestWatcher({isWatchMode: globalConfig.watch}), + () => {}, + () => {}, + () => {}, + {serial: false}, + ); + + expect(mockWorkerFarm.worker.mock.calls).toEqual([ + [ + { + config, + context: runContext, + globalConfig, + path: './file.test.js', + }, + ], + [ + { + config, + context: runContext, + globalConfig, + path: './file2.test.js', + }, + ], + ]); }); -test('assign process.env.JEST_WORKER_ID = 1 when in runInBand mode', () => { +test('assign process.env.JEST_WORKER_ID = 1 when in runInBand mode', async () => { const globalConfig = {maxWorkers: 1, watch: false}; const config = {rootDir: '/path/'}; const context = {config}; - return new TestRunner(globalConfig) - .runTests( - [{context, path: './file.test.js'}], - new TestWatcher({isWatchMode: globalConfig.watch}), - () => {}, - () => {}, - () => {}, - {serial: true}, - ) - .then(() => { - expect(process.env.JEST_WORKER_ID).toBe('1'); - }); + await new TestRunner(globalConfig).runTests( + [{context, path: './file.test.js'}], + new TestWatcher({isWatchMode: globalConfig.watch}), + () => {}, + () => {}, + () => {}, + {serial: true}, + ); + + expect(process.env.JEST_WORKER_ID).toBe('1'); }); diff --git a/packages/jest-runner/src/index.ts b/packages/jest-runner/src/index.ts index c64e658bae98..24a2ecf1601d 100644 --- a/packages/jest-runner/src/index.ts +++ b/packages/jest-runner/src/index.ts @@ -11,7 +11,7 @@ import exit from 'exit'; import throat from 'throat'; import Worker from 'jest-worker'; import runTest from './runTest'; -import {worker, SerializableResolver} from './testWorker'; +import {SerializableResolver, worker} from './testWorker'; import { OnTestFailure as JestOnTestFailure, OnTestStart as JestOnTestStart, diff --git a/packages/jest-runner/src/runTest.ts b/packages/jest-runner/src/runTest.ts index 2ca661b76464..7742cc9c09cf 100644 --- a/packages/jest-runner/src/runTest.ts +++ b/packages/jest-runner/src/runTest.ts @@ -11,15 +11,15 @@ import {TestResult} from '@jest/test-result'; import { BufferedConsole, CustomConsole, - NullConsole, - LogType, LogMessage, + LogType, + NullConsole, getConsoleOutput, } from '@jest/console'; import {JestEnvironment} from '@jest/environment'; import RuntimeClass from 'jest-runtime'; import * as fs from 'graceful-fs'; -import {ErrorWithStack, setGlobal, interopRequireDefault} from 'jest-util'; +import {ErrorWithStack, interopRequireDefault, setGlobal} from 'jest-util'; import LeakDetector from 'jest-leak-detector'; import Resolver from 'jest-resolve'; import {getTestEnvironment} from 'jest-config'; diff --git a/packages/jest-runner/src/types.ts b/packages/jest-runner/src/types.ts index 57e54a2b0166..801926edc39d 100644 --- a/packages/jest-runner/src/types.ts +++ b/packages/jest-runner/src/types.ts @@ -9,7 +9,7 @@ import {EventEmitter} from 'events'; import {Config} from '@jest/types'; import {SerializableError, TestResult} from '@jest/test-result'; import {JestEnvironment} from '@jest/environment'; -import {ModuleMap, FS as HasteFS} from 'jest-haste-map'; +import {FS as HasteFS, ModuleMap} from 'jest-haste-map'; import HasteResolver from 'jest-resolve'; import Runtime from 'jest-runtime'; diff --git a/packages/jest-runtime/src/cli/index.ts b/packages/jest-runtime/src/cli/index.ts index 9910a0464b9d..3883238623b0 100644 --- a/packages/jest-runtime/src/cli/index.ts +++ b/packages/jest-runtime/src/cli/index.ts @@ -15,7 +15,7 @@ import {JestEnvironment} from '@jest/environment'; import {CustomConsole} from '@jest/console'; import {setGlobal} from 'jest-util'; import {validateCLIOptions} from 'jest-validate'; -import {readConfig, deprecationEntries} from 'jest-config'; +import {deprecationEntries, readConfig} from 'jest-config'; import {VERSION} from '../version'; import {Context} from '../types'; import * as args from './args'; diff --git a/packages/jest-runtime/src/index.ts b/packages/jest-runtime/src/index.ts index e756b89140c9..bd47575a7204 100644 --- a/packages/jest-runtime/src/index.ts +++ b/packages/jest-runtime/src/index.ts @@ -24,8 +24,8 @@ import Snapshot from 'jest-snapshot'; import { ScriptTransformer, ShouldInstrumentOptions, - shouldInstrument, TransformationOptions, + shouldInstrument, } from '@jest/transform'; import * as fs from 'graceful-fs'; import stripBOM from 'strip-bom'; diff --git a/packages/jest-serializer/README.md b/packages/jest-serializer/README.md index 15cf4666399c..43c8bb13a187 100644 --- a/packages/jest-serializer/README.md +++ b/packages/jest-serializer/README.md @@ -17,7 +17,7 @@ Three kinds of API groups are exposed: This set of functions take or return a `Buffer`. All the process happens in memory. This is useful when willing to transfer over HTTP, TCP or via UNIX pipes. ```javascript -import {serialize, deserialize} from 'jest-serializer'; +import {deserialize, serialize} from 'jest-serializer'; const myObject = { foo: 'bar', diff --git a/packages/jest-snapshot/src/State.ts b/packages/jest-snapshot/src/State.ts index 97330edfef56..b27bbc838d31 100644 --- a/packages/jest-snapshot/src/State.ts +++ b/packages/jest-snapshot/src/State.ts @@ -8,16 +8,16 @@ import * as fs from 'fs'; import {Config} from '@jest/types'; -import {getTopFrame, getStackTraceLines} from 'jest-message-util'; +import {getStackTraceLines, getTopFrame} from 'jest-message-util'; import { - saveSnapshotFile, getSnapshotData, keyToTestName, + saveSnapshotFile, serialize, testNameToKey, unescape, } from './utils'; -import {saveInlineSnapshots, InlineSnapshot} from './inline_snapshots'; +import {InlineSnapshot, saveInlineSnapshots} from './inline_snapshots'; import {SnapshotData} from './types'; export type SnapshotStateOptions = { diff --git a/packages/jest-snapshot/src/__tests__/snapshot_resolver.test.ts b/packages/jest-snapshot/src/__tests__/snapshot_resolver.test.ts index 33debf200b25..0dad205560e6 100644 --- a/packages/jest-snapshot/src/__tests__/snapshot_resolver.test.ts +++ b/packages/jest-snapshot/src/__tests__/snapshot_resolver.test.ts @@ -8,7 +8,7 @@ import * as path from 'path'; import {Config} from '@jest/types'; -import {buildSnapshotResolver, SnapshotResolver} from '../snapshot_resolver'; +import {SnapshotResolver, buildSnapshotResolver} from '../snapshot_resolver'; describe('defaults', () => { let snapshotResolver: SnapshotResolver; diff --git a/packages/jest-snapshot/src/__tests__/utils.test.ts b/packages/jest-snapshot/src/__tests__/utils.test.ts index 473215c9dcb7..85c757fe10d7 100644 --- a/packages/jest-snapshot/src/__tests__/utils.test.ts +++ b/packages/jest-snapshot/src/__tests__/utils.test.ts @@ -16,15 +16,15 @@ import assert from 'assert'; import chalk from 'chalk'; import { + SNAPSHOT_GUIDE_LINK, + SNAPSHOT_VERSION, + SNAPSHOT_VERSION_WARNING, deepMerge, getSnapshotData, keyToTestName, saveSnapshotFile, serialize, testNameToKey, - SNAPSHOT_GUIDE_LINK, - SNAPSHOT_VERSION, - SNAPSHOT_VERSION_WARNING, } from '../utils'; test('keyToTestName()', () => { diff --git a/packages/jest-snapshot/src/index.ts b/packages/jest-snapshot/src/index.ts index 1b4efdcf2f66..401843374b9f 100644 --- a/packages/jest-snapshot/src/index.ts +++ b/packages/jest-snapshot/src/index.ts @@ -12,15 +12,15 @@ import {MatcherState} from 'expect'; import { BOLD_WEIGHT, - matcherHint, MatcherHintOptions, RECEIVED_COLOR, + matcherHint, } from 'jest-matcher-utils'; import { + EXTENSION, + SnapshotResolver as JestSnapshotResolver, buildSnapshotResolver, isSnapshotPath, - SnapshotResolver as JestSnapshotResolver, - EXTENSION, } from './snapshot_resolver'; import SnapshotState from './State'; import {addSerializer, getSerializers} from './plugins'; diff --git a/packages/jest-snapshot/src/inline_snapshots.ts b/packages/jest-snapshot/src/inline_snapshots.ts index e8a9731b39cd..7e124972ddd3 100644 --- a/packages/jest-snapshot/src/inline_snapshots.ts +++ b/packages/jest-snapshot/src/inline_snapshots.ts @@ -9,10 +9,10 @@ import * as fs from 'fs'; import * as path from 'path'; import semver from 'semver'; import { + CallExpression, + file, templateElement, templateLiteral, - file, - CallExpression, } from '@babel/types'; import {Frame} from 'jest-message-util'; diff --git a/packages/jest-transform/src/ScriptTransformer.ts b/packages/jest-transform/src/ScriptTransformer.ts index 7a9e157ad00d..44a1cd763887 100644 --- a/packages/jest-transform/src/ScriptTransformer.ts +++ b/packages/jest-transform/src/ScriptTransformer.ts @@ -23,9 +23,9 @@ import {sync as realpath} from 'realpath-native'; import {addHook} from 'pirates'; import { Options, - Transformer, - TransformedSource, TransformResult, + TransformedSource, + Transformer, } from './types'; import shouldInstrument from './shouldInstrument'; import enhanceUnexpectedTokenMessage from './enhanceUnexpectedTokenMessage'; diff --git a/packages/jest-validate/src/defaultConfig.ts b/packages/jest-validate/src/defaultConfig.ts index 6856bbfdeabf..1ba132dd9113 100644 --- a/packages/jest-validate/src/defaultConfig.ts +++ b/packages/jest-validate/src/defaultConfig.ts @@ -11,7 +11,7 @@ import {deprecationWarning} from './deprecated'; import {unknownOptionWarning} from './warnings'; import {errorMessage} from './errors'; import {validationCondition} from './condition'; -import {ERROR, DEPRECATION, WARNING} from './utils'; +import {DEPRECATION, ERROR, WARNING} from './utils'; const validationOptions: ValidationOptions = { comment: '', diff --git a/packages/jest-validate/src/deprecated.ts b/packages/jest-validate/src/deprecated.ts index 8a9b99a0e87b..fde481a3673f 100644 --- a/packages/jest-validate/src/deprecated.ts +++ b/packages/jest-validate/src/deprecated.ts @@ -7,7 +7,7 @@ import {DeprecatedOptions, ValidationOptions} from './types'; -import {logValidationWarning, DEPRECATION} from './utils'; +import {DEPRECATION, logValidationWarning} from './utils'; const deprecationMessage = (message: string, options: ValidationOptions) => { const comment = options.comment; diff --git a/packages/jest-validate/src/errors.ts b/packages/jest-validate/src/errors.ts index c5d205330883..56b9d5884344 100644 --- a/packages/jest-validate/src/errors.ts +++ b/packages/jest-validate/src/errors.ts @@ -7,7 +7,7 @@ import chalk from 'chalk'; import getType from 'jest-get-type'; -import {formatPrettyObject, ValidationError, ERROR} from './utils'; +import {ERROR, ValidationError, formatPrettyObject} from './utils'; import {getValues} from './condition'; import {ValidationOptions} from './types'; diff --git a/packages/jest-validate/src/index.ts b/packages/jest-validate/src/index.ts index ff5d721cdd81..85661dcf720e 100644 --- a/packages/jest-validate/src/index.ts +++ b/packages/jest-validate/src/index.ts @@ -6,10 +6,10 @@ */ import { + ValidationError, createDidYouMeanMessage, format, logValidationWarning, - ValidationError, } from './utils'; import validate from './validate'; import validateCLIOptions from './validateCLIOptions'; diff --git a/packages/jest-validate/src/validateCLIOptions.ts b/packages/jest-validate/src/validateCLIOptions.ts index a4962ed2dc74..a10bd24ba8aa 100644 --- a/packages/jest-validate/src/validateCLIOptions.ts +++ b/packages/jest-validate/src/validateCLIOptions.ts @@ -10,7 +10,7 @@ import chalk from 'chalk'; import camelcase from 'camelcase'; // eslint-disable-next-line import/no-extraneous-dependencies import {Options} from 'yargs'; -import {createDidYouMeanMessage, format, ValidationError} from './utils'; +import {ValidationError, createDidYouMeanMessage, format} from './utils'; import {deprecationWarning} from './deprecated'; import defaultConfig from './defaultConfig'; import {DeprecatedOptions} from './types'; diff --git a/packages/jest-validate/src/warnings.ts b/packages/jest-validate/src/warnings.ts index 371f93ecdfdb..b8937ae032d6 100644 --- a/packages/jest-validate/src/warnings.ts +++ b/packages/jest-validate/src/warnings.ts @@ -8,10 +8,10 @@ import chalk from 'chalk'; import {ValidationOptions} from './types'; import { + WARNING, + createDidYouMeanMessage, format, logValidationWarning, - createDidYouMeanMessage, - WARNING, } from './utils'; export const unknownOptionWarning = ( diff --git a/packages/jest-watcher/src/JestHooks.ts b/packages/jest-watcher/src/JestHooks.ts index f697192f2da4..50db5d92bc60 100644 --- a/packages/jest-watcher/src/JestHooks.ts +++ b/packages/jest-watcher/src/JestHooks.ts @@ -6,9 +6,9 @@ */ import { - JestHookSubscriber, - JestHookEmitter, FileChange, + JestHookEmitter, + JestHookSubscriber, ShouldRunTestSuite, TestRunComplete, } from './types'; diff --git a/packages/jest-worker/src/Farm.ts b/packages/jest-worker/src/Farm.ts index 02f70b9fe043..3e9196b1339d 100644 --- a/packages/jest-worker/src/Farm.ts +++ b/packages/jest-worker/src/Farm.ts @@ -6,14 +6,14 @@ */ import { + CHILD_MESSAGE_CALL, ChildMessage, FarmOptions, + OnEnd, + OnStart, QueueChildMessage, QueueItem, WorkerInterface, - OnStart, - OnEnd, - CHILD_MESSAGE_CALL, } from './types'; export default class Farm { diff --git a/packages/jest-worker/src/WorkerPool.ts b/packages/jest-worker/src/WorkerPool.ts index cd7159bfad9d..941312facaa9 100644 --- a/packages/jest-worker/src/WorkerPool.ts +++ b/packages/jest-worker/src/WorkerPool.ts @@ -9,11 +9,11 @@ import BaseWorkerPool from './base/BaseWorkerPool'; import { ChildMessage, - WorkerOptions, - OnStart, OnEnd, - WorkerPoolInterface, + OnStart, WorkerInterface, + WorkerOptions, + WorkerPoolInterface, } from './types'; const canUseWorkerThreads = () => { diff --git a/packages/jest-worker/src/base/BaseWorkerPool.ts b/packages/jest-worker/src/base/BaseWorkerPool.ts index 4106a7bbdac1..007b2ff3e770 100644 --- a/packages/jest-worker/src/base/BaseWorkerPool.ts +++ b/packages/jest-worker/src/base/BaseWorkerPool.ts @@ -10,9 +10,9 @@ import mergeStream from 'merge-stream'; import { CHILD_MESSAGE_END, - WorkerPoolOptions, - WorkerOptions, WorkerInterface, + WorkerOptions, + WorkerPoolOptions, } from '../types'; /* istanbul ignore next */ diff --git a/packages/jest-worker/src/index.ts b/packages/jest-worker/src/index.ts index 5b686f2c7f71..114d884eb16e 100644 --- a/packages/jest-worker/src/index.ts +++ b/packages/jest-worker/src/index.ts @@ -8,7 +8,7 @@ import {cpus} from 'os'; import WorkerPool from './WorkerPool'; import Farm from './Farm'; -import {WorkerPoolInterface, WorkerPoolOptions, FarmOptions} from './types'; +import {FarmOptions, WorkerPoolInterface, WorkerPoolOptions} from './types'; function getExposedMethods( workerPath: string, diff --git a/packages/jest-worker/src/workers/ChildProcessWorker.ts b/packages/jest-worker/src/workers/ChildProcessWorker.ts index 9ff8cd97c772..020be3b587aa 100644 --- a/packages/jest-worker/src/workers/ChildProcessWorker.ts +++ b/packages/jest-worker/src/workers/ChildProcessWorker.ts @@ -5,22 +5,22 @@ * LICENSE file in the root directory of this source tree. */ -import {fork, ChildProcess} from 'child_process'; +import {ChildProcess, fork} from 'child_process'; import {PassThrough} from 'stream'; import mergeStream from 'merge-stream'; import {stdout as stdoutSupportsColor} from 'supports-color'; import { CHILD_MESSAGE_INITIALIZE, - PARENT_MESSAGE_CLIENT_ERROR, - PARENT_MESSAGE_SETUP_ERROR, - PARENT_MESSAGE_OK, - WorkerInterface, ChildMessage, OnEnd, OnStart, - WorkerOptions, + PARENT_MESSAGE_CLIENT_ERROR, + PARENT_MESSAGE_OK, + PARENT_MESSAGE_SETUP_ERROR, ParentMessage, + WorkerInterface, + WorkerOptions, } from '../types'; /** diff --git a/packages/jest-worker/src/workers/NodeThreadsWorker.ts b/packages/jest-worker/src/workers/NodeThreadsWorker.ts index ef54e7d4e328..c70a6feddcf1 100644 --- a/packages/jest-worker/src/workers/NodeThreadsWorker.ts +++ b/packages/jest-worker/src/workers/NodeThreadsWorker.ts @@ -14,15 +14,15 @@ import mergeStream from 'merge-stream'; import { CHILD_MESSAGE_INITIALIZE, - PARENT_MESSAGE_OK, - PARENT_MESSAGE_CLIENT_ERROR, - PARENT_MESSAGE_SETUP_ERROR, ChildMessage, OnEnd, OnStart, - WorkerOptions, - WorkerInterface, + PARENT_MESSAGE_CLIENT_ERROR, + PARENT_MESSAGE_OK, + PARENT_MESSAGE_SETUP_ERROR, ParentMessage, + WorkerInterface, + WorkerOptions, } from '../types'; export default class ExperimentalWorker implements WorkerInterface { diff --git a/packages/jest-worker/src/workers/__tests__/NodeThreadsWorker.test.js b/packages/jest-worker/src/workers/__tests__/NodeThreadsWorker.test.js index d729a7661cc6..f232e8818e15 100644 --- a/packages/jest-worker/src/workers/__tests__/NodeThreadsWorker.test.js +++ b/packages/jest-worker/src/workers/__tests__/NodeThreadsWorker.test.js @@ -14,8 +14,8 @@ import getStream from 'get-stream'; import { CHILD_MESSAGE_CALL, CHILD_MESSAGE_INITIALIZE, - PARENT_MESSAGE_OK, PARENT_MESSAGE_CLIENT_ERROR, + PARENT_MESSAGE_OK, } from '../../types'; let Worker; diff --git a/packages/jest-worker/src/workers/__tests__/processChild.test.js b/packages/jest-worker/src/workers/__tests__/processChild.test.js index d1bc1ff0671a..df71b9b20144 100644 --- a/packages/jest-worker/src/workers/__tests__/processChild.test.js +++ b/packages/jest-worker/src/workers/__tests__/processChild.test.js @@ -15,11 +15,11 @@ const uninitializedParam = {}; const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); import { - CHILD_MESSAGE_INITIALIZE, CHILD_MESSAGE_CALL, CHILD_MESSAGE_END, - PARENT_MESSAGE_OK, + CHILD_MESSAGE_INITIALIZE, PARENT_MESSAGE_CLIENT_ERROR, + PARENT_MESSAGE_OK, } from '../../types'; let ended; diff --git a/packages/jest-worker/src/workers/__tests__/threadChild.test.js b/packages/jest-worker/src/workers/__tests__/threadChild.test.js index e44602361499..5e8431b8df66 100644 --- a/packages/jest-worker/src/workers/__tests__/threadChild.test.js +++ b/packages/jest-worker/src/workers/__tests__/threadChild.test.js @@ -25,11 +25,11 @@ const uninitializedParam = {}; const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); import { - CHILD_MESSAGE_INITIALIZE, CHILD_MESSAGE_CALL, CHILD_MESSAGE_END, - PARENT_MESSAGE_OK, + CHILD_MESSAGE_INITIALIZE, PARENT_MESSAGE_CLIENT_ERROR, + PARENT_MESSAGE_OK, } from '../../types'; let ended; diff --git a/packages/jest-worker/src/workers/processChild.ts b/packages/jest-worker/src/workers/processChild.ts index 6998b971f908..fd964fc349d5 100644 --- a/packages/jest-worker/src/workers/processChild.ts +++ b/packages/jest-worker/src/workers/processChild.ts @@ -9,12 +9,12 @@ import { CHILD_MESSAGE_CALL, CHILD_MESSAGE_END, CHILD_MESSAGE_INITIALIZE, + ChildMessageCall, + ChildMessageInitialize, PARENT_MESSAGE_CLIENT_ERROR, PARENT_MESSAGE_ERROR, - PARENT_MESSAGE_SETUP_ERROR, PARENT_MESSAGE_OK, - ChildMessageInitialize, - ChildMessageCall, + PARENT_MESSAGE_SETUP_ERROR, } from '../types'; let file: string | null = null; diff --git a/packages/jest-worker/src/workers/threadChild.ts b/packages/jest-worker/src/workers/threadChild.ts index 4d8272cef8c0..4e81c394b7d0 100644 --- a/packages/jest-worker/src/workers/threadChild.ts +++ b/packages/jest-worker/src/workers/threadChild.ts @@ -7,18 +7,18 @@ // ESLint doesn't know about this experimental module // eslint-disable-next-line import/no-unresolved -import {parentPort, isMainThread} from 'worker_threads'; +import {isMainThread, parentPort} from 'worker_threads'; import { - ChildMessageInitialize, - ChildMessageCall, CHILD_MESSAGE_CALL, CHILD_MESSAGE_END, CHILD_MESSAGE_INITIALIZE, + ChildMessageCall, + ChildMessageInitialize, PARENT_MESSAGE_CLIENT_ERROR, PARENT_MESSAGE_ERROR, - PARENT_MESSAGE_SETUP_ERROR, PARENT_MESSAGE_OK, + PARENT_MESSAGE_SETUP_ERROR, } from '../types'; let file: string | null = null; diff --git a/packages/pretty-format/src/plugins/ConvertAnsi.ts b/packages/pretty-format/src/plugins/ConvertAnsi.ts index 84f87b74e2b2..1ccf3b9ef2a3 100644 --- a/packages/pretty-format/src/plugins/ConvertAnsi.ts +++ b/packages/pretty-format/src/plugins/ConvertAnsi.ts @@ -7,7 +7,7 @@ import ansiRegex from 'ansi-regex'; import * as style from 'ansi-styles'; -import {Config, Printer, NewPlugin, Refs} from '../types'; +import {Config, NewPlugin, Printer, Refs} from '../types'; const toHumanReadableAnsi = (text: string) => text.replace(ansiRegex(), match => { diff --git a/packages/pretty-format/src/plugins/Immutable.ts b/packages/pretty-format/src/plugins/Immutable.ts index 85a415731a49..5697feb7a281 100644 --- a/packages/pretty-format/src/plugins/Immutable.ts +++ b/packages/pretty-format/src/plugins/Immutable.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Config, Printer, NewPlugin, Refs} from '../types'; +import {Config, NewPlugin, Printer, Refs} from '../types'; import {printIteratorEntries, printIteratorValues} from '../collections'; // SENTINEL constants are from https://github.com/facebook/immutable-js diff --git a/packages/pretty-format/src/plugins/ReactTestComponent.ts b/packages/pretty-format/src/plugins/ReactTestComponent.ts index 1a0ca918cfb3..855bb59c1b36 100644 --- a/packages/pretty-format/src/plugins/ReactTestComponent.ts +++ b/packages/pretty-format/src/plugins/ReactTestComponent.ts @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. */ -import {Config, Printer, NewPlugin, Refs} from '../types'; +import {Config, NewPlugin, Printer, Refs} from '../types'; export type ReactTestObject = { $$typeof: symbol; diff --git a/website/versioned_docs/version-24.0/TutorialReact.md b/website/versioned_docs/version-24.0/TutorialReact.md index 38fc7a6a91a5..8f138178b78c 100644 --- a/website/versioned_docs/version-24.0/TutorialReact.md +++ b/website/versioned_docs/version-24.0/TutorialReact.md @@ -254,7 +254,7 @@ export default class CheckboxWithLabel extends React.Component { ```javascript // __tests__/CheckboxWithLabel-test.js import React from 'react'; -import {render, fireEvent, cleanup} from '@testing-library/react'; +import {cleanup, fireEvent, render} from '@testing-library/react'; import CheckboxWithLabel from '../CheckboxWithLabel'; // automatically unmount and cleanup DOM after the test is finished. diff --git a/website/versioned_docs/version-24.8/TutorialReact.md b/website/versioned_docs/version-24.8/TutorialReact.md index abe47abebf7d..e8480988cc1d 100644 --- a/website/versioned_docs/version-24.8/TutorialReact.md +++ b/website/versioned_docs/version-24.8/TutorialReact.md @@ -254,7 +254,7 @@ export default class CheckboxWithLabel extends React.Component { ```javascript // __tests__/CheckboxWithLabel-test.js import React from 'react'; -import {render, fireEvent, cleanup} from '@testing-library/react'; +import {cleanup, fireEvent, render} from '@testing-library/react'; import CheckboxWithLabel from '../CheckboxWithLabel'; // automatically unmount and cleanup DOM after the test is finished. diff --git a/yarn.lock b/yarn.lock index a8ec8423f9f1..ac21ec58ed14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2375,10 +2375,10 @@ "@types/tough-cookie" "*" parse5 "^4.0.0" -"@types/json5@^0.0.29": - version "0.0.29" - resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" - integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= +"@types/json-schema@^7.0.3": + version "7.0.3" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" + integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== "@types/merge-stream@^1.1.2": version "1.1.2" @@ -2565,43 +2565,61 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^1.10.2": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.12.0.tgz#96b4e08b5f998a198b8414508b1a289f9e8c549a" - integrity sha512-J/ZTZF+pLNqjXBGNfq5fahsoJ4vJOkYbitWPavA05IrZ7BXUaf4XWlhUB/ic1lpOGTRpLWF+PLAePjiHp6dz8g== +"@typescript-eslint/eslint-plugin@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.0.0.tgz#609a5d7b00ce21a6f94d7ef282eba9da57ca1e42" + integrity sha512-Mo45nxTTELODdl7CgpZKJISvLb+Fu64OOO2ZFc2x8sYSnUpFrBUW3H+H/ZGYmEkfnL6VkdtOSxgdt+Av79j0sA== dependencies: - "@typescript-eslint/experimental-utils" "1.12.0" - eslint-utils "^1.3.1" + "@typescript-eslint/experimental-utils" "2.0.0" + eslint-utils "^1.4.0" functional-red-black-tree "^1.0.1" regexpp "^2.0.1" - tsutils "^3.7.0" + tsutils "^3.14.0" -"@typescript-eslint/experimental-utils@1.12.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.12.0.tgz#98417ee2e0c6fe8d1e50d934a6535d9c0f4277b6" - integrity sha512-s0soOTMJloytr9GbPteMLNiO2HvJ+qgQkRNplABXiVw6vq7uQRvidkby64Gqt/nA7pys74HksHwRULaB/QRVyw== +"@typescript-eslint/experimental-utils@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.0.0.tgz#f3d298bb411357f35c4184e24280b256b6321949" + integrity sha512-XGJG6GNBXIEx/mN4eTRypN/EUmsd0VhVGQ1AG+WTgdvjHl0G8vHhVBHrd/5oI6RRYBRnedNymSYWW1HAdivtmg== dependencies: - "@typescript-eslint/typescript-estree" "1.12.0" + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "2.0.0" eslint-scope "^4.0.0" -"@typescript-eslint/parser@^1.10.2": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.12.0.tgz#9965895ec4745578185965d63f21510f93a3f35a" - integrity sha512-0uzbaa9ZLCA5yMWJywnJJ7YVENKGWVUhJDV5UrMoldC5HoI54W5kkdPhTfmtFKpPFp93MIwmJj0/61ztvmz5Dw== +"@typescript-eslint/experimental-utils@^1.13.0": + version "1.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.13.0.tgz#b08c60d780c0067de2fb44b04b432f540138301e" + integrity sha512-zmpS6SyqG4ZF64ffaJ6uah6tWWWgZ8m+c54XXgwFtUv0jNz8aJAVx8chMCvnk7yl6xwn8d+d96+tWp7fXzTuDg== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "1.13.0" + eslint-scope "^4.0.0" + +"@typescript-eslint/parser@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.0.0.tgz#4273bb19d03489daf8372cdaccbc8042e098178f" + integrity sha512-ibyMBMr0383ZKserIsp67+WnNVoM402HKkxqXGlxEZsXtnGGurbnY90pBO3e0nBUM7chEEOcxUhgw9aPq7fEBA== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "1.12.0" - "@typescript-eslint/typescript-estree" "1.12.0" + "@typescript-eslint/experimental-utils" "2.0.0" + "@typescript-eslint/typescript-estree" "2.0.0" eslint-visitor-keys "^1.0.0" -"@typescript-eslint/typescript-estree@1.12.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.12.0.tgz#d8dd0a7cffb5e3c0c3e98714042d83e316dfc9a9" - integrity sha512-nwN6yy//XcVhFs0ZyU+teJHB8tbCm7AIA8mu6E2r5hu6MajwYBY3Uwop7+rPZWUN/IUOHpL8C+iUPMDVYUU3og== +"@typescript-eslint/typescript-estree@1.13.0": + version "1.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.13.0.tgz#8140f17d0f60c03619798f1d628b8434913dc32e" + integrity sha512-b5rCmd2e6DCC6tCTN9GSUAuxdYwCM/k/2wdjHGrIRGPSJotWMCe/dGpi66u42bhuh8q3QBzqM4TMA1GUUCJvdw== dependencies: lodash.unescape "4.0.1" semver "5.5.0" +"@typescript-eslint/typescript-estree@2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.0.0.tgz#c9f6c0efd1b11475540d6a55dc973cc5b9a67e77" + integrity sha512-NXbmzA3vWrSgavymlzMWNecgNOuiMMp62MO3kI7awZRLRcsA1QrYWo6q08m++uuAGVbXH/prZi2y1AWuhSu63w== + dependencies: + lodash.unescape "4.0.1" + semver "^6.2.0" + "@webassemblyjs/ast@1.8.5": version "1.8.5" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" @@ -5175,11 +5193,6 @@ deepmerge@4.0.0: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.0.0.tgz#3e3110ca29205f120d7cb064960a39c3d2087c09" integrity sha512-YZ1rOP5+kHor4hMAH+HRQnBQHg+wvS1un1hAOuIcxcBy0hzcUf6Jg2a1w65kpoOUnurOfZbERwjI1TfZxNjcww== -deepmerge@^2.0.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-2.2.1.tgz#5d3ff22a01c00f645405a2fbc17d0778a1801170" - integrity sha512-R9hc1Xa/NOBi9WRVUWg19rl1UB7Tt4kuPd+thNJgFZoxXsTz7ncaPaeIm+40oSGuP33DfMb4sZt1QIGiJzC4EA== - defaults@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" @@ -5848,15 +5861,6 @@ eslint-import-resolver-node@^0.3.2: debug "^2.6.9" resolve "^1.5.0" -eslint-import-resolver-typescript@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-1.1.1.tgz#e6d42172b95144ef16610fe104ef38340edea591" - integrity sha512-jqSfumQ+H5y3FUJ6NjRkbOQSUOlbBucGTN3ELymOtcDBbPjVdm/luvJuCfCaIXGh8sEF26ma1qVdtDgl9ndhUg== - dependencies: - debug "^4.0.1" - resolve "^1.4.0" - tsconfig-paths "^3.6.0" - eslint-module-utils@^2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz#8b93499e9b00eab80ccb6614e69f03678e84e09a" @@ -5880,9 +5884,9 @@ eslint-plugin-flowtype@^2.35.0: lodash "^4.17.10" eslint-plugin-import@^2.6.0: - version "2.18.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.0.tgz#7a5ba8d32622fb35eb9c8db195c2090bd18a3678" - integrity sha512-PZpAEC4gj/6DEMMoU2Df01C5c50r7zdGIN52Yfi7CvvWaYssG7Jt5R9nFG5gmqodxNOz9vQS87xk6Izdtpdrig== + version "2.18.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz#02f1180b90b077b33d447a17a2326ceb400aceb6" + integrity sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ== dependencies: array-includes "^3.0.3" contains-path "^0.1.0" @@ -5891,15 +5895,17 @@ eslint-plugin-import@^2.6.0: eslint-import-resolver-node "^0.3.2" eslint-module-utils "^2.4.0" has "^1.0.3" - lodash "^4.17.11" minimatch "^3.0.4" + object.values "^1.1.0" read-pkg-up "^2.0.0" resolve "^1.11.0" eslint-plugin-jest@^22.0.0: - version "22.12.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.12.0.tgz#6f83de048371ec8dda20f3195c76d1cd6fd8de71" - integrity sha512-Uoi4KvIJl59wgwjltgNhvVThQHbxs94TE3qUCg70aanjDk0IMWxKFa1K3F+9RHvcY0zddztbvX1IVDuR5a34ig== + version "22.15.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-22.15.1.tgz#54c4a752a44c4bc5a564ecc22b32e1cd16a2961a" + integrity sha512-CWq/RR/3tLaKFB+FZcCJwU9hH5q/bKeO3rFP8G07+q7hcDCFNqpvdphVbEbGE6o6qo1UbciEev4ejUWv7brUhw== + dependencies: + "@typescript-eslint/experimental-utils" "^1.13.0" eslint-plugin-jsx-a11y@^6.0.2: version "6.2.3" @@ -5941,9 +5947,9 @@ eslint-plugin-prettier@^3.0.1: prettier-linter-helpers "^1.0.0" eslint-plugin-react@^7.1.0: - version "7.14.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.14.2.tgz#94c193cc77a899ac0ecbb2766fbef88685b7ecc1" - integrity sha512-jZdnKe3ip7FQOdjxks9XPN0pjUKZYq48OggNMd16Sk+8VXx6JOvXmlElxROCgp7tiUsTsze3jd78s/9AFJP2mA== + version "7.14.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz#911030dd7e98ba49e1b2208599571846a66bdf13" + integrity sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA== dependencies: array-includes "^3.0.3" doctrine "^2.1.0" @@ -5976,7 +5982,7 @@ eslint-scope@^4.0.0, eslint-scope@^4.0.3: esrecurse "^4.1.0" estraverse "^4.1.1" -eslint-utils@^1.3.1: +eslint-utils@^1.3.1, eslint-utils@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.0.tgz#e2c3c8dba768425f897cf0f9e51fe2e241485d4c" integrity sha512-7ehnzPaP5IIEh1r1tkjuIrxqhNkzUJa9z3R92tLJdZIVdWaczEhr3EbhGtsMrVxi1KeR8qA7Off6SWc5WNQqyQ== @@ -13561,26 +13567,15 @@ truncate-html@^1.0.1: "@types/cheerio" "^0.22.8" cheerio "0.22.0" -tsconfig-paths@^3.6.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.8.0.tgz#4e34202d5b41958f269cf56b01ed95b853d59f72" - integrity sha512-zZEYFo4sjORK8W58ENkRn9s+HmQFkkwydDG7My5s/fnfr2YYCaiyXe/HBUcIgU8epEKOXwiahOO+KZYjiXlWyQ== - dependencies: - "@types/json5" "^0.0.29" - deepmerge "^2.0.1" - json5 "^1.0.1" - minimist "^1.2.0" - strip-bom "^3.0.0" - tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.10.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a" integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== -tsutils@^3.7.0: - version "3.14.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.14.0.tgz#bf8d5a7bae5369331fa0f2b0a5a10bd7f7396c77" - integrity sha512-SmzGbB0l+8I0QwsPgjooFRaRvHLBLNYM8SeQ0k6rtNDru5sCGeLJcZdwilNndN+GysuFjF5EIYgN8GfFG6UeUw== +tsutils@^3.14.0: + version "3.17.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" + integrity sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g== dependencies: tslib "^1.8.1"