From 1ce1402b6fa938c25196a49aaa7fa4a0500aa69b Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 22 May 2019 20:41:28 +0200 Subject: [PATCH] fix: revert TypeScript migration Fixes #268 Fixes #269 Fixes #270 --- .eslintrc.js | 13 +- .travis.yml | 1 - babel.config.js | 5 +- package.json | 20 +-- src/index.js | 20 +-- ...se-name.test.ts => lowercase-name.test.js} | 46 ++--- ...-import.test.ts => no-jest-import.test.js} | 30 ++-- src/rules/lowercase-name.js | 97 +++++++++++ src/rules/lowercase-name.ts | 158 ------------------ src/rules/no-jest-import.js | 26 +++ src/rules/no-jest-import.ts | 37 ---- src/rules/tsUtils.ts | 11 -- tsconfig.json | 12 -- yarn.lock | 127 +------------- 14 files changed, 162 insertions(+), 441 deletions(-) rename src/rules/__tests__/{lowercase-name.test.ts => lowercase-name.test.js} (77%) rename src/rules/__tests__/{no-jest-import.test.ts => no-jest-import.test.js} (64%) create mode 100644 src/rules/lowercase-name.js delete mode 100644 src/rules/lowercase-name.ts create mode 100644 src/rules/no-jest-import.js delete mode 100644 src/rules/no-jest-import.ts delete mode 100644 src/rules/tsUtils.ts delete mode 100644 tsconfig.json diff --git a/.eslintrc.js b/.eslintrc.js index 62711220b..e2f7ddd4f 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -3,14 +3,13 @@ const { globals } = require('./').environments.globals; module.exports = { - parser: '@typescript-eslint/parser', extends: [ + 'eslint:recommended', 'plugin:eslint-plugin/recommended', 'plugin:node/recommended', - 'plugin:@typescript-eslint/eslint-recommended', 'prettier', ], - plugins: ['eslint-plugin', 'node', 'prettier', '@typescript-eslint'], + plugins: ['eslint-plugin', 'node', 'prettier'], parserOptions: { ecmaVersion: 2017, }, @@ -38,14 +37,8 @@ module.exports = { }, overrides: [ { - files: ['*.test.js', '*.test.ts'], + files: ['*.test.js'], globals, }, - { - files: ['*.ts'], - parserOptions: { - sourceType: 'module', - }, - }, ], }; diff --git a/.travis.yml b/.travis.yml index bf87b921e..853dece62 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,7 +14,6 @@ script: - yarn commitlint --from="$TRAVIS_BRANCH" --to="$TRAVIS_COMMIT" - yarn commitlint --from=$TRAVIS_COMMIT - yarn prettylint -- yarn typecheck - yarn test --coverage --maxWorkers 2 after_script: greenkeeper-lockfile-upload jobs: diff --git a/babel.config.js b/babel.config.js index ba2c691af..87920c859 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,8 +1,5 @@ 'use strict'; module.exports = { - presets: [ - '@babel/preset-typescript', - ['@babel/preset-env', { targets: { node: 6 } }], - ], + presets: [['@babel/preset-env', { targets: { node: 6 } }]], }; diff --git a/package.json b/package.json index d2506ca25..c29bedca9 100644 --- a/package.json +++ b/package.json @@ -27,28 +27,19 @@ "eslint": ">=5" }, "scripts": { - "pretest": "yarn build", - "lint": "eslint . --ignore-pattern '!.eslintrc.js' --ext js,ts", + "prepare": "yarn build", + "lint": "eslint . --ignore-pattern '!.eslintrc.js'", "prettylint": "prettylint docs/**/*.md README.md package.json", "prepublishOnly": "yarn build", "test": "jest", - "build": "babel --extensions .js,.ts src --out-dir lib", - "typecheck": "tsc -p ." - }, - "dependencies": { - "@typescript-eslint/experimental-utils": "^1.9.1-alpha.3" + "build": "babel src --out-dir lib" }, "devDependencies": { "@babel/cli": "^7.4.4", "@babel/core": "^7.4.4", "@babel/preset-env": "^7.4.4", - "@babel/preset-typescript": "^7.3.3", "@commitlint/cli": "^7.0.0", "@commitlint/config-conventional": "^7.0.1", - "@types/eslint": "^4.16.6", - "@types/jest": "^24.0.12", - "@types/node": "^12.0.0", - "@typescript-eslint/eslint-plugin": "^1.9.1-alpha.3", "babel-jest": "^24.8.0", "eslint": "^5.1.0", "eslint-config-prettier": "^4.1.0", @@ -60,8 +51,7 @@ "jest-runner-eslint": "^0.7.1", "lint-staged": "^8.0.4", "prettier": "^1.10.2", - "prettylint": "^1.0.0", - "typescript": "^3.4.5" + "prettylint": "^1.0.0" }, "prettier": { "proseWrap": "always", @@ -69,7 +59,7 @@ "trailingComma": "all" }, "lint-staged": { - "*.{js,ts}": [ + "*.js": [ "eslint --fix", "git add" ], diff --git a/src/index.js b/src/index.js index 400651b77..53e7afd5b 100644 --- a/src/index.js +++ b/src/index.js @@ -3,26 +3,12 @@ const fs = require('fs'); const path = require('path'); -// copied from https://github.com/babel/babel/blob/56044c7851d583d498f919e9546caddf8f80a72f/packages/babel-helpers/src/helpers.js#L558-L562 -function interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { default: obj }; -} - const rules = fs .readdirSync(path.join(__dirname, 'rules')) - .filter( - rule => rule !== '__tests__' && rule !== 'util.js' && rule !== 'tsUtils.ts', - ) - .map(rule => - rule.endsWith('js') - ? path.basename(rule, '.js') - : path.basename(rule, '.ts'), - ) + .filter(rule => rule !== '__tests__' && rule !== 'util.js') + .map(rule => path.basename(rule, '.js')) .reduce( - (acc, curr) => ({ - ...acc, - [curr]: interopRequireDefault(require(`./rules/${curr}`)).default, - }), + (acc, curr) => Object.assign(acc, { [curr]: require(`./rules/${curr}`) }), {}, ); diff --git a/src/rules/__tests__/lowercase-name.test.ts b/src/rules/__tests__/lowercase-name.test.js similarity index 77% rename from src/rules/__tests__/lowercase-name.test.ts rename to src/rules/__tests__/lowercase-name.test.js index 034c5ad76..420d2cf8b 100644 --- a/src/rules/__tests__/lowercase-name.test.ts +++ b/src/rules/__tests__/lowercase-name.test.js @@ -1,11 +1,9 @@ -import { RuleTester as ESLintRuleTester } from 'eslint'; -import { TSESLint } from '@typescript-eslint/experimental-utils'; -import rule from '../lowercase-name'; +'use strict'; -const RuleTester: TSESLint.RuleTester = ESLintRuleTester as any; +const { RuleTester } = require('eslint'); +const rule = require('../lowercase-name'); const ruleTester = new RuleTester({ - parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 6, }, @@ -13,8 +11,6 @@ const ruleTester = new RuleTester({ ruleTester.run('lowercase-name', rule, { valid: [ - 'randomFunction()', - 'foo.bar()', 'it()', "it(' ', function () {})", 'it(" ", function () {})', @@ -26,8 +22,6 @@ ruleTester.run('lowercase-name', rule, { 'it("123 foo", function () {})', 'it(42, function () {})', 'it(``)', - 'it("")', - 'it(42)', 'test()', "test('foo', function () {})", 'test("foo", function () {})', @@ -36,8 +30,6 @@ ruleTester.run('lowercase-name', rule, { 'test("123 foo", function () {})', 'test("42", function () {})', 'test(``)', - 'test("")', - 'test(42)', 'describe()', "describe('foo', function () {})", 'describe("foo", function () {})', @@ -47,8 +39,6 @@ ruleTester.run('lowercase-name', rule, { 'describe("42", function () {})', 'describe(function () {})', 'describe(``)', - 'describe("")', - 'describe(42)', ], invalid: [ @@ -57,8 +47,7 @@ ruleTester.run('lowercase-name', rule, { output: "it('foo', function () {})", errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'it' }, + message: '`it`s should begin with lowercase', column: 1, line: 1, }, @@ -69,8 +58,7 @@ ruleTester.run('lowercase-name', rule, { output: 'it("foo", function () {})', errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'it' }, + message: '`it`s should begin with lowercase', column: 1, line: 1, }, @@ -81,8 +69,7 @@ ruleTester.run('lowercase-name', rule, { output: 'it(`foo`, function () {})', errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'it' }, + message: '`it`s should begin with lowercase', column: 1, line: 1, }, @@ -93,8 +80,7 @@ ruleTester.run('lowercase-name', rule, { output: "test('foo', function () {})", errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'test' }, + message: '`test`s should begin with lowercase', column: 1, line: 1, }, @@ -105,8 +91,7 @@ ruleTester.run('lowercase-name', rule, { output: 'test("foo", function () {})', errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'test' }, + message: '`test`s should begin with lowercase', column: 1, line: 1, }, @@ -117,8 +102,7 @@ ruleTester.run('lowercase-name', rule, { output: 'test(`foo`, function () {})', errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'test' }, + message: '`test`s should begin with lowercase', column: 1, line: 1, }, @@ -129,8 +113,7 @@ ruleTester.run('lowercase-name', rule, { output: "describe('foo', function () {})", errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'describe' }, + message: '`describe`s should begin with lowercase', column: 1, line: 1, }, @@ -141,8 +124,7 @@ ruleTester.run('lowercase-name', rule, { output: 'describe("foo", function () {})', errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'describe' }, + message: '`describe`s should begin with lowercase', column: 1, line: 1, }, @@ -153,8 +135,7 @@ ruleTester.run('lowercase-name', rule, { output: 'describe(`foo`, function () {})', errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'describe' }, + message: '`describe`s should begin with lowercase', column: 1, line: 1, }, @@ -165,8 +146,7 @@ ruleTester.run('lowercase-name', rule, { output: 'describe(`some longer description`, function () {})', errors: [ { - messageId: 'unexpectedLowercase', - data: { method: 'describe' }, + message: '`describe`s should begin with lowercase', column: 1, line: 1, }, diff --git a/src/rules/__tests__/no-jest-import.test.ts b/src/rules/__tests__/no-jest-import.test.js similarity index 64% rename from src/rules/__tests__/no-jest-import.test.ts rename to src/rules/__tests__/no-jest-import.test.js index 4267b7612..bc21192dd 100644 --- a/src/rules/__tests__/no-jest-import.test.ts +++ b/src/rules/__tests__/no-jest-import.test.js @@ -1,15 +1,9 @@ -import { RuleTester as ESLintRuleTester } from 'eslint'; -import { TSESLint } from '@typescript-eslint/experimental-utils'; -import rule from '../no-jest-import'; +'use strict'; -const RuleTester: TSESLint.RuleTester = ESLintRuleTester as any; - -const ruleTester = new RuleTester({ - parser: '@typescript-eslint/parser', - parserOptions: { - ecmaVersion: 6, - }, -}); +const rule = require('../no-jest-import.js'); +const { RuleTester } = require('eslint'); +const ruleTester = new RuleTester(); +const message = `Jest is automatically in scope. Do not import "jest", as Jest doesn't export anything.`; ruleTester.run('no-jest-import', rule, { valid: [ @@ -28,7 +22,7 @@ ruleTester.run('no-jest-import', rule, { { endColumn: 15, column: 9, - messageId: 'unexpectedImport', + message, }, ], }, @@ -38,8 +32,8 @@ ruleTester.run('no-jest-import', rule, { errors: [ { endColumn: 24, - column: 18, - messageId: 'unexpectedImport', + column: 1, + message, }, ], }, @@ -49,7 +43,7 @@ ruleTester.run('no-jest-import', rule, { { endColumn: 26, column: 20, - messageId: 'unexpectedImport', + message, }, ], }, @@ -59,8 +53,8 @@ ruleTester.run('no-jest-import', rule, { errors: [ { endColumn: 34, - column: 28, - messageId: 'unexpectedImport', + column: 1, + message, }, ], }, @@ -71,7 +65,7 @@ ruleTester.run('no-jest-import', rule, { { endColumn: 28, column: 22, - messageId: 'unexpectedImport', + message, }, ], }, diff --git a/src/rules/lowercase-name.js b/src/rules/lowercase-name.js new file mode 100644 index 000000000..84b8748b5 --- /dev/null +++ b/src/rules/lowercase-name.js @@ -0,0 +1,97 @@ +'use strict'; + +const { getDocsUrl } = require('./util'); + +const isItTestOrDescribeFunction = node => { + return ( + node.type === 'CallExpression' && + node.callee && + (node.callee.name === 'it' || + node.callee.name === 'test' || + node.callee.name === 'describe') + ); +}; + +const isItDescription = node => { + return ( + node.arguments && + node.arguments[0] && + (node.arguments[0].type === 'Literal' || + node.arguments[0].type === 'TemplateLiteral') + ); +}; + +const testDescription = node => { + const [firstArgument] = node.arguments; + const { type } = firstArgument; + + if (type === 'Literal') { + return firstArgument.value; + } + + // `isItDescription` guarantees this is `type === 'TemplateLiteral'` + return firstArgument.quasis[0].value.raw; +}; + +const descriptionBeginsWithLowerCase = node => { + if (isItTestOrDescribeFunction(node) && isItDescription(node)) { + const description = testDescription(node); + if (!description[0]) { + return false; + } + + if (description[0] !== description[0].toLowerCase()) { + return node.callee.name; + } + } + return false; +}; + +module.exports = { + meta: { + docs: { + url: getDocsUrl(__filename), + }, + fixable: 'code', + }, + create(context) { + const ignore = (context.options[0] && context.options[0].ignore) || []; + const ignoredFunctionNames = ignore.reduce((accumulator, value) => { + accumulator[value] = true; + return accumulator; + }, Object.create(null)); + + const isIgnoredFunctionName = node => + ignoredFunctionNames[node.callee.name]; + + return { + CallExpression(node) { + const erroneousMethod = descriptionBeginsWithLowerCase(node); + + if (erroneousMethod && !isIgnoredFunctionName(node)) { + context.report({ + message: '`{{ method }}`s should begin with lowercase', + data: { method: erroneousMethod }, + node, + fix(fixer) { + const [firstArg] = node.arguments; + const description = testDescription(node); + + const rangeIgnoringQuotes = [ + firstArg.range[0] + 1, + firstArg.range[1] - 1, + ]; + const newDescription = + description.substring(0, 1).toLowerCase() + + description.substring(1); + + return [ + fixer.replaceTextRange(rangeIgnoringQuotes, newDescription), + ]; + }, + }); + } + }, + }; + }, +}; diff --git a/src/rules/lowercase-name.ts b/src/rules/lowercase-name.ts deleted file mode 100644 index 0f058e51d..000000000 --- a/src/rules/lowercase-name.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { createRule } from './tsUtils'; -import { - AST_NODE_TYPES, - TSESTree, -} from '@typescript-eslint/experimental-utils'; - -interface JestFunctionIdentifier extends TSESTree.Identifier { - name: 'it' | 'test' | 'describe'; -} - -interface TestFunctionCallExpression extends TSESTree.CallExpression { - callee: JestFunctionIdentifier; -} - -type ArgumentLiteral = TSESTree.Literal | TSESTree.TemplateLiteral; - -interface FirstArgumentStringCallExpression extends TSESTree.CallExpression { - arguments: [ArgumentLiteral]; -} - -type CallExpressionWithCorrectCalleeAndArguments = TestFunctionCallExpression & - FirstArgumentStringCallExpression; - -const isItTestOrDescribeFunction = ( - node: TSESTree.CallExpression, -): node is TestFunctionCallExpression => { - const { callee } = node; - - if (callee.type !== AST_NODE_TYPES.Identifier) { - return false; - } - - const { name } = callee; - - return name === 'it' || name === 'test' || name === 'describe'; -}; - -const hasStringAsFirstArgument = ( - node: TSESTree.CallExpression, -): node is FirstArgumentStringCallExpression => - node.arguments && - node.arguments[0] && - (node.arguments[0].type === AST_NODE_TYPES.Literal || - node.arguments[0].type === AST_NODE_TYPES.TemplateLiteral); - -const isJestFunctionWithLiteralArg = ( - node: TSESTree.CallExpression, -): node is CallExpressionWithCorrectCalleeAndArguments => - isItTestOrDescribeFunction(node) && hasStringAsFirstArgument(node); - -const testDescription = (argument: ArgumentLiteral): string | null => { - if (argument.type === AST_NODE_TYPES.Literal) { - const { value } = argument; - - if (typeof value === 'string') { - return value; - } - return null; - } - - return argument.quasis[0].value.raw; -}; - -const jestFunctionName = ( - node: CallExpressionWithCorrectCalleeAndArguments, -) => { - const description = testDescription(node.arguments[0]); - if (description === null) { - return null; - } - - const firstCharacter = description.charAt(0); - - if (!firstCharacter) { - return null; - } - - if (firstCharacter !== firstCharacter.toLowerCase()) { - return node.callee.name; - } - - return null; -}; - -export default createRule({ - name: __filename, - meta: { - type: 'suggestion', - docs: { - description: - 'Enforce `it`, `test` and `describe` to have descriptions that begin with a lowercase letter. This provides more readable test failures.', - category: 'Best Practices', - recommended: false, - }, - fixable: 'code', - messages: { - unexpectedLowercase: '`{{ method }}`s should begin with lowercase', - }, - schema: [ - { - type: 'object', - additionalProperties: false, - properties: { - ignore: { type: 'array', items: { type: 'string' } }, - }, - }, - ], - } as const, - defaultOptions: [ - { ignore: [] } as { ignore: readonly (JestFunctionIdentifier['name'])[] }, - ], - create(context, [{ ignore }]) { - const ignoredFunctionNames = ignore.reduce< - Record - >((accumulator, value) => { - accumulator[value] = true; - return accumulator; - }, Object.create(null)); - - const isIgnoredFunctionName = ( - node: CallExpressionWithCorrectCalleeAndArguments, - ) => ignoredFunctionNames[node.callee.name]; - - return { - CallExpression(node) { - if (!isJestFunctionWithLiteralArg(node)) { - return; - } - const erroneousMethod = jestFunctionName(node); - - if (erroneousMethod && !isIgnoredFunctionName(node)) { - context.report({ - messageId: 'unexpectedLowercase', - data: { method: erroneousMethod }, - node, - fix(fixer) { - const [firstArg] = node.arguments; - // guaranteed by jestFunctionName - const description = testDescription(firstArg)!; - - const rangeIgnoringQuotes: [number, number] = [ - firstArg.range[0] + 1, - firstArg.range[1] - 1, - ]; - const newDescription = - description.substring(0, 1).toLowerCase() + - description.substring(1); - - return [ - fixer.replaceTextRange(rangeIgnoringQuotes, newDescription), - ]; - }, - }); - } - }, - }; - }, -}); diff --git a/src/rules/no-jest-import.js b/src/rules/no-jest-import.js new file mode 100644 index 000000000..139d4fb7d --- /dev/null +++ b/src/rules/no-jest-import.js @@ -0,0 +1,26 @@ +'use strict'; + +const { getDocsUrl } = require('./util'); + +const message = `Jest is automatically in scope. Do not import "jest", as Jest doesn't export anything.`; + +module.exports = { + meta: { + docs: { + url: getDocsUrl(__filename), + }, + }, + create(context) { + return { + 'ImportDeclaration[source.value="jest"]'(node) { + context.report({ node, message }); + }, + 'CallExpression[callee.name="require"][arguments.0.value="jest"]'(node) { + context.report({ + loc: node.arguments[0].loc, + message, + }); + }, + }; + }, +}; diff --git a/src/rules/no-jest-import.ts b/src/rules/no-jest-import.ts deleted file mode 100644 index c244dbdd8..000000000 --- a/src/rules/no-jest-import.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { TSESTree } from '@typescript-eslint/experimental-utils'; -import { createRule } from './tsUtils'; - -export default createRule({ - name: __filename, - meta: { - type: 'problem', - docs: { - description: - "The `jest` object is automatically in scope within every test file. The methods in the `jest` object help create mocks and let you control Jest's overall behavior. It is therefore completely unnecessary to import in `jest`, as Jest doesn't export anything in the first place.", - category: 'Best Practices', - recommended: 'error', - }, - messages: { - unexpectedImport: `Jest is automatically in scope. Do not import "jest", as Jest doesn't export anything.`, - }, - schema: [], - }, - defaultOptions: [], - create(context) { - return { - 'ImportDeclaration[source.value="jest"]'( - node: TSESTree.ImportDeclaration, - ) { - context.report({ node: node.source, messageId: 'unexpectedImport' }); - }, - 'CallExpression[callee.name="require"][arguments.0.value="jest"]'( - node: TSESTree.CallExpression, - ) { - context.report({ - node: node.arguments[0], - messageId: 'unexpectedImport', - }); - }, - }; - }, -}); diff --git a/src/rules/tsUtils.ts b/src/rules/tsUtils.ts deleted file mode 100644 index ca3891053..000000000 --- a/src/rules/tsUtils.ts +++ /dev/null @@ -1,11 +0,0 @@ -// TODO: rename to utils.ts when TS migration is complete -import { basename } from 'path'; -import { ESLintUtils } from '@typescript-eslint/experimental-utils'; -import { version } from '../../package.json'; - -const REPO_URL = 'https://github.com/jest-community/eslint-plugin-jest'; - -export const createRule = ESLintUtils.RuleCreator(name => { - const ruleName = basename(name, '.ts'); - return `${REPO_URL}/blob/v${version}/docs/rules/${ruleName}.md`; -}); diff --git a/tsconfig.json b/tsconfig.json deleted file mode 100644 index f84026bfc..000000000 --- a/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "noEmit": true, - "strict": true, - "moduleResolution": "node", - "esModuleInterop": true, - "resolveJsonModule": true - }, - "include": ["src/**/*"] -} diff --git a/yarn.lock b/yarn.lock index ebc9c7015..7d6dd31f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -305,13 +305,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-syntax-typescript@^7.2.0": - version "7.3.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.3.3.tgz#a7cc3f66119a9f7ebe2de5383cce193473d65991" - integrity sha512-dGwbSMA1YhVS8+31CnPR7LB4pcbrzcV99wQzby4uAfrkZPYZlQ7ImwdpzLqi6Z6IL02b8IAL379CaMwo0x5Lag== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-arrow-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz#9aeafbe4d6ffc6563bf8f8372091628f00779550" @@ -546,14 +539,6 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-typescript@^7.3.2": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.4.4.tgz#93e9c3f2a546e6d3da1e9cc990e30791b807aa9f" - integrity sha512-rwDvjaMTx09WC0rXGBRlYSSkEHOKRrecY6hEr3SVIPKII8DVWXtapNAfAyMC0dovuO+zYArcAuKeu3q9DNRfzA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-syntax-typescript" "^7.2.0" - "@babel/plugin-transform-unicode-regex@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.4.4.tgz#ab4634bb4f14d36728bf5978322b35587787970f" @@ -617,14 +602,6 @@ js-levenshtein "^1.1.3" semver "^5.5.0" -"@babel/preset-typescript@^7.3.3": - version "7.3.3" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.3.3.tgz#88669911053fa16b2b276ea2ede2ca603b3f307a" - integrity sha512-mzMVuIP4lqtn4du2ynEfdO0+RYcslwrZiJHXu4MGaC1ctJiW2fyaeDrtjJGs7R/KebZ1sgowcIoWf4uRpEfKEg== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-transform-typescript" "^7.3.2" - "@babel/runtime@^7.0.0": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.4.tgz#dc2e34982eb236803aa27a07fea6857af1b9171d" @@ -999,19 +976,6 @@ dependencies: "@babel/types" "^7.3.0" -"@types/eslint@^4.16.6": - version "4.16.6" - resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-4.16.6.tgz#96d4ecddbea618ab0b55eaf0dffedf387129b06c" - integrity sha512-GL7tGJig55FeclpOytU7nCCqtR143jBoC7AUdH0DO9xBSIFiNNUFCY/S3KNWsHeQJuU3hjw/OC1+kRTFNXqUZQ== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "0.0.39" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" - integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== - "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" @@ -1032,28 +996,6 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" -"@types/jest-diff@*": - version "20.0.1" - resolved "https://registry.yarnpkg.com/@types/jest-diff/-/jest-diff-20.0.1.tgz#35cc15b9c4f30a18ef21852e255fdb02f6d59b89" - integrity sha512-yALhelO3i0hqZwhjtcr6dYyaLoCHbAMshwtj6cGxTvHZAKXHsYGdff6E8EPw3xLKY0ELUTQ69Q1rQiJENnccMA== - -"@types/jest@^24.0.12": - version "24.0.12" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-24.0.12.tgz#0553dd0a5ac744e7dc4e8700da6d3baedbde3e8f" - integrity sha512-60sjqMhat7i7XntZckcSGV8iREJyXXI6yFHZkSZvCPUeOnEJ/VP1rU/WpEWQ56mvoh8NhC+sfKAuJRTyGtCOow== - dependencies: - "@types/jest-diff" "*" - -"@types/json-schema@*": - 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/node@^12.0.0": - version "12.0.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.0.0.tgz#d11813b9c0ff8aaca29f04cbc12817f4c7d656e5" - integrity sha512-Jrb/x3HT4PTJp6a4avhmJCDEVrPdqLfl3e8GGMbpkGGdwAV5UGlIs4vVEfsHHfylZVOKZWpOqmqFH8CbfOZ6kg== - "@types/stack-utils@^1.0.1": version "1.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-1.0.1.tgz#0a851d3bd96498fa25c33ab7278ed3bd65f06c3e" @@ -1064,44 +1006,6 @@ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== -"@typescript-eslint/eslint-plugin@^1.9.1-alpha.3": - version "1.9.1-alpha.3" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.1-alpha.3.tgz#1a428cd22e699367a90f84c6f28fa31a0c18536c" - integrity sha512-YMdn15ImxsJ49SfvDXwv8pQBZ/ODm+ubhbfzSVxdWHrPWbUJuH+waRklKnpb3pa/+yIAx3hUxCwi2BTxhiR2Ng== - dependencies: - "@typescript-eslint/experimental-utils" "1.9.1-alpha.3+8c8497c" - "@typescript-eslint/parser" "1.9.1-alpha.3+8c8497c" - eslint-utils "^1.3.1" - functional-red-black-tree "^1.0.1" - regexpp "^2.0.1" - requireindex "^1.2.0" - tsutils "^3.7.0" - -"@typescript-eslint/experimental-utils@1.9.1-alpha.3+8c8497c", "@typescript-eslint/experimental-utils@^1.9.1-alpha.3": - version "1.9.1-alpha.3" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.1-alpha.3.tgz#4dc44080fa2659a26e7acf9115e64aa1f132793b" - integrity sha512-0RB13XRNGcwrdpLgq/kyZiR3Vj4l4+RauBAjxBoMR77arO3YFTlb/QOw/41k+jBMzuhA9H6LVVBzqJKxnWav+Q== - dependencies: - "@typescript-eslint/typescript-estree" "1.9.1-alpha.3+8c8497c" - -"@typescript-eslint/parser@1.9.1-alpha.3+8c8497c": - version "1.9.1-alpha.3" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.9.1-alpha.3.tgz#5f59250ffa0aea4dd7d83b79673f23307f406754" - integrity sha512-BInMC4AVITeqh+UD5NWUst5cN4SRvUCWd55nj/VFNLLtPkciNPQlDwYa3+gQGCJzasD0Y4Fx6tRBUUS0ZWWz0w== - dependencies: - "@typescript-eslint/experimental-utils" "1.9.1-alpha.3+8c8497c" - "@typescript-eslint/typescript-estree" "1.9.1-alpha.3+8c8497c" - eslint-scope "^4.0.0" - eslint-visitor-keys "^1.0.0" - -"@typescript-eslint/typescript-estree@1.9.1-alpha.3+8c8497c": - version "1.9.1-alpha.3" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.1-alpha.3.tgz#b6319f9c6b07fff22953ec67cecb9c6354cab3cf" - integrity sha512-CVCk1aQz/n70msW2UePldSertYAOymuqvtW1xisABr0gVDRlZ894XlrT5ck+yORjjs0ln/hyabcGsYhRSUuHZQ== - dependencies: - lodash.unescape "4.0.1" - semver "5.5.0" - JSONStream@^1.0.4: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" @@ -2141,7 +2045,7 @@ eslint-plugin-prettier@^3.0.0: dependencies: prettier-linter-helpers "^1.0.0" -eslint-scope@^4.0.0, eslint-scope@^4.0.3: +eslint-scope@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" integrity sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg== @@ -3887,11 +3791,6 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "~3.0.0" -lodash.unescape@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" - integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= - lodash@4.17.11, lodash@^4.17.11, lodash@^4.2.1: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -5058,11 +4957,6 @@ require-main-filename@^2.0.0: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== -requireindex@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/requireindex/-/requireindex-1.2.0.tgz#3463cdb22ee151902635aa6c9535d4de9c2ef1ef" - integrity sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww== - resolve-cwd@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a" @@ -5200,11 +5094,6 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== -semver@5.5.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" - integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== - semver@6.0.0, semver@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65" @@ -5730,18 +5619,11 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= -tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.8.0, tslib@^1.9.0: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== -tsutils@^3.7.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.10.0.tgz#6f1c95c94606e098592b0dff06590cf9659227d6" - integrity sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q== - dependencies: - tslib "^1.8.1" - tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -5761,11 +5643,6 @@ type-check@~0.3.2: dependencies: prelude-ls "~1.1.2" -typescript@^3.4.5: - version "3.4.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.4.5.tgz#2d2618d10bb566572b8d7aad5180d84257d70a99" - integrity sha512-YycBxUb49UUhdNMU5aJ7z5Ej2XGmaIBL0x34vZ82fn3hGvD+bgrMrVDpatgz2f7YxUMJxMkbWxJZeAvDxVe7Vw== - uglify-js@^3.1.4: version "3.5.11" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.5.11.tgz#833442c0aa29b3a7d34344c7c63adaa3f3504f6a"