From a53365a1a911900ab9431de105133334158bdf97 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Fri, 10 May 2019 22:46:05 -0500 Subject: [PATCH 01/29] feat(lint): Add tsdx lint command Use it to lint itself --- .circleci/config.yml | 4 + README.md | 31 +++ package.json | 6 + src/createEslintConfig.ts | 49 +++++ src/createJestConfig.ts | 3 - src/createRollupConfig.ts | 1 + src/index.ts | 46 +++- yarn.lock | 430 ++++++++++++++++++++++++++++++++++++-- 8 files changed, 541 insertions(+), 29 deletions(-) create mode 100644 src/createEslintConfig.ts diff --git a/.circleci/config.yml b/.circleci/config.yml index 747cb51da..9e7aa89a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -24,6 +24,10 @@ jobs: name: Build command: yarn build + - run: + name: Lint + command: yarn lint:ci + - run: name: Run tests command: yarn test --runInBand --no-cache --coverage diff --git a/README.md b/README.md index b0835a1a7..c399a775e 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,14 @@ Despite all the recent hype, setting up a new TypeScript (x React) library can b - [`npm start` or `yarn start`](#npm-start-or-yarn-start) - [`npm run build` or `yarn build`](#npm-run-build-or-yarn-build) - [`npm test` or `yarn test`](#npm-test-or-yarn-test) + - [`npm run lint` or `yarn lint`](#npm-run-lint-or-yarn-lint) - [Optimizations](#optimizations) - [Development-only Expressions + Treeshaking](#development-only-expressions--treeshaking) + - [Rollup Treeshaking](#rollup-treeshaking) + - [Advanced `babel-plugin-dev-expressions`](#advanced-babel-plugin-dev-expressions) + - [`__DEV__`](#dev) + - [`invariant`](#invariant) + - [`warning`](#warning) - [Using lodash](#using-lodash) - [Inspiration](#inspiration) - [Comparison to Microbundle](#comparison-to-microbundle) @@ -21,6 +27,7 @@ Despite all the recent hype, setting up a new TypeScript (x React) library can b - [`tsdx watch`](#tsdx-watch) - [`tsdx build`](#tsdx-build) - [`tsdx test`](#tsdx-test) + - [`tsdx lint`](#tsdx-lint) - [Author](#author) - [License](#license) @@ -71,6 +78,10 @@ The package is optimized and bundled with Rollup into multiple formats (CommonJS Runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit. +### `npm run lint` or `yarn lint` + +Runs Eslint. + ## Optimizations Aside from just bundling your module into different formats, TSDX comes with some optimizations for your convenience. They yield objectively better code and smaller bundle sizes. @@ -316,6 +327,26 @@ Examples This runs Jest v24.x in watch mode. See [https://jestjs.io](https://jestjs.io) for options. If you are using the React template, jest uses the flag `--env=jsdom` by default. +### `tsdx lint` + +```shell + Description + Run eslint + + Usage + $ tsdx lint [options] + + Options + --fix Fixes fixable errors and warnings + --write-file Write the config file locally + -h, --help Displays this message + + Examples + $ tsdx lint src test + $ tsdx lint src test --fix + $ tsdx lint src test --write-file +``` + ## Author - [Jared Palmer](https://twitter.com/jaredpalmer) diff --git a/package.json b/package.json index ca803701f..218fda8d0 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,8 @@ }, "scripts": { "build": "tsc -p tsconfig.json", + "lint": "yarn build && node dist/index.js lint src test", + "lint:ci": "node dist/index.js lint src test", "test": "jest --config ./test/jest.config.json" }, "files": [ @@ -31,6 +33,8 @@ "dependencies": { "@babel/core": "^7.2.2", "@jaredpalmer/rollup-plugin-preserve-shebang": "^0.1.7", + "@typescript-eslint/eslint-plugin": "^1.8.0", + "@typescript-eslint/parser": "^1.8.0", "ansi-escapes": "^3.1.0", "asyncro": "^3.0.0", "babel-plugin-annotate-pure-calls": "^0.4.0", @@ -40,6 +44,7 @@ "chalk": "^2.4.2", "cross-env": "5.0.5", "enquirer": "^2.3.0", + "eslint": "^5.16.0", "execa": "^1.0.0", "fs-extra": "^7.0.1", "jest": "^24.7.1", @@ -67,6 +72,7 @@ "devDependencies": { "@types/ansi-escapes": "^4.0.0", "@types/camelcase": "^5.2.0", + "@types/eslint": "^4.16.6", "@types/execa": "^0.9.0", "@types/fs-extra": "^5.0.5", "@types/mkdirp": "^0.5.2", diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts new file mode 100644 index 000000000..bce7e9bca --- /dev/null +++ b/src/createEslintConfig.ts @@ -0,0 +1,49 @@ +import fs from 'fs'; +import path from 'path'; +import { CLIEngine } from 'eslint'; + +interface CreateEslintConfigArgs { + rootDir: string; + writeFile: boolean; +} +export function createEslintConfig({ + rootDir, + writeFile, +}: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { + const config = { + extends: ['plugin:@typescript-eslint/recommended'], + root: true, + env: { + node: true, + es6: true, + jest: true, + }, + parserOptions: { + ecmaVersion: 8, + ecmaFeatures: { + impliedStrict: true, + }, + sourceType: 'module', + }, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + rules: { + indent: 'off', + '@typescript-eslint/indent': ['error', 2], + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + }, + }; + if (writeFile && !fs.existsSync(path.join(rootDir, '.eslintrc.js'))) + fs.writeFile( + path.join(rootDir, '.eslintrc.js'), + `module.exports = ${JSON.stringify(config, null, 2)}`, + err => { + if (err) { + console.error('Error trying to save the Eslint configuration file!'); + } + } + ); + + return config; +} diff --git a/src/createJestConfig.ts b/src/createJestConfig.ts index 1d61aff6b..78966d29b 100644 --- a/src/createJestConfig.ts +++ b/src/createJestConfig.ts @@ -1,6 +1,3 @@ -import fs from 'fs'; -import path from 'path'; - export function createJestConfig( _: (relativePath: string) => void, rootDir: string diff --git a/src/createRollupConfig.ts b/src/createRollupConfig.ts index 6703788a1..4245401be 100644 --- a/src/createRollupConfig.ts +++ b/src/createRollupConfig.ts @@ -1,3 +1,4 @@ +/* eslint @typescript-eslint/camelcase: 0 */ import { DEFAULT_EXTENSIONS } from '@babel/core'; import { safeVariableName, safePackageName, external } from './utils'; import { paths } from './constants'; diff --git a/src/index.ts b/src/index.ts index a82ac3af3..d53e6c56c 100755 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ #!/usr/bin/env node +/* eslint @typescript-eslint/no-var-requires: 0 */ import sade from 'sade'; import glob from 'tiny-glob/sync'; @@ -8,6 +9,7 @@ import chalk from 'chalk'; import util from 'util'; import * as fs from 'fs-extra'; import jest from 'jest'; +import { CLIEngine } from 'eslint'; import logError from './logError'; import path from 'path'; import mkdirp from 'mkdirp'; @@ -17,13 +19,8 @@ import { paths } from './constants'; import * as Messages from './messages'; import { createRollupConfig } from './createRollupConfig'; import { createJestConfig } from './createJestConfig'; -import { - safeVariableName, - resolveApp, - safePackageName, - clearConsole, -} from './utils'; -import * as Output from './output'; +import { createEslintConfig } from './createEslintConfig'; +import { resolveApp, safePackageName, clearConsole } from './utils'; import { concatAllArray } from 'jpjs'; import getInstallCmd from './getInstallCmd'; import getInstallArgs from './getInstallArgs'; @@ -42,6 +39,7 @@ let appPackageJson: { name: string; source?: string; jest?: any; + eslint?: any; }; try { appPackageJson = fs.readJSONSync(resolveApp('package.json')); @@ -370,7 +368,7 @@ prog .describe( 'Run jest test runner in watch mode. Passes through all flags directly to Jest' ) - .action(async (opts: any) => { + .action(async () => { // Do this as the first thing so that any code reading it knows the right env. process.env.BABEL_ENV = 'test'; process.env.NODE_ENV = 'test'; @@ -394,8 +392,38 @@ prog }) ); - const [_skipTheWordTest, ...argsToPassToJestCli] = argv; + const [, ...argsToPassToJestCli] = argv; jest.run(argsToPassToJestCli); }); +prog + .command('lint') + .describe('Run eslint') + .example('lint src test') + .option('--fix', 'Fixes fixable errors and warnings') + .example('lint src test --fix') + .option('--write-file', 'Write the config file locally') + .example('lint src test --write-file') + .action(async (opts: { fix: boolean; 'write-file': boolean }) => { + const argv = process.argv.slice(2); + + const [, ...rest] = argv; + const cli = new CLIEngine({ + extensions: ['.ts', '.tsx'], + fix: opts.fix, + baseConfig: { + ...createEslintConfig({ + rootDir: paths.appRoot, + writeFile: opts['write-file'], + }), + ...appPackageJson.eslint, + }, + }); + const report = cli.executeOnFiles(rest.filter(it => !it.startsWith('-'))); + if (opts.fix) { + CLIEngine.outputFixes(report); + } + console.log(cli.getFormatter()(report.results)); + }); + prog.parse(process.argv); diff --git a/yarn.lock b/yarn.lock index 69c068e29..5737f7d92 100644 --- a/yarn.lock +++ b/yarn.lock @@ -429,7 +429,15 @@ dependencies: camelcase "*" -"@types/estree@0.0.39": +"@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@*", "@types/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" integrity sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw== @@ -453,6 +461,11 @@ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== +"@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/mkdirp@^0.5.2": version "0.5.2" resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" @@ -520,6 +533,43 @@ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== +"@typescript-eslint/eslint-plugin@^1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.8.0.tgz#675e179de2a9a7f192eccfa7583f9c647180e17a" + integrity sha512-wypT9PZUDKxCc2wVMqifo5unmtHqOPuBdcvuY03fPWQfHLqWEl49JCbGzRRXovRROONxMqbaiJPo+biL7QoDwQ== + dependencies: + "@typescript-eslint/experimental-utils" "1.8.0" + "@typescript-eslint/parser" "1.8.0" + eslint-utils "^1.3.1" + regexpp "^2.0.1" + requireindex "^1.2.0" + tsutils "^3.7.0" + +"@typescript-eslint/experimental-utils@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.8.0.tgz#634edf60c2fa6e6a34df3d96887dfc26c4fcbdcc" + integrity sha512-j+uDLmB/OC8Siir8bJk7PzGxkDn04MVLC+hRMADrK5JnKRXxiE2nSR2E6jk4XP36y/Hba2uma+CRGfs6n+Kwaw== + dependencies: + "@typescript-eslint/typescript-estree" "1.8.0" + +"@typescript-eslint/parser@1.8.0", "@typescript-eslint/parser@^1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.8.0.tgz#994c9923b3406e71f58f8f0cce40e8770834b416" + integrity sha512-3SK++gL2ndV/X7jlceiaRfHww7/JVguxFKMSF7k8iNXflR+oSucfRacReXuwVcNy09aepgDD/MCMJo/7Eh/GVg== + dependencies: + "@typescript-eslint/experimental-utils" "1.8.0" + "@typescript-eslint/typescript-estree" "1.8.0" + eslint-scope "^4.0.0" + eslint-visitor-keys "^1.0.0" + +"@typescript-eslint/typescript-estree@1.8.0": + version "1.8.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.8.0.tgz#8f327a4267c6074ec7dd55b7b3e418d91d1d0226" + integrity sha512-3ZeE79z+L8W/zsuta8vStI8W0d5j5BYiFc5sH8zerIl61hlwU3HJZIQTAnzX9r7kqf0QvIk5ak5iacttmci/mg== + dependencies: + lodash.unescape "4.0.1" + semver "5.5.0" + "@webassemblyjs/ast@1.8.5": version "1.8.5" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" @@ -699,6 +749,11 @@ acorn-globals@^4.1.0: acorn "^6.0.1" acorn-walk "^6.0.1" +acorn-jsx@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" + integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg== + acorn-walk@^6.0.1: version "6.1.1" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.1.1.tgz#d363b66f5fac5f018ff9c3a1e7b6f8e310cc3913" @@ -714,7 +769,7 @@ acorn@^6.0.1: resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a" integrity sha512-i33Zgp3XWtmZBMNvCr4azvOFeWVw1Rk6p3hfi3LUDvIFraOMywb1kAtrbi+med14m4Xfpqm3zRZMT+c0FNE7kg== -acorn@^6.0.5, acorn@^6.1.1: +acorn@^6.0.5, acorn@^6.0.7, acorn@^6.1.1: version "6.1.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.1.1.tgz#7d25ae05bb8ad1f9b699108e1094ecd7884adc1f" integrity sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA== @@ -739,6 +794,16 @@ ajv@^6.1.0, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^6.9.1: + version "6.10.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" + integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== + dependencies: + fast-deep-equal "^2.0.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + ansi-colors@^3.2.1: version "3.2.4" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" @@ -756,6 +821,11 @@ ansi-escapes@^3.0.0, ansi-escapes@^3.1.0: resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30" integrity sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw== +ansi-escapes@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" + integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ== + ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" @@ -1311,7 +1381,7 @@ chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.2: +chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1320,6 +1390,11 @@ chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" +chardet@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e" + integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== + chokidar@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" @@ -1392,6 +1467,11 @@ cli-spinners@^2.0.0: resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.1.0.tgz#22c34b4d51f573240885b201efda4e4ec9fff3c7" integrity sha512-8B00fJOEh1HPrx4fo5eW16XmE1PcL1tGpGrxy63CXGP9nHdPBN63X75hA1zhvQuhVztJWLqV58Roj2qlNM7cAA== +cli-width@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" + integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= + cliui@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-4.1.0.tgz#348422dbe82d800b3022eef4f6ac10bf2e4d1b49" @@ -1587,7 +1667,7 @@ cross-spawn@^5.0.1, cross-spawn@^5.1.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^6.0.0: +cross-spawn@^6.0.0, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -1660,7 +1740,7 @@ debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: dependencies: ms "2.0.0" -debug@^4.1.0, debug@^4.1.1: +debug@^4.0.1, debug@^4.1.0, debug@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== @@ -1777,6 +1857,13 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + domain-browser@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda" @@ -1825,6 +1912,11 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -1905,6 +1997,20 @@ escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" +eslint-config-prettier@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.2.0.tgz#70b946b629cd0e3e98233fd9ecde4cb9778de96c" + integrity sha512-y0uWc/FRfrHhpPZCYflWC8aE0KRJRY04rdZVfl8cL3sEZmOYyaBdhdlQPjKZBnuRMyLVK+JUZr7HaZFClQiH4w== + dependencies: + get-stdin "^6.0.0" + +eslint-plugin-prettier@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.1.tgz#19d521e3981f69dd6d14f64aec8c6a6ac6eb0b0d" + integrity sha512-/PMttrarPAY78PLvV3xfWibMOdMDl57hmlQ2XqFeA37wd+CJ7WSxV7txqjVPHi/AAFKd2lX0ZqfsOc/i5yFCSQ== + dependencies: + prettier-linter-helpers "^1.0.0" + eslint-scope@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" @@ -1913,6 +2019,75 @@ eslint-scope@^4.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" +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== + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint-utils@^1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512" + integrity sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q== + +eslint-visitor-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" + integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== + +eslint@^5.16.0: + version "5.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" + integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.9.1" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^4.0.3" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + espree "^5.0.1" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^6.2.2" + js-yaml "^3.13.0" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.11" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.2" + path-is-inside "^1.0.2" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^5.5.1" + strip-ansi "^4.0.0" + strip-json-comments "^2.0.1" + table "^5.2.3" + text-table "^0.2.0" + +espree@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" + integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== + dependencies: + acorn "^6.0.7" + acorn-jsx "^5.0.0" + eslint-visitor-keys "^1.0.0" + esprima@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633" @@ -1923,6 +2098,13 @@ esprima@^4.0.0: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== +esquery@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708" + integrity sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA== + dependencies: + estraverse "^4.0.0" + esrecurse@^4.1.0: version "4.2.1" resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf" @@ -1930,7 +2112,7 @@ esrecurse@^4.1.0: dependencies: estraverse "^4.1.0" -estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: +estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13" integrity sha1-De4/7TH81GlhjOc0IJn8GvoL2xM= @@ -2071,6 +2253,15 @@ extend@~3.0.2: resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== +external-editor@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27" + integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA== + dependencies: + chardet "^0.7.0" + iconv-lite "^0.4.24" + tmp "^0.0.33" + extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -2107,6 +2298,11 @@ fast-deep-equal@^2.0.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -2129,6 +2325,20 @@ figgy-pudding@^3.5.1: resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" integrity sha512-vNKxJHTEKNThjfrdJwHc7brvM6eVevuO5nTj6ez8ZQ1qbXTvGthucRF7S4vf2cr71QVnT70V34v0S1DyQsti0w== +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" + integrity sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI= + dependencies: + escape-string-regexp "^1.0.5" + +file-entry-cache@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-5.0.1.tgz#ca0f6efa6dd3d561333fb14515065c2fafdf439c" + integrity sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== + dependencies: + flat-cache "^2.0.1" + filename-regex@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26" @@ -2186,6 +2396,20 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +flat-cache@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-2.0.1.tgz#5d296d6f04bda44a4630a301413bdbc2ec085ec0" + integrity sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA== + dependencies: + flatted "^2.0.0" + rimraf "2.6.3" + write "1.0.3" + +flatted@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.0.tgz#55122b6536ea496b4b44893ee2608141d10d9916" + integrity sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg== + flush-write-stream@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd" @@ -2292,6 +2516,11 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -2311,6 +2540,11 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + get-stdin@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" @@ -2380,6 +2614,11 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.9.0.tgz#bde236808e987f290768a93d065060d78e6ab249" integrity sha512-5cJVtyXWH8PiJPVLZzzoIizXx944O4OmRro5MWKx5fT4MgcN7OfaMutPeaTdJCCURwbWdhhcCWcKIffPnmTzBg== +globals@^11.7.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + globalyzer@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" @@ -2557,7 +2796,7 @@ husky@^2.1.0: run-node "^1.0.0" slash "^2.0.0" -iconv-lite@0.4.24, iconv-lite@^0.4.4: +iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== @@ -2586,6 +2825,11 @@ ignore@^3.3.7: resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.10.tgz#0a97fb876986e8081c631160f8f9f389157f0043" integrity sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug== +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + import-fresh@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-2.0.0.tgz#d81355c15612d386c61f9ddd3922d4304822a546" @@ -2594,6 +2838,14 @@ import-fresh@^2.0.0: caller-path "^2.0.0" resolve-from "^3.0.0" +import-fresh@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390" + integrity sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + import-local@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" @@ -2635,6 +2887,25 @@ ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== +inquirer@^6.2.2: + version "6.3.1" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" + integrity sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA== + dependencies: + ansi-escapes "^3.2.0" + chalk "^2.4.2" + cli-cursor "^2.1.0" + cli-width "^2.0.0" + external-editor "^3.0.3" + figures "^2.0.0" + lodash "^4.17.11" + mute-stream "0.0.7" + run-async "^2.2.0" + rxjs "^6.4.0" + string-width "^2.1.0" + strip-ansi "^5.1.0" + through "^2.3.6" + interpret@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" @@ -2862,6 +3133,11 @@ is-primitive@^2.0.0: resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" integrity sha1-IHurkWOEmcB7Kt8kCkGochADRXU= +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + is-regex@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" @@ -3443,6 +3719,11 @@ json-schema@0.2.3: resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" @@ -3525,7 +3806,7 @@ leven@^2.1.0: resolved "https://registry.yarnpkg.com/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580" integrity sha1-wuep93IJTe6dNCAq6KzORoeHVYA= -levn@~0.3.0: +levn@^0.3.0, levn@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= @@ -3583,6 +3864,11 @@ lodash.sortby@^4.7.0: resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= +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.13.1, lodash@^4.17.10, lodash@^4.17.11: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -3924,6 +4210,11 @@ multimatch@^3.0.0: arrify "^1.0.1" minimatch "^3.0.4" +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" + integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= + nan@^2.12.1: version "2.13.2" resolved "https://registry.yarnpkg.com/nan/-/nan-2.13.2.tgz#f51dc7ae66ba7d5d55e1e6d4d8092e802c9aefe7" @@ -4207,7 +4498,7 @@ optimist@^0.6.1: minimist "~0.0.1" wordwrap "~0.0.2" -optionator@^0.8.1: +optionator@^0.8.1, optionator@^0.8.2: version "0.8.2" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64" integrity sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q= @@ -4262,7 +4553,7 @@ os-locale@^3.0.0: lcid "^2.0.0" mem "^4.0.0" -os-tmpdir@^1.0.0: +os-tmpdir@^1.0.0, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= @@ -4354,6 +4645,13 @@ parallel-transform@^1.1.0: inherits "^2.0.3" readable-stream "^2.1.5" +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + parse-asn1@^5.0.0: version "5.1.3" resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.3.tgz#1600c6cc0727365d68b97f3aa78939e735a75204" @@ -4414,6 +4712,11 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +path-is-inside@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" + integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= + path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -4512,6 +4815,13 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier@^1.17.0: version "1.17.0" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.0.tgz#53b303676eed22cc14a9f0cec09b477b3026c008" @@ -4567,6 +4877,11 @@ progress-estimator@^0.2.2: humanize-duration "^3.15.3" log-update "^2.3.0" +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + promise-inflight@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-inflight/-/promise-inflight-1.0.1.tgz#98472870bf228132fcbdd868129bad12c3c029e3" @@ -4786,6 +5101,11 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -4858,6 +5178,11 @@ 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" @@ -4870,6 +5195,11 @@ resolve-from@^3.0.0: resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-3.0.0.tgz#b22c7af7d9d6881bc8b6e653335eebcb0a188748" integrity sha1-six699nWiBvItuZTM17rywoYh0g= +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + resolve-url@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" @@ -4914,7 +5244,7 @@ ret@~0.1.10: resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== -rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: +rimraf@2.6.3, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -5070,6 +5400,13 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.4.tgz#b50e6b34583f3dd89329a2f23a8a2be072845911" integrity sha512-6FomvYPfs+Jy9TfXmBpBuMWNH94SgCsZmJKcanySzgNNP6LjWxBvyLTa9KaMfDDM5oxRfrKDB0r/qeRsLwnBfA== +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" + integrity sha1-A3GrSuC91yDUFm19/aZP96RFpsA= + dependencies: + is-promise "^2.1.0" + run-node@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/run-node/-/run-node-1.0.0.tgz#46b50b946a2aa2d4947ae1d886e9856fd9cabe5e" @@ -5082,6 +5419,13 @@ run-queue@^1.0.0, run-queue@^1.0.3: dependencies: aproba "^1.1.1" +rxjs@^6.4.0: + version "6.5.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7" + integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg== + dependencies: + tslib "^1.9.0" + sade@^1.4.2: version "1.4.2" resolved "https://registry.yarnpkg.com/sade/-/sade-1.4.2.tgz#b1946ef9ec62450b74e17d9fec30156c94f193a6" @@ -5145,7 +5489,12 @@ semver-compare@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== -semver@^5.6.0: +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@^5.5.1, semver@^5.6.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== @@ -5244,6 +5593,15 @@ slash@^2.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== +slice-ansi@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" + integrity sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ== + dependencies: + ansi-styles "^3.2.0" + astral-regex "^1.0.0" + is-fullwidth-code-point "^2.0.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -5467,7 +5825,7 @@ string-width@^1.0.1: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -5475,6 +5833,15 @@ string-width@^1.0.1: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + string_decoder@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" @@ -5503,7 +5870,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.2.0: +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== @@ -5520,7 +5887,7 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-json-comments@~2.0.1: +strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -5544,6 +5911,16 @@ symbol-tree@^3.2.2: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= +table@^5.2.3: + version "5.3.2" + resolved "https://registry.yarnpkg.com/table/-/table-5.3.2.tgz#3aab56a41b2905bf66a6a006bd716fa1e78d4702" + integrity sha512-gDBrfla2z1JiBio5BE7nudwkjTjPOTduCzJC94fc1JjnuzI+tUsMiDskxFQCskxAtMB2c/ZwD6R2lg65zCptdQ== + dependencies: + ajv "^6.9.1" + lodash "^4.17.11" + slice-ansi "^2.1.0" + string-width "^3.0.0" + tapable@^1.0.0, tapable@^1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.1.tgz#4d297923c5a72a42360de2ab52dadfaaec00018e" @@ -5595,6 +5972,11 @@ test-exclude@^5.2.2: read-pkg-up "^4.0.0" require-main-filename "^2.0.0" +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + throat@^4.0.0: version "4.1.0" resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a" @@ -5608,7 +5990,7 @@ through2@^2.0.0: readable-stream "~2.3.6" xtend "~4.0.1" -through@2, through@~2.3, through@~2.3.1: +through@2, through@^2.3.6, through@~2.3, through@~2.3.1: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= @@ -5628,6 +6010,13 @@ tiny-glob@^0.2.6: globalyzer "^0.1.0" globrex "^0.1.1" +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -5768,7 +6157,7 @@ tsutils@^2.29.0: dependencies: tslib "^1.8.1" -tsutils@^3.9.1: +tsutils@^3.7.0, tsutils@^3.9.1: version "3.10.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.10.0.tgz#6f1c95c94606e098592b0dff06590cf9659227d6" integrity sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q== @@ -6124,6 +6513,13 @@ write-file-atomic@2.4.1: imurmurhash "^0.1.4" signal-exit "^3.0.2" +write@1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/write/-/write-1.0.3.tgz#0800e14523b923a387e415123c865616aae0f5c3" + integrity sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== + dependencies: + mkdirp "^0.5.1" + ws@^5.2.0: version "5.2.2" resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" From c2d5ff88ef0e399fd8a40efcc95342aab9b7b7f8 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Sat, 11 May 2019 10:25:18 -0500 Subject: [PATCH 02/29] feat(lint): process.exit(1) when errorCount > 0 --- src/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/index.ts b/src/index.ts index d53e6c56c..8f92b0a59 100755 --- a/src/index.ts +++ b/src/index.ts @@ -424,6 +424,9 @@ prog CLIEngine.outputFixes(report); } console.log(cli.getFormatter()(report.results)); + if (report.errorCount) { + process.exit(1); + } }); prog.parse(process.argv); From b34a8f45129e95220ba5b95adcdb8e373c29ed67 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Sat, 11 May 2019 10:26:49 -0500 Subject: [PATCH 03/29] style(lint): Fix lint errors that failed the CI build From 641f5fb2f46369dc334c42e181f235a3cb92425d Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Sat, 11 May 2019 10:36:24 -0500 Subject: [PATCH 04/29] feat(lint): Play nicely with pretty-quick husky hook --- src/createEslintConfig.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index bce7e9bca..353f2bdbb 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -11,7 +11,11 @@ export function createEslintConfig({ writeFile, }: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { const config = { - extends: ['plugin:@typescript-eslint/recommended'], + extends: [ + 'plugin:@typescript-eslint/recommended', + 'prettier/@typescript-eslint', + 'plugin:prettier/recommended', + ], root: true, env: { node: true, @@ -28,8 +32,6 @@ export function createEslintConfig({ parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], rules: { - indent: 'off', - '@typescript-eslint/indent': ['error', 2], '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/explicit-function-return-type': 'off', }, From 87d26f6d29083f1935999277a84cc0684c22bdb4 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Sat, 11 May 2019 10:40:25 -0500 Subject: [PATCH 05/29] feat(lint): Install eslint-prettier dependencies, remove tslint devDeps --- package.json | 8 +++---- yarn.lock | 62 ++++++---------------------------------------------- 2 files changed, 10 insertions(+), 60 deletions(-) diff --git a/package.json b/package.json index 218fda8d0..b34a72665 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,8 @@ "cross-env": "5.0.5", "enquirer": "^2.3.0", "eslint": "^5.16.0", + "eslint-config-prettier": "^4.2.0", + "eslint-plugin-prettier": "^3.1.0", "execa": "^1.0.0", "fs-extra": "^7.0.1", "jest": "^24.7.1", @@ -85,11 +87,7 @@ "prettier": "^1.17.0", "pretty-quick": "^1.10.0", "ps-tree": "^1.2.0", - "shelljs": "^0.8.3", - "tslint": "^5.16.0", - "tslint-config-palmerhq": "^1.0.2", - "tslint-config-prettier": "^1.18.0", - "tslint-react": "^4.0.0" + "shelljs": "^0.8.3" }, "husky": { "hooks": { diff --git a/yarn.lock b/yarn.lock index 5737f7d92..7f948db3c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1266,7 +1266,7 @@ buffer@^4.3.0: ieee754 "^1.1.4" isarray "^1.0.0" -builtin-modules@^1.0.0, builtin-modules@^1.1.1: +builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= @@ -1523,11 +1523,6 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" -commander@^2.12.1: - version "2.19.0" - resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a" - integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg== - commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" @@ -2004,10 +1999,10 @@ eslint-config-prettier@^4.2.0: dependencies: get-stdin "^6.0.0" -eslint-plugin-prettier@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.0.1.tgz#19d521e3981f69dd6d14f64aec8c6a6ac6eb0b0d" - integrity sha512-/PMttrarPAY78PLvV3xfWibMOdMDl57hmlQ2XqFeA37wd+CJ7WSxV7txqjVPHi/AAFKd2lX0ZqfsOc/i5yFCSQ== +eslint-plugin-prettier@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz#8695188f95daa93b0dc54b249347ca3b79c4686d" + integrity sha512-XWX2yVuwVNLOUhQijAkXz+rMPPoCr7WFiAl8ig6I7Xn+pPVhDhzg4DxHpmbeb0iqjO9UronEA3Tb09ChnFVHHA== dependencies: prettier-linter-helpers "^1.0.0" @@ -6109,55 +6104,12 @@ ts-jest@^24.0.2: semver "^5.5" yargs-parser "10.x" -tslib@1.9.3, tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: +tslib@1.9.3, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.9.3" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286" integrity sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ== -tslint-config-palmerhq@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/tslint-config-palmerhq/-/tslint-config-palmerhq-1.0.2.tgz#76524f6c62018c35681b80b21ed37e2b5f0dd331" - integrity sha1-dlJPbGIBjDVoG4CyHtN+K18N0zE= - -tslint-config-prettier@^1.18.0: - version "1.18.0" - resolved "https://registry.yarnpkg.com/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz#75f140bde947d35d8f0d238e0ebf809d64592c37" - integrity sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg== - -tslint-react@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-4.0.0.tgz#b4bb4c01c32448cb14d23f143a2f5e4989bb961e" - integrity sha512-9fNE0fm9zNDx1+b6hgy8rgDN2WsQLRiIrn3+fbqm0tazBVF6jiaCFAITxmU+WSFWYE03Xhp1joCircXOe1WVAQ== - dependencies: - tsutils "^3.9.1" - -tslint@^5.16.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.16.0.tgz#ae61f9c5a98d295b9a4f4553b1b1e831c1984d67" - integrity sha512-UxG2yNxJ5pgGwmMzPMYh/CCnCnh0HfPgtlVRDs1ykZklufFBL1ZoTlWFRz2NQjcoEiDoRp+JyT0lhBbbH/obyA== - dependencies: - "@babel/code-frame" "^7.0.0" - builtin-modules "^1.1.1" - chalk "^2.3.0" - commander "^2.12.1" - diff "^3.2.0" - glob "^7.1.1" - js-yaml "^3.13.0" - minimatch "^3.0.4" - mkdirp "^0.5.1" - resolve "^1.3.2" - semver "^5.3.0" - tslib "^1.8.0" - tsutils "^2.29.0" - -tsutils@^2.29.0: - version "2.29.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" - integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== - dependencies: - tslib "^1.8.1" - -tsutils@^3.7.0, tsutils@^3.9.1: +tsutils@^3.7.0: version "3.10.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.10.0.tgz#6f1c95c94606e098592b0dff06590cf9659227d6" integrity sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q== From 2009b77dfca2c52e0d5fddc833128a2e136d3218 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Sat, 11 May 2019 13:38:04 -0500 Subject: [PATCH 06/29] feat(lint): Add jsx linting support for React by default --- README.md | 26 ++--- package.json | 7 +- src/createEslintConfig.ts | 14 ++- src/index.ts | 53 ++++++---- test/tests/lint/file-with-lint-errors.ts | 4 + test/tests/lint/file-without-lint-error.ts | 1 + .../lint/react-file-with-lint-errors.tsx | 7 ++ .../lint/react-file-without-lint-error.tsx | 5 + test/tests/lint/tsdx-lint.test.js | 34 ++++++ tsconfig.json | 1 + yarn.lock | 100 +++++++++++++++++- 11 files changed, 209 insertions(+), 43 deletions(-) create mode 100644 test/tests/lint/file-with-lint-errors.ts create mode 100644 test/tests/lint/file-without-lint-error.ts create mode 100644 test/tests/lint/react-file-with-lint-errors.tsx create mode 100644 test/tests/lint/react-file-without-lint-error.tsx create mode 100644 test/tests/lint/tsdx-lint.test.js diff --git a/README.md b/README.md index c399a775e..2b3222950 100644 --- a/README.md +++ b/README.md @@ -330,21 +330,23 @@ This runs Jest v24.x in watch mode. See [https://jestjs.io](https://jestjs.io) f ### `tsdx lint` ```shell - Description - Run eslint +Description + Run eslint - Usage - $ tsdx lint [options] +Usage + $ tsdx lint [options] - Options - --fix Fixes fixable errors and warnings - --write-file Write the config file locally - -h, --help Displays this message +Options + --fix Fixes fixable errors and warnings + --ignore-pattern Ignore a pattern + --write-file Write the config file locally + -h, --help Displays this message - Examples - $ tsdx lint src test - $ tsdx lint src test --fix - $ tsdx lint src test --write-file +Examples + $ tsdx lint src test + $ tsdx lint src test --fix + $ tsdx lint src test --ignore-pattern test/foobar.ts + $ tsdx lint src test --write-file ``` ## Author diff --git a/package.json b/package.json index b34a72665..868077613 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ }, "scripts": { "build": "tsc -p tsconfig.json", - "lint": "yarn build && node dist/index.js lint src test", + "lint": "yarn build && node dist/index.js lint src --ignore-pattern tests/lint", "lint:ci": "node dist/index.js lint src test", "test": "jest --config ./test/jest.config.json" }, @@ -47,6 +47,7 @@ "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", "eslint-plugin-prettier": "^3.1.0", + "eslint-plugin-react": "^7.13.0", "execa": "^1.0.0", "fs-extra": "^7.0.1", "jest": "^24.7.1", @@ -81,17 +82,19 @@ "@types/ms": "^0.7.30", "@types/node": "^11.13.8", "@types/ora": "^3.2.0", + "@types/react": "^16.8.17", "@types/rollup-plugin-json": "^3.0.2", "@types/rollup-plugin-sourcemaps": "^0.4.2", "husky": "^2.1.0", "prettier": "^1.17.0", "pretty-quick": "^1.10.0", "ps-tree": "^1.2.0", + "react": "^16.8.6", "shelljs": "^0.8.3" }, "husky": { "hooks": { - "pre-commit": "pretty-quick --staged" + "pre-commit": "pretty-quick --staged --pattern '!tests/lint/**'" } }, "prettier": { diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index 353f2bdbb..a371e360f 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -12,29 +12,41 @@ export function createEslintConfig({ }: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { const config = { extends: [ + 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier/@typescript-eslint', 'plugin:prettier/recommended', + 'plugin:react/recommended', ], root: true, env: { node: true, es6: true, jest: true, + browser: true, }, parserOptions: { - ecmaVersion: 8, + ecmaVersion: 2017, ecmaFeatures: { impliedStrict: true, + jsx: true, + experimentalObjectRestSpread: true, }, sourceType: 'module', }, parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint'], rules: { + 'no-console': 'off', + 'no-empty': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/explicit-function-return-type': 'off', }, + settings: { + react: { + version: 'detect', + }, + }, }; if (writeFile && !fs.existsSync(path.join(rootDir, '.eslintrc.js'))) fs.writeFile( diff --git a/src/index.ts b/src/index.ts index 8f92b0a59..26f67014c 100755 --- a/src/index.ts +++ b/src/index.ts @@ -402,31 +402,38 @@ prog .example('lint src test') .option('--fix', 'Fixes fixable errors and warnings') .example('lint src test --fix') + .option('--ignore-pattern', 'Ignore a pattern') + .example('lint src test --ignore-pattern test/foobar.ts') .option('--write-file', 'Write the config file locally') .example('lint src test --write-file') - .action(async (opts: { fix: boolean; 'write-file': boolean }) => { - const argv = process.argv.slice(2); - - const [, ...rest] = argv; - const cli = new CLIEngine({ - extensions: ['.ts', '.tsx'], - fix: opts.fix, - baseConfig: { - ...createEslintConfig({ - rootDir: paths.appRoot, - writeFile: opts['write-file'], - }), - ...appPackageJson.eslint, - }, - }); - const report = cli.executeOnFiles(rest.filter(it => !it.startsWith('-'))); - if (opts.fix) { - CLIEngine.outputFixes(report); - } - console.log(cli.getFormatter()(report.results)); - if (report.errorCount) { - process.exit(1); + .action( + async (opts: { + fix: boolean; + 'ignore-pattern': string; + 'write-file': boolean; + _: string[]; + }) => { + const cli = new CLIEngine({ + extensions: ['.ts', '.tsx'], + fix: opts.fix, + ignorePattern: opts['ignore-pattern'], + baseConfig: { + ...createEslintConfig({ + rootDir: paths.appRoot, + writeFile: opts['write-file'], + }), + ...appPackageJson.eslint, + }, + }); + const report = cli.executeOnFiles(opts['_']); + if (opts.fix) { + CLIEngine.outputFixes(report); + } + console.log(cli.getFormatter()(report.results)); + if (report.errorCount) { + process.exit(1); + } } - }); + ); prog.parse(process.argv); diff --git a/test/tests/lint/file-with-lint-errors.ts b/test/tests/lint/file-with-lint-errors.ts new file mode 100644 index 000000000..3e8e21f8f --- /dev/null +++ b/test/tests/lint/file-with-lint-errors.ts @@ -0,0 +1,4 @@ +export const foo = ( ) => +!! ('bar') +; + diff --git a/test/tests/lint/file-without-lint-error.ts b/test/tests/lint/file-without-lint-error.ts new file mode 100644 index 000000000..ccd16e4b9 --- /dev/null +++ b/test/tests/lint/file-without-lint-error.ts @@ -0,0 +1 @@ +export const foo = () => !!'bar'; diff --git a/test/tests/lint/react-file-with-lint-errors.tsx b/test/tests/lint/react-file-with-lint-errors.tsx new file mode 100644 index 000000000..f5e7449b5 --- /dev/null +++ b/test/tests/lint/react-file-with-lint-errors.tsx @@ -0,0 +1,7 @@ +import React from 'react'; + +export const Foobar = (props: any ) => { + return
foobar
; +} +; diff --git a/test/tests/lint/react-file-without-lint-error.tsx b/test/tests/lint/react-file-without-lint-error.tsx new file mode 100644 index 000000000..325632557 --- /dev/null +++ b/test/tests/lint/react-file-without-lint-error.tsx @@ -0,0 +1,5 @@ +import React from 'react'; + +export const Foobar = (props: any) => { + return
foobar
; +}; diff --git a/test/tests/lint/tsdx-lint.test.js b/test/tests/lint/tsdx-lint.test.js new file mode 100644 index 000000000..5e2da2135 --- /dev/null +++ b/test/tests/lint/tsdx-lint.test.js @@ -0,0 +1,34 @@ +/** + * @jest-environment node + */ +'use strict'; + +const shell = require('shelljs'); + +shell.config.silent = true; + +describe('tsdx lint', () => { + it('should fail to lint a ts file with errors', () => { + const testFile = 'test/tests/lint/file-with-lint-errors.ts'; + const output = shell.exec(`node dist/index.js lint ${testFile}`); + expect(output.code).toBe(1); + }); + + it('should succeed linting a ts file without errors', () => { + const testFile = 'test/tests/lint/file-without-lint-error.ts'; + const output = shell.exec(`node dist/index.js lint ${testFile}`); + expect(output.code).toBe(0); + }); + + it('should fail to lint a tsx file with errors', () => { + const testFile = 'test/tests/lint/react-file-with-lint-errors.tsx'; + const output = shell.exec(`node dist/index.js lint ${testFile}`); + expect(output.code).toBe(1); + }); + + it('should succeed linting a tsx file without errors', () => { + const testFile = 'test/tests/lint/react-file-without-lint-error.tsx'; + const output = shell.exec(`node dist/index.js lint ${testFile}`); + expect(output.code).toBe(0); + }); +}); diff --git a/tsconfig.json b/tsconfig.json index 98899bb98..42b671312 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "exclude": ["src/template/**/*"], "compilerOptions": { "allowJs": true, + "jsx": "react", "importHelpers": true, "esModuleInterop": true, "outDir": "dist", diff --git a/yarn.lock b/yarn.lock index 7f948db3c..ea8e7d7a4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -500,6 +500,19 @@ dependencies: ora "*" +"@types/prop-types@*": + version "15.7.1" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.1.tgz#f1a11e7babb0c3cad68100be381d1e064c68f1f6" + integrity sha512-CFzn9idOEpHrgdw8JsoTkaDDyRWk1jrzIV8djzcgpq0y9tG4B4lFT+Nxh52DVpDXV+n4+NPNv7M1Dj5uMp6XFg== + +"@types/react@^16.8.17": + version "16.8.17" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.8.17.tgz#f287b76a5badb93bc9aa3f54521a3eb53d6c2374" + integrity sha512-pln3mgc6VfkNg92WXODul/ONo140huK9OMsx62GlBlZ2lvjNK86PQJhYMPLO1i66aF5O9OPyZefogvNltBIszA== + dependencies: + "@types/prop-types" "*" + csstype "^2.2.0" + "@types/resolve@0.0.8": version "0.0.8" resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" @@ -915,6 +928,14 @@ array-equal@^1.0.0: resolved "https://registry.yarnpkg.com/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93" integrity sha1-jCpe8kcv2ep0KwTHenUJO6J1fJM= +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + integrity sha1-GEtI9i2S10UrsxsyMWXH+L0CJm0= + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + array-union@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -1702,6 +1723,11 @@ cssstyle@^1.0.0: dependencies: cssom "0.3.x" +csstype@^2.2.0: + version "2.6.4" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.4.tgz#d585a6062096e324e7187f80e04f92bd0f00e37f" + integrity sha512-lAJUJP3M6HxFXbqtGRc0iZrdyeN+WzOWeY0q/VnFzI+kqVrYIzC7bWlKqCW7oCIdzoPkvfp82EVvrTlQ8zsWQg== + cyclist@~0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" @@ -1852,6 +1878,13 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -1954,7 +1987,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.5.1: +es-abstract@^1.11.0, es-abstract@^1.5.1, es-abstract@^1.7.0: version "1.13.0" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== @@ -2006,6 +2039,19 @@ eslint-plugin-prettier@^3.1.0: dependencies: prettier-linter-helpers "^1.0.0" +eslint-plugin-react@^7.13.0: + version "7.13.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.13.0.tgz#bc13fd7101de67996ea51b33873cd9dc2b7e5758" + integrity sha512-uA5LrHylu8lW/eAH3bEQe9YdzpPaFd9yAJTwTi/i/BKTD7j6aQMKVAdGM/ML72zD6womuSK7EiGtMKuK06lWjQ== + dependencies: + array-includes "^3.0.3" + doctrine "^2.1.0" + has "^1.0.3" + jsx-ast-utils "^2.1.0" + object.fromentries "^2.0.0" + prop-types "^15.7.2" + resolve "^1.10.1" + eslint-scope@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" @@ -3755,6 +3801,13 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" +jsx-ast-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.1.0.tgz#0ee4e2c971fb9601c67b5641b71be80faecf0b36" + integrity sha512-yDGDG2DS4JcqhA6blsuYbtsT09xL8AoLuUR2Gb5exrw7UEM19sBcOTq+YBBhrNbl0PUC4R4LnFu+dHg2HKeVvA== + dependencies: + array-includes "^3.0.3" + kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: version "3.2.2" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" @@ -3885,7 +3938,7 @@ log-update@^2.3.0: cli-cursor "^2.0.0" wrap-ansi "^3.0.1" -loose-envify@^1.0.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== @@ -4422,7 +4475,7 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -object-assign@^4.1.0: +object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -4448,6 +4501,16 @@ object-visit@^1.0.0: dependencies: isobject "^3.0.0" +object.fromentries@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.0.tgz#49a543d92151f8277b3ac9600f1e930b189d30ab" + integrity sha512-9iLiI6H083uiqUuvzyY6qrlmc/Gz8hLQFOcb/Ri/0xXFkSNS3ctV+CbE6yM2+AnkYfOB3dGjdzC0wrMLIhQICA== + dependencies: + define-properties "^1.1.2" + es-abstract "^1.11.0" + function-bind "^1.1.1" + has "^1.0.1" + object.getownpropertydescriptors@^2.0.3: version "2.0.3" resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16" @@ -4890,6 +4953,15 @@ prompts@^2.0.1: kleur "^3.0.2" sisteransi "^1.0.0" +prop-types@^15.6.2, prop-types@^15.7.2: + version "15.7.2" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5" + integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== + dependencies: + loose-envify "^1.4.0" + object-assign "^4.1.1" + react-is "^16.8.1" + prr@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" @@ -5013,11 +5085,21 @@ rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-is@^16.8.4: +react-is@^16.8.1, react-is@^16.8.4: version "16.8.6" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== +react@^16.8.6: + version "16.8.6" + resolved "https://registry.yarnpkg.com/react/-/react-16.8.6.tgz#ad6c3a9614fd3a4e9ef51117f54d888da01f2bbe" + integrity sha512-pC0uMkhLaHm11ZSJULfOBqV4tIZkx87ZLvbbQYunNixAAvjnC+snJCg0XQXn9VIsttVsbZP/H/ewzgsd5fxKXw== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + prop-types "^15.6.2" + scheduler "^0.13.6" + read-pkg-up@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" @@ -5212,7 +5294,7 @@ resolve@1.10.0, resolve@1.x: dependencies: path-parse "^1.0.6" -resolve@^1.1.6, resolve@^1.10.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1: version "1.10.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18" integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA== @@ -5465,6 +5547,14 @@ sax@^1.2.4: resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== +scheduler@^0.13.6: + version "0.13.6" + resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.13.6.tgz#466a4ec332467b31a91b9bf74e5347072e4cd889" + integrity sha512-IWnObHt413ucAYKsD9J1QShUKkbKLQQHdxRyw73sw4FN26iWr3DY/H34xGPe4nmL1DwXyWmSWmMrA9TfQbE/XQ== + dependencies: + loose-envify "^1.1.0" + object-assign "^4.1.1" + schema-utils@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770" From ec9ee11be2dde8c8e1a605f862248e7a67972816 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Sat, 11 May 2019 14:25:39 -0500 Subject: [PATCH 07/29] fix(lint): Fix local ignore-pattern --- .circleci/config.yml | 2 +- package.json | 6 +++--- src/createEslintConfig.ts | 30 +++++++++++++++++++++--------- 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9e7aa89a2..3cf48005e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,7 @@ jobs: - run: name: Lint - command: yarn lint:ci + command: yarn lint:post-build - run: name: Run tests diff --git a/package.json b/package.json index 868077613..a4e7f6ee3 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ }, "scripts": { "build": "tsc -p tsconfig.json", - "lint": "yarn build && node dist/index.js lint src --ignore-pattern tests/lint", - "lint:ci": "node dist/index.js lint src test", + "lint": "yarn build && yarn lint:post-build", + "lint:post-build": "node dist/index.js lint src test --ignore-pattern 'test/tests/lint'", "test": "jest --config ./test/jest.config.json" }, "files": [ @@ -94,7 +94,7 @@ }, "husky": { "hooks": { - "pre-commit": "pretty-quick --staged --pattern '!tests/lint/**'" + "pre-commit": "pretty-quick --staged --pattern '!test/tests/lint/**'" } }, "prettier": { diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index a371e360f..1a72f4e09 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -48,16 +48,28 @@ export function createEslintConfig({ }, }, }; - if (writeFile && !fs.existsSync(path.join(rootDir, '.eslintrc.js'))) - fs.writeFile( - path.join(rootDir, '.eslintrc.js'), - `module.exports = ${JSON.stringify(config, null, 2)}`, - err => { - if (err) { - console.error('Error trying to save the Eslint configuration file!'); + + if (writeFile) { + const file = path.join(rootDir, '.eslintrc.js'); + if (fs.existsSync(file)) { + console.error( + 'Error trying to save the Eslint configuration file:', + `${file} already exists.` + ); + } else { + fs.writeFile( + file, + `module.exports = ${JSON.stringify(config, null, 2)}`, + err => { + if (err) { + console.error( + 'Error trying to save the Eslint configuration file!' + ); + } } - } - ); + ); + } + } return config; } From dcf82df036e6d886b50c1da4660c4514a7c26e9e Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Mon, 13 May 2019 09:44:08 -0500 Subject: [PATCH 08/29] feat(lint): Use @typescript-eslint/no-unused-vars instead of typescript/no-unused-vars --- src/createEslintConfig.ts | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index 1a72f4e09..af65ebbac 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -41,6 +41,8 @@ export function createEslintConfig({ 'no-empty': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/explicit-function-return-type': 'off', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': [2, { args: 'none' }], }, settings: { react: { @@ -57,17 +59,14 @@ export function createEslintConfig({ `${file} already exists.` ); } else { - fs.writeFile( - file, - `module.exports = ${JSON.stringify(config, null, 2)}`, - err => { - if (err) { - console.error( - 'Error trying to save the Eslint configuration file!' - ); - } - } - ); + try { + fs.writeFileSync( + file, + `module.exports = ${JSON.stringify(config, null, 2)}` + ); + } catch (e) { + console.error(e); + } } } From 5f82e132c36968802c350311048a565afd3f391d Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Thu, 30 May 2019 08:23:48 -0400 Subject: [PATCH 09/29] Update lockfile --- yarn.lock | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index cf9e94cb0..476c01156 100644 --- a/yarn.lock +++ b/yarn.lock @@ -427,10 +427,6 @@ resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.1.tgz#42995b446db9a48a11a07ec083499a860e9138ff" integrity sha512-hRJD2ahnnpLgsj6KWMYSrmXkM3rm2Dl1qkx6IOFD5FnuNPXJIG5L0dhgKXCYTRMGzU4n0wImQ/xfmRc4POUFlg== -"@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/istanbul-lib-report@*": version "1.1.1" resolved "https://registry.yarnpkg.com/@types/istanbul-lib-report/-/istanbul-lib-report-1.1.1.tgz#e5471e7fa33c61358dd38426189c037a58433b8c" @@ -446,6 +442,11 @@ "@types/istanbul-lib-coverage" "*" "@types/istanbul-lib-report" "*" +"@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/mkdirp@^0.5.2": version "0.5.2" resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" @@ -1368,7 +1369,7 @@ chalk@^2.0.0, chalk@^2.3.0, chalk@^2.4.1: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.2: +chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -3133,6 +3134,7 @@ is-promise@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" integrity sha1-eaKp7OfwlugPNtKy87wWwf9L8/o= + is-reference@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/is-reference/-/is-reference-1.1.2.tgz#01cf91517d21db66a34642287ed6e70d53dcbe5c" @@ -4860,10 +4862,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.0.tgz#53b303676eed22cc14a9f0cec09b477b3026c008" - integrity sha512-sXe5lSt2WQlCbydGETgfm1YBShgOX4HxQkFPvbxkcwgDvGDeqVau8h+12+lmSVlP3rHPz0oavfddSZg/q+Szjw== +prettier@^1.17.1: + version "1.17.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db" + integrity sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg== pretty-format@^23.6.0: version "23.6.0" @@ -5274,7 +5276,7 @@ resolve@1.10.0, resolve@1.x: dependencies: path-parse "^1.0.6" -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1: +resolve@^1.1.6, resolve@^1.10.0: version "1.10.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18" integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA== @@ -5675,6 +5677,11 @@ slash@^2.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + slice-ansi@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.1.0.tgz#cacd7693461a637a5788d92a7dd4fba068e81636" @@ -5683,10 +5690,6 @@ slice-ansi@^2.1.0: ansi-styles "^3.2.0" astral-regex "^1.0.0" is-fullwidth-code-point "^2.0.0" -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== snapdragon-node@^2.0.1: version "2.1.1" From 6be8bc49f76227f6d7316f29a282ca75a2574ebf Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Thu, 30 May 2019 08:25:54 -0400 Subject: [PATCH 10/29] Merge branch 'master' into pr/skvale/99 --- CONTRIBUTING.md | 44 +++ package.json | 11 +- src/createRollupConfig.ts | 64 +++- yarn.lock | 723 +++++++++++++++++++++++++++++++++++--- 4 files changed, 781 insertions(+), 61 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..256ad6536 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,44 @@ +# Contributing to TSDX + +Thanks for your interest in TSDX! You are very welcome to contribute. If you are proposing a new feature, make sure to [open an issue](https://github.com/palmerhq/tsdx/issues/new/choose) to make sure it is inline with the project goals. + +## Setup +0. First, remove any existing `tsdx` global installations that may conflict. + + ``` + yarn global remove tsdx # or npm uninstall -g tsdx + ``` + +1. Fork this repository to your own GitHub account and clone it to your local device: + + ``` + git clone https://github.com/your-name/tsdx.git + cd tsdx + ``` + +2. Install the dependencies and build the Typescript files to Javascript: + + ``` + yarn && yarn build + ``` + + > **Note:** you'll need to run `yarn build` any time you want to see your changes, or run `yarn watch` to leave it in watch mode. + +3. Make it so running `tsdx` anywhere will run your local dev version: + + ``` + yarn link + ``` + + +4. To use your local version when running `yarn build`/`yarn start`/`yarn test` in a TSDX project, run this in the project: + + ``` + yarn link tsdx + ``` + + You should see a success message: `success Using linked package for "tsdx".` The project will now use the locally linked version instead of a copy from `node_modules`. + +## Submitting a PR + +Be sure to run `yarn test` before you make your PR to make sure you haven't broken anything. diff --git a/package.json b/package.json index 18f2d7e9b..a2183023f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tsdx", - "version": "0.5.11", + "version": "0.6.0", "author": "Jared Palmer ", "description": "Zero-config TypeScript package development", "license": "MIT", @@ -33,13 +33,16 @@ ], "dependencies": { "@babel/core": "^7.4.4", - "@jaredpalmer/rollup-plugin-preserve-shebang": "^0.1.7", "@typescript-eslint/eslint-plugin": "^1.8.0", "@typescript-eslint/parser": "^1.8.0", + "@babel/plugin-proposal-class-properties": "^7.4.4", + "@babel/polyfill": "^7.4.4", + "@babel/preset-env": "^7.4.4", "ansi-escapes": "^3.2.0", "asyncro": "^3.0.0", "babel-plugin-annotate-pure-calls": "^0.4.0", "babel-plugin-dev-expression": "^0.2.1", + "babel-plugin-transform-async-to-promises": "^0.8.11", "babel-plugin-transform-rename-import": "^2.3.0", "camelcase": "^5.0.0", "chalk": "^2.4.2", @@ -66,7 +69,7 @@ "rollup-plugin-size-snapshot": "^0.8.0", "rollup-plugin-sourcemaps": "^0.4.2", "rollup-plugin-terser": "^4.0.4", - "rollup-plugin-typescript2": "^0.21.0", + "rollup-plugin-typescript2": "^0.21.1", "sade": "^1.4.2", "tiny-glob": "^0.2.6", "ts-jest": "^24.0.2", @@ -104,4 +107,4 @@ "singleQuote": true, "trailingComma": "es5" } -} +} \ No newline at end of file diff --git a/src/createRollupConfig.ts b/src/createRollupConfig.ts index b338bd04a..f6f192d13 100644 --- a/src/createRollupConfig.ts +++ b/src/createRollupConfig.ts @@ -14,9 +14,24 @@ import shebangPlugin from '@jaredpalmer/rollup-plugin-preserve-shebang'; const replacements = [{ original: 'lodash', replacement: 'lodash-es' }]; -const babelOptions = (format: 'cjs' | 'es' | 'umd') => ({ - exclude: /node_modules/, +const babelOptions = ( + format: 'cjs' | 'es' | 'umd', + target: 'node' | 'browser' +) => ({ + exclude: 'node_modules/**', extensions: [...DEFAULT_EXTENSIONS, 'ts', 'tsx'], + passPerPreset: true, // @see https://babeljs.io/docs/en/options#passperpreset + presets: [ + [ + '@babel/preset-env', + { + loose: true, + modules: false, + targets: target === 'node' ? { node: '8' } : undefined, + exclude: ['transform-async-to-generator'], + }, + ], + ], plugins: [ require.resolve('babel-plugin-annotate-pure-calls'), require.resolve('babel-plugin-dev-expression'), @@ -24,20 +39,34 @@ const babelOptions = (format: 'cjs' | 'es' | 'umd') => ({ require.resolve('babel-plugin-transform-rename-import'), { replacements }, ], + [ + require.resolve('babel-plugin-transform-async-to-promises'), + { inlineHelpers: true, externalHelpers: true }, + ], + [ + require.resolve('@babel/plugin-proposal-class-properties'), + { loose: true }, + ], ].filter(Boolean), }); +// shebang cache map thing because the transform only gets run once +let shebang: any = {}; export function createRollupConfig( format: 'cjs' | 'umd' | 'es', env: 'development' | 'production', opts: { input: string; name: string; target: 'node' | 'browser' } ) { - let shebang; return { // Tell Rollup the entry point to the package input: opts.input, // Tell Rollup which packages to ignore - external, + external: (id: string) => { + if (id === 'babel-plugin-transform-async-to-promises/helpers') { + return false; + } + return external(id); + }, // Establish Rollup output output: { // Set filenames of the consumer's package @@ -90,6 +119,26 @@ export function createRollupConfig( include: /\/node_modules\//, }), json(), + { + // Custom plugin that removes shebang from code because newer + // versions of bublé bundle their own private version of `acorn` + // and I don't know a way to patch in the option `allowHashBang` + // to acorn. Taken from microbundle. + // See: https://github.com/Rich-Harris/buble/pull/165 + transform(code: string) { + let reg = /^#!(.*)/; + let match = code.match(reg); + + shebang[opts.name] = match ? '#!' + match[1] : ''; + + code = code.replace(reg, ''); + + return { + code, + map: null, + }; + }, + }, typescript({ typescript: require('typescript'), cacheRoot: `./.rts2_cache_${format}`, @@ -106,7 +155,7 @@ export function createRollupConfig( }, }, }), - babel(babelOptions(format)), + babel(babelOptions(format, opts.target)), replace({ 'process.env.NODE_ENV': JSON.stringify(env), }), @@ -121,15 +170,12 @@ export function createRollupConfig( compress: { keep_infinity: true, pure_getters: true, - collapse_vars: false, + passes: 10, }, ecma: 5, toplevel: format === 'es' || format === 'cjs', warnings: true, }), - shebangPlugin({ - shebang, - }), ], }; } diff --git a/yarn.lock b/yarn.lock index 476c01156..da693e926 100644 --- a/yarn.lock +++ b/yarn.lock @@ -40,6 +40,59 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/helper-annotate-as-pure@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" + integrity sha512-3UYcJUj9kvSLbLbUIfQTqzcy5VX7GRZ/CCDrnOaZorFFM01aXp1+GJwuFGV4NDDoAS+mOUyHcO6UD/RfqOks3Q== + dependencies: + "@babel/types" "^7.0.0" + +"@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.1.0.tgz#6b69628dfe4087798e0c4ed98e3d4a6b2fbd2f5f" + integrity sha512-qNSR4jrmJ8M1VMM9tibvyRAHXQs2PmaksQF7c1CGJNipfe3D8p+wgNwgso/P2A2r2mdgBWAXljNWR0QRZAMW8w== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-call-delegate@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-call-delegate/-/helper-call-delegate-7.4.4.tgz#87c1f8ca19ad552a736a7a27b1c1fcf8b1ff1f43" + integrity sha512-l79boDFJ8S1c5hvQvG+rc+wHw6IuH7YldmRKsYtpbawsxURu/paVy57FZMomGK22/JckepaikOkY0MoAmdyOlQ== + dependencies: + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" + +"@babel/helper-create-class-features-plugin@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.4.4.tgz#fc3d690af6554cc9efc607364a82d48f58736dba" + integrity sha512-UbBHIa2qeAGgyiNR9RszVF7bUHEdgS4JAUNT8SiqrAN6YJVxlOxeLr5pBzb5kan302dejJ9nla4RyKcR1XT6XA== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-split-export-declaration" "^7.4.4" + +"@babel/helper-define-map@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-define-map/-/helper-define-map-7.4.4.tgz#6969d1f570b46bdc900d1eba8e5d59c48ba2c12a" + integrity sha512-IX3Ln8gLhZpSuqHJSnTNBWGDE9kdkTEWl21A/K7PQ00tseBwbqCHTvNLHSBd9M0R5rER4h5Rsvj9vw0R5SieBg== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/types" "^7.4.4" + lodash "^4.17.11" + +"@babel/helper-explode-assignable-expression@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.1.0.tgz#537fa13f6f1674df745b0c00ec8fe4e99681c8f6" + integrity sha512-NRQpfHrJ1msCHtKjbzs9YcMmJZOg6mQMmGRB+hbamEdG5PNpaSm95275VD92DvJKuyl0s2sFiDmMZ+EnnvufqA== + dependencies: + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + "@babel/helper-function-name@^7.1.0": version "7.1.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53" @@ -56,6 +109,20 @@ dependencies: "@babel/types" "^7.0.0" +"@babel/helper-hoist-variables@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" + integrity sha512-VYk2/H/BnYbZDDg39hr3t2kKyifAm1W6zHRfhx8jGjIHpQEBv9dry7oQ2f3+J703TLu69nYdxsovl0XYfcnK4w== + dependencies: + "@babel/types" "^7.4.4" + +"@babel/helper-member-expression-to-functions@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.0.0.tgz#8cd14b0a0df7ff00f009e7d7a436945f47c7a16f" + integrity sha512-avo+lm/QmZlv27Zsi0xEor2fKcqWG56D5ae9dzklpIaY7cQMK5N8VSpaNVPPagiqmy7LrEjK1IWdGMOqPu5csg== + dependencies: + "@babel/types" "^7.0.0" + "@babel/helper-module-imports@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d" @@ -63,11 +130,66 @@ dependencies: "@babel/types" "^7.0.0" +"@babel/helper-module-transforms@^7.1.0", "@babel/helper-module-transforms@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.4.4.tgz#96115ea42a2f139e619e98ed46df6019b94414b8" + integrity sha512-3Z1yp8TVQf+B4ynN7WoHPKS8EkdTbgAEy0nU0rs/1Kw4pDgmvYH3rz3aI11KgxKCba2cn7N+tqzV1mY2HMN96w== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/template" "^7.4.4" + "@babel/types" "^7.4.4" + lodash "^4.17.11" + +"@babel/helper-optimise-call-expression@^7.0.0": + version "7.0.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.0.0.tgz#a2920c5702b073c15de51106200aa8cad20497d5" + integrity sha512-u8nd9NQePYNQV8iPWu/pLLYBqZBa4ZaY1YWRFMuxrid94wKI1QNt67NEZ7GAe5Kc/0LLScbim05xZFWkAdrj9g== + dependencies: + "@babel/types" "^7.0.0" + "@babel/helper-plugin-utils@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== +"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.4.4.tgz#a47e02bc91fb259d2e6727c2a30013e3ac13c4a2" + integrity sha512-Y5nuB/kESmR3tKjU8Nkn1wMGEx1tjJX076HBMeL3XLQCu6vA/YRzuTW0bbb+qRnXvQGn+d6Rx953yffl8vEy7Q== + dependencies: + lodash "^4.17.11" + +"@babel/helper-remap-async-to-generator@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.1.0.tgz#361d80821b6f38da75bd3f0785ece20a88c5fe7f" + integrity sha512-3fOK0L+Fdlg8S5al8u/hWE6vhufGSn0bN09xm2LXMy//REAF8kDCrYoOBKYmA8m5Nom+sV9LyLCwrFynA8/slg== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-wrap-function" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.0.0" + +"@babel/helper-replace-supers@^7.1.0", "@babel/helper-replace-supers@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.4.4.tgz#aee41783ebe4f2d3ab3ae775e1cc6f1a90cefa27" + integrity sha512-04xGEnd+s01nY1l15EuMS1rfKktNF+1CkKmHoErDppjAAZL+IUBZpzT748x262HF7fibaQPhbvWUl5HeSt1EXg== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.0.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/traverse" "^7.4.4" + "@babel/types" "^7.4.4" + +"@babel/helper-simple-access@^7.1.0": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.1.0.tgz#65eeb954c8c245beaa4e859da6188f39d71e585c" + integrity sha512-Vk+78hNjRbsiu49zAPALxTb+JUQCz1aolpd8osOF16BGnLtseD21nbHgLPGUwrXEurZgiCOUmvs3ExTu4F5x6w== + dependencies: + "@babel/template" "^7.1.0" + "@babel/types" "^7.0.0" + "@babel/helper-split-export-declaration@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" @@ -75,6 +197,16 @@ dependencies: "@babel/types" "^7.4.4" +"@babel/helper-wrap-function@^7.1.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" + integrity sha512-o9fP1BZLLSrYlxYEYyl2aS+Flun5gtjTIG8iln+XuEzQTs0PLagAGSXUcqruJwD5fM48jzIEggCKpIfWTcR7pQ== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/template" "^7.1.0" + "@babel/traverse" "^7.1.0" + "@babel/types" "^7.2.0" + "@babel/helpers@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.4.4.tgz#868b0ef59c1dd4e78744562d5ce1b59c89f2f2a5" @@ -103,13 +235,389 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" integrity sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA== -"@babel/plugin-syntax-object-rest-spread@^7.0.0": +"@babel/plugin-proposal-async-generator-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" + integrity sha512-+Dfo/SCQqrwx48ptLVGLdE39YtWRuKc/Y9I5Fy0P1DDBB9lsAHpjcEJQt+4IifuSOSTLBKJObJqMvaO1pIE8LQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + "@babel/plugin-syntax-async-generators" "^7.2.0" + +"@babel/plugin-proposal-class-properties@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.4.4.tgz#93a6486eed86d53452ab9bab35e368e9461198ce" + integrity sha512-WjKTI8g8d5w1Bc9zgwSz2nfrsNQsXcCf9J9cdCvrJV6RF56yztwm4TmJC0MgJ9tvwO9gUA/mcYe89bLdGfiXFg== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-proposal-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.2.0.tgz#568ecc446c6148ae6b267f02551130891e29f317" + integrity sha512-MAFV1CA/YVmYwZG0fBQyXhmj0BHCB5egZHCKWIFVv/XCxAeVGIHfos3SwDck4LvCllENIAg7xMKOG5kH0dzyUg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" + +"@babel/plugin-proposal-object-rest-spread@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.4.4.tgz#1ef173fcf24b3e2df92a678f027673b55e7e3005" + integrity sha512-dMBG6cSPBbHeEBdFXeQ2QLc5gUpg4Vkaz8octD4aoW/ISO+jBOcsuxYL7bsb5WSu8RLP6boxrBIALEHgoHtO9g== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + +"@babel/plugin-proposal-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.2.0.tgz#135d81edb68a081e55e56ec48541ece8065c38f5" + integrity sha512-mgYj3jCcxug6KUcX4OBoOJz3CMrwRfQELPQ5560F70YQUBZB7uac9fqaWamKR1iWUzGiK2t0ygzjTScZnVz75g== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + +"@babel/plugin-proposal-unicode-property-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz#501ffd9826c0b91da22690720722ac7cb1ca9c78" + integrity sha512-j1NwnOqMG9mFUOH58JTFsA/+ZYzQLUZ/drqWUqxCYLGeu2JFZL8YrNC9hBxKmWtAuOCHPcRpgv7fhap09Fb4kA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.5.4" + +"@babel/plugin-syntax-async-generators@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.2.0.tgz#69e1f0db34c6f5a0cf7e2b3323bf159a76c8cb7f" + integrity sha512-1ZrIRBv2t0GSlcwVoQ6VgSLpLgiN/FVQUzt9znxo7v2Ov4jJrs8RY8tv0wvDmFN3qIdMKWrmMMW6yZ0G19MfGg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-json-strings@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.2.0.tgz#72bd13f6ffe1d25938129d2a186b11fd62951470" + integrity sha512-5UGYnMSLRE1dqqZwug+1LISpA403HzlSfsg6P9VXU6TBjcSHeNlw4DxDx7LgpF+iKZoOG/+uzqoRHTdcUpiZNg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-syntax-object-rest-spread@^7.0.0", "@babel/plugin-syntax-object-rest-spread@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.2.0.tgz#3b7a3e733510c57e820b9142a6579ac8b0dfad2e" integrity sha512-t0JKGgqk2We+9may3t0xDdmneaXmyxq0xieYcKHxIsrJO64n1OiMWNUtc5gQK1PA0NpdCRrtZp4z+IUaKugrSA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-optional-catch-binding@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.2.0.tgz#a94013d6eda8908dfe6a477e7f9eda85656ecf5c" + integrity sha512-bDe4xKNhb0LI7IvZHiA13kff0KEfaGX/Hv4lMA9+7TEc63hMNvfKo6ZFpXhKuEp+II/q35Gc4NoMeDZyaUbj9w== + 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" + integrity sha512-ER77Cax1+8/8jCB9fo4Ud161OZzWN5qawi4GusDuRLcDbDG+bIGYY20zb2dfAFdTRGzrfq2xZPvF0R64EHnimg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-async-to-generator@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.4.4.tgz#a3f1d01f2f21cadab20b33a82133116f14fb5894" + integrity sha512-YiqW2Li8TXmzgbXw+STsSqPBPFnGviiaSp6CYOq55X8GQ2SGVLrXB6pNid8HkqkZAzOH6knbai3snhP7v0fNwA== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-remap-async-to-generator" "^7.1.0" + +"@babel/plugin-transform-block-scoped-functions@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.2.0.tgz#5d3cc11e8d5ddd752aa64c9148d0db6cb79fd190" + integrity sha512-ntQPR6q1/NKuphly49+QiQiTN0O63uOwjdD6dhIjSWBI5xlrbUFh720TIpzBhpnrLfv2tNH/BXvLIab1+BAI0w== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-block-scoping@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.4.4.tgz#c13279fabf6b916661531841a23c4b7dae29646d" + integrity sha512-jkTUyWZcTrwxu5DD4rWz6rDB5Cjdmgz6z7M7RLXOJyCUkFBawssDGcGh8M/0FTSB87avyJI1HsTwUXp9nKA1PA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + lodash "^4.17.11" + +"@babel/plugin-transform-classes@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.4.4.tgz#0ce4094cdafd709721076d3b9c38ad31ca715eb6" + integrity sha512-/e44eFLImEGIpL9qPxSRat13I5QNRgBLu2hOQJCF7VLy/otSM/sypV1+XaIw5+502RX/+6YaSAPmldk+nhHDPw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-define-map" "^7.4.4" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-optimise-call-expression" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.4.4" + "@babel/helper-split-export-declaration" "^7.4.4" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.2.0.tgz#83a7df6a658865b1c8f641d510c6f3af220216da" + integrity sha512-kP/drqTxY6Xt3NNpKiMomfgkNn4o7+vKxK2DDKcBG9sHj51vHqMBGy8wbDS/J4lMxnqs153/T3+DmCEAkC5cpA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-destructuring@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.4.4.tgz#9d964717829cc9e4b601fc82a26a71a4d8faf20f" + integrity sha512-/aOx+nW0w8eHiEHm+BTERB2oJn5D127iye/SUQl7NjHy0lf+j7h4MKMMSOwdazGq9OxgiNADncE+SRJkCxjZpQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-dotall-regex@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.4.4.tgz#361a148bc951444312c69446d76ed1ea8e4450c3" + integrity sha512-P05YEhRc2h53lZDjRPk/OektxCVevFzZs2Gfjd545Wde3k+yFDbXORgl2e0xpbq8mLcKJ7Idss4fAg0zORN/zg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.5.4" + +"@babel/plugin-transform-duplicate-keys@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.2.0.tgz#d952c4930f312a4dbfff18f0b2914e60c35530b3" + integrity sha512-q+yuxW4DsTjNceUiTzK0L+AfQ0zD9rWaTLiUqHA8p0gxx7lu1EylenfzjeIWNkPy6e/0VG/Wjw9uf9LueQwLOw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-exponentiation-operator@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.2.0.tgz#a63868289e5b4007f7054d46491af51435766008" + integrity sha512-umh4hR6N7mu4Elq9GG8TOu9M0bakvlsREEC+ialrQN6ABS4oDQ69qJv1VtR3uxlKMCQMCvzk7vr17RHKcjx68A== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-for-of@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.4.4.tgz#0267fc735e24c808ba173866c6c4d1440fc3c556" + integrity sha512-9T/5Dlr14Z9TIEXLXkt8T1DU7F24cbhwhMNUziN3hB1AXoZcdzPcTiKGRn/6iOymDqtTKWnr/BtRKN9JwbKtdQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-function-name@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.4.4.tgz#e1436116abb0610c2259094848754ac5230922ad" + integrity sha512-iU9pv7U+2jC9ANQkKeNF6DrPy4GBa4NWQtl6dHB4Pb3izX2JOEvDTFarlNsBj/63ZEzNNIAMs3Qw4fNCcSOXJA== + dependencies: + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.2.0.tgz#690353e81f9267dad4fd8cfd77eafa86aba53ea1" + integrity sha512-2ThDhm4lI4oV7fVQ6pNNK+sx+c/GM5/SaML0w/r4ZB7sAneD/piDJtwdKlNckXeyGK7wlwg2E2w33C/Hh+VFCg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-member-expression-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.2.0.tgz#fa10aa5c58a2cb6afcf2c9ffa8cb4d8b3d489a2d" + integrity sha512-HiU3zKkSU6scTidmnFJ0bMX8hz5ixC93b4MHMiYebmk2lUVNGOboPsqQvx5LzooihijUoLR/v7Nc1rbBtnc7FA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-amd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.2.0.tgz#82a9bce45b95441f617a24011dc89d12da7f4ee6" + integrity sha512-mK2A8ucqz1qhrdqjS9VMIDfIvvT2thrEsIQzbaTdc5QFzhDjQv2CkJJ5f6BXIkgbmaoax3zBr2RyvV/8zeoUZw== + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-commonjs@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.4.4.tgz#0bef4713d30f1d78c2e59b3d6db40e60192cac1e" + integrity sha512-4sfBOJt58sEo9a2BQXnZq+Q3ZTSAUXyK3E30o36BOGnJ+tvJ6YSxF0PG6kERvbeISgProodWuI9UVG3/FMY6iw== + dependencies: + "@babel/helper-module-transforms" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-simple-access" "^7.1.0" + +"@babel/plugin-transform-modules-systemjs@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.4.4.tgz#dc83c5665b07d6c2a7b224c00ac63659ea36a405" + integrity sha512-MSiModfILQc3/oqnG7NrP1jHaSPryO6tA2kOMmAQApz5dayPxWiHqmq4sWH2xF5LcQK56LlbKByCd8Aah/OIkQ== + dependencies: + "@babel/helper-hoist-variables" "^7.4.4" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-modules-umd@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.2.0.tgz#7678ce75169f0877b8eb2235538c074268dd01ae" + integrity sha512-BV3bw6MyUH1iIsGhXlOK6sXhmSarZjtJ/vMiD9dNmpY8QXFFQTj+6v92pcfy1iqa8DeAfJFwoxcrS/TUZda6sw== + dependencies: + "@babel/helper-module-transforms" "^7.1.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.4.5.tgz#9d269fd28a370258199b4294736813a60bbdd106" + integrity sha512-z7+2IsWafTBbjNsOxU/Iv5CvTJlr5w4+HGu1HovKYTtgJ362f7kBcQglkfmlspKKZ3bgrbSGvLfNx++ZJgCWsg== + dependencies: + regexp-tree "^0.1.6" + +"@babel/plugin-transform-new-target@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.4.4.tgz#18d120438b0cc9ee95a47f2c72bc9768fbed60a5" + integrity sha512-r1z3T2DNGQwwe2vPGZMBNjioT2scgWzK9BCnDEh+46z8EEwXBq24uRzd65I7pjtugzPSj921aM15RpESgzsSuA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-object-super@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.2.0.tgz#b35d4c10f56bab5d650047dad0f1d8e8814b6598" + integrity sha512-VMyhPYZISFZAqAPVkiYb7dUe2AsVi2/wCT5+wZdsNO31FojQJa9ns40hzZ6U9f50Jlq4w6qwzdBB2uwqZ00ebg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-replace-supers" "^7.1.0" + +"@babel/plugin-transform-parameters@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.4.4.tgz#7556cf03f318bd2719fe4c922d2d808be5571e16" + integrity sha512-oMh5DUO1V63nZcu/ZVLQFqiihBGo4OpxJxR1otF50GMeCLiRx5nUdtokd+u9SuVJrvvuIh9OosRFPP4pIPnwmw== + dependencies: + "@babel/helper-call-delegate" "^7.4.4" + "@babel/helper-get-function-arity" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-property-literals@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.2.0.tgz#03e33f653f5b25c4eb572c98b9485055b389e905" + integrity sha512-9q7Dbk4RhgcLp8ebduOpCbtjh7C0itoLYHXd9ueASKAG/is5PQtMR5VJGka9NKqGhYEGn5ITahd4h9QeBMylWQ== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-regenerator@^7.4.5": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.4.5.tgz#629dc82512c55cee01341fb27bdfcb210354680f" + integrity sha512-gBKRh5qAaCWntnd09S8QC7r3auLCqq5DI6O0DlfoyDjslSBVqBibrMdsqO+Uhmx3+BlOmE/Kw1HFxmGbv0N9dA== + dependencies: + regenerator-transform "^0.14.0" + +"@babel/plugin-transform-reserved-words@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.2.0.tgz#4792af87c998a49367597d07fedf02636d2e1634" + integrity sha512-fz43fqW8E1tAB3DKF19/vxbpib1fuyCwSPE418ge5ZxILnBhWyhtPgz8eh1RCGGJlwvksHkyxMxh0eenFi+kFw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-shorthand-properties@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.2.0.tgz#6333aee2f8d6ee7e28615457298934a3b46198f0" + integrity sha512-QP4eUM83ha9zmYtpbnyjTLAGKQritA5XW/iG9cjtuOI8s1RuL/3V6a3DeSHfKutJQ+ayUfeZJPcnCYEQzaPQqg== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-spread@^7.2.0": + version "7.2.2" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.2.2.tgz#3103a9abe22f742b6d406ecd3cd49b774919b406" + integrity sha512-KWfky/58vubwtS0hLqEnrWJjsMGaOeSBn90Ezn5Jeg9Z8KKHmELbP1yGylMlm5N6TPKeY9A2+UaSYLdxahg01w== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-sticky-regex@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.2.0.tgz#a1e454b5995560a9c1e0d537dfc15061fd2687e1" + integrity sha512-KKYCoGaRAf+ckH8gEL3JHUaFVyNHKe3ASNsZ+AlktgHevvxGigoIttrEJb8iKN03Q7Eazlv1s6cx2B2cQ3Jabw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.0.0" + +"@babel/plugin-transform-template-literals@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.4.4.tgz#9d28fea7bbce637fb7612a0750989d8321d4bcb0" + integrity sha512-mQrEC4TWkhLN0z8ygIvEL9ZEToPhG5K7KDW3pzGqOfIGZ28Jb0POUkeWcoz8HnHvhFy6dwAT1j8OzqN8s804+g== + dependencies: + "@babel/helper-annotate-as-pure" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + +"@babel/plugin-transform-typeof-symbol@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.2.0.tgz#117d2bcec2fbf64b4b59d1f9819894682d29f2b2" + integrity sha512-2LNhETWYxiYysBtrBTqL8+La0jIoQQnIScUJc74OYvUGRmkskNY4EzLCnjHBzdmb38wqtTaixpo1NctEcvMDZw== + dependencies: + "@babel/helper-plugin-utils" "^7.0.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" + integrity sha512-il+/XdNw01i93+M9J9u4T7/e/Ue/vWfNZE4IRUQjplu2Mqb/AFTDimkw2tdEdSH50wuQXZAbXSql0UphQke+vA== + dependencies: + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/helper-regex" "^7.4.4" + regexpu-core "^4.5.4" + +"@babel/polyfill@^7.4.4": + version "7.4.4" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.4.4.tgz#78801cf3dbe657844eeabf31c1cae3828051e893" + integrity sha512-WlthFLfhQQhh+A2Gn5NSFl0Huxz36x86Jn+E9OW7ibK8edKPq+KLy4apM1yDpQ8kJOVi1OVjpP4vSDLdrI04dg== + dependencies: + core-js "^2.6.5" + regenerator-runtime "^0.13.2" + +"@babel/preset-env@^7.4.4": + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.4.5.tgz#2fad7f62983d5af563b5f3139242755884998a58" + integrity sha512-f2yNVXM+FsR5V8UwcFeIHzHWgnhXg3NpRmy0ADvALpnhB0SLbCvrCRr4BLOUYbQNLS+Z0Yer46x9dJXpXewI7w== + dependencies: + "@babel/helper-module-imports" "^7.0.0" + "@babel/helper-plugin-utils" "^7.0.0" + "@babel/plugin-proposal-async-generator-functions" "^7.2.0" + "@babel/plugin-proposal-json-strings" "^7.2.0" + "@babel/plugin-proposal-object-rest-spread" "^7.4.4" + "@babel/plugin-proposal-optional-catch-binding" "^7.2.0" + "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" + "@babel/plugin-syntax-async-generators" "^7.2.0" + "@babel/plugin-syntax-json-strings" "^7.2.0" + "@babel/plugin-syntax-object-rest-spread" "^7.2.0" + "@babel/plugin-syntax-optional-catch-binding" "^7.2.0" + "@babel/plugin-transform-arrow-functions" "^7.2.0" + "@babel/plugin-transform-async-to-generator" "^7.4.4" + "@babel/plugin-transform-block-scoped-functions" "^7.2.0" + "@babel/plugin-transform-block-scoping" "^7.4.4" + "@babel/plugin-transform-classes" "^7.4.4" + "@babel/plugin-transform-computed-properties" "^7.2.0" + "@babel/plugin-transform-destructuring" "^7.4.4" + "@babel/plugin-transform-dotall-regex" "^7.4.4" + "@babel/plugin-transform-duplicate-keys" "^7.2.0" + "@babel/plugin-transform-exponentiation-operator" "^7.2.0" + "@babel/plugin-transform-for-of" "^7.4.4" + "@babel/plugin-transform-function-name" "^7.4.4" + "@babel/plugin-transform-literals" "^7.2.0" + "@babel/plugin-transform-member-expression-literals" "^7.2.0" + "@babel/plugin-transform-modules-amd" "^7.2.0" + "@babel/plugin-transform-modules-commonjs" "^7.4.4" + "@babel/plugin-transform-modules-systemjs" "^7.4.4" + "@babel/plugin-transform-modules-umd" "^7.2.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.4.5" + "@babel/plugin-transform-new-target" "^7.4.4" + "@babel/plugin-transform-object-super" "^7.2.0" + "@babel/plugin-transform-parameters" "^7.4.4" + "@babel/plugin-transform-property-literals" "^7.2.0" + "@babel/plugin-transform-regenerator" "^7.4.5" + "@babel/plugin-transform-reserved-words" "^7.2.0" + "@babel/plugin-transform-shorthand-properties" "^7.2.0" + "@babel/plugin-transform-spread" "^7.2.0" + "@babel/plugin-transform-sticky-regex" "^7.2.0" + "@babel/plugin-transform-template-literals" "^7.4.4" + "@babel/plugin-transform-typeof-symbol" "^7.2.0" + "@babel/plugin-transform-unicode-regex" "^7.4.4" + "@babel/types" "^7.4.4" + browserslist "^4.6.0" + core-js-compat "^3.1.1" + invariant "^2.2.2" + js-levenshtein "^1.1.3" + semver "^5.5.0" + "@babel/template@^7.0.0", "@babel/template@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237" @@ -152,7 +660,7 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" -"@babel/types@^7.3.0", "@babel/types@^7.4.4": +"@babel/types@^7.2.0", "@babel/types@^7.3.0", "@babel/types@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.4.4.tgz#8db9e9a629bb7c29370009b4b779ed93fe57d5f0" integrity sha512-dOllgYdnEFOebhkKCjzSVFqw/PmmB8pH6RGOWkY4GsboQNd47b1fBThBSwlHAq9alF9vc1M3+6oqR47R50L0tQ== @@ -169,13 +677,6 @@ exec-sh "^0.3.2" minimist "^1.2.0" -"@jaredpalmer/rollup-plugin-preserve-shebang@^0.1.7": - version "0.1.7" - resolved "https://registry.yarnpkg.com/@jaredpalmer/rollup-plugin-preserve-shebang/-/rollup-plugin-preserve-shebang-0.1.7.tgz#859af736117f3596e30942ceed305c3b0385fdbe" - integrity sha512-3LXEo59XtjdnGMVBsyvKAe8g1SEffjut7RguqjK1H8VfpqLvclDTIFCIZMUsCnja2PyKb/R20LaJtNf415pTSg== - dependencies: - magic-string "^0.22.4" - "@jest/console@^24.7.1": version "24.7.1" resolved "https://registry.yarnpkg.com/@jest/console/-/console-24.7.1.tgz#32a9e42535a97aedfe037e725bd67e954b459545" @@ -1049,6 +1550,11 @@ babel-plugin-jest-hoist@^24.6.0: dependencies: "@types/babel__traverse" "^7.0.6" +babel-plugin-transform-async-to-promises@^0.8.11: + version "0.8.11" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.11.tgz#30b145149e34cbb06cc3b06179ef0a8f70dd1b5c" + integrity sha512-Ut0In27GXx//Z3Gw8nhfg4pse7U4rd0t46oAvdvOWPCPSkEAemH1d6lIOFQb+oDdv70hIM+B7vOtLUP6dNdSiA== + babel-plugin-transform-rename-import@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-transform-rename-import/-/babel-plugin-transform-rename-import-2.3.0.tgz#5d9d645f937b0ca5c26a24b2510a06277b6ffd9b" @@ -1221,6 +1727,15 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" +browserslist@^4.6.0: + version "4.6.1" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.6.1.tgz#ee5059b1aec18cbec9d055d6cb5e24ae50343a9b" + integrity sha512-1MC18ooMPRG2UuVFJTHFIAkk6mpByJfxCrnUyvSlu/hyQSFHMrlhM02SzNuCV+quTP4CKmqtOMAIjrifrpBJXQ== + dependencies: + caniuse-lite "^1.0.30000971" + electron-to-chromium "^1.3.137" + node-releases "^1.1.21" + bs-logger@0.x: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -1348,6 +1863,11 @@ camelcase@^5.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42" integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA== +caniuse-lite@^1.0.30000971: + version "1.0.30000971" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000971.tgz#d1000e4546486a6977756547352bc96a4cfd2b13" + integrity sha512-TQFYFhRS0O5rdsmSbF1Wn+16latXYsQJat66f7S7lizXW1PVpWJeZw9wqqVLIjuxDRz7s7xRUj13QCfd8hKn6g== + capture-exit@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-2.0.0.tgz#fb953bfaebeb781f62898239dabb426d08a509a4" @@ -1582,6 +2102,25 @@ copy-descriptor@^0.1.0: resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= +core-js-compat@^3.1.1: + version "3.1.3" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.1.3.tgz#0cc3ba4c7f62928c2837e1cffbe8dc78b4f1ae14" + integrity sha512-EP018pVhgwsKHz3YoN1hTq49aRe+h017Kjz0NQz3nXV0cCRMvH3fLQl+vEPGr4r4J5sk4sU3tUC7U1aqTCeJeA== + dependencies: + browserslist "^4.6.0" + core-js-pure "3.1.3" + semver "^6.1.0" + +core-js-pure@3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.1.3.tgz#4c90752d5b9471f641514f3728f51c1e0783d0b5" + integrity sha512-k3JWTrcQBKqjkjI0bkfXS0lbpWPxYuHWfMMjC1VDmzU4Q58IwSbuXSo99YO/hUHlw/EB4AlfA2PVxOGkrIq6dA== + +core-js@^2.6.5: + version "2.6.9" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2" + integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A== + core-util-is@1.0.2, core-util-is@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" @@ -1882,6 +2421,11 @@ ecc-jsbn@~0.1.1: jsbn "~0.1.0" safer-buffer "^2.1.0" +electron-to-chromium@^1.3.137: + version "1.3.137" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.137.tgz#ba7c88024984c038a5c5c434529aabcea7b42944" + integrity sha512-kGi32g42a8vS/WnYE7ELJyejRT7hbr3UeOOu0WeuYuQ29gCpg9Lrf6RdcTQVXSt/v0bjCfnlb/EWOOsiKpTmkw== + elliptic@^6.0.0: version "6.4.1" resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.4.1.tgz#c2d0b7776911b86722c632c3c06c60f2f819939a" @@ -2908,7 +3452,7 @@ interpret@^1.0.0: resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.2.0.tgz#d5061a6224be58e8083985f5014d844359576296" integrity sha512-mT34yGKMNceBQUoVn7iCDKDntA7SC6gycMAWzGx1z/CMCTV7b2AAtXlo3nRyHZ1FelRkQbQjprHSYGwzLtkVbw== -invariant@^2.2.4: +invariant@^2.2.2, invariant@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== @@ -3684,6 +4228,11 @@ jpjs@^1.2.1: resolved "https://registry.yarnpkg.com/jpjs/-/jpjs-1.2.1.tgz#f343833de8838a5beba1f42d5a219be0114c44b7" integrity sha512-GxJWybWU4NV0RNKi6EIqk6IRPOTqd/h+U7sbtyuD7yUISUzV78LdHnq2xkevJsTlz/EImux4sWj+wfMiwKLkiw== +js-levenshtein@^1.1.3: + version "1.1.6" + resolved "https://registry.yarnpkg.com/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d" + integrity sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g== + "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" @@ -3739,6 +4288,11 @@ jsesc@^2.5.1: resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= + json-parse-better-errors@^1.0.1, json-parse-better-errors@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" @@ -3954,13 +4508,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -magic-string@^0.22.4: - version "0.22.5" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.22.5.tgz#8e9cf5afddf44385c1da5bc2a6a0dbd10b03657e" - integrity sha512-oreip9rJZkzvA8Qzk9HFs8fZGF/u7H/gtrE8EN6RjKJ9kh2HlC+yQ2QezifqTZfGyiuAV0dRv5a+y/8gBb1m9w== - dependencies: - vlq "^0.2.2" - magic-string@^0.25.1: version "0.25.1" resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.25.1.tgz#b1c248b399cd7485da0fe7385c2fc7011843266e" @@ -4389,6 +4936,13 @@ node-pre-gyp@^0.12.0: semver "^5.3.0" tar "^4" +node-releases@^1.1.21: + version "1.1.21" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.21.tgz#46c86f9adaceae4d63c75d3c2f2e6eee618e55f3" + integrity sha512-TwnURTCjc8a+ElJUjmDqU6+12jhli1Q61xOQmdZ7ECZVBZuQpN/1UnembiIHDM1wCcfLvh5wrWXUF5H6ufX64Q== + dependencies: + semver "^5.3.0" + nopt@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.1.tgz#d0d4685afd5415193c8c7505602d0d17cd64474d" @@ -4897,6 +5451,11 @@ pretty-quick@^1.10.0: mri "^1.1.0" multimatch "^3.0.0" +private@^0.1.6: + version "0.1.8" + resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" + integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== + process-nextick-args@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" @@ -5145,6 +5704,30 @@ rechoir@^0.6.2: dependencies: resolve "^1.1.6" +regenerate-unicode-properties@^8.0.2: + version "8.1.0" + resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-8.1.0.tgz#ef51e0f0ea4ad424b77bf7cb41f3e015c70a3f0e" + integrity sha512-LGZzkgtLY79GeXLm8Dp0BVLdQlWICzBnJz/ipWUgo59qBaZ+BHtq51P2q1uVZlppMuUAT37SDk39qUbjTWB7bA== + dependencies: + regenerate "^1.4.0" + +regenerate@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.0.tgz#4a856ec4b56e4077c557589cae85e7a4c8869a11" + integrity sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg== + +regenerator-runtime@^0.13.2: + version "0.13.2" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.2.tgz#32e59c9a6fb9b1a4aff09b4930ca2d4477343447" + integrity sha512-S/TQAZJO+D3m9xeN1WTI8dLKBBiRgXBlTJvbWjCThHWZj9EvHK70Ff50/tYj2J/fvBY6JtFVwRuazHN2E7M9BA== + +regenerator-transform@^0.14.0: + version "0.14.0" + resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.14.0.tgz#2ca9aaf7a2c239dd32e4761218425b8c7a86ecaf" + integrity sha512-rtOelq4Cawlbmq9xuMR5gdFmv7ku/sFoB7sRiywx7aq53bc52b4j6zvH7Te1Vt/X2YveDKnCGUbioieU7FEL3w== + dependencies: + private "^0.1.6" + regex-cache@^0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/regex-cache/-/regex-cache-0.4.4.tgz#75bdc58a2a1496cec48a12835bc54c8d562336dd" @@ -5160,11 +5743,40 @@ regex-not@^1.0.0, regex-not@^1.0.2: extend-shallow "^3.0.2" safe-regex "^1.1.0" +regexp-tree@^0.1.6: + version "0.1.10" + resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.10.tgz#d837816a039c7af8a8d64d7a7c3cf6a1d93450bc" + integrity sha512-K1qVSbcedffwuIslMwpe6vGlj+ZXRnGkvjAtFHfDZZZuEdA/h0dxljAPu9vhUo6Rrx2U2AwJ+nSQ6hK+lrP5MQ== + regexpp@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== +regexpu-core@^4.5.4: + version "4.5.4" + resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-4.5.4.tgz#080d9d02289aa87fe1667a4f5136bc98a6aebaae" + integrity sha512-BtizvGtFQKGPUcTy56o3nk1bGRp4SZOTYrDtGNlqCQufptV5IkkLN6Emw+yunAJjzf+C9FQFtvq7IoA3+oMYHQ== + dependencies: + regenerate "^1.4.0" + regenerate-unicode-properties "^8.0.2" + regjsgen "^0.5.0" + regjsparser "^0.6.0" + unicode-match-property-ecmascript "^1.0.4" + unicode-match-property-value-ecmascript "^1.1.0" + +regjsgen@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.5.0.tgz#a7634dc08f89209c2049adda3525711fb97265dd" + integrity sha512-RnIrLhrXCX5ow/E5/Mh2O4e/oa1/jW0eaBKTSy3LaCj+M3Bqvm97GWDp2yUtzIs4LEn65zR2yiYGFqb2ApnzDA== + +regjsparser@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.6.0.tgz#f1e6ae8b7da2bae96c99399b868cd6c933a2ba9c" + integrity sha512-RQ7YyokLiQBomUJuUG8iGVvkgOLxwyZM8k6d3q5SAXpg4r5TZJZigKFvC6PpD+qQ98bCDC5YelPeA3EucDoNeQ== + dependencies: + jsesc "~0.5.0" + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" @@ -5269,20 +5881,20 @@ resolve@1.1.7: resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= -resolve@1.10.0, resolve@1.x: - version "1.10.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" - integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== - dependencies: - path-parse "^1.0.6" - -resolve@^1.1.6, resolve@^1.10.0: +resolve@1.10.1, resolve@^1.1.6, resolve@^1.10.0: version "1.10.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.1.tgz#664842ac960795bbe758221cdccda61fb64b5f18" integrity sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA== dependencies: path-parse "^1.0.6" +resolve@1.x: + version "1.10.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.10.0.tgz#3bdaaeaf45cc07f375656dfd2e54ed0810b101ba" + integrity sha512-3sUr9aq5OfSg2S9pNtPA9hL1FVEAjvfOC4leW0SNf/mpnaakz2a9femSd6LqAww2RaFctwyf1lCqnTHuF1rxDg== + dependencies: + path-parse "^1.0.6" + resolve@^1.10.1: version "1.11.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.0.tgz#4014870ba296176b86343d50b60f3b50609ce232" @@ -5412,20 +6024,20 @@ rollup-plugin-terser@^4.0.4: serialize-javascript "^1.6.1" terser "^3.14.1" -rollup-plugin-typescript2@^0.21.0: - version "0.21.0" - resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.21.0.tgz#cc61ed756ac6e68cb3c03f7ee78001346243ed54" - integrity sha512-fbUAc2bvWxRrg1GGMYCFVf6aSxq3zvWn0sY2ubzFW9shJNT95ztFbM6GHO4/2rDSCjier7IswQnbr1ySqoLNPw== +rollup-plugin-typescript2@^0.21.1: + version "0.21.1" + resolved "https://registry.yarnpkg.com/rollup-plugin-typescript2/-/rollup-plugin-typescript2-0.21.1.tgz#91cea787c5282762f4849e334cbef6a9fdaa7564" + integrity sha512-jM2tn8/fUKDRmDtH++/6CHYHv2R9dxfXnuW0rxbOq1Zrxdsg4g6w+WwbK0X2ma21WQcT9l/U9bA3RO+2SBIJ/A== dependencies: fs-extra "7.0.1" - resolve "1.10.0" - rollup-pluginutils "2.4.1" + resolve "1.10.1" + rollup-pluginutils "2.6.0" tslib "1.9.3" -rollup-pluginutils@2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.4.1.tgz#de43ab54965bbf47843599a7f3adceb723de38db" - integrity sha512-wesMQ9/172IJDIW/lYWm0vW0LiKe5Ekjws481R7z9WTRtmO59cqyM/2uUlxvf6yzm/fElFmHUobeQOYz46dZJw== +rollup-pluginutils@2.6.0, rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0: + version "2.6.0" + resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz#203706edd43dfafeaebc355d7351119402fc83ad" + integrity sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ== dependencies: estree-walker "^0.6.0" micromatch "^3.1.10" @@ -5438,14 +6050,6 @@ rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.0: estree-walker "^0.5.2" micromatch "^2.3.11" -rollup-pluginutils@^2.5.0, rollup-pluginutils@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.6.0.tgz#203706edd43dfafeaebc355d7351119402fc83ad" - integrity sha512-aGQwspEF8oPKvg37u3p7h0cYNwmJR1sCBMZGZ5b9qy8HGtETknqjzcxrDRrcAnJNXN18lBH4Q9vZYth/p4n8jQ== - dependencies: - estree-walker "^0.6.0" - micromatch "^3.1.10" - rollup-pluginutils@^2.7.0: version "2.7.0" resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.7.0.tgz#da24a6f99432626160643ac6b087d71684317c4f" @@ -5588,6 +6192,11 @@ semver@^6.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.0.0.tgz#05e359ee571e5ad7ed641a6eec1e547ba52dea65" integrity sha512-0UewU+9rFapKFnlbirLi3byoOuhrSsli/z/ihNnvM24vgF+8sNBiI1LZPBSH9wJKUwaUbw+s3hToDLCXkrghrQ== +semver@^6.1.0: + version "6.1.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b" + integrity sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ== + serialize-javascript@^1.4.0: version "1.6.1" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.6.1.tgz#4d1f697ec49429a847ca6f442a2a755126c4d879" @@ -6262,6 +6871,29 @@ uglify-js@^3.1.4: commander "~2.17.1" source-map "~0.6.1" +unicode-canonical-property-names-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818" + integrity sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ== + +unicode-match-property-ecmascript@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz#8ed2a32569961bce9227d09cd3ffbb8fed5f020c" + integrity sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg== + dependencies: + unicode-canonical-property-names-ecmascript "^1.0.4" + unicode-property-aliases-ecmascript "^1.0.4" + +unicode-match-property-value-ecmascript@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.1.0.tgz#5b4b426e08d13a80365e0d657ac7a6c1ec46a277" + integrity sha512-hDTHvaBk3RmFzvSl0UVrUmC3PuW9wKVnpoUDYH0JDkSIovzw+J5viQmeYHxVSBptubnr7PbH2e0fnpDRQnQl5g== + +unicode-property-aliases-ecmascript@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.0.5.tgz#a9cc6cc7ce63a0a3023fc99e341b94431d405a57" + integrity sha512-L5RAqCfXqAwR3RriF8pM0lU0w4Ryf/GgzONwi6KnL1taJQa7x1TCxdJnILX59WIGOwR57IVxn7Nej0fz1Ny6fw== + union-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4" @@ -6378,11 +7010,6 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -vlq@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/vlq/-/vlq-0.2.3.tgz#8f3e4328cf63b1540c0d67e1b2778386f8975b26" - integrity sha512-DRibZL6DsNhIgYQ+wNdWDL2SL3bKPlVrRiBqV5yuMm++op8W4kGFtaQfCs4KEJn0wBZcHVHJ3eoywX8983k1ow== - vm-browserify@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73" From 97e97c29a4808f230ebeb19608fe2dd6fe5f6e1a Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Thu, 30 May 2019 08:48:25 -0400 Subject: [PATCH 11/29] Add pre-commit lint hook --- package.json | 8 ++++---- src/createRollupConfig.ts | 1 - yarn.lock | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index a2183023f..43663818b 100644 --- a/package.json +++ b/package.json @@ -33,11 +33,11 @@ ], "dependencies": { "@babel/core": "^7.4.4", - "@typescript-eslint/eslint-plugin": "^1.8.0", - "@typescript-eslint/parser": "^1.8.0", "@babel/plugin-proposal-class-properties": "^7.4.4", "@babel/polyfill": "^7.4.4", "@babel/preset-env": "^7.4.4", + "@typescript-eslint/eslint-plugin": "^1.8.0", + "@typescript-eslint/parser": "^1.8.0", "ansi-escapes": "^3.2.0", "asyncro": "^3.0.0", "babel-plugin-annotate-pure-calls": "^0.4.0", @@ -49,7 +49,7 @@ "cross-env": "5.2.0", "enquirer": "^2.3.0", "eslint": "^5.16.0", - "eslint-config-prettier": "^4.2.0", + "eslint-config-prettier": "^4.3.0", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-react": "^7.13.0", "execa": "^1.0.0", @@ -98,7 +98,7 @@ }, "husky": { "hooks": { - "pre-commit": "pretty-quick --staged --pattern '!test/tests/lint/**'" + "pre-commit": "pretty-quick --staged --pattern '!test/tests/lint/**' && yarn lint" } }, "prettier": { diff --git a/src/createRollupConfig.ts b/src/createRollupConfig.ts index f6f192d13..6d59697ea 100644 --- a/src/createRollupConfig.ts +++ b/src/createRollupConfig.ts @@ -10,7 +10,6 @@ import replace from 'rollup-plugin-replace'; import resolve from 'rollup-plugin-node-resolve'; import sourceMaps from 'rollup-plugin-sourcemaps'; import typescript from 'rollup-plugin-typescript2'; -import shebangPlugin from '@jaredpalmer/rollup-plugin-preserve-shebang'; const replacements = [{ original: 'lodash', replacement: 'lodash-es' }]; diff --git a/yarn.lock b/yarn.lock index da693e926..69ad1f67b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6610,9 +6610,9 @@ symbol-tree@^3.2.2: integrity sha1-rifbOPZgp64uHDt9G8KQgZuFGeY= table@^5.2.3: - version "5.3.2" - resolved "https://registry.yarnpkg.com/table/-/table-5.3.2.tgz#3aab56a41b2905bf66a6a006bd716fa1e78d4702" - integrity sha512-gDBrfla2z1JiBio5BE7nudwkjTjPOTduCzJC94fc1JjnuzI+tUsMiDskxFQCskxAtMB2c/ZwD6R2lg65zCptdQ== + version "5.4.0" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.0.tgz#d772a3216e68829920a41a32c18eda286c95d780" + integrity sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw== dependencies: ajv "^6.9.1" lodash "^4.17.11" From 6fafc73ebf1310fc5f56c7c4ea4757912f6f6f3e Mon Sep 17 00:00:00 2001 From: Jared Palmer Date: Thu, 30 May 2019 08:49:20 -0400 Subject: [PATCH 12/29] Specify no-unused-locals in tsconfig --- tsconfig.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 42b671312..e0d9c086b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,8 @@ "rootDir": "src", "strict": true, "noImplicitAny": true, + "noUnusedLocals": true, "skipLibCheck": true, - "target": "es2017" + "target": "es2017", } -} +} \ No newline at end of file From 0794e13e6585f95fc3cda8fe902f468033318e5c Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Thu, 30 May 2019 08:19:59 -0500 Subject: [PATCH 13/29] feat(lint): Extend react-app from eslint-config-react-app --- package.json | 8 +- src/createEslintConfig.ts | 8 +- yarn.lock | 222 ++++++++++++++++++++++++++++++++------ 3 files changed, 196 insertions(+), 42 deletions(-) diff --git a/package.json b/package.json index 43663818b..fba34e3e1 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "@typescript-eslint/parser": "^1.8.0", "ansi-escapes": "^3.2.0", "asyncro": "^3.0.0", + "babel-eslint": "^10.0.1", "babel-plugin-annotate-pure-calls": "^0.4.0", "babel-plugin-dev-expression": "^0.2.1", "babel-plugin-transform-async-to-promises": "^0.8.11", @@ -49,9 +50,12 @@ "cross-env": "5.2.0", "enquirer": "^2.3.0", "eslint": "^5.16.0", - "eslint-config-prettier": "^4.3.0", - "eslint-plugin-prettier": "^3.1.0", + "eslint-config-react-app": "^4.0.1", + "eslint-plugin-flowtype": "^2.50.3", + "eslint-plugin-import": "^2.17.3", + "eslint-plugin-jsx-a11y": "^6.2.1", "eslint-plugin-react": "^7.13.0", + "eslint-plugin-react-hooks": "^1.6.0", "execa": "^1.0.0", "fs-extra": "^8.0.1", "jest": "^24.8.0", diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index af65ebbac..839c6d654 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -11,13 +11,7 @@ export function createEslintConfig({ writeFile, }: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { const config = { - extends: [ - 'eslint:recommended', - 'plugin:@typescript-eslint/recommended', - 'prettier/@typescript-eslint', - 'plugin:prettier/recommended', - 'plugin:react/recommended', - ], + extends: ['react-app'], root: true, env: { node: true, diff --git a/yarn.lock b/yarn.lock index 69ad1f67b..6fc92065f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1371,6 +1371,14 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" +aria-query@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-3.0.0.tgz#65b3fcc1ca1155a8c9ae64d6eee297f15d5133cc" + integrity sha1-ZbP8wcoRVajJrmTW7uKX8V1RM8w= + dependencies: + ast-types-flow "0.0.7" + commander "^2.11.0" + arr-diff@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf" @@ -1471,6 +1479,11 @@ assign-symbols@^1.0.0: resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= +ast-types-flow@0.0.7, ast-types-flow@^0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/ast-types-flow/-/ast-types-flow-0.0.7.tgz#f70b735c6bca1a5c9c22d982c3e39e7feba3bdad" + integrity sha1-9wtzXGvKGlycItmCw+Oef+ujva0= + astral-regex@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9" @@ -1511,6 +1524,25 @@ aws4@^1.8.0: resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== +axobject-query@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-2.0.2.tgz#ea187abe5b9002b377f925d8bf7d1c561adf38f9" + integrity sha512-MCeek8ZH7hKyO1rWUbKNQBbl4l2eY0ntk7OGi+q0RlafrCnfPxC06WZA+uebCfmYp4mNU9jRBP1AhGyf8+W3ww== + dependencies: + ast-types-flow "0.0.7" + +babel-eslint@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.1.tgz#919681dc099614cd7d31d45c8908695092a1faed" + integrity sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ== + dependencies: + "@babel/code-frame" "^7.0.0" + "@babel/parser" "^7.0.0" + "@babel/traverse" "^7.0.0" + "@babel/types" "^7.0.0" + eslint-scope "3.7.1" + eslint-visitor-keys "^1.0.0" + babel-jest@^24.8.0: version "24.8.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.8.0.tgz#5c15ff2b28e20b0f45df43fe6b7f2aae93dba589" @@ -2031,6 +2063,11 @@ combined-stream@^1.0.6, combined-stream@~1.0.6: dependencies: delayed-stream "~1.0.0" +commander@^2.11.0: + version "2.20.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" + integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== + commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" @@ -2061,6 +2098,11 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" +confusing-browser-globals@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.7.tgz#5ae852bd541a910e7ffb2dbb864a2d21a36ad29b" + integrity sha512-cgHI1azax5ATrZ8rJ+ODDML9Fvu67PimB6aNxBrc/QwSaDaM9eTfIEUHx3bBLJJ82ioSb+/5zfsMCCEJax3ByQ== + console-browserify@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10" @@ -2078,6 +2120,11 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= +contains-path@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a" + integrity sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo= + convert-source-map@^1.1.0, convert-source-map@^1.4.0: version "1.6.0" resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20" @@ -2234,6 +2281,11 @@ cyclist@~0.2.2: resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640" integrity sha1-GzN5LhHpFKL9bW7WRHRkRE5fpkA= +damerau-levenshtein@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.5.tgz#780cf7144eb2e8dbd1c3bb83ae31100ccc31a414" + integrity sha512-CBCRqFnpu715iPmw1KrdOrzRqbdFwQTwAWyyyYS42+iAgHCuXZ+/TdMgQkUENPomxEz9z1BEzuQU2Xw0kUuAgA== + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -2255,7 +2307,7 @@ date-now@^0.1.4: resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" integrity sha1-6vQ5/U1ISK105cx9vvIAZyueNFs= -debug@^2.1.2, debug@^2.2.0, debug@^2.3.3: +debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== @@ -2372,6 +2424,14 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" +doctrine@1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" + integrity sha1-N53Ocw9hZvds76TmcHoVmwLFpvo= + dependencies: + esutils "^2.0.2" + isarray "^1.0.0" + doctrine@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" @@ -2439,7 +2499,7 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" -emoji-regex@^7.0.1: +emoji-regex@^7.0.1, emoji-regex@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== @@ -2479,7 +2539,7 @@ errno@^0.1.3, errno@~0.1.7: dependencies: prr "~1.0.1" -error-ex@^1.3.1: +error-ex@^1.2.0, error-ex@^1.3.1: version "1.3.2" resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== @@ -2524,19 +2584,71 @@ escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.2.0.tgz#70b946b629cd0e3e98233fd9ecde4cb9778de96c" - integrity sha512-y0uWc/FRfrHhpPZCYflWC8aE0KRJRY04rdZVfl8cL3sEZmOYyaBdhdlQPjKZBnuRMyLVK+JUZr7HaZFClQiH4w== +eslint-config-react-app@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-4.0.1.tgz#23fd0fd7ea89442ef1e733f66a7207674b23c8db" + integrity sha512-ZsaoXUIGsK8FCi/x4lT2bZR5mMkL/Kgj+Lnw690rbvvUr/uiwgFiD8FcfAhkCycm7Xte6O5lYz4EqMx2vX7jgw== dependencies: - get-stdin "^6.0.0" + confusing-browser-globals "^1.0.7" -eslint-plugin-prettier@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz#8695188f95daa93b0dc54b249347ca3b79c4686d" - integrity sha512-XWX2yVuwVNLOUhQijAkXz+rMPPoCr7WFiAl8ig6I7Xn+pPVhDhzg4DxHpmbeb0iqjO9UronEA3Tb09ChnFVHHA== +eslint-import-resolver-node@^0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.2.tgz#58f15fb839b8d0576ca980413476aab2472db66a" + integrity sha512-sfmTqJfPSizWu4aymbPr4Iidp5yKm8yDkHp+Ir3YiTHiiDfxh69mOUsmiqW6RZ9zRXFaF64GtYmN7e+8GHBv6Q== dependencies: - prettier-linter-helpers "^1.0.0" + debug "^2.6.9" + resolve "^1.5.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" + integrity sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw== + dependencies: + debug "^2.6.8" + pkg-dir "^2.0.0" + +eslint-plugin-flowtype@^2.50.3: + version "2.50.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.3.tgz#61379d6dce1d010370acd6681740fd913d68175f" + integrity sha512-X+AoKVOr7Re0ko/yEXyM5SSZ0tazc6ffdIOocp2fFUlWoDt7DV0Bz99mngOkAFLOAWjqRA5jPwqUCbrx13XoxQ== + dependencies: + lodash "^4.17.10" + +eslint-plugin-import@^2.17.3: + version "2.17.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.17.3.tgz#00548b4434c18faebaba04b24ae6198f280de189" + integrity sha512-qeVf/UwXFJbeyLbxuY8RgqDyEKCkqV7YC+E5S5uOjAp4tOc8zj01JP3ucoBM8JcEqd1qRasJSg6LLlisirfy0Q== + dependencies: + array-includes "^3.0.3" + contains-path "^0.1.0" + debug "^2.6.9" + doctrine "1.5.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" + read-pkg-up "^2.0.0" + resolve "^1.11.0" + +eslint-plugin-jsx-a11y@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.2.1.tgz#4ebba9f339b600ff415ae4166e3e2e008831cf0c" + integrity sha512-cjN2ObWrRz0TTw7vEcGQrx+YltMvZoOEx4hWU8eEERDnBIU00OTq7Vr+jA7DFKxiwLNv4tTh5Pq2GUNEa8b6+w== + dependencies: + aria-query "^3.0.0" + array-includes "^3.0.3" + ast-types-flow "^0.0.7" + axobject-query "^2.0.2" + damerau-levenshtein "^1.0.4" + emoji-regex "^7.0.2" + has "^1.0.3" + jsx-ast-utils "^2.0.1" + +eslint-plugin-react-hooks@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.6.0.tgz#348efcda8fb426399ac7b8609607c7b4025a6f5f" + integrity sha512-lHBVRIaz5ibnIgNG07JNiAuBUeKhEf8l4etNx5vfAEwqQ5tcuK3jV9yjmopPgQDagQb7HwIuQVsE3IVcGrRnag== eslint-plugin-react@^7.13.0: version "7.13.0" @@ -2551,6 +2663,14 @@ eslint-plugin-react@^7.13.0: prop-types "^15.7.2" resolve "^1.10.1" +eslint-scope@3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" + integrity sha1-PWPD7f2gLgbgGkUq2IyqzHzctug= + dependencies: + esrecurse "^4.1.0" + estraverse "^4.1.1" + eslint-scope@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" @@ -2838,11 +2958,6 @@ fast-deep-equal@^2.0.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= -fast-diff@^1.1.2: - version "1.2.0" - resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" - integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== - fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -2914,7 +3029,7 @@ find-cache-dir@^2.0.0: make-dir "^1.0.0" pkg-dir "^3.0.0" -find-up@^2.1.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= @@ -3081,11 +3196,6 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== -get-stdin@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" - integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - get-stdin@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" @@ -4349,7 +4459,7 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" -jsx-ast-utils@^2.1.0: +jsx-ast-utils@^2.0.1, jsx-ast-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.1.0.tgz#0ee4e2c971fb9601c67b5641b71be80faecf0b36" integrity sha512-yDGDG2DS4JcqhA6blsuYbtsT09xL8AoLuUR2Gb5exrw7UEM19sBcOTq+YBBhrNbl0PUC4R4LnFu+dHg2HKeVvA== @@ -4410,6 +4520,16 @@ levn@^0.3.0, levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + integrity sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg= + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + load-json-file@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" @@ -5268,6 +5388,13 @@ parse-glob@^3.0.4: is-extglob "^1.0.0" is-glob "^2.0.0" +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= + dependencies: + error-ex "^1.2.0" + parse-json@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" @@ -5321,6 +5448,13 @@ path-parse@^1.0.6: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + integrity sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM= + dependencies: + pify "^2.0.0" + path-type@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" @@ -5351,6 +5485,11 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + pify@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" @@ -5368,6 +5507,13 @@ pirates@^4.0.1: dependencies: node-modules-regexp "^1.0.0" +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + pkg-dir@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" @@ -5409,13 +5555,6 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= -prettier-linter-helpers@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" - integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== - dependencies: - fast-diff "^1.1.2" - prettier@^1.17.1: version "1.17.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db" @@ -5641,6 +5780,14 @@ react@^16.8.6: prop-types "^15.6.2" scheduler "^0.13.6" +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + integrity sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4= + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + read-pkg-up@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-4.0.0.tgz#1b221c6088ba7799601c808f91161c66e58f8978" @@ -5649,6 +5796,15 @@ read-pkg-up@^4.0.0: find-up "^3.0.0" read-pkg "^3.0.0" +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + integrity sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg= + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + read-pkg@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" @@ -5895,7 +6051,7 @@ resolve@1.x: dependencies: path-parse "^1.0.6" -resolve@^1.10.1: +resolve@^1.10.1, resolve@^1.11.0, resolve@^1.5.0: version "1.11.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.0.tgz#4014870ba296176b86343d50b60f3b50609ce232" integrity sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw== From eae9baca3dd32ccdda7916f3a02d6c36f5127333 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Thu, 30 May 2019 08:29:42 -0500 Subject: [PATCH 14/29] test(lint): Tests no longer failed from spacing violations --- test/tests/lint/file-with-lint-errors.ts | 5 +---- test/tests/lint/react-file-with-lint-errors.tsx | 8 +++----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/test/tests/lint/file-with-lint-errors.ts b/test/tests/lint/file-with-lint-errors.ts index 3e8e21f8f..04ab1c7a4 100644 --- a/test/tests/lint/file-with-lint-errors.ts +++ b/test/tests/lint/file-with-lint-errors.ts @@ -1,4 +1 @@ -export const foo = ( ) => -!! ('bar') -; - +export const foo:() = () => !!'bar'; diff --git a/test/tests/lint/react-file-with-lint-errors.tsx b/test/tests/lint/react-file-with-lint-errors.tsx index f5e7449b5..abbec3059 100644 --- a/test/tests/lint/react-file-with-lint-errors.tsx +++ b/test/tests/lint/react-file-with-lint-errors.tsx @@ -1,7 +1,5 @@ import React from 'react'; -export const Foobar = (props: any ) => { - return
foobar
; -} -; +export const Foobar (props: any) => { + return
foobar
; +}; From 63cb7eb84237a95f7dd4b4e68e89cee503db2e91 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Thu, 30 May 2019 08:35:54 -0500 Subject: [PATCH 15/29] feat(lint): Could just extend react-app instead of overriding anything --- src/createEslintConfig.ts | 33 +-------------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index 839c6d654..b2529d5a5 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -11,38 +11,7 @@ export function createEslintConfig({ writeFile, }: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { const config = { - extends: ['react-app'], - root: true, - env: { - node: true, - es6: true, - jest: true, - browser: true, - }, - parserOptions: { - ecmaVersion: 2017, - ecmaFeatures: { - impliedStrict: true, - jsx: true, - experimentalObjectRestSpread: true, - }, - sourceType: 'module', - }, - parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint'], - rules: { - 'no-console': 'off', - 'no-empty': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - 'no-unused-vars': 'off', - '@typescript-eslint/no-unused-vars': [2, { args: 'none' }], - }, - settings: { - react: { - version: 'detect', - }, - }, + extends: 'react-app' }; if (writeFile) { From 42fb9862c2b00e34149ac4ed8a321201dc1a23a5 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Thu, 30 May 2019 08:44:31 -0500 Subject: [PATCH 16/29] feat(lint): Use prettier eslint for tsdx as an opt-in --- .eslintrc.js | 7 +++++ package.json | 4 ++- src/createEslintConfig.ts | 2 +- test/tests/lint/file-with-lint-errors.ts | 5 ++- .../lint/react-file-with-lint-errors.tsx | 8 +++-- yarn.lock | 31 +++++++++++++++++++ 6 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 .eslintrc.js diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..2375096f9 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: [ + 'react-app', + 'prettier/@typescript-eslint', + 'plugin:prettier/recommended', + ], +}; diff --git a/package.json b/package.json index fba34e3e1..2a9ae7636 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,8 @@ "@types/react": "^16.8.17", "@types/rollup-plugin-json": "^3.0.2", "@types/rollup-plugin-sourcemaps": "^0.4.2", + "eslint-config-prettier": "^4.3.0", + "eslint-plugin-prettier": "^3.1.0", "husky": "^2.3.0", "prettier": "^1.17.1", "pretty-quick": "^1.10.0", @@ -111,4 +113,4 @@ "singleQuote": true, "trailingComma": "es5" } -} \ No newline at end of file +} diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index b2529d5a5..a42f55fd4 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -11,7 +11,7 @@ export function createEslintConfig({ writeFile, }: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { const config = { - extends: 'react-app' + extends: ['react-app'], }; if (writeFile) { diff --git a/test/tests/lint/file-with-lint-errors.ts b/test/tests/lint/file-with-lint-errors.ts index 04ab1c7a4..3e8e21f8f 100644 --- a/test/tests/lint/file-with-lint-errors.ts +++ b/test/tests/lint/file-with-lint-errors.ts @@ -1 +1,4 @@ -export const foo:() = () => !!'bar'; +export const foo = ( ) => +!! ('bar') +; + diff --git a/test/tests/lint/react-file-with-lint-errors.tsx b/test/tests/lint/react-file-with-lint-errors.tsx index abbec3059..f5e7449b5 100644 --- a/test/tests/lint/react-file-with-lint-errors.tsx +++ b/test/tests/lint/react-file-with-lint-errors.tsx @@ -1,5 +1,7 @@ import React from 'react'; -export const Foobar (props: any) => { - return
foobar
; -}; +export const Foobar = (props: any ) => { + return
foobar
; +} +; diff --git a/yarn.lock b/yarn.lock index 6fc92065f..c3fbc42e4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2584,6 +2584,13 @@ escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" +eslint-config-prettier@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.3.0.tgz#c55c1fcac8ce4518aeb77906984e134d9eb5a4f0" + integrity sha512-sZwhSTHVVz78+kYD3t5pCWSYEdVSBR0PXnwjDRsUs8ytIrK8PLXw+6FKp8r3Z7rx4ZszdetWlXYKOHoUrrwPlA== + dependencies: + get-stdin "^6.0.0" + eslint-config-react-app@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-4.0.1.tgz#23fd0fd7ea89442ef1e733f66a7207674b23c8db" @@ -2645,6 +2652,13 @@ eslint-plugin-jsx-a11y@^6.2.1: has "^1.0.3" jsx-ast-utils "^2.0.1" +eslint-plugin-prettier@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz#8695188f95daa93b0dc54b249347ca3b79c4686d" + integrity sha512-XWX2yVuwVNLOUhQijAkXz+rMPPoCr7WFiAl8ig6I7Xn+pPVhDhzg4DxHpmbeb0iqjO9UronEA3Tb09ChnFVHHA== + dependencies: + prettier-linter-helpers "^1.0.0" + eslint-plugin-react-hooks@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.6.0.tgz#348efcda8fb426399ac7b8609607c7b4025a6f5f" @@ -2958,6 +2972,11 @@ fast-deep-equal@^2.0.1: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49" integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk= +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2" @@ -3196,6 +3215,11 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + get-stdin@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-7.0.0.tgz#8d5de98f15171a125c5e516643c7a6d0ea8a96f6" @@ -5555,6 +5579,13 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks= +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + prettier@^1.17.1: version "1.17.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db" From 4332881de85a1aac9cbec370881a3a14a7e5cf51 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Thu, 30 May 2019 18:19:10 -0500 Subject: [PATCH 17/29] feat(lint): Optionally use prettier with --prettier flag --- .eslintrc.js | 7 ------- README.md | 8 +++++--- package.json | 6 +++--- src/createEslintConfig.ts | 10 +++++++++- src/index.ts | 4 ++++ test/tests/lint/file-with-lint-errors.ts | 5 +---- test/tests/lint/file-with-prettier-lint-errors.ts | 5 +++++ test/tests/lint/react-file-with-lint-errors.tsx | 2 +- test/tests/lint/tsdx-lint.test.js | 15 +++++++++++++++ 9 files changed, 43 insertions(+), 19 deletions(-) delete mode 100644 .eslintrc.js create mode 100644 test/tests/lint/file-with-prettier-lint-errors.ts diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index 2375096f9..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = { - extends: [ - 'react-app', - 'prettier/@typescript-eslint', - 'plugin:prettier/recommended', - ], -}; diff --git a/README.md b/README.md index dd8a18721..30af8add1 100644 --- a/README.md +++ b/README.md @@ -340,13 +340,15 @@ Options --fix Fixes fixable errors and warnings --ignore-pattern Ignore a pattern --write-file Write the config file locally + --prettier Use Prettier to lint -h, --help Displays this message Examples - $ tsdx lint src test - $ tsdx lint src test --fix + $ tsdx lint src + $ tsdx lint src --fix $ tsdx lint src test --ignore-pattern test/foobar.ts - $ tsdx lint src test --write-file + $ tsdx lint src --write-file + $ tsdx lint src test --prettier ``` ## Author diff --git a/package.json b/package.json index 2a9ae7636..ec2c23370 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "prepare": "tsc -p tsconfig.json", "build": "tsc -p tsconfig.json", "lint": "yarn build && yarn lint:post-build", - "lint:post-build": "node dist/index.js lint src test --ignore-pattern 'test/tests/lint'", + "lint:post-build": "node dist/index.js lint src test --ignore-pattern 'test/tests/lint' --prettier", "test": "jest --config ./test/jest.config.json" }, "files": [ @@ -50,6 +50,8 @@ "cross-env": "5.2.0", "enquirer": "^2.3.0", "eslint": "^5.16.0", + "eslint-config-prettier": "^4.3.0", + "eslint-plugin-prettier": "^3.1.0", "eslint-config-react-app": "^4.0.1", "eslint-plugin-flowtype": "^2.50.3", "eslint-plugin-import": "^2.17.3", @@ -93,8 +95,6 @@ "@types/react": "^16.8.17", "@types/rollup-plugin-json": "^3.0.2", "@types/rollup-plugin-sourcemaps": "^0.4.2", - "eslint-config-prettier": "^4.3.0", - "eslint-plugin-prettier": "^3.1.0", "husky": "^2.3.0", "prettier": "^1.17.1", "pretty-quick": "^1.10.0", diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index a42f55fd4..f9dcae758 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -3,15 +3,23 @@ import path from 'path'; import { CLIEngine } from 'eslint'; interface CreateEslintConfigArgs { + prettier: boolean; rootDir: string; writeFile: boolean; } export function createEslintConfig({ + prettier, rootDir, writeFile, }: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { + const baseExtends = ['react-app']; const config = { - extends: ['react-app'], + extends: prettier + ? baseExtends.concat([ + 'prettier/@typescript-eslint', + 'plugin:prettier/recommended', + ]) + : baseExtends, }; if (writeFile) { diff --git a/src/index.ts b/src/index.ts index 26f67014c..abfa9807f 100755 --- a/src/index.ts +++ b/src/index.ts @@ -406,9 +406,12 @@ prog .example('lint src test --ignore-pattern test/foobar.ts') .option('--write-file', 'Write the config file locally') .example('lint src test --write-file') + .option('--prettier', 'Use Prettier to lint') + .example('lint src test --prettier') .action( async (opts: { fix: boolean; + prettier: boolean; 'ignore-pattern': string; 'write-file': boolean; _: string[]; @@ -419,6 +422,7 @@ prog ignorePattern: opts['ignore-pattern'], baseConfig: { ...createEslintConfig({ + prettier: opts.prettier, rootDir: paths.appRoot, writeFile: opts['write-file'], }), diff --git a/test/tests/lint/file-with-lint-errors.ts b/test/tests/lint/file-with-lint-errors.ts index 3e8e21f8f..77a8e933b 100644 --- a/test/tests/lint/file-with-lint-errors.ts +++ b/test/tests/lint/file-with-lint-errors.ts @@ -1,4 +1 @@ -export const foo = ( ) => -!! ('bar') -; - +export const foo () => !!'bar'; diff --git a/test/tests/lint/file-with-prettier-lint-errors.ts b/test/tests/lint/file-with-prettier-lint-errors.ts new file mode 100644 index 000000000..ec7429dd2 --- /dev/null +++ b/test/tests/lint/file-with-prettier-lint-errors.ts @@ -0,0 +1,5 @@ +export const foo = ( ) => +!! ('bar') +; + + \ No newline at end of file diff --git a/test/tests/lint/react-file-with-lint-errors.tsx b/test/tests/lint/react-file-with-lint-errors.tsx index f5e7449b5..41f3538e6 100644 --- a/test/tests/lint/react-file-with-lint-errors.tsx +++ b/test/tests/lint/react-file-with-lint-errors.tsx @@ -1,6 +1,6 @@ import React from 'react'; -export const Foobar = (props: any ) => { +export const Foobar (props: any ) => { return
foobar
; } diff --git a/test/tests/lint/tsdx-lint.test.js b/test/tests/lint/tsdx-lint.test.js index 5e2da2135..f0d44fede 100644 --- a/test/tests/lint/tsdx-lint.test.js +++ b/test/tests/lint/tsdx-lint.test.js @@ -20,6 +20,21 @@ describe('tsdx lint', () => { expect(output.code).toBe(0); }); + describe('prettier', () => { + const flags = '--prettier' + it('should fail to lint a ts file with errors', () => { + const testFile = 'test/tests/lint/file-with-prettier-lint-errors.ts'; + const output = shell.exec(`node dist/index.js lint ${testFile} ${flags}`); + expect(output.code).toBe(1); + }); + + it('should succeed linting a ts file without errors', () => { + const testFile = 'test/tests/lint/file-without-lint-error.ts'; + const output = shell.exec(`node dist/index.js lint ${testFile} ${flags}`); + expect(output.code).toBe(0); + }); + }) + it('should fail to lint a tsx file with errors', () => { const testFile = 'test/tests/lint/react-file-with-lint-errors.tsx'; const output = shell.exec(`node dist/index.js lint ${testFile}`); From 12f2e99482d7e94818b05488f36caa16618978dd Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Thu, 30 May 2019 18:20:54 -0500 Subject: [PATCH 18/29] feat(lint): Specify how to customize the lint rules in the README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 30af8add1..76c2151df 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,8 @@ By default, runs tests related to files changed since the last commit. ### `npm run lint` or `yarn lint` -Runs Eslint. +Runs Eslint. +If you would like to customize the linting you can add a `eslint` block to your package.json or you can run `yarn lint --write-file` and edit the generated `.eslintrc.js` file to whatever you want. ## Optimizations From 92adf03b570e2e9a1aec33f7d22c746c8956eeb8 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Fri, 31 May 2019 08:40:09 -0500 Subject: [PATCH 19/29] feat(lint): Use prettier by default again --- README.md | 2 -- package.json | 2 +- src/createEslintConfig.ts | 14 +++++------- src/index.ts | 3 --- .../lint/react-file-with-lint-errors.tsx | 8 +++---- test/tests/lint/tsdx-lint.test.js | 22 +++++++------------ 6 files changed, 17 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 76c2151df..30f679b7d 100644 --- a/README.md +++ b/README.md @@ -341,7 +341,6 @@ Options --fix Fixes fixable errors and warnings --ignore-pattern Ignore a pattern --write-file Write the config file locally - --prettier Use Prettier to lint -h, --help Displays this message Examples @@ -349,7 +348,6 @@ Examples $ tsdx lint src --fix $ tsdx lint src test --ignore-pattern test/foobar.ts $ tsdx lint src --write-file - $ tsdx lint src test --prettier ``` ## Author diff --git a/package.json b/package.json index ec2c23370..7e2740a8d 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "prepare": "tsc -p tsconfig.json", "build": "tsc -p tsconfig.json", "lint": "yarn build && yarn lint:post-build", - "lint:post-build": "node dist/index.js lint src test --ignore-pattern 'test/tests/lint' --prettier", + "lint:post-build": "node dist/index.js lint src test --ignore-pattern 'test/tests/lint'", "test": "jest --config ./test/jest.config.json" }, "files": [ diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index f9dcae758..1b7ce51d3 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -3,23 +3,19 @@ import path from 'path'; import { CLIEngine } from 'eslint'; interface CreateEslintConfigArgs { - prettier: boolean; rootDir: string; writeFile: boolean; } export function createEslintConfig({ - prettier, rootDir, writeFile, }: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { - const baseExtends = ['react-app']; const config = { - extends: prettier - ? baseExtends.concat([ - 'prettier/@typescript-eslint', - 'plugin:prettier/recommended', - ]) - : baseExtends, + extends: [ + 'react-app', + 'prettier/@typescript-eslint', + 'plugin:prettier/recommended', + ], }; if (writeFile) { diff --git a/src/index.ts b/src/index.ts index abfa9807f..d15df3c19 100755 --- a/src/index.ts +++ b/src/index.ts @@ -406,8 +406,6 @@ prog .example('lint src test --ignore-pattern test/foobar.ts') .option('--write-file', 'Write the config file locally') .example('lint src test --write-file') - .option('--prettier', 'Use Prettier to lint') - .example('lint src test --prettier') .action( async (opts: { fix: boolean; @@ -422,7 +420,6 @@ prog ignorePattern: opts['ignore-pattern'], baseConfig: { ...createEslintConfig({ - prettier: opts.prettier, rootDir: paths.appRoot, writeFile: opts['write-file'], }), diff --git a/test/tests/lint/react-file-with-lint-errors.tsx b/test/tests/lint/react-file-with-lint-errors.tsx index 41f3538e6..b7a1d3c2a 100644 --- a/test/tests/lint/react-file-with-lint-errors.tsx +++ b/test/tests/lint/react-file-with-lint-errors.tsx @@ -1,7 +1,5 @@ import React from 'react'; -export const Foobar (props: any ) => { - return
foobar
; -} -; +export const Foobar = (props: any) => { + return <
foobar
; +}; diff --git a/test/tests/lint/tsdx-lint.test.js b/test/tests/lint/tsdx-lint.test.js index f0d44fede..cb8051dbc 100644 --- a/test/tests/lint/tsdx-lint.test.js +++ b/test/tests/lint/tsdx-lint.test.js @@ -12,6 +12,7 @@ describe('tsdx lint', () => { const testFile = 'test/tests/lint/file-with-lint-errors.ts'; const output = shell.exec(`node dist/index.js lint ${testFile}`); expect(output.code).toBe(1); + expect(output.stdout.includes('Parsing error:')).toBe(true); }); it('should succeed linting a ts file without errors', () => { @@ -20,25 +21,18 @@ describe('tsdx lint', () => { expect(output.code).toBe(0); }); - describe('prettier', () => { - const flags = '--prettier' - it('should fail to lint a ts file with errors', () => { - const testFile = 'test/tests/lint/file-with-prettier-lint-errors.ts'; - const output = shell.exec(`node dist/index.js lint ${testFile} ${flags}`); - expect(output.code).toBe(1); - }); - - it('should succeed linting a ts file without errors', () => { - const testFile = 'test/tests/lint/file-without-lint-error.ts'; - const output = shell.exec(`node dist/index.js lint ${testFile} ${flags}`); - expect(output.code).toBe(0); - }); - }) + it('should fail to lint a ts file with prettier errors', () => { + const testFile = 'test/tests/lint/file-with-prettier-lint-errors.ts'; + const output = shell.exec(`node dist/index.js lint ${testFile}`); + expect(output.code).toBe(1); + expect(output.stdout.includes('prettier/prettier')).toBe(true); + }); it('should fail to lint a tsx file with errors', () => { const testFile = 'test/tests/lint/react-file-with-lint-errors.tsx'; const output = shell.exec(`node dist/index.js lint ${testFile}`); expect(output.code).toBe(1); + expect(output.stdout.includes('Parsing error:')).toBe(true); }); it('should succeed linting a tsx file without errors', () => { From 3f57f61115af6974e6c4da21c277f65f8c707d7e Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Sat, 22 Jun 2019 14:19:45 -0500 Subject: [PATCH 20/29] feat(lint): Use eslint@6 --- package.json | 18 ++--- src/createEslintConfig.ts | 26 ++++++- src/env.d.ts | 1 + src/index.ts | 1 - yarn.lock | 149 ++++++++++++++++++++------------------ 5 files changed, 112 insertions(+), 83 deletions(-) diff --git a/package.json b/package.json index 20a745045..639e52b51 100644 --- a/package.json +++ b/package.json @@ -36,11 +36,11 @@ "@babel/plugin-proposal-class-properties": "^7.4.4", "@babel/polyfill": "^7.4.4", "@babel/preset-env": "^7.4.4", - "@typescript-eslint/eslint-plugin": "^1.8.0", - "@typescript-eslint/parser": "^1.8.0", + "@typescript-eslint/eslint-plugin": "^1.10.2", + "@typescript-eslint/parser": "^1.10.3-alpha.13", "ansi-escapes": "^3.2.0", "asyncro": "^3.0.0", - "babel-eslint": "^10.0.1", + "babel-eslint": "^10.0.2", "babel-plugin-annotate-pure-calls": "^0.4.0", "babel-plugin-dev-expression": "^0.2.1", "babel-plugin-transform-async-to-promises": "^0.8.11", @@ -49,13 +49,12 @@ "chalk": "^2.4.2", "cross-env": "5.2.0", "enquirer": "^2.3.0", - "eslint": "^5.16.0", - "eslint-config-prettier": "^4.3.0", - "eslint-plugin-prettier": "^3.1.0", - "eslint-config-react-app": "^4.0.1", - "eslint-plugin-flowtype": "^2.50.3", + "eslint": "^6.0.0", + "eslint-config-prettier": "^5.0.0", + "eslint-config-react-app": "4.0.1", "eslint-plugin-import": "^2.17.3", "eslint-plugin-jsx-a11y": "^6.2.1", + "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-react": "^7.13.0", "eslint-plugin-react-hooks": "^1.6.0", "execa": "^1.0.0", @@ -95,8 +94,9 @@ "@types/react": "^16.8.17", "@types/rollup-plugin-json": "^3.0.2", "@types/rollup-plugin-sourcemaps": "^0.4.2", + "eslint-plugin-flowtype": "^3.10.5", "husky": "^2.3.0", - "prettier": "^1.17.1", + "prettier": "^1.18.2", "pretty-quick": "^1.10.0", "ps-tree": "^1.2.0", "react": "^16.8.6", diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index 1b7ce51d3..c4ff552ce 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -1,6 +1,7 @@ import fs from 'fs'; import path from 'path'; import { CLIEngine } from 'eslint'; +import reactAppConfig from 'eslint-config-react-app'; interface CreateEslintConfigArgs { rootDir: string; @@ -10,12 +11,29 @@ export function createEslintConfig({ rootDir, writeFile, }: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { - const config = { + /* + This config could change to + { extends: [ 'react-app', - 'prettier/@typescript-eslint', - 'plugin:prettier/recommended', - ], + 'prettier/@typescript-eslint', + 'plugin:prettier/recommended' + ] + } + after https://github.com/facebook/create-react-app/commit/24489ac0a667af416f1d59dd806dfc2623aabe36 is released + eslint-config-react-app defines overrides as an object instead of an array, which is not supported in eslint@6. + */ + const config = { + ...reactAppConfig, + extends: ['prettier/@typescript-eslint', 'plugin:prettier/recommended'], + overrides: undefined, + parser: require.resolve('@typescript-eslint/parser'), + parserOptions: reactAppConfig.overrides.parserOptions, + plugins: [...reactAppConfig.plugins, ...reactAppConfig.overrides.plugins], + rules: { + ...reactAppConfig.rules, + ...reactAppConfig.overrides.rules, + }, }; if (writeFile) { diff --git a/src/env.d.ts b/src/env.d.ts index 53a2ed21f..d9fdc7e72 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -5,6 +5,7 @@ declare module 'ora'; declare module 'sade'; declare module 'tiny-glob/sync'; declare module 'ansi-escapes'; +declare module 'eslint-config-react-app'; // Patch Babel // @see line 226 of https://unpkg.com/@babel/core@7.4.4/lib/index.js diff --git a/src/index.ts b/src/index.ts index f5a05798b..283745ec3 100755 --- a/src/index.ts +++ b/src/index.ts @@ -426,7 +426,6 @@ prog .action( async (opts: { fix: boolean; - prettier: boolean; 'ignore-pattern': string; 'write-file': boolean; _: string[]; diff --git a/yarn.lock b/yarn.lock index 15699ae50..118c69c09 100644 --- a/yarn.lock +++ b/yarn.lock @@ -896,6 +896,11 @@ dependencies: camelcase "*" +"@types/eslint-visitor-keys@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" + integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== + "@types/eslint@^4.16.6": version "4.16.6" resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-4.16.6.tgz#96d4ecddbea618ab0b55eaf0dffedf387129b06c" @@ -1040,39 +1045,55 @@ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== -"@typescript-eslint/eslint-plugin@^1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.8.0.tgz#675e179de2a9a7f192eccfa7583f9c647180e17a" - integrity sha512-wypT9PZUDKxCc2wVMqifo5unmtHqOPuBdcvuY03fPWQfHLqWEl49JCbGzRRXovRROONxMqbaiJPo+biL7QoDwQ== +"@typescript-eslint/eslint-plugin@^1.10.2": + version "1.10.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.10.2.tgz#552fc64cfcb19c6162190360217c945e8faa330a" + integrity sha512-7449RhjE1oLFIy5E/5rT4wG5+KsfPzakJuhvpzXJ3C46lq7xywY0/Rjo9ZBcwrfbk0nRZ5xmUHkk7DZ67tSBKw== dependencies: - "@typescript-eslint/experimental-utils" "1.8.0" - "@typescript-eslint/parser" "1.8.0" + "@typescript-eslint/experimental-utils" "1.10.2" 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.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.8.0.tgz#634edf60c2fa6e6a34df3d96887dfc26c4fcbdcc" - integrity sha512-j+uDLmB/OC8Siir8bJk7PzGxkDn04MVLC+hRMADrK5JnKRXxiE2nSR2E6jk4XP36y/Hba2uma+CRGfs6n+Kwaw== +"@typescript-eslint/experimental-utils@1.10.2": + version "1.10.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.10.2.tgz#cd548c03fc1a2b3ba5c136d1599001a1ede24215" + integrity sha512-Hf5lYcrnTH5Oc67SRrQUA7KuHErMvCf5RlZsyxXPIT6AXa8fKTyfFO6vaEnUmlz48RpbxO4f0fY3QtWkuHZNjg== dependencies: - "@typescript-eslint/typescript-estree" "1.8.0" + "@typescript-eslint/typescript-estree" "1.10.2" + eslint-scope "^4.0.0" -"@typescript-eslint/parser@1.8.0", "@typescript-eslint/parser@^1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.8.0.tgz#994c9923b3406e71f58f8f0cce40e8770834b416" - integrity sha512-3SK++gL2ndV/X7jlceiaRfHww7/JVguxFKMSF7k8iNXflR+oSucfRacReXuwVcNy09aepgDD/MCMJo/7Eh/GVg== +"@typescript-eslint/experimental-utils@1.10.3-alpha.13+cd80fd3": + version "1.10.3-alpha.13" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.10.3-alpha.13.tgz#b6040f2d57742bf5d5bc7a47e73e79d0bd54b069" + integrity sha512-1MMlFzLjaY05r3CHpZudADhu+GST21q3ak1PSy9BC/LMURy3iHi50WRgmdinVeYWD4UC8u0VXnfj4XumIydxew== dependencies: - "@typescript-eslint/experimental-utils" "1.8.0" - "@typescript-eslint/typescript-estree" "1.8.0" + "@typescript-eslint/typescript-estree" "1.10.3-alpha.13+cd80fd3" eslint-scope "^4.0.0" + +"@typescript-eslint/parser@^1.10.3-alpha.13": + version "1.10.3-alpha.13" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.10.3-alpha.13.tgz#0b46b9fdbbfa69b905745cbc9d4a71088d2363fc" + integrity sha512-3Hg3ZMsOuSSK/aU0azXsTiaMU390283wYBSf4UOkPyEpQsWvtrRJsHzB0b+fv3E8NqIcUWNpfqdqvrlA1lvjKA== + dependencies: + "@types/eslint-visitor-keys" "^1.0.0" + "@typescript-eslint/experimental-utils" "1.10.3-alpha.13+cd80fd3" + "@typescript-eslint/typescript-estree" "1.10.3-alpha.13+cd80fd3" eslint-visitor-keys "^1.0.0" -"@typescript-eslint/typescript-estree@1.8.0": - version "1.8.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.8.0.tgz#8f327a4267c6074ec7dd55b7b3e418d91d1d0226" - integrity sha512-3ZeE79z+L8W/zsuta8vStI8W0d5j5BYiFc5sH8zerIl61hlwU3HJZIQTAnzX9r7kqf0QvIk5ak5iacttmci/mg== +"@typescript-eslint/typescript-estree@1.10.2": + version "1.10.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.10.2.tgz#8403585dd74b6cfb6f78aa98b6958de158b5897b" + integrity sha512-Kutjz0i69qraOsWeI8ETqYJ07tRLvD9URmdrMoF10bG8y8ucLmPtSxROvVejWvlJUGl2et/plnMiKRDW+rhEhw== + dependencies: + lodash.unescape "4.0.1" + semver "5.5.0" + +"@typescript-eslint/typescript-estree@1.10.3-alpha.13+cd80fd3": + version "1.10.3-alpha.13" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.10.3-alpha.13.tgz#72bd60779f1943328081010fbe4d31ba5782fa30" + integrity sha512-2hCJyiLsWkHDSke7LcD/h+MchYHXkkUUsK3s/Ji4hjaG1IkViHDPfj5Oeem3l1kG4J/2pkrFtEiz2kJCEAqpJA== dependencies: lodash.unescape "4.0.1" semver "5.5.0" @@ -1301,7 +1322,7 @@ ajv@^6.1.0, ajv@^6.5.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^6.9.1: +ajv@^6.10.0, ajv@^6.9.1: version "6.10.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.0.tgz#90d0d54439da587cd7e843bfb7045f50bd22bdf1" integrity sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg== @@ -1543,10 +1564,10 @@ axobject-query@^2.0.2: dependencies: ast-types-flow "0.0.7" -babel-eslint@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.1.tgz#919681dc099614cd7d31d45c8908695092a1faed" - integrity sha512-z7OT1iNV+TjOwHNLLyJk+HN+YVWX+CLE6fPD2SymJZOZQBs+QIexFjhm4keGTm8MW9xr4EC9Q0PbaLB24V5GoQ== +babel-eslint@^10.0.2: + version "10.0.2" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.2.tgz#182d5ac204579ff0881684b040560fdcc1558456" + integrity sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q== dependencies: "@babel/code-frame" "^7.0.0" "@babel/parser" "^7.0.0" @@ -1594,10 +1615,10 @@ babel-plugin-jest-hoist@^24.6.0: dependencies: "@types/babel__traverse" "^7.0.6" -babel-plugin-transform-async-to-promises@^0.8.11: - version "0.8.11" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.11.tgz#30b145149e34cbb06cc3b06179ef0a8f70dd1b5c" - integrity sha512-Ut0In27GXx//Z3Gw8nhfg4pse7U4rd0t46oAvdvOWPCPSkEAemH1d6lIOFQb+oDdv70hIM+B7vOtLUP6dNdSiA== +babel-plugin-transform-async-to-promises@^0.8.12: + version "0.8.12" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.12.tgz#281917387606f2f925eb6e9e368703cb6c436337" + integrity sha512-hkTh5yCZAGFUrOsBJgwJlhnnW4BxOn7GBdnJ7Dy4/JLgLdBqsWX+6+VYXv3/T2Xm+4r5mX6scvmxOTU+eTi5cA== babel-plugin-transform-rename-import@^2.3.0: version "2.3.0" @@ -2596,14 +2617,14 @@ escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" -eslint-config-prettier@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-4.3.0.tgz#c55c1fcac8ce4518aeb77906984e134d9eb5a4f0" - integrity sha512-sZwhSTHVVz78+kYD3t5pCWSYEdVSBR0PXnwjDRsUs8ytIrK8PLXw+6FKp8r3Z7rx4ZszdetWlXYKOHoUrrwPlA== +eslint-config-prettier@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-5.0.0.tgz#f7a94b2b8ae7cbf25842c36fa96c6d32cd0a697c" + integrity sha512-c17Aqiz5e8LEqoc/QPmYnaxQFAHTx2KlCZBPxXXjEMmNchOLnV/7j0HoPZuC+rL/tDC9bazUYOKJW9bOhftI/w== dependencies: get-stdin "^6.0.0" -eslint-config-react-app@^4.0.1: +eslint-config-react-app@4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-4.0.1.tgz#23fd0fd7ea89442ef1e733f66a7207674b23c8db" integrity sha512-ZsaoXUIGsK8FCi/x4lT2bZR5mMkL/Kgj+Lnw690rbvvUr/uiwgFiD8FcfAhkCycm7Xte6O5lYz4EqMx2vX7jgw== @@ -2626,12 +2647,12 @@ eslint-module-utils@^2.4.0: debug "^2.6.8" pkg-dir "^2.0.0" -eslint-plugin-flowtype@^2.50.3: - version "2.50.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-2.50.3.tgz#61379d6dce1d010370acd6681740fd913d68175f" - integrity sha512-X+AoKVOr7Re0ko/yEXyM5SSZ0tazc6ffdIOocp2fFUlWoDt7DV0Bz99mngOkAFLOAWjqRA5jPwqUCbrx13XoxQ== +eslint-plugin-flowtype@^3.10.5: + version "3.10.5" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.10.5.tgz#d7649e4a85ba771032724e064c2ee3ddf644a8ec" + integrity sha512-Kyz4fq6YZ83x8CD2ZSeKyX7vFwL5M9wDW5UZaSO1oM+32Wwu0Zbk50VBiPeRgTrCzxpq7geOxEY7lSY98oLzYQ== dependencies: - lodash "^4.17.10" + lodash "^4.17.11" eslint-plugin-import@^2.17.3: version "2.17.3" @@ -2723,13 +2744,13 @@ eslint-visitor-keys@^1.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== -eslint@^5.16.0: - version "5.16.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.16.0.tgz#a1e3ac1aae4a3fbd8296fcf8f7ab7314cbb6abea" - integrity sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg== +eslint@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.0.0.tgz#9223f19223de73b4ed730e11bff44a376b65844d" + integrity sha512-SrrIfcd4tOgsspOKTSwamuTOAMZOUigHQhVMrzNjz4/B9Za6SHQDIocMIyIDfwDgx6MhS15nS6HC8kumCV2qBQ== dependencies: "@babel/code-frame" "^7.0.0" - ajv "^6.9.1" + ajv "^6.10.0" chalk "^2.1.0" cross-spawn "^6.0.5" debug "^4.0.1" @@ -2737,18 +2758,19 @@ eslint@^5.16.0: eslint-scope "^4.0.3" eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" - espree "^5.0.1" + espree "^6.0.0" esquery "^1.0.1" esutils "^2.0.2" file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" - glob "^7.1.2" + glob-parent "^3.1.0" globals "^11.7.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" inquirer "^6.2.2" - js-yaml "^3.13.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" lodash "^4.17.11" @@ -2756,7 +2778,6 @@ eslint@^5.16.0: mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" - path-is-inside "^1.0.2" progress "^2.0.0" regexpp "^2.0.1" semver "^5.5.1" @@ -2765,10 +2786,10 @@ eslint@^5.16.0: table "^5.2.3" text-table "^0.2.0" -espree@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.1.tgz#5d6526fa4fc7f0788a5cf75b15f30323e2f81f7a" - integrity sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A== +espree@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.0.0.tgz#716fc1f5a245ef5b9a7fdb1d7b0d3f02322e75f6" + integrity sha512-lJvCS6YbCn3ImT3yKkPe0+tJ+mH6ljhGNjHQH9mRtiO6gjhVAOhVXW1yjnwqGwTkK3bGbye+hb00nFNmu0l/1Q== dependencies: acorn "^6.0.7" acorn-jsx "^5.0.0" @@ -4384,7 +4405,7 @@ js-levenshtein@^1.1.3: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@^3.13.0: +js-yaml@^3.13.0, js-yaml@^3.13.1: version "3.13.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== @@ -5469,11 +5490,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" - integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= - path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" @@ -5598,10 +5614,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^1.17.1: - version "1.17.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.17.1.tgz#ed64b4e93e370cb8a25b9ef7fef3e4fd1c0995db" - integrity sha512-TzGRNvuUSmPgwivDqkZ9tM/qTGW9hqDKWOE9YHiyQdixlKbv7kvEqsmDPrcHJTKwthU774TQwZXVtaQ/mMsvjg== +prettier@^1.18.2: + version "1.18.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.18.2.tgz#6823e7c5900017b4bd3acf46fe9ac4b4d7bda9ea" + integrity sha512-OeHeMc0JhFE9idD4ZdtNibzY0+TPHSpSSb9h8FqtP+YnoZZ1sl8Vc9b1sasjfymH3SonAF4QcA2+mzHPhMvIiw== pretty-format@^23.6.0: version "23.6.0" @@ -6048,11 +6064,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" From 41974829df888350f5e169d4aa45276a6aaabcb0 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Sat, 22 Jun 2019 14:30:15 -0500 Subject: [PATCH 21/29] chore(lockfile): Commit updated lockfile --- yarn.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn.lock b/yarn.lock index 118c69c09..a84fda591 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1615,7 +1615,7 @@ babel-plugin-jest-hoist@^24.6.0: dependencies: "@types/babel__traverse" "^7.0.6" -babel-plugin-transform-async-to-promises@^0.8.12: +babel-plugin-transform-async-to-promises@^0.8.11: version "0.8.12" resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-promises/-/babel-plugin-transform-async-to-promises-0.8.12.tgz#281917387606f2f925eb6e9e368703cb6c436337" integrity sha512-hkTh5yCZAGFUrOsBJgwJlhnnW4BxOn7GBdnJ7Dy4/JLgLdBqsWX+6+VYXv3/T2Xm+4r5mX6scvmxOTU+eTi5cA== From 257a19653acdc1795fda01f60faeef8d531364d0 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Mon, 24 Jun 2019 11:29:32 -0500 Subject: [PATCH 22/29] feat(lint): Update to @typescript-eslint/{parser,eslint-plugin} v1.11.0 --- package.json | 4 ++-- yarn.lock | 56 +++++++++++++++++++--------------------------------- 2 files changed, 22 insertions(+), 38 deletions(-) diff --git a/package.json b/package.json index 639e52b51..c13655d1c 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "@babel/plugin-proposal-class-properties": "^7.4.4", "@babel/polyfill": "^7.4.4", "@babel/preset-env": "^7.4.4", - "@typescript-eslint/eslint-plugin": "^1.10.2", - "@typescript-eslint/parser": "^1.10.3-alpha.13", + "@typescript-eslint/eslint-plugin": "^1.11.0", + "@typescript-eslint/parser": "^1.11.0", "ansi-escapes": "^3.2.0", "asyncro": "^3.0.0", "babel-eslint": "^10.0.2", diff --git a/yarn.lock b/yarn.lock index a84fda591..e019b629b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1045,55 +1045,39 @@ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== -"@typescript-eslint/eslint-plugin@^1.10.2": - version "1.10.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.10.2.tgz#552fc64cfcb19c6162190360217c945e8faa330a" - integrity sha512-7449RhjE1oLFIy5E/5rT4wG5+KsfPzakJuhvpzXJ3C46lq7xywY0/Rjo9ZBcwrfbk0nRZ5xmUHkk7DZ67tSBKw== +"@typescript-eslint/eslint-plugin@^1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.11.0.tgz#870f752c520db04db6d3668af7479026a6f2fb9a" + integrity sha512-mXv9ccCou89C8/4avKHuPB2WkSZyY/XcTQUXd5LFZAcLw1I3mWYVjUu6eS9Ja0QkP/ClolbcW9tb3Ov/pMdcqw== dependencies: - "@typescript-eslint/experimental-utils" "1.10.2" + "@typescript-eslint/experimental-utils" "1.11.0" eslint-utils "^1.3.1" functional-red-black-tree "^1.0.1" regexpp "^2.0.1" tsutils "^3.7.0" -"@typescript-eslint/experimental-utils@1.10.2": - version "1.10.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.10.2.tgz#cd548c03fc1a2b3ba5c136d1599001a1ede24215" - integrity sha512-Hf5lYcrnTH5Oc67SRrQUA7KuHErMvCf5RlZsyxXPIT6AXa8fKTyfFO6vaEnUmlz48RpbxO4f0fY3QtWkuHZNjg== - dependencies: - "@typescript-eslint/typescript-estree" "1.10.2" - eslint-scope "^4.0.0" - -"@typescript-eslint/experimental-utils@1.10.3-alpha.13+cd80fd3": - version "1.10.3-alpha.13" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.10.3-alpha.13.tgz#b6040f2d57742bf5d5bc7a47e73e79d0bd54b069" - integrity sha512-1MMlFzLjaY05r3CHpZudADhu+GST21q3ak1PSy9BC/LMURy3iHi50WRgmdinVeYWD4UC8u0VXnfj4XumIydxew== +"@typescript-eslint/experimental-utils@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.11.0.tgz#594abe47091cbeabac1d6f9cfed06d0ad99eb7e3" + integrity sha512-7LbfaqF6B8oa8cp/315zxKk8FFzosRzzhF8Kn/ZRsRsnpm7Qcu25cR/9RnAQo5utZ2KIWVgaALr+ZmcbG47ruw== dependencies: - "@typescript-eslint/typescript-estree" "1.10.3-alpha.13+cd80fd3" + "@typescript-eslint/typescript-estree" "1.11.0" eslint-scope "^4.0.0" -"@typescript-eslint/parser@^1.10.3-alpha.13": - version "1.10.3-alpha.13" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.10.3-alpha.13.tgz#0b46b9fdbbfa69b905745cbc9d4a71088d2363fc" - integrity sha512-3Hg3ZMsOuSSK/aU0azXsTiaMU390283wYBSf4UOkPyEpQsWvtrRJsHzB0b+fv3E8NqIcUWNpfqdqvrlA1lvjKA== +"@typescript-eslint/parser@^1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.11.0.tgz#2f6d4f7e64eeb1e7c25b422f8df14d0c9e508e36" + integrity sha512-5xBExyXaxVyczrZvbRKEXvaTUFFq7gIM9BynXukXZE0zF3IQP/FxF4mPmmh3gJ9egafZFqByCpPTFm3dk4SY7Q== dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "1.10.3-alpha.13+cd80fd3" - "@typescript-eslint/typescript-estree" "1.10.3-alpha.13+cd80fd3" + "@typescript-eslint/experimental-utils" "1.11.0" + "@typescript-eslint/typescript-estree" "1.11.0" eslint-visitor-keys "^1.0.0" -"@typescript-eslint/typescript-estree@1.10.2": - version "1.10.2" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.10.2.tgz#8403585dd74b6cfb6f78aa98b6958de158b5897b" - integrity sha512-Kutjz0i69qraOsWeI8ETqYJ07tRLvD9URmdrMoF10bG8y8ucLmPtSxROvVejWvlJUGl2et/plnMiKRDW+rhEhw== - dependencies: - lodash.unescape "4.0.1" - semver "5.5.0" - -"@typescript-eslint/typescript-estree@1.10.3-alpha.13+cd80fd3": - version "1.10.3-alpha.13" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.10.3-alpha.13.tgz#72bd60779f1943328081010fbe4d31ba5782fa30" - integrity sha512-2hCJyiLsWkHDSke7LcD/h+MchYHXkkUUsK3s/Ji4hjaG1IkViHDPfj5Oeem3l1kG4J/2pkrFtEiz2kJCEAqpJA== +"@typescript-eslint/typescript-estree@1.11.0": + version "1.11.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.11.0.tgz#b7b5782aab22e4b3b6d84633652c9f41e62d37d5" + integrity sha512-fquUHF5tAx1sM2OeRCC7wVxFd1iMELWMGCzOSmJ3pLzArj9+kRixdlC4d5MncuzXpjEqc6045p3KwM0o/3FuUA== dependencies: lodash.unescape "4.0.1" semver "5.5.0" From 83c753d73deb735a3b35fb5aeff2b742a41af8d4 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Fri, 12 Jul 2019 08:56:45 -0500 Subject: [PATCH 23/29] chore(deps): Bump eslint and @typescript-eslint --- package.json | 6 +++--- yarn.lock | 48 ++++++++++++++++++++++++------------------------ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index c13655d1c..12c28f894 100644 --- a/package.json +++ b/package.json @@ -36,8 +36,8 @@ "@babel/plugin-proposal-class-properties": "^7.4.4", "@babel/polyfill": "^7.4.4", "@babel/preset-env": "^7.4.4", - "@typescript-eslint/eslint-plugin": "^1.11.0", - "@typescript-eslint/parser": "^1.11.0", + "@typescript-eslint/eslint-plugin": "^1.12.0", + "@typescript-eslint/parser": "^1.12.0", "ansi-escapes": "^3.2.0", "asyncro": "^3.0.0", "babel-eslint": "^10.0.2", @@ -49,7 +49,7 @@ "chalk": "^2.4.2", "cross-env": "5.2.0", "enquirer": "^2.3.0", - "eslint": "^6.0.0", + "eslint": "^6.0.1", "eslint-config-prettier": "^5.0.0", "eslint-config-react-app": "4.0.1", "eslint-plugin-import": "^2.17.3", diff --git a/yarn.lock b/yarn.lock index e019b629b..e0f5d09e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1045,39 +1045,39 @@ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== -"@typescript-eslint/eslint-plugin@^1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.11.0.tgz#870f752c520db04db6d3668af7479026a6f2fb9a" - integrity sha512-mXv9ccCou89C8/4avKHuPB2WkSZyY/XcTQUXd5LFZAcLw1I3mWYVjUu6eS9Ja0QkP/ClolbcW9tb3Ov/pMdcqw== +"@typescript-eslint/eslint-plugin@^1.12.0": + version "1.12.0" + resolved "https://artifactory.concurtech.net/artifactory/api/npm/npm-aggregate/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.12.0.tgz#96b4e08b5f998a198b8414508b1a289f9e8c549a" + integrity sha1-lrTgi1+ZihmLhBRQixoon56MVJo= dependencies: - "@typescript-eslint/experimental-utils" "1.11.0" + "@typescript-eslint/experimental-utils" "1.12.0" eslint-utils "^1.3.1" functional-red-black-tree "^1.0.1" regexpp "^2.0.1" tsutils "^3.7.0" -"@typescript-eslint/experimental-utils@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-1.11.0.tgz#594abe47091cbeabac1d6f9cfed06d0ad99eb7e3" - integrity sha512-7LbfaqF6B8oa8cp/315zxKk8FFzosRzzhF8Kn/ZRsRsnpm7Qcu25cR/9RnAQo5utZ2KIWVgaALr+ZmcbG47ruw== +"@typescript-eslint/experimental-utils@1.12.0": + version "1.12.0" + resolved "https://artifactory.concurtech.net/artifactory/api/npm/npm-aggregate/@typescript-eslint/experimental-utils/-/experimental-utils-1.12.0.tgz#98417ee2e0c6fe8d1e50d934a6535d9c0f4277b6" + integrity sha1-mEF+4uDG/o0eUNk0plNdnA9Cd7Y= dependencies: - "@typescript-eslint/typescript-estree" "1.11.0" + "@typescript-eslint/typescript-estree" "1.12.0" eslint-scope "^4.0.0" -"@typescript-eslint/parser@^1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.11.0.tgz#2f6d4f7e64eeb1e7c25b422f8df14d0c9e508e36" - integrity sha512-5xBExyXaxVyczrZvbRKEXvaTUFFq7gIM9BynXukXZE0zF3IQP/FxF4mPmmh3gJ9egafZFqByCpPTFm3dk4SY7Q== +"@typescript-eslint/parser@^1.12.0": + version "1.12.0" + resolved "https://artifactory.concurtech.net/artifactory/api/npm/npm-aggregate/@typescript-eslint/parser/-/parser-1.12.0.tgz#9965895ec4745578185965d63f21510f93a3f35a" + integrity sha1-mWWJXsR0VXgYWWXWPyFRD5Oj81o= dependencies: "@types/eslint-visitor-keys" "^1.0.0" - "@typescript-eslint/experimental-utils" "1.11.0" - "@typescript-eslint/typescript-estree" "1.11.0" + "@typescript-eslint/experimental-utils" "1.12.0" + "@typescript-eslint/typescript-estree" "1.12.0" eslint-visitor-keys "^1.0.0" -"@typescript-eslint/typescript-estree@1.11.0": - version "1.11.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-1.11.0.tgz#b7b5782aab22e4b3b6d84633652c9f41e62d37d5" - integrity sha512-fquUHF5tAx1sM2OeRCC7wVxFd1iMELWMGCzOSmJ3pLzArj9+kRixdlC4d5MncuzXpjEqc6045p3KwM0o/3FuUA== +"@typescript-eslint/typescript-estree@1.12.0": + version "1.12.0" + resolved "https://artifactory.concurtech.net/artifactory/api/npm/npm-aggregate/@typescript-eslint/typescript-estree/-/typescript-estree-1.12.0.tgz#d8dd0a7cffb5e3c0c3e98714042d83e316dfc9a9" + integrity sha1-2N0KfP+148DD6YcUBC2D4xbfyak= dependencies: lodash.unescape "4.0.1" semver "5.5.0" @@ -2728,10 +2728,10 @@ eslint-visitor-keys@^1.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== -eslint@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.0.0.tgz#9223f19223de73b4ed730e11bff44a376b65844d" - integrity sha512-SrrIfcd4tOgsspOKTSwamuTOAMZOUigHQhVMrzNjz4/B9Za6SHQDIocMIyIDfwDgx6MhS15nS6HC8kumCV2qBQ== +eslint@^6.0.1: + version "6.0.1" + resolved "https://artifactory.concurtech.net/artifactory/api/npm/npm-aggregate/eslint/-/eslint-6.0.1.tgz#4a32181d72cb999d6f54151df7d337131f81cda7" + integrity sha1-SjIYHXLLmZ1vVBUd99M3Ex+Bzac= dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0" From 9d595a57179a49bab04e23cfbc4b839d40b10b78 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Fri, 9 Aug 2019 20:34:44 -0500 Subject: [PATCH 24/29] feat(lint): Bump deps and simplify createEslintConfig --- .eslintrc.js | 346 ++++++++++++++++++++++++++++++++++++++ .yarnrc | 1 + package.json | 21 ++- src/createEslintConfig.ts | 28 +-- yarn.lock | 212 ++++++++++++----------- 5 files changed, 474 insertions(+), 134 deletions(-) create mode 100644 .eslintrc.js create mode 100644 .yarnrc diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..cd16d1a51 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,346 @@ +module.exports = { + "root": true, + "parser": "@typescript-eslint/parser", + "plugins": [ + "import", + "flowtype", + "jsx-a11y", + "react", + "react-hooks", + "@typescript-eslint", + "no-for-of-loops" + ], + "env": { + "browser": true, + "commonjs": true, + "es6": true, + "jest": true, + "node": true + }, + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "ecmaFeatures": { + "jsx": true + }, + "warnOnUnsupportedTypeScriptVersion": true + }, + "settings": { + "react": { + "version": "detect" + } + }, + "rules": { + "array-callback-return": "warn", + "default-case": "off", + "dot-location": [ + "warn", + "property" + ], + "eqeqeq": [ + "warn", + "smart" + ], + "new-parens": "warn", + "no-array-constructor": "off", + "no-caller": "warn", + "no-cond-assign": [ + "warn", + "except-parens" + ], + "no-const-assign": "warn", + "no-control-regex": "warn", + "no-delete-var": "warn", + "no-dupe-args": "warn", + "no-dupe-class-members": "off", + "no-dupe-keys": "warn", + "no-duplicate-case": "warn", + "no-empty-character-class": "warn", + "no-empty-pattern": "warn", + "no-eval": "warn", + "no-ex-assign": "warn", + "no-extend-native": "warn", + "no-extra-bind": "warn", + "no-extra-label": "warn", + "no-fallthrough": "warn", + "no-func-assign": "warn", + "no-implied-eval": "warn", + "no-invalid-regexp": "warn", + "no-iterator": "warn", + "no-label-var": "warn", + "no-labels": [ + "warn", + { + "allowLoop": true, + "allowSwitch": false + } + ], + "no-lone-blocks": "warn", + "no-loop-func": "warn", + "no-mixed-operators": [ + "warn", + { + "groups": [ + [ + "&", + "|", + "^", + "~", + "<<", + ">>", + ">>>" + ], + [ + "==", + "!=", + "===", + "!==", + ">", + ">=", + "<", + "<=" + ], + [ + "&&", + "||" + ], + [ + "in", + "instanceof" + ] + ], + "allowSamePrecedence": false + } + ], + "no-multi-str": "warn", + "no-native-reassign": "warn", + "no-negated-in-lhs": "warn", + "no-new-func": "warn", + "no-new-object": "warn", + "no-new-symbol": "warn", + "no-new-wrappers": "warn", + "no-obj-calls": "warn", + "no-octal": "warn", + "no-octal-escape": "warn", + "no-redeclare": "warn", + "no-regex-spaces": "warn", + "no-restricted-syntax": [ + "warn", + "WithStatement" + ], + "no-script-url": "warn", + "no-self-assign": "warn", + "no-self-compare": "warn", + "no-sequences": "warn", + "no-shadow-restricted-names": "warn", + "no-sparse-arrays": "warn", + "no-template-curly-in-string": "warn", + "no-this-before-super": "warn", + "no-throw-literal": "warn", + "no-undef": "error", + "no-restricted-globals": [ + "error", + "addEventListener", + "blur", + "close", + "closed", + "confirm", + "defaultStatus", + "defaultstatus", + "event", + "external", + "find", + "focus", + "frameElement", + "frames", + "history", + "innerHeight", + "innerWidth", + "length", + "location", + "locationbar", + "menubar", + "moveBy", + "moveTo", + "name", + "onblur", + "onerror", + "onfocus", + "onload", + "onresize", + "onunload", + "open", + "opener", + "opera", + "outerHeight", + "outerWidth", + "pageXOffset", + "pageYOffset", + "parent", + "print", + "removeEventListener", + "resizeBy", + "resizeTo", + "screen", + "screenLeft", + "screenTop", + "screenX", + "screenY", + "scroll", + "scrollbars", + "scrollBy", + "scrollTo", + "scrollX", + "scrollY", + "self", + "status", + "statusbar", + "stop", + "toolbar", + "top" + ], + "no-unexpected-multiline": "warn", + "no-unreachable": "warn", + "no-unused-expressions": [ + "error", + { + "allowShortCircuit": true, + "allowTernary": true, + "allowTaggedTemplates": true + } + ], + "no-unused-labels": "warn", + "no-unused-vars": "off", + "no-use-before-define": [ + "warn", + { + "functions": false, + "classes": false, + "variables": false + } + ], + "no-useless-computed-key": "warn", + "no-useless-concat": "warn", + "no-useless-constructor": "off", + "no-useless-escape": "warn", + "no-useless-rename": [ + "warn", + { + "ignoreDestructuring": false, + "ignoreImport": false, + "ignoreExport": false + } + ], + "no-with": "warn", + "no-whitespace-before-property": "warn", + "react-hooks/exhaustive-deps": "warn", + "require-yield": "warn", + "rest-spread-spacing": [ + "warn", + "never" + ], + "strict": [ + "warn", + "never" + ], + "unicode-bom": [ + "warn", + "never" + ], + "use-isnan": "warn", + "valid-typeof": "warn", + "no-restricted-properties": [ + "error", + { + "object": "require", + "property": "ensure", + "message": "Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting" + }, + { + "object": "System", + "property": "import", + "message": "Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting" + } + ], + "getter-return": "warn", + "import/first": "error", + "import/no-amd": "error", + "import/no-webpack-loader-syntax": "error", + "react/forbid-foreign-prop-types": [ + "warn", + { + "allowInPropTypes": true + } + ], + "react/jsx-no-comment-textnodes": "warn", + "react/jsx-no-duplicate-props": [ + "warn", + { + "ignoreCase": true + } + ], + "react/jsx-no-target-blank": "warn", + "react/jsx-no-undef": "error", + "react/jsx-pascal-case": [ + "warn", + { + "allowAllCaps": true, + "ignore": [] + } + ], + "react/jsx-uses-react": "warn", + "react/jsx-uses-vars": "warn", + "react/no-danger-with-children": "warn", + "react/no-direct-mutation-state": "warn", + "react/no-is-mounted": "warn", + "react/no-typos": "error", + "react/react-in-jsx-scope": "error", + "react/require-render-return": "error", + "react/style-prop-object": "warn", + "jsx-a11y/accessible-emoji": "warn", + "jsx-a11y/alt-text": "warn", + "jsx-a11y/anchor-has-content": "warn", + "jsx-a11y/anchor-is-valid": [ + "warn", + { + "aspects": [ + "noHref", + "invalidHref" + ] + } + ], + "jsx-a11y/aria-activedescendant-has-tabindex": "warn", + "jsx-a11y/aria-props": "warn", + "jsx-a11y/aria-proptypes": "warn", + "jsx-a11y/aria-role": "warn", + "jsx-a11y/aria-unsupported-elements": "warn", + "jsx-a11y/heading-has-content": "warn", + "jsx-a11y/iframe-has-title": "warn", + "jsx-a11y/img-redundant-alt": "warn", + "jsx-a11y/no-access-key": "warn", + "jsx-a11y/no-distracting-elements": "warn", + "jsx-a11y/no-redundant-roles": "warn", + "jsx-a11y/role-has-required-aria-props": "warn", + "jsx-a11y/role-supports-aria-props": "warn", + "jsx-a11y/scope": "warn", + "react-hooks/rules-of-hooks": "error", + "flowtype/define-flow-type": "warn", + "flowtype/require-valid-file-annotation": "warn", + "flowtype/use-flow-type": "warn", + "@typescript-eslint/no-angle-bracket-type-assertion": "warn", + "@typescript-eslint/no-array-constructor": "warn", + "@typescript-eslint/no-namespace": "error", + "@typescript-eslint/no-unused-vars": [ + "warn", + { + "args": "none", + "ignoreRestSiblings": true + } + ], + "@typescript-eslint/no-useless-constructor": "warn" + }, + "extends": [ + "prettier/@typescript-eslint", + "plugin:prettier/recommended" + ] +} \ No newline at end of file diff --git a/.yarnrc b/.yarnrc new file mode 100644 index 000000000..93bdfe702 --- /dev/null +++ b/.yarnrc @@ -0,0 +1 @@ +"registry" "https://registry.yarnpkg.com" diff --git a/package.json b/package.json index ffda7ad69..56b2ecc9f 100644 --- a/package.json +++ b/package.json @@ -37,11 +37,10 @@ "@babel/plugin-proposal-class-properties": "^7.4.4", "@babel/polyfill": "^7.4.4", "@babel/preset-env": "^7.4.4", - "@typescript-eslint/eslint-plugin": "^1.12.0", - "@typescript-eslint/parser": "^1.12.0", + "@typescript-eslint/eslint-plugin": "^1.13.0", + "@typescript-eslint/parser": "^1.13.0", "ansi-escapes": "^3.2.0", "asyncro": "^3.0.0", - "babel-eslint": "^10.0.2", "babel-plugin-annotate-pure-calls": "^0.4.0", "babel-plugin-dev-expression": "^0.2.1", "babel-plugin-transform-async-to-promises": "^0.8.11", @@ -52,16 +51,16 @@ "chalk": "^2.4.2", "cross-env": "5.2.0", "enquirer": "^2.3.0", - "eslint": "^6.0.1", + "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", - "eslint-config-react-app": "4.0.1", - "eslint-plugin-flowtype": "^3.11.1", - "eslint-plugin-import": "^2.18.0", + "eslint-config-react-app": "^5.0.0", + "eslint-plugin-flowtype": "^4.2.0", + "eslint-plugin-import": "^2.18.2", "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-no-for-of-loops": "^1.0.0", + "eslint-plugin-no-for-of-loops": "^1.0.1", "eslint-plugin-prettier": "^3.1.0", - "eslint-plugin-react": "^7.14.2", - "eslint-plugin-react-hooks": "^1.6.1", + "eslint-plugin-react": "^7.14.3", + "eslint-plugin-react-hooks": "^1.7.0", "execa": "^1.0.0", "fs-extra": "^8.0.1", "jest": "^24.8.0", @@ -90,7 +89,7 @@ "devDependencies": { "@types/ansi-escapes": "^4.0.0", "@types/camelcase": "^5.2.0", - "@types/eslint": "^4.16.6", + "@types/eslint": "^4.16.8", "@types/execa": "^0.9.0", "@types/fs-extra": "^8.0.0", "@types/jest": "^24.0.15", diff --git a/src/createEslintConfig.ts b/src/createEslintConfig.ts index 08c041af1..1b7ce51d3 100644 --- a/src/createEslintConfig.ts +++ b/src/createEslintConfig.ts @@ -1,7 +1,6 @@ import fs from 'fs'; import path from 'path'; import { CLIEngine } from 'eslint'; -import reactAppConfig from 'eslint-config-react-app'; interface CreateEslintConfigArgs { rootDir: string; @@ -11,33 +10,12 @@ export function createEslintConfig({ rootDir, writeFile, }: CreateEslintConfigArgs): CLIEngine.Options['baseConfig'] { - /* - This config could change to - { + const config = { extends: [ 'react-app', - 'prettier/@typescript-eslint', - 'plugin:prettier/recommended' - ] - } - after https://github.com/facebook/create-react-app/commit/24489ac0a667af416f1d59dd806dfc2623aabe36 is released - eslint-config-react-app defines overrides as an object instead of an array, which is not supported in eslint@6. - */ - const config = { - ...reactAppConfig, - extends: ['prettier/@typescript-eslint', 'plugin:prettier/recommended'], - overrides: undefined, - parser: require.resolve('@typescript-eslint/parser'), - parserOptions: reactAppConfig.overrides.parserOptions, - plugins: [ - ...reactAppConfig.plugins, - ...reactAppConfig.overrides.plugins, - 'no-for-of-loops', + 'prettier/@typescript-eslint', + 'plugin:prettier/recommended', ], - rules: { - ...reactAppConfig.rules, - ...reactAppConfig.overrides.rules, - }, }; if (writeFile) { diff --git a/yarn.lock b/yarn.lock index 10f7e91c3..e8a3c0a63 100644 --- a/yarn.lock +++ b/yarn.lock @@ -908,10 +908,10 @@ resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== -"@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== +"@types/eslint@^4.16.8": + version "4.16.8" + resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-4.16.8.tgz#856f0eb8a312d25a7989b6d0ab708e8d5f8cc7ee" + integrity sha512-n0ZvaIpPeBxproRvV+tZoCHRxIoNAk+k+XMvQefKgx3qM3IundoogQBAwiNEnqW0GDP1j1ATe5lFy9xxutFAHg== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -967,7 +967,7 @@ dependencies: "@types/jest-diff" "*" -"@types/json-schema@*": +"@types/json-schema@*", "@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== @@ -1052,39 +1052,40 @@ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== -"@typescript-eslint/eslint-plugin@^1.12.0": - 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@^1.13.0": + version "1.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.13.0.tgz#22fed9b16ddfeb402fd7bcde56307820f6ebc49f" + integrity sha512-WQHCozMnuNADiqMtsNzp96FNox5sOVpU8Xt4meaT4em8lOG1SrOv92/mUbEHQVh90sldKSfcOc/I0FOb/14G1g== dependencies: - "@typescript-eslint/experimental-utils" "1.12.0" + "@typescript-eslint/experimental-utils" "1.13.0" eslint-utils "^1.3.1" functional-red-black-tree "^1.0.1" regexpp "^2.0.1" tsutils "^3.7.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@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: - "@typescript-eslint/typescript-estree" "1.12.0" + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "1.13.0" eslint-scope "^4.0.0" -"@typescript-eslint/parser@^1.12.0": - version "1.12.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.12.0.tgz#9965895ec4745578185965d63f21510f93a3f35a" - integrity sha512-0uzbaa9ZLCA5yMWJywnJJ7YVENKGWVUhJDV5UrMoldC5HoI54W5kkdPhTfmtFKpPFp93MIwmJj0/61ztvmz5Dw== +"@typescript-eslint/parser@^1.13.0": + version "1.13.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-1.13.0.tgz#61ac7811ea52791c47dc9fd4dd4a184fae9ac355" + integrity sha512-ITMBs52PCPgLb2nGPoeT4iU3HdQZHcPaZVw+7CsFagRJHUhyeTgorEwHXhFf3e7Evzi8oujKNpHc8TONth8AdQ== 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" "1.13.0" + "@typescript-eslint/typescript-estree" "1.13.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" @@ -1569,18 +1570,6 @@ babel-code-frame@^6.26.0: esutils "^2.0.2" js-tokens "^3.0.2" -babel-eslint@^10.0.2: - version "10.0.2" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.2.tgz#182d5ac204579ff0881684b040560fdcc1558456" - integrity sha512-UdsurWPtgiPgpJ06ryUnuaSXC2s0WoSZnQmEpbAH65XZSdwowgN5MvyP7e88nW07FYXv72erVtpBkxyDVKhH1Q== - dependencies: - "@babel/code-frame" "^7.0.0" - "@babel/parser" "^7.0.0" - "@babel/traverse" "^7.0.0" - "@babel/types" "^7.0.0" - eslint-scope "3.7.1" - eslint-visitor-keys "^1.0.0" - babel-jest@^24.8.0: version "24.8.0" resolved "https://registry.yarnpkg.com/babel-jest/-/babel-jest-24.8.0.tgz#5c15ff2b28e20b0f45df43fe6b7f2aae93dba589" @@ -2191,10 +2180,10 @@ concat-stream@^1.5.0: readable-stream "^2.2.2" typedarray "^0.0.6" -confusing-browser-globals@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.7.tgz#5ae852bd541a910e7ffb2dbb864a2d21a36ad29b" - integrity sha512-cgHI1azax5ATrZ8rJ+ODDML9Fvu67PimB6aNxBrc/QwSaDaM9eTfIEUHx3bBLJJ82ioSb+/5zfsMCCEJax3ByQ== +confusing-browser-globals@^1.0.8: + version "1.0.8" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.8.tgz#93ffec1f82a6e2bf2bc36769cc3a92fa20e502f3" + integrity sha512-lI7asCibVJ6Qd3FGU7mu4sfG4try4LX3+GVS+Gv8UlrEf2AeW57piecapnog2UHZSbcX/P/1UDWVaTsblowlZg== console-browserify@^1.1.0: version "1.1.0" @@ -2684,12 +2673,12 @@ eslint-config-prettier@^6.0.0: dependencies: get-stdin "^6.0.0" -eslint-config-react-app@4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-4.0.1.tgz#23fd0fd7ea89442ef1e733f66a7207674b23c8db" - integrity sha512-ZsaoXUIGsK8FCi/x4lT2bZR5mMkL/Kgj+Lnw690rbvvUr/uiwgFiD8FcfAhkCycm7Xte6O5lYz4EqMx2vX7jgw== +eslint-config-react-app@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-5.0.0.tgz#b3639e96fccc24eaaa63c92fc2f4358f79f22fb2" + integrity sha512-d3hbvu14J1Iy7N+XvrMOMXmw32iIGGIHqg7DK0RqA6UxKOix+Z53fuQ/uf2NqasSse3uHUNB1EvuZ8Iw2bzd3g== dependencies: - confusing-browser-globals "^1.0.7" + confusing-browser-globals "^1.0.8" eslint-import-resolver-node@^0.3.2: version "0.3.2" @@ -2707,17 +2696,17 @@ eslint-module-utils@^2.4.0: debug "^2.6.8" pkg-dir "^2.0.0" -eslint-plugin-flowtype@^3.11.1: - version "3.11.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-3.11.1.tgz#1aae15a10dbcd5aecc89897f810f2e9fcc18a5e3" - integrity sha512-4NiaaGZuz9iEGRTK8j4lkA/scibOXSYaYoHbsTtgLOxxqQCkbWV3xt8ETqILKg7DAYDqB69z1H5U71UmtdF9hw== +eslint-plugin-flowtype@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-flowtype/-/eslint-plugin-flowtype-4.2.0.tgz#a89ac991eef6753226eb8871261e266645aca4b9" + integrity sha512-mqf6AbQCP6N8Bk+ryXYwxt6sj3RT7i3kt8JOOx7WOQNlZtsLxqvnkXRRrToFHcN52E5W9c/p3UfNxCMsfENIJA== dependencies: - lodash "^4.17.11" + lodash "^4.17.15" -eslint-plugin-import@^2.18.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== +eslint-plugin-import@^2.18.2: + 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" @@ -2726,8 +2715,8 @@ eslint-plugin-import@^2.18.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" @@ -2746,10 +2735,10 @@ eslint-plugin-jsx-a11y@^6.2.3: has "^1.0.3" jsx-ast-utils "^2.2.1" -eslint-plugin-no-for-of-loops@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-no-for-of-loops/-/eslint-plugin-no-for-of-loops-1.0.0.tgz#a13d91a8f1922f7fefedeab351dc0055994601f6" - integrity sha1-oT2RqPGSL3/v7eqzUdwAVZlGAfY= +eslint-plugin-no-for-of-loops@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-no-for-of-loops/-/eslint-plugin-no-for-of-loops-1.0.1.tgz#2ee3732d50c642b8d1bfacedbfe3b28f86222369" + integrity sha512-uCotzBHt2W+HbLw2srRmqDJHOPbJGzeVLstKh8YyxS3ppduq2P50qdpJfHKoD+UGbnqA/zhy8NRgPH6p0y8bnA== eslint-plugin-prettier@^3.1.0: version "3.1.0" @@ -2758,15 +2747,15 @@ eslint-plugin-prettier@^3.1.0: dependencies: prettier-linter-helpers "^1.0.0" -eslint-plugin-react-hooks@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.6.1.tgz#3c66a5515ea3e0a221ffc5d4e75c971c217b1a4c" - integrity sha512-wHhmGJyVuijnYIJXZJHDUF2WM+rJYTjulUTqF9k61d3BTk8etydz+M4dXUVH7M76ZRS85rqBTCx0Es/lLsrjnA== +eslint-plugin-react-hooks@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-1.7.0.tgz#6210b6d5a37205f0b92858f895a4e827020a7d04" + integrity sha512-iXTCFcOmlWvw4+TOE8CLWj6yX1GwzT0Y6cUfHHZqWnSk144VmVIRcVGtUAzrLES7C798lmvnt02C7rxaOX1HNA== -eslint-plugin-react@^7.14.2: - 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== +eslint-plugin-react@^7.14.3: + 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" @@ -2778,14 +2767,6 @@ eslint-plugin-react@^7.14.2: prop-types "^15.7.2" resolve "^1.10.1" -eslint-scope@3.7.1: - version "3.7.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" - integrity sha1-PWPD7f2gLgbgGkUq2IyqzHzctug= - dependencies: - esrecurse "^4.1.0" - estraverse "^4.1.1" - eslint-scope@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172" @@ -2794,10 +2775,10 @@ eslint-scope@^4.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" -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== +eslint-scope@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9" + integrity sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw== dependencies: esrecurse "^4.1.0" estraverse "^4.1.1" @@ -2812,10 +2793,10 @@ eslint-visitor-keys@^1.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" integrity sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ== -eslint@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.0.1.tgz#4a32181d72cb999d6f54151df7d337131f81cda7" - integrity sha512-DyQRaMmORQ+JsWShYsSg4OPTjY56u1nCjAmICrE8vLWqyLKxhFXOthwMj1SA8xwfrv0CofLNVnqbfyhwCkaO0w== +eslint@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.1.0.tgz#06438a4a278b1d84fb107d24eaaa35471986e646" + integrity sha512-QhrbdRD7ofuV09IuE2ySWBz0FyXCq0rriLTZXZqaWSI79CVtHVRdkFuFTViiqzZhkCgfOh9USpriuGN2gIpZDQ== dependencies: "@babel/code-frame" "^7.0.0" ajv "^6.10.0" @@ -2823,7 +2804,7 @@ eslint@^6.0.1: cross-spawn "^6.0.5" debug "^4.0.1" doctrine "^3.0.0" - eslint-scope "^4.0.3" + eslint-scope "^5.0.0" eslint-utils "^1.3.1" eslint-visitor-keys "^1.0.0" espree "^6.0.0" @@ -2831,28 +2812,29 @@ eslint@^6.0.1: esutils "^2.0.2" file-entry-cache "^5.0.1" functional-red-black-tree "^1.0.1" - glob-parent "^3.1.0" + glob-parent "^5.0.0" globals "^11.7.0" ignore "^4.0.6" import-fresh "^3.0.0" imurmurhash "^0.1.4" - inquirer "^6.2.2" + inquirer "^6.4.1" is-glob "^4.0.0" js-yaml "^3.13.1" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.3.0" - lodash "^4.17.11" + lodash "^4.17.14" minimatch "^3.0.4" mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" progress "^2.0.0" regexpp "^2.0.1" - semver "^5.5.1" - strip-ansi "^4.0.0" - strip-json-comments "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" table "^5.2.3" text-table "^0.2.0" + v8-compile-cache "^2.0.3" espree@^6.0.0: version "6.0.0" @@ -3373,6 +3355,13 @@ glob-parent@^3.1.0: is-glob "^3.1.0" path-dirname "^1.0.0" +glob-parent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.0.0.tgz#1dc99f0f39b006d3e92c2c284068382f0c20e954" + integrity sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg== + dependencies: + is-glob "^4.0.1" + glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" @@ -3675,10 +3664,10 @@ ini@~1.3.0: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== -inquirer@^6.2.2: - version "6.3.1" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.3.1.tgz#7a413b5e7950811013a3db491c61d1f3b776e8e7" - integrity sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA== +inquirer@^6.4.1: + version "6.5.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.5.0.tgz#2303317efc9a4ea7ec2e2df6f86569b734accf42" + integrity sha512-scfHejeG/lVZSpvCXpsB4j/wQNPM5JC8kiElOI0OUTwmc1RTpXr4H32/HOlQHcZiYl2z2VElwuCVDRG8vFmbnA== dependencies: ansi-escapes "^3.2.0" chalk "^2.4.2" @@ -3686,7 +3675,7 @@ inquirer@^6.2.2: cli-width "^2.0.0" external-editor "^3.0.3" figures "^2.0.0" - lodash "^4.17.11" + lodash "^4.17.12" mute-stream "0.0.7" run-async "^2.2.0" rxjs "^6.4.0" @@ -3880,6 +3869,13 @@ is-glob@^4.0.0: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + is-module@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-module/-/is-module-1.0.0.tgz#3258fb69f78c14d5b815d664336b4cffb6441591" @@ -4740,6 +4736,11 @@ lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== +lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== + lodash@^4.17.4: version "4.17.14" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.14.tgz#9ce487ae66c96254fe20b599f21b6816028078ba" @@ -6550,7 +6551,7 @@ semver@5.5.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" integrity sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA== -semver@^5.5.1, semver@^5.6.0: +semver@^5.6.0: version "5.7.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b" integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== @@ -6565,6 +6566,11 @@ semver@^6.1.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.1.1.tgz#53f53da9b30b2103cd4f15eab3a18ecbcb210c9b" integrity sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ== +semver@^6.1.2: + version "6.2.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" + integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== + serialize-javascript@^1.4.0: version "1.6.1" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.6.1.tgz#4d1f697ec49429a847ca6f442a2a755126c4d879" @@ -6953,7 +6959,12 @@ strip-eof@^1.0.0: resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= -strip-json-comments@^2.0.1, strip-json-comments@~2.0.1: +strip-json-comments@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.0.1.tgz#85713975a91fb87bf1b305cca77395e40d2a64a7" + integrity sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw== + +strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= @@ -7383,6 +7394,11 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== +v8-compile-cache@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz#00f7494d2ae2b688cfe2899df6ed2c54bef91dbe" + integrity sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w== + validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" From 215cd93fdbd24b4e3c4ec8329a1b11e2f451a318 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Fri, 9 Aug 2019 20:43:23 -0500 Subject: [PATCH 25/29] feat(lint): Simplify written eslintrc --- .eslintrc.js | 349 +------------------------------------ package.json | 1 - src/errors/invertObject.ts | 1 - yarn.lock | 5 - 4 files changed, 5 insertions(+), 351 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index cd16d1a51..2375096f9 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,346 +1,7 @@ module.exports = { - "root": true, - "parser": "@typescript-eslint/parser", - "plugins": [ - "import", - "flowtype", - "jsx-a11y", - "react", - "react-hooks", - "@typescript-eslint", - "no-for-of-loops" + extends: [ + 'react-app', + 'prettier/@typescript-eslint', + 'plugin:prettier/recommended', ], - "env": { - "browser": true, - "commonjs": true, - "es6": true, - "jest": true, - "node": true - }, - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - "ecmaFeatures": { - "jsx": true - }, - "warnOnUnsupportedTypeScriptVersion": true - }, - "settings": { - "react": { - "version": "detect" - } - }, - "rules": { - "array-callback-return": "warn", - "default-case": "off", - "dot-location": [ - "warn", - "property" - ], - "eqeqeq": [ - "warn", - "smart" - ], - "new-parens": "warn", - "no-array-constructor": "off", - "no-caller": "warn", - "no-cond-assign": [ - "warn", - "except-parens" - ], - "no-const-assign": "warn", - "no-control-regex": "warn", - "no-delete-var": "warn", - "no-dupe-args": "warn", - "no-dupe-class-members": "off", - "no-dupe-keys": "warn", - "no-duplicate-case": "warn", - "no-empty-character-class": "warn", - "no-empty-pattern": "warn", - "no-eval": "warn", - "no-ex-assign": "warn", - "no-extend-native": "warn", - "no-extra-bind": "warn", - "no-extra-label": "warn", - "no-fallthrough": "warn", - "no-func-assign": "warn", - "no-implied-eval": "warn", - "no-invalid-regexp": "warn", - "no-iterator": "warn", - "no-label-var": "warn", - "no-labels": [ - "warn", - { - "allowLoop": true, - "allowSwitch": false - } - ], - "no-lone-blocks": "warn", - "no-loop-func": "warn", - "no-mixed-operators": [ - "warn", - { - "groups": [ - [ - "&", - "|", - "^", - "~", - "<<", - ">>", - ">>>" - ], - [ - "==", - "!=", - "===", - "!==", - ">", - ">=", - "<", - "<=" - ], - [ - "&&", - "||" - ], - [ - "in", - "instanceof" - ] - ], - "allowSamePrecedence": false - } - ], - "no-multi-str": "warn", - "no-native-reassign": "warn", - "no-negated-in-lhs": "warn", - "no-new-func": "warn", - "no-new-object": "warn", - "no-new-symbol": "warn", - "no-new-wrappers": "warn", - "no-obj-calls": "warn", - "no-octal": "warn", - "no-octal-escape": "warn", - "no-redeclare": "warn", - "no-regex-spaces": "warn", - "no-restricted-syntax": [ - "warn", - "WithStatement" - ], - "no-script-url": "warn", - "no-self-assign": "warn", - "no-self-compare": "warn", - "no-sequences": "warn", - "no-shadow-restricted-names": "warn", - "no-sparse-arrays": "warn", - "no-template-curly-in-string": "warn", - "no-this-before-super": "warn", - "no-throw-literal": "warn", - "no-undef": "error", - "no-restricted-globals": [ - "error", - "addEventListener", - "blur", - "close", - "closed", - "confirm", - "defaultStatus", - "defaultstatus", - "event", - "external", - "find", - "focus", - "frameElement", - "frames", - "history", - "innerHeight", - "innerWidth", - "length", - "location", - "locationbar", - "menubar", - "moveBy", - "moveTo", - "name", - "onblur", - "onerror", - "onfocus", - "onload", - "onresize", - "onunload", - "open", - "opener", - "opera", - "outerHeight", - "outerWidth", - "pageXOffset", - "pageYOffset", - "parent", - "print", - "removeEventListener", - "resizeBy", - "resizeTo", - "screen", - "screenLeft", - "screenTop", - "screenX", - "screenY", - "scroll", - "scrollbars", - "scrollBy", - "scrollTo", - "scrollX", - "scrollY", - "self", - "status", - "statusbar", - "stop", - "toolbar", - "top" - ], - "no-unexpected-multiline": "warn", - "no-unreachable": "warn", - "no-unused-expressions": [ - "error", - { - "allowShortCircuit": true, - "allowTernary": true, - "allowTaggedTemplates": true - } - ], - "no-unused-labels": "warn", - "no-unused-vars": "off", - "no-use-before-define": [ - "warn", - { - "functions": false, - "classes": false, - "variables": false - } - ], - "no-useless-computed-key": "warn", - "no-useless-concat": "warn", - "no-useless-constructor": "off", - "no-useless-escape": "warn", - "no-useless-rename": [ - "warn", - { - "ignoreDestructuring": false, - "ignoreImport": false, - "ignoreExport": false - } - ], - "no-with": "warn", - "no-whitespace-before-property": "warn", - "react-hooks/exhaustive-deps": "warn", - "require-yield": "warn", - "rest-spread-spacing": [ - "warn", - "never" - ], - "strict": [ - "warn", - "never" - ], - "unicode-bom": [ - "warn", - "never" - ], - "use-isnan": "warn", - "valid-typeof": "warn", - "no-restricted-properties": [ - "error", - { - "object": "require", - "property": "ensure", - "message": "Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting" - }, - { - "object": "System", - "property": "import", - "message": "Please use import() instead. More info: https://facebook.github.io/create-react-app/docs/code-splitting" - } - ], - "getter-return": "warn", - "import/first": "error", - "import/no-amd": "error", - "import/no-webpack-loader-syntax": "error", - "react/forbid-foreign-prop-types": [ - "warn", - { - "allowInPropTypes": true - } - ], - "react/jsx-no-comment-textnodes": "warn", - "react/jsx-no-duplicate-props": [ - "warn", - { - "ignoreCase": true - } - ], - "react/jsx-no-target-blank": "warn", - "react/jsx-no-undef": "error", - "react/jsx-pascal-case": [ - "warn", - { - "allowAllCaps": true, - "ignore": [] - } - ], - "react/jsx-uses-react": "warn", - "react/jsx-uses-vars": "warn", - "react/no-danger-with-children": "warn", - "react/no-direct-mutation-state": "warn", - "react/no-is-mounted": "warn", - "react/no-typos": "error", - "react/react-in-jsx-scope": "error", - "react/require-render-return": "error", - "react/style-prop-object": "warn", - "jsx-a11y/accessible-emoji": "warn", - "jsx-a11y/alt-text": "warn", - "jsx-a11y/anchor-has-content": "warn", - "jsx-a11y/anchor-is-valid": [ - "warn", - { - "aspects": [ - "noHref", - "invalidHref" - ] - } - ], - "jsx-a11y/aria-activedescendant-has-tabindex": "warn", - "jsx-a11y/aria-props": "warn", - "jsx-a11y/aria-proptypes": "warn", - "jsx-a11y/aria-role": "warn", - "jsx-a11y/aria-unsupported-elements": "warn", - "jsx-a11y/heading-has-content": "warn", - "jsx-a11y/iframe-has-title": "warn", - "jsx-a11y/img-redundant-alt": "warn", - "jsx-a11y/no-access-key": "warn", - "jsx-a11y/no-distracting-elements": "warn", - "jsx-a11y/no-redundant-roles": "warn", - "jsx-a11y/role-has-required-aria-props": "warn", - "jsx-a11y/role-supports-aria-props": "warn", - "jsx-a11y/scope": "warn", - "react-hooks/rules-of-hooks": "error", - "flowtype/define-flow-type": "warn", - "flowtype/require-valid-file-annotation": "warn", - "flowtype/use-flow-type": "warn", - "@typescript-eslint/no-angle-bracket-type-assertion": "warn", - "@typescript-eslint/no-array-constructor": "warn", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-unused-vars": [ - "warn", - { - "args": "none", - "ignoreRestSiblings": true - } - ], - "@typescript-eslint/no-useless-constructor": "warn" - }, - "extends": [ - "prettier/@typescript-eslint", - "plugin:prettier/recommended" - ] -} \ No newline at end of file +}; diff --git a/package.json b/package.json index 56b2ecc9f..819efe69f 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,6 @@ "eslint-plugin-flowtype": "^4.2.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-no-for-of-loops": "^1.0.1", "eslint-plugin-prettier": "^3.1.0", "eslint-plugin-react": "^7.14.3", "eslint-plugin-react-hooks": "^1.7.0", diff --git a/src/errors/invertObject.ts b/src/errors/invertObject.ts index 5a2f80ef5..23fd54f53 100644 --- a/src/errors/invertObject.ts +++ b/src/errors/invertObject.ts @@ -13,7 +13,6 @@ export function invertObject( const result: Dict = {}; const mapKeys = Object.keys(targetObj); - // eslint-disable-next-line no-for-of-loops/no-for-of-loops for (const originalKey of mapKeys) { const originalVal = targetObj[originalKey]; diff --git a/yarn.lock b/yarn.lock index e8a3c0a63..8db33db0e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2735,11 +2735,6 @@ eslint-plugin-jsx-a11y@^6.2.3: has "^1.0.3" jsx-ast-utils "^2.2.1" -eslint-plugin-no-for-of-loops@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-no-for-of-loops/-/eslint-plugin-no-for-of-loops-1.0.1.tgz#2ee3732d50c642b8d1bfacedbfe3b28f86222369" - integrity sha512-uCotzBHt2W+HbLw2srRmqDJHOPbJGzeVLstKh8YyxS3ppduq2P50qdpJfHKoD+UGbnqA/zhy8NRgPH6p0y8bnA== - eslint-plugin-prettier@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.0.tgz#8695188f95daa93b0dc54b249347ca3b79c4686d" From 530b8b53a147ddd6e2a8703e24872817341b330a Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Fri, 9 Aug 2019 20:47:40 -0500 Subject: [PATCH 26/29] chore(docs): Remove wrongfully merged README addition --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index 199c201b3..8acf642b9 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,6 @@ Despite all the recent hype, setting up a new TypeScript (x React) library can b - [`tsdx build`](#tsdx-build) - [`tsdx test`](#tsdx-test) - [`tsdx lint`](#tsdx-lint) -- [Hosting extracted Errors](#hosting-extracted-errors) - [Author](#author) - [License](#license) @@ -373,12 +372,6 @@ Examples $ tsdx lint src --write-file ``` -## Hosting extracted Errors - -After running `--extractErrors`, you will have a `codes.json` file with all your extracted error codes. You will need to host the decoder somewhere (with the URL that you passed in to `--extractErrors`). - -_Simple guide to host error codes to be completed_ - ## Author - [Jared Palmer](https://twitter.com/jaredpalmer) From fe37a21953d392e5daf9a1c8ddc95adbde0dce60 Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Fri, 9 Aug 2019 20:54:36 -0500 Subject: [PATCH 27/29] chore(yarn.lock): Fix merge issue with the babel/core version --- yarn.lock | 59 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 6 deletions(-) diff --git a/yarn.lock b/yarn.lock index 8db33db0e..abeca1689 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,17 +9,24 @@ dependencies: "@babel/highlight" "^7.0.0" +"@babel/code-frame@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d" + integrity sha512-27d4lZoomVyo51VegxI20xZPuSHusqbQag/ztrBC7wegWoQ1nLREPVSKSW8byhTlzTKyNE4ifaTA6lCp7JjpFw== + dependencies: + "@babel/highlight" "^7.0.0" + "@babel/core@^7.1.0", "@babel/core@^7.4.4": - version "7.4.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.4.tgz#84055750b05fcd50f9915a826b44fa347a825250" - integrity sha512-lQgGX3FPRgbz2SKmhMtYgJvVzGZrmjaF4apZ2bLwofAKiSjxU0drPh4S/VasyYXwaTs+A1gvQ45BN8SQJzHsQQ== + version "7.4.5" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.4.5.tgz#081f97e8ffca65a9b4b0fdc7e274e703f000c06a" + integrity sha512-OvjIh6aqXtlsA8ujtGKfC7LYWksYSX8yQcM8Ay3LuvVeQ63lcOKgoZWVqcpFwkd29aYU9rVx7jxhfhiEDV9MZA== dependencies: "@babel/code-frame" "^7.0.0" "@babel/generator" "^7.4.4" "@babel/helpers" "^7.4.4" - "@babel/parser" "^7.4.4" + "@babel/parser" "^7.4.5" "@babel/template" "^7.4.4" - "@babel/traverse" "^7.4.4" + "@babel/traverse" "^7.4.5" "@babel/types" "^7.4.4" convert-source-map "^1.1.0" debug "^4.1.0" @@ -40,6 +47,17 @@ source-map "^0.5.0" trim-right "^1.0.1" +"@babel/generator@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.5.tgz#873a7f936a3c89491b43536d12245b626664e3cf" + integrity sha512-ETI/4vyTSxTzGnU2c49XHv2zhExkv9JHLTwDAFz85kmcwuShvYG2H08FwgIguQf4JC75CBnXAUM5PqeF4fj0nQ== + dependencies: + "@babel/types" "^7.5.5" + jsesc "^2.5.1" + lodash "^4.17.13" + source-map "^0.5.0" + trim-right "^1.0.1" + "@babel/helper-annotate-as-pure@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32" @@ -235,6 +253,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.2.3.tgz#32f5df65744b70888d17872ec106b02434ba1489" integrity sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA== +"@babel/parser@^7.4.5", "@babel/parser@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.5.tgz#02f077ac8817d3df4a832ef59de67565e71cca4b" + integrity sha512-E5BN68cqR7dhKan1SfqgPGhQ178bkVKpXTPEXnFJBrEt8/DKRZlybmy+IgYLTeN7tp1R5Ccmbm2rBk17sHYU3g== + "@babel/plugin-proposal-async-generator-functions@^7.2.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.2.0.tgz#b289b306669dce4ad20b0252889a15768c9d417e" @@ -658,6 +681,21 @@ globals "^11.1.0" lodash "^4.17.11" +"@babel/traverse@^7.4.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.5.5.tgz#f664f8f368ed32988cd648da9f72d5ca70f165bb" + integrity sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ== + dependencies: + "@babel/code-frame" "^7.5.5" + "@babel/generator" "^7.5.5" + "@babel/helper-function-name" "^7.1.0" + "@babel/helper-split-export-declaration" "^7.4.4" + "@babel/parser" "^7.5.5" + "@babel/types" "^7.5.5" + debug "^4.1.0" + globals "^11.1.0" + lodash "^4.17.13" + "@babel/types@^7.0.0", "@babel/types@^7.2.2": version "7.2.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.2.2.tgz#44e10fc24e33af524488b716cdaee5360ea8ed1e" @@ -676,6 +714,15 @@ lodash "^4.17.11" to-fast-properties "^2.0.0" +"@babel/types@^7.5.5": + version "7.5.5" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.5.5.tgz#97b9f728e182785909aa4ab56264f090a028d18a" + integrity sha512-s63F9nJioLqOlW3UkyMd+BYhXt44YuaFm/VV0VwuteqjYwRrObkU7ra9pY4wAJR3oXi8hJrMcrcJdO/HH33vtw== + dependencies: + esutils "^2.0.2" + lodash "^4.17.13" + to-fast-properties "^2.0.0" + "@cnakazawa/watch@^1.0.3": version "1.0.3" resolved "https://registry.yarnpkg.com/@cnakazawa/watch/-/watch-1.0.3.tgz#099139eaec7ebf07a27c1786a3ff64f39464d2ef" @@ -4731,7 +4778,7 @@ lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg== -lodash@^4.17.12, lodash@^4.17.14, lodash@^4.17.15: +lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15: version "4.17.15" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== From 65ea74fb0d44c8593f0bd37ca17b5d51bcbf666e Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Tue, 13 Aug 2019 16:33:15 -0500 Subject: [PATCH 28/29] feat(lint): Bump eslint-config-react-app dep --- package.json | 2 +- src/index.ts | 1 - yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 819efe69f..19397447e 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "enquirer": "^2.3.0", "eslint": "^6.1.0", "eslint-config-prettier": "^6.0.0", - "eslint-config-react-app": "^5.0.0", + "eslint-config-react-app": "^5.0.1", "eslint-plugin-flowtype": "^4.2.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-jsx-a11y": "^6.2.3", diff --git a/src/index.ts b/src/index.ts index 28740fd1c..465de64cd 100755 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,4 @@ #!/usr/bin/env node -/* eslint @typescript-eslint/no-var-requires: 0 */ import sade from 'sade'; import glob from 'tiny-glob/sync'; diff --git a/yarn.lock b/yarn.lock index abeca1689..63753fcca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2720,10 +2720,10 @@ eslint-config-prettier@^6.0.0: dependencies: get-stdin "^6.0.0" -eslint-config-react-app@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-5.0.0.tgz#b3639e96fccc24eaaa63c92fc2f4358f79f22fb2" - integrity sha512-d3hbvu14J1Iy7N+XvrMOMXmw32iIGGIHqg7DK0RqA6UxKOix+Z53fuQ/uf2NqasSse3uHUNB1EvuZ8Iw2bzd3g== +eslint-config-react-app@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/eslint-config-react-app/-/eslint-config-react-app-5.0.1.tgz#5f3d666ba3ee3cb384eb943e260e868f6c72251b" + integrity sha512-GYXP3F/0PSHlYfGHhahqnJze8rYKxzXgrzXVqRRd4rDO40ga4NA3aHM7/HKbwceDN0/C1Ij3BoAWFawJgRbXEw== dependencies: confusing-browser-globals "^1.0.8" From 00584a1348a4d17991c02a95b1d8952116ccab9e Mon Sep 17 00:00:00 2001 From: Sam Kvale Date: Tue, 13 Aug 2019 19:32:22 -0500 Subject: [PATCH 29/29] feat(lint): Last small updates --- .yarnrc | 1 - README.md | 6 +++--- src/createRollupConfig.ts | 1 - src/index.ts | 8 ++++---- 4 files changed, 7 insertions(+), 9 deletions(-) delete mode 100644 .yarnrc diff --git a/.yarnrc b/.yarnrc deleted file mode 100644 index 93bdfe702..000000000 --- a/.yarnrc +++ /dev/null @@ -1 +0,0 @@ -"registry" "https://registry.yarnpkg.com" diff --git a/README.md b/README.md index 8acf642b9..f04de793f 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,8 @@ By default, runs tests related to files changed since the last commit. ### `npm run lint` or `yarn lint` -Runs Eslint. -If you would like to customize the linting you can add a `eslint` block to your package.json or you can run `yarn lint --write-file` and edit the generated `.eslintrc.js` file to whatever you want. +Runs Eslint with Prettier on .ts and .tsx files. +If you want to customize eslint you can add an `eslint` block to your package.json, or you can run `yarn lint --write-file` and edit the generated `.eslintrc.js` file. ## Optimizations @@ -354,7 +354,7 @@ This runs Jest v24.x in watch mode. See [https://jestjs.io](https://jestjs.io) f ```shell Description - Run eslint + Run eslint with Prettier Usage $ tsdx lint [options] diff --git a/src/createRollupConfig.ts b/src/createRollupConfig.ts index 9224d8fd1..f7fe58ff5 100644 --- a/src/createRollupConfig.ts +++ b/src/createRollupConfig.ts @@ -1,4 +1,3 @@ -/* eslint @typescript-eslint/camelcase: 0 */ import { DEFAULT_EXTENSIONS } from '@babel/core'; import { safeVariableName, safePackageName, external } from './utils'; import { paths } from './constants'; diff --git a/src/index.ts b/src/index.ts index 465de64cd..6de759dc1 100755 --- a/src/index.ts +++ b/src/index.ts @@ -449,7 +449,7 @@ prog prog .command('lint') - .describe('Run eslint') + .describe('Run eslint with Prettier') .example('lint src test') .option('--fix', 'Fixes fixable errors and warnings') .example('lint src test --fix') @@ -465,9 +465,6 @@ prog _: string[]; }) => { const cli = new CLIEngine({ - extensions: ['.ts', '.tsx'], - fix: opts.fix, - ignorePattern: opts['ignore-pattern'], baseConfig: { ...createEslintConfig({ rootDir: paths.appRoot, @@ -475,6 +472,9 @@ prog }), ...appPackageJson.eslint, }, + extensions: ['.ts', '.tsx'], + fix: opts.fix, + ignorePattern: opts['ignore-pattern'], }); const report = cli.executeOnFiles(opts['_']); if (opts.fix) {