diff --git a/docs/api-angular/schematics/application.md b/docs/api-angular/schematics/application.md index 58bfabc5016f1..a2866429f7fed 100644 --- a/docs/api-angular/schematics/application.md +++ b/docs/api-angular/schematics/application.md @@ -53,6 +53,14 @@ Type: `boolean` Specifies if the template will be in the ts file. +### linter + +Default: `tslint` + +Type: `string` + +The tool to use for running lint checks. + ### name Type: `string` diff --git a/docs/api-express/schematics/application.md b/docs/api-express/schematics/application.md index 475456be5cee4..bb2a5edc64d42 100644 --- a/docs/api-express/schematics/application.md +++ b/docs/api-express/schematics/application.md @@ -23,6 +23,14 @@ Type: `string` Frontend project that needs to access this application. This sets up proxy configuration. +### linter + +Default: `tslint` + +Type: `string` + +The tool to use for running lint checks. + ### name Type: `string` diff --git a/docs/api-nest/schematics/application.md b/docs/api-nest/schematics/application.md index 170bffa48dc84..6866d6d6f60ef 100644 --- a/docs/api-nest/schematics/application.md +++ b/docs/api-nest/schematics/application.md @@ -23,6 +23,14 @@ Type: `string` Frontend project that needs to access this application. This sets up proxy configuration. +### linter + +Default: `tslint` + +Type: `string` + +The tool to use for running lint checks. + ### name Type: `string` diff --git a/e2e/cypress.test.ts b/e2e/cypress.test.ts index eb28f519141f6..c7a6ae8c4dae4 100644 --- a/e2e/cypress.test.ts +++ b/e2e/cypress.test.ts @@ -11,13 +11,18 @@ import { supportUi } from './utils'; -forEachCli(() => { +forEachCli(currentCLIName => { + const linter = currentCLIName === 'angular' ? 'tslint' : 'eslint'; + const nrwlPackageName = currentCLIName === 'angular' ? 'angular' : 'react'; + describe('Cypress E2E Test runner', () => { describe('project scaffolding', () => { it('should generate an app with the Cypress as e2e test runner', () => { ensureProject(); const myapp = uniq('myapp'); - runCLI(`generate @nrwl/angular:app ${myapp} --e2eTestRunner=cypress`); + runCLI( + `generate @nrwl/${nrwlPackageName}:app ${myapp} --e2eTestRunner=cypress --linter=${linter}` + ); // Making sure the package.json file contains the Cypress dependency const packageJson = readJson('package.json'); @@ -38,10 +43,12 @@ forEachCli(() => { if (supportUi()) { describe('running Cypress', () => { - fit('should execute e2e tests using Cypress', () => { + it('should execute e2e tests using Cypress', () => { newProject(); const myapp = uniq('myapp'); - runCLI(`generate @nrwl/angular:app ${myapp} --e2eTestRunner=cypress`); + runCLI( + `generate @nrwl/${nrwlPackageName}:app ${myapp} --e2eTestRunner=cypress --linter=${linter}` + ); expect(runCLI(`e2e ${myapp}-e2e --headless --no-watch`)).toContain( 'All specs passed!' diff --git a/e2e/node.test.ts b/e2e/node.test.ts index 2f81db08aac93..66b0eced39711 100644 --- a/e2e/node.test.ts +++ b/e2e/node.test.ts @@ -31,12 +31,17 @@ function getData(): Promise { }); } -forEachCli(() => { +forEachCli(currentCLIName => { + const linter = currentCLIName === 'angular' ? 'tslint' : 'eslint'; + describe('Node Applications', () => { it('should be able to generate an express application', async done => { ensureProject(); const nodeapp = uniq('nodeapp'); - runCLI(`generate @nrwl/express:app ${nodeapp}`); + + runCLI(`generate @nrwl/express:app ${nodeapp} --linter=${linter}`); + const lintResults = runCLI(`lint ${nodeapp}`); + expect(lintResults).toContain('All files pass linting.'); updateFile( `apps/${nodeapp}/src/app/test.spec.ts`, @@ -123,7 +128,9 @@ forEachCli(() => { it('should be able to generate a nest application', async done => { ensureProject(); const nestapp = uniq('nestapp'); - runCLI(`generate @nrwl/nest:app ${nestapp}`); + runCLI(`generate @nrwl/nest:app ${nestapp} --linter=${linter}`); + const lintResults = runCLI(`lint ${nestapp}`); + expect(lintResults).toContain('All files pass linting.'); updateFile(`apps/${nestapp}/src/assets/file.txt`, ``); const jestResult = await runCLIAsync(`test ${nestapp}`); @@ -183,7 +190,10 @@ forEachCli(() => { ensureProject(); const nodeapp = uniq('nodeapp'); - runCLI(`generate @nrwl/node:app ${nodeapp}`); + runCLI(`generate @nrwl/node:app ${nodeapp} --linter=${linter}`); + const lintResults = runCLI(`lint ${nodeapp}`); + expect(lintResults).toContain('All files pass linting.'); + updateFile(`apps/${nodeapp}/src/main.ts`, `console.log('Hello World!');`); await runCLIAsync(`build ${nodeapp}`); diff --git a/e2e/react.test.ts b/e2e/react.test.ts index 985c062ec00e9..d77f05c6d2574 100644 --- a/e2e/react.test.ts +++ b/e2e/react.test.ts @@ -14,14 +14,18 @@ import { } from './utils'; import { serializeJson } from '@nrwl/workspace'; -forEachCli(() => { +forEachCli(currentCLIName => { + const linter = currentCLIName === 'angular' ? 'tslint' : 'eslint'; + describe('React Applications', () => { it('should be able to generate a react app + lib', async () => { ensureProject(); const appName = uniq('app'); const libName = uniq('lib'); - runCLI(`generate @nrwl/react:app ${appName} --no-interactive --babel`); + runCLI( + `generate @nrwl/react:app ${appName} --no-interactive --babel --linter=${linter}` + ); runCLI(`generate @nrwl/react:lib ${libName} --no-interactive`); const mainPath = `apps/${appName}/src/main.tsx`; @@ -30,7 +34,7 @@ forEachCli(() => { const libTestResults = await runCLIAsync(`test ${libName}`); expect(libTestResults.stderr).toContain('Test Suites: 1 passed, 1 total'); - await testGeneratedApp(appName, { checkStyles: true }); + await testGeneratedApp(appName, { checkStyles: true, checkLinter: true }); }, 120000); it('should generate app with routing', async () => { @@ -38,10 +42,10 @@ forEachCli(() => { const appName = uniq('app'); runCLI( - `generate @nrwl/react:app ${appName} --routing --no-interactive --babel` + `generate @nrwl/react:app ${appName} --routing --no-interactive --babel --linter=${linter}` ); - await testGeneratedApp(appName, { checkStyles: true }); + await testGeneratedApp(appName, { checkStyles: true, checkLinter: true }); }, 120000); it('should generate app with styled-components', async () => { @@ -49,10 +53,13 @@ forEachCli(() => { const appName = uniq('app'); runCLI( - `generate @nrwl/react:app ${appName} --style styled-components --no-interactive --babel` + `generate @nrwl/react:app ${appName} --style styled-components --no-interactive --babel --linter=${linter}` ); - await testGeneratedApp(appName, { checkStyles: false }); + await testGeneratedApp(appName, { + checkStyles: false, + checkLinter: true + }); }, 120000); it('should be able to use JSX', async () => { @@ -60,7 +67,9 @@ forEachCli(() => { const appName = uniq('app'); const libName = uniq('lib'); - runCLI(`generate @nrwl/react:app ${appName} --no-interactive --babel`); + runCLI( + `generate @nrwl/react:app ${appName} --no-interactive --babel --linter=${linter}` + ); runCLI(`generate @nrwl/react:lib ${libName} --no-interactive`); renameFile( @@ -92,12 +101,20 @@ forEachCli(() => { const mainPath = `apps/${appName}/src/main.jsx`; updateFile(mainPath, `import '@proj/${libName}';\n` + readFile(mainPath)); - await testGeneratedApp(appName, { checkStyles: true }); + await testGeneratedApp(appName, { + checkStyles: true, + checkLinter: false + }); }, 30000); - async function testGeneratedApp(appName, opts: { checkStyles: boolean }) { - const lintResults = runCLI(`lint ${appName}`); - expect(lintResults).toContain('All files pass linting.'); + async function testGeneratedApp( + appName, + opts: { checkStyles: boolean; checkLinter: boolean } + ) { + if (opts.checkLinter) { + const lintResults = runCLI(`lint ${appName}`); + expect(lintResults).toContain('All files pass linting.'); + } runCLI(`build ${appName}`); let filesToCheck = [ @@ -133,8 +150,6 @@ forEachCli(() => { const testResults = await runCLIAsync(`test ${appName}`); expect(testResults.stderr).toContain('Test Suites: 1 passed, 1 total'); - const lintE2eResults = runCLI(`lint ${appName}-e2e`); - expect(lintE2eResults).toContain('All files pass linting.'); if (supportUi()) { const e2eResults = runCLI(`e2e ${appName}-e2e`); diff --git a/e2e/utils.ts b/e2e/utils.ts index 5b782e0345a95..5a0b2a9ba74d9 100644 --- a/e2e/utils.ts +++ b/e2e/utils.ts @@ -11,7 +11,7 @@ export function uniq(prefix: string) { export function forEachCli( selectedCliOrFunction: string | Function, - callback?: Function + callback?: (currentCLIName) => void ) { let clis; if (process.env.SELECTED_CLI && selectedCliOrFunction && callback) { @@ -32,7 +32,7 @@ export function forEachCli( beforeEach(() => { cli = c; }); - cb(); + cb(c); }); }); } diff --git a/e2e/web.test.ts b/e2e/web.test.ts index 5730d24de80f3..5a193cb26156a 100644 --- a/e2e/web.test.ts +++ b/e2e/web.test.ts @@ -9,13 +9,16 @@ import { supportUi } from './utils'; -forEachCli(() => { +forEachCli(currentCLIName => { describe('Web Components Applications', () => { it('should be able to generate a web app', async () => { ensureProject(); const appName = uniq('app'); - runCLI(`generate @nrwl/web:app ${appName} --no-interactive`); + const linter = currentCLIName === 'angular' ? 'tslint' : 'eslint'; + runCLI( + `generate @nrwl/web:app ${appName} --no-interactive --linter=${linter}` + ); const lintResults = runCLI(`lint ${appName}`); expect(lintResults).toContain('All files pass linting.'); diff --git a/package.json b/package.json index f326945ce9688..6e4953d7a614c 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@angular-devkit/build-webpack": "0.801.1", "@angular-devkit/core": "8.1.1", "@angular-devkit/schematics": "8.1.1", + "@angular-eslint/builder": "0.0.1-alpha.16", "@angular/cli": "8.1.1", "@angular/common": "^8.0.0", "@angular/compiler": "^8.0.0", @@ -66,6 +67,8 @@ "@types/react-dom": "^16.8.2", "@types/webpack": "^4.4.24", "@types/yargs": "^11.0.0", + "@typescript-eslint/eslint-plugin": "2.0.0-alpha.4", + "@typescript-eslint/parser": "2.0.0-alpha.4", "angular": "1.6.6", "app-root-path": "^2.0.1", "babel-loader": "8.0.6", @@ -81,6 +84,8 @@ "document-register-element": "^1.13.1", "dotenv": "6.2.0", "express": "4.16.3", + "eslint": "6.1.0", + "eslint-config-prettier": "6.0.0", "fork-ts-checker-webpack-plugin": "^0.4.9", "fs-extra": "7.0.1", "graphviz": "^0.0.8", diff --git a/packages/angular/src/schematics/application/schema.d.ts b/packages/angular/src/schematics/application/schema.d.ts index 2b581da7f0095..b430cae65a36d 100644 --- a/packages/angular/src/schematics/application/schema.d.ts +++ b/packages/angular/src/schematics/application/schema.d.ts @@ -14,6 +14,7 @@ export interface Schema { skipTests?: boolean; directory?: string; tags?: string; + linter: string; unitTestRunner: UnitTestRunner; e2eTestRunner: E2eTestRunner; } diff --git a/packages/angular/src/schematics/application/schema.json b/packages/angular/src/schematics/application/schema.json index 1c2c4d29b26b4..db431fe92af25 100644 --- a/packages/angular/src/schematics/application/schema.json +++ b/packages/angular/src/schematics/application/schema.json @@ -110,6 +110,12 @@ "tags": { "type": "string", "description": "Add tags to the application (used for linting)" + }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["tslint"], + "default": "tslint" } }, "required": [] diff --git a/packages/express/src/schematics/application/schema.d.ts b/packages/express/src/schematics/application/schema.d.ts index 415d9c1d9459b..6f4ba8cd8cce8 100644 --- a/packages/express/src/schematics/application/schema.d.ts +++ b/packages/express/src/schematics/application/schema.d.ts @@ -6,5 +6,6 @@ export interface Schema { directory?: string; unitTestRunner: UnitTestRunner; tags?: string; + linter: string; frontendProject?: string; } diff --git a/packages/express/src/schematics/application/schema.json b/packages/express/src/schematics/application/schema.json index a746ce645da2f..437061649bffd 100644 --- a/packages/express/src/schematics/application/schema.json +++ b/packages/express/src/schematics/application/schema.json @@ -28,6 +28,12 @@ "default": false, "description": "Do not add dependencies to package.json." }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "tslint"], + "default": "tslint" + }, "unitTestRunner": { "type": "string", "enum": ["jest", "none"], diff --git a/packages/linter/package.json b/packages/linter/package.json index 3e52491a4d5f8..5dad3b87a8d4f 100644 --- a/packages/linter/package.json +++ b/packages/linter/package.json @@ -30,6 +30,7 @@ "@angular/compiler": "8.1.2", "@angular/compiler-cli": "8.1.2", "@angular-devkit/build-angular": "0.801.1", - "@angular-devkit/architect": "0.801.1" + "@angular-devkit/architect": "0.801.1", + "@angular-eslint/builder": "0.0.1-alpha.16" } } diff --git a/packages/linter/src/builders/lint/lint.impl.ts b/packages/linter/src/builders/lint/lint.impl.ts index fc2f9b4a21c47..515615e8e031f 100644 --- a/packages/linter/src/builders/lint/lint.impl.ts +++ b/packages/linter/src/builders/lint/lint.impl.ts @@ -1,25 +1,41 @@ import { BuilderContext, - createBuilder, - BuilderOutput + BuilderOutput, + createBuilder } from '@angular-devkit/architect'; -import { Observable, from } from 'rxjs'; -import { concatMap, tap } from 'rxjs/operators'; +import { from, Observable } from 'rxjs'; +import { concatMap } from 'rxjs/operators'; function run(options: any, context: BuilderContext): Observable { if (options.linter === 'tslint') { delete options.linter; options.tslintConfig = options.config; delete options.config; - context.logger; return from( context.scheduleBuilder('@angular-devkit/build-angular:tslint', options, { logger: patchedLogger(context) }) ).pipe(concatMap(r => r.output)); - } else { - throw new Error(`ESLint support hasn't been implemented yet.`); } + + if (options.linter === 'eslint') { + delete options.linter; + options.eslintConfig = options.config; + delete options.config; + // Use whatever the default formatter is + delete options.format; + return from( + context.scheduleBuilder('@angular-eslint/builder:lint', options, { + logger: patchedLogger(context) + }) + ).pipe(concatMap(r => r.output)); + } + + throw new Error( + `"${ + options.linter + }" is not a supported linter option: use either eslint or tslint` + ); } // remove once https://github.com/angular/angular-cli/issues/15053 is fixed diff --git a/packages/nest/src/schematics/application/schema.d.ts b/packages/nest/src/schematics/application/schema.d.ts index 415d9c1d9459b..6f4ba8cd8cce8 100644 --- a/packages/nest/src/schematics/application/schema.d.ts +++ b/packages/nest/src/schematics/application/schema.d.ts @@ -6,5 +6,6 @@ export interface Schema { directory?: string; unitTestRunner: UnitTestRunner; tags?: string; + linter: string; frontendProject?: string; } diff --git a/packages/nest/src/schematics/application/schema.json b/packages/nest/src/schematics/application/schema.json index 628dae369ba7d..94316a0d53fa6 100644 --- a/packages/nest/src/schematics/application/schema.json +++ b/packages/nest/src/schematics/application/schema.json @@ -28,6 +28,12 @@ "default": false, "description": "Do not add dependencies to package.json." }, + "linter": { + "description": "The tool to use for running lint checks.", + "type": "string", + "enum": ["eslint", "tslint"], + "default": "tslint" + }, "unitTestRunner": { "type": "string", "enum": ["jest", "none"], diff --git a/packages/workspace/src/schematics/ng-new/schema.json b/packages/workspace/src/schematics/ng-new/schema.json index 2e3158f4add68..afe808bff636d 100644 --- a/packages/workspace/src/schematics/ng-new/schema.json +++ b/packages/workspace/src/schematics/ng-new/schema.json @@ -37,6 +37,14 @@ { "value": "less", "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" } ] } diff --git a/packages/workspace/src/schematics/preset/preset.ts b/packages/workspace/src/schematics/preset/preset.ts index 792f0c160782e..3ba291ad2616f 100644 --- a/packages/workspace/src/schematics/preset/preset.ts +++ b/packages/workspace/src/schematics/preset/preset.ts @@ -28,8 +28,7 @@ export default function(options: Schema): Rule { } function createPreset(options: Schema): Rule { - // const linter = options.cli === 'angular' ? 'tslint' : 'eslint'; - const linter = 'tslint'; + const linter = options.cli === 'angular' ? 'tslint' : 'eslint'; if (options.preset === 'empty') { return setDefaultLinter(linter); diff --git a/packages/workspace/src/schematics/tao-new/schema.json b/packages/workspace/src/schematics/tao-new/schema.json index 53ff60baa8937..702266cc2a3ae 100644 --- a/packages/workspace/src/schematics/tao-new/schema.json +++ b/packages/workspace/src/schematics/tao-new/schema.json @@ -37,6 +37,14 @@ { "value": "less", "label": "LESS [ http://lesscss.org ]" + }, + { + "value": "styled-components", + "label": "styled-components [ https://styled-components.com ]" + }, + { + "value": "@emotion/styled", + "label": "emotion [ https://emotion.sh ]" } ] } diff --git a/packages/workspace/src/utils/lint.ts b/packages/workspace/src/utils/lint.ts index 18b3dcbd965e9..34ea3aec1d421 100644 --- a/packages/workspace/src/utils/lint.ts +++ b/packages/workspace/src/utils/lint.ts @@ -1,6 +1,17 @@ import { join } from '@angular-devkit/core'; -import { Tree } from '@angular-devkit/schematics'; +import { + chain, + Rule, + Tree, + SchematicContext +} from '@angular-devkit/schematics'; +import { addDepsToPackageJson } from './ast-utils'; import { offsetFromRoot } from './common'; +import { + eslintVersion, + typescriptESLintVersion, + eslintConfigPrettierVersion +} from './versions'; export function generateProjectLint( projectRoot: string, @@ -21,6 +32,7 @@ export function generateProjectLint( builder: '@nrwl/linter:lint', options: { linter: 'eslint', + config: projectRoot + '/.eslintrc', tsConfig: [tsConfigPath], exclude: ['**/node_modules/**', '!' + projectRoot + '/**'] } @@ -34,8 +46,8 @@ export function addLintFiles( projectRoot: string, linter: 'tslint' | 'eslint' | 'none', onlyGlobal = false -) { - return (host: Tree) => { +): Rule { + return (host: Tree, context: SchematicContext) => { if (linter === 'tslint') { if (!host.exists('/tslint.json')) { host.create('/tslint.json', globalTsLint); @@ -49,11 +61,42 @@ export function addLintFiles( }) ); } - } else if (linter === 'eslint') { + return; + } + + if (linter === 'eslint') { if (!host.exists('/.eslintrc')) { - host.create('/.eslintrc', '{}'); + host.create('/.eslintrc', globalESLint); + addDepsToPackageJson( + {}, + { + '@typescript-eslint/parser': typescriptESLintVersion, + '@typescript-eslint/eslint-plugin': typescriptESLintVersion, + eslint: eslintVersion, + 'eslint-config-prettier': eslintConfigPrettierVersion + + /** + * REACT SPECIFIC PLUGINS USED IN CONFIG REACT SPECIFIC CONFIG BELOW + * + * NOTE: They will also need adding to the root package.json of this repo + * when the time comes + */ + // "eslint-plugin-import": "2.18.2", + // "eslint-plugin-jsx-a11y": "6.2.3", + // "eslint-plugin-react": "7.14.3", + // "eslint-plugin-react-hooks": "1.6.1", + } + )(host, context); + } + if (!onlyGlobal) { + host.create( + join(projectRoot as any, `.eslintrc`), + JSON.stringify({ + extends: `${offsetFromRoot(projectRoot)}.eslintrc`, + rules: {} + }) + ); } - } else { } }; } @@ -122,7 +165,360 @@ const globalTsLint = ` } `; -const globalEsLit = ` +const globalESLint = ` { + "root": true, + "parser": "@typescript-eslint/parser", + "parserOptions": { + "ecmaVersion": 2018, + "sourceType": "module", + "project": "./tsconfig.json" + }, + "plugins": ["@typescript-eslint"], + "extends": [ + "eslint:recommended", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended", + "prettier", + "prettier/@typescript-eslint" + ], + "rules": { + "@typescript-eslint/explicit-member-accessibility": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-parameter-properties": "off" + }, + "overrides": [ + { + "files": ["*.tsx"], + "rules": { + "@typescript-eslint/no-unused-vars": "off" + } + } + ] } `; + +/** + * CONFIG FOR REACT WORKSPACES + * + * ADAPTED FROM https://github.com/facebook/create-react-app/blob/567f36c9235f1e1fd4a76dc6d1ae00be754ca047/packages/eslint-config-react-app/index.js + */ +// { +// "parser": "@typescript-eslint/parser", +// "parserOptions": { +// "ecmaVersion": 2018, +// "sourceType": "module", +// "project": "./tsconfig.json" +// }, +// "env": { +// "browser": true, +// "commonjs": true, +// "es6": true, +// "jest": true, +// "node": true +// }, +// "settings": { +// "react": { +// "version": "detect" +// } +// }, +// "plugins": ["@typescript-eslint", "import", "jsx-a11y", "react", "react-hooks"], +// "extends": [ +// "eslint:recommended", +// "plugin:@typescript-eslint/eslint-recommended", +// "plugin:@typescript-eslint/recommended", +// "prettier", +// "prettier/@typescript-eslint" +// ], + +// /** +// * Inspired by configuration originally found in create-react-app +// * https://github.com/facebook/create-react-app +// */ +// "rules": { +// /** +// * Standard ESLint rule configurations +// * https://eslint.org/docs/rules +// */ +// "array-callback-return": "warn", +// "dot-location": ["warn", "property"], +// "eqeqeq": ["warn", "smart"], +// "new-parens": "warn", +// "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-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-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-useless-computed-key": "warn", +// "no-useless-concat": "warn", +// "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 rule configurations +// * https://github.com/benmosher/eslint-plugin-import +// */ +// "import/first": "error", +// "import/no-amd": "error", +// "import/no-webpack-loader-syntax": "error", + +// /** +// * React-specific rule configurations +// * https://github.com/yannickcr/eslint-plugin-react +// */ +// "react/forbid-foreign-prop-types": ["warn", { "allowInPropTypes": true }], +// "react/jsx-no-comment-textnodes": "warn", +// "react/jsx-no-duplicate-props": "warn", +// "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 Accessibility rule configurations +// * https://github.com/evcohen/eslint-plugin-jsx-a11y +// */ +// "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 rule configurations +// * https://github.com/facebook/react/tree/master/packages/eslint-plugin-react-hooks +// */ +// "react-hooks/rules-of-hooks": "error", + +// /** +// * TypeScript-specific rule configurations (in addition to @typescript-eslint:recommended) +// * https://github.com/typescript-eslint/typescript-eslint +// */ + +// // TypeScript"s `noFallthroughCasesInSwitch` option is more robust (#6906) +// "default-case": "off", +// // "tsc" already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/291) +// "no-dupe-class-members": "off", +// // "tsc" already handles this (https://github.com/typescript-eslint/typescript-eslint/issues/477) +// "no-undef": "off", + +// // Add TypeScript specific rules (and turn off ESLint equivalents) +// "@typescript-eslint/consistent-type-assertions": "warn", +// "no-array-constructor": "off", +// "@typescript-eslint/no-array-constructor": "warn", +// "@typescript-eslint/no-namespace": "error", +// "no-use-before-define": "off", +// "@typescript-eslint/no-use-before-define": [ +// "warn", +// { +// "functions": false, +// "classes": false, +// "variables": false, +// "typedefs": false, +// }, +// ], +// "no-unused-vars": "off", +// "@typescript-eslint/no-unused-vars": [ +// "warn", +// { +// "args": "none", +// "ignoreRestSiblings": true, +// }, +// ], +// "no-useless-constructor": "off", +// "@typescript-eslint/no-useless-constructor": "warn", +// "@typescript-eslint/explicit-member-accessibility": "off", +// "@typescript-eslint/explicit-function-return-type": "off" +// } +// } diff --git a/packages/workspace/src/utils/versions.ts b/packages/workspace/src/utils/versions.ts index da2a4a8f3c8ab..43c77e7cd441b 100644 --- a/packages/workspace/src/utils/versions.ts +++ b/packages/workspace/src/utils/versions.ts @@ -3,3 +3,6 @@ export const nxVersion = '*'; export const angularCliVersion = '8.1.1'; export const typescriptVersion = '~3.4.5'; export const prettierVersion = '1.16.4'; +export const typescriptESLintVersion = '2.0.0-alpha.4'; +export const eslintVersion = '6.1.0'; +export const eslintConfigPrettierVersion = '6.0.0'; diff --git a/yarn.lock b/yarn.lock index eec3479a95d34..05fc9b496e0a3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -130,6 +130,11 @@ "@angular-devkit/core" "8.1.2" rxjs "6.4.0" +"@angular-eslint/builder@0.0.1-alpha.16": + version "0.0.1-alpha.16" + resolved "https://registry.yarnpkg.com/@angular-eslint/builder/-/builder-0.0.1-alpha.16.tgz#c8af30ed1e778138139353627ec8d51543237e12" + integrity sha512-VwpFd2fcp7FCEmOtef9VkteFwyVpIzciNn0pvlWvHgwJWGyKyT5NVRpVvUAWBdHgja1jl67h0B9uDFMqWUBTjw== + "@angular/cli@8.1.1": version "8.1.1" resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-8.1.1.tgz#c63e525c74046457f07d35cb3ec66818c8c6d7b1" @@ -1548,6 +1553,11 @@ dependencies: "@types/node" "*" +"@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/estree@0.0.39": version "0.0.39" resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.39.tgz#e177e699ee1b8c22d23174caaa7422644389509f" @@ -1633,6 +1643,11 @@ dependencies: "@types/jest-diff" "*" +"@types/json-schema@^7.0.3": + version "7.0.3" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.3.tgz#bdfd69d61e464dcc81b25159c270d75a73c1a636" + integrity sha512-Il2DtDVRGDcqjDtE+rF8iqg1CArehSK84HZJCT7AMITlyXRBpuPhqGLDQMowraqqu1coEaimg4ZOqggt6L6L+A== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -1760,6 +1775,44 @@ resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-12.0.12.tgz#45dd1d0638e8c8f153e87d296907659296873916" integrity sha512-SOhuU4wNBxhhTHxYaiG5NY4HBhDIDnJF60GU+2LqHAdKKer86//e4yg69aENCtQ04n0ovz+tq2YPME5t5yp4pw== +"@typescript-eslint/eslint-plugin@2.0.0-alpha.4": + version "2.0.0-alpha.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-2.0.0-alpha.4.tgz#e4e6806fabaf7411c644482c69f78c0de9db222b" + integrity sha512-biYKwXQm1dE7SfR1BwIedIeJ/9MLDw1Sam7E8ax7w6TTWVcMr9TJFAS9v1miPFhUo6fJcQhGXbVIsblA10OV0A== + dependencies: + "@typescript-eslint/experimental-utils" "2.0.0-alpha.4" + eslint-utils "^1.4.0" + functional-red-black-tree "^1.0.1" + regexpp "^2.0.1" + tsutils "^3.14.0" + +"@typescript-eslint/experimental-utils@2.0.0-alpha.4": + version "2.0.0-alpha.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.0.0-alpha.4.tgz#09dda3afca271b149e162b841a231ec359528f5c" + integrity sha512-eBgBrSgtgI6HFAwKleHaMUuyiUIY0bKARlhQhmedv/CaOoBBmtgF5ObJpQmMH2AKJC3xgpbBrAZor7gi4UICYg== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "2.0.0-alpha.4" + eslint-scope "^4.0.0" + +"@typescript-eslint/parser@2.0.0-alpha.4": + version "2.0.0-alpha.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.0.0-alpha.4.tgz#3c6f4afe3cfe308c553b7800daad12a42f93a445" + integrity sha512-s2YsXBvhKSFCKiPWo4zxWZkAslYUVd0bC2t3qWdX081ztkPQOoD7Px9UhfTQmJb4uvh2n0vQSkg3cPHWYUn7iQ== + dependencies: + "@types/eslint-visitor-keys" "^1.0.0" + "@typescript-eslint/experimental-utils" "2.0.0-alpha.4" + "@typescript-eslint/typescript-estree" "2.0.0-alpha.4" + eslint-visitor-keys "^1.0.0" + +"@typescript-eslint/typescript-estree@2.0.0-alpha.4": + version "2.0.0-alpha.4" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.0.0-alpha.4.tgz#1c309baed5598d70db88e176e90cf85492484d21" + integrity sha512-46jvSuHtKwsaRmj+J+gED0MmiKsCjG7si5DLii6EQGxZM6vKmwiYtzVgJUKpPZwoNO29pAS7KxP/nEXgRqg4Eg== + dependencies: + lodash.unescape "4.0.1" + semver "^6.2.0" + "@webassemblyjs/ast@1.8.5": version "1.8.5" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.8.5.tgz#51b1c5fe6576a34953bf4b253df9f0d490d9e359" @@ -1960,6 +2013,11 @@ acorn-globals@^4.1.0, acorn-globals@^4.3.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.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" @@ -1970,7 +2028,7 @@ acorn@^5.5.3: resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279" integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw== -acorn@^6.0.1, acorn@^6.0.4, acorn@^6.0.5, acorn@^6.2.0: +acorn@^6.0.1, acorn@^6.0.4, acorn@^6.0.5, acorn@^6.0.7, acorn@^6.2.0: version "6.2.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.2.1.tgz#3ed8422d6dec09e6121cc7a843ca86a330a86b51" integrity sha512-JD0xT5FCRDNyjDda3Lrg/IxFscp9q4tiYtxE1/nOzlKCk7hIRuYjhq1kCNkbPjMRMZuFq20HNQn1I9k8Oj0E+Q== @@ -2036,7 +2094,7 @@ ajv@^5.0.0: fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.3.0" -ajv@^6.1.0, ajv@^6.5.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.5.5: version "6.10.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.10.2.tgz#d3cea04d6b017b2894ad69040fec8b623eb4bd52" integrity sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw== @@ -4820,7 +4878,7 @@ dateformat@^3.0.0: resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@*, debug@^4.1.0, debug@^4.1.1: +debug@*, 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== @@ -5178,6 +5236,13 @@ dns-txt@^2.0.2: dependencies: buffer-indexof "^1.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" + document-register-element@^1.13.1: version "1.13.3" resolved "https://registry.yarnpkg.com/document-register-element/-/document-register-element-1.13.3.tgz#81e44360a2e01ad0a56cf94bd1a7627e5cc2013e" @@ -5523,6 +5588,13 @@ escodegen@^1.11.0, escodegen@^1.9.1: optionalDependencies: source-map "~0.6.1" +eslint-config-prettier@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.0.0.tgz#f429a53bde9fc7660e6353910fd996d6284d3c25" + integrity sha512-vDrcCFE3+2ixNT5H83g28bO/uYAwibJxerXPj+E7op4qzBCsAV36QfvdAyVOoNxKAH2Os/e01T/2x++V0LPukA== + dependencies: + get-stdin "^6.0.0" + eslint-scope@^4.0.0: version "4.0.3" resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-4.0.3.tgz#ca03833310f6889a3264781aa82e63eb9cfe7848" @@ -5531,6 +5603,78 @@ eslint-scope@^4.0.0: esrecurse "^4.1.0" estraverse "^4.1.1" +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" + +eslint-utils@^1.3.1, eslint-utils@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.0.tgz#e2c3c8dba768425f897cf0f9e51fe2e241485d4c" + integrity sha512-7ehnzPaP5IIEh1r1tkjuIrxqhNkzUJa9z3R92tLJdZIVdWaczEhr3EbhGtsMrVxi1KeR8qA7Off6SWc5WNQqyQ== + dependencies: + eslint-visitor-keys "^1.0.0" + +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@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" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.3.1" + eslint-visitor-keys "^1.0.0" + 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-parent "^5.0.0" + globals "^11.7.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + 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.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 "^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" + 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" + 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" @@ -5541,6 +5685,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" @@ -5548,7 +5699,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= @@ -5979,6 +6130,13 @@ figures@^2.0.0: 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" + file-loader@4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-4.0.0.tgz#c3570783fefb6e1bc0978a856f4bf5825b966c2a" @@ -6121,6 +6279,15 @@ findup-sync@^3.0.0: micromatch "^3.0.4" resolve-dir "^1.0.1" +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.1" resolved "https://registry.yarnpkg.com/flatted/-/flatted-2.0.1.tgz#69e57caa8f0eacbc281d2e2cb458d46fdb449e08" @@ -6299,6 +6466,11 @@ function-bind@^1.0.2, 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" @@ -6344,6 +6516,11 @@ get-stdin@^4.0.1: resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= +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" @@ -6519,7 +6696,7 @@ global-prefix@^1.0.1: is-windows "^1.0.1" which "^1.2.14" -globals@^11.1.0: +globals@^11.1.0, 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== @@ -7109,6 +7286,11 @@ ignore@^3.3.5, 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== + ignore@^5.0.4, ignore@^5.1.1: version "5.1.2" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.2.tgz#e28e584d43ad7e92f96995019cc43b9e1ac49558" @@ -7255,7 +7437,7 @@ inquirer@6.4.1: strip-ansi "^5.1.0" through "^2.3.6" -inquirer@6.5.0: +inquirer@6.5.0, 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== @@ -8463,6 +8645,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, 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" @@ -8722,7 +8909,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= @@ -8924,6 +9111,11 @@ lodash.templatesettings@^4.0.0: dependencies: lodash._reinterpolate "^3.0.0" +lodash.unescape@4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/lodash.unescape/-/lodash.unescape-4.0.1.tgz#bf2249886ce514cda112fae9218cdc065211fc9c" + integrity sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw= + lodash@4.17.11: version "4.17.11" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" @@ -10088,7 +10280,7 @@ optional@0.1.4: resolved "https://registry.yarnpkg.com/optional/-/optional-0.1.4.tgz#cdb1a9bedc737d2025f690ceeb50e049444fd5b3" integrity sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw== -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= @@ -10798,6 +10990,11 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= +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" @@ -11351,6 +11548,11 @@ regexp-tree@^0.1.6: resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.11.tgz#c9c7f00fcf722e0a56c7390983a7a63dd6c272f3" integrity sha512-7/l/DgapVVDzZobwMCCgMlqiqyLFJ0cduo/j+3BcDJIB+yJdsYCfKuI3l/04NV+H/rfNRdPIDbXNZHM9XvQatg== +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@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b" @@ -11692,7 +11894,7 @@ right-pad@^1.0.1: resolved "https://registry.yarnpkg.com/right-pad/-/right-pad-1.0.1.tgz#8ca08c2cbb5b55e74dafa96bf7fd1a27d568c8d0" integrity sha1-jKCMLLtbVedNr6lr9/0aJ9VoyNA= -rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: +rimraf@2.6.3, rimraf@^2.2.8, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2, rimraf@^2.6.3: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== @@ -11977,7 +12179,7 @@ semver@6.2.0, semver@^6.0.0, semver@^6.1.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db" integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== -semver@^6.2.0: +semver@^6.1.2, semver@^6.2.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -12194,6 +12396,15 @@ slice-ansi@0.0.4: resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" integrity sha1-7b+JA/ZvfOL46v1s7tZeJkyDGzU= +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" + smart-buffer@4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.2.tgz#5207858c3815cc69110703c6b94e46c15634395d" @@ -12684,7 +12895,7 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" -strip-ansi@^5.0.0, strip-ansi@^5.1.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== @@ -12730,7 +12941,7 @@ strip-json-comments@2.0.1, strip-json-comments@~2.0.1: resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= -strip-json-comments@3.0.1: +strip-json-comments@3.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== @@ -12827,6 +13038,16 @@ symbol-tree@^3.2.2: resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== +table@^5.2.3: + version "5.4.4" + resolved "https://registry.yarnpkg.com/table/-/table-5.4.4.tgz#6e0f88fdae3692793d1077fd172a4667afe986a6" + integrity sha512-IIfEAUx5QlODLblLrGTTLJA7Tk0iLSGBvgY8essPRVNGHAzThujww1YqHLs6h3HfTg55h++RzLHH5Xw/rfv+mg== + dependencies: + ajv "^6.10.2" + lodash "^4.17.14" + slice-ansi "^2.1.0" + string-width "^3.0.0" + tapable@^1.0.0, tapable@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -12910,6 +13131,11 @@ text-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-2.0.0.tgz#43eabd1b495482fae4a2bf65e5f56c29f69220f6" integrity sha512-F91ZqLgvi1E0PdvmxMgp+gcf6q8fMH7mhdwWfzXnl1k+GbpQDmi8l7DzLC5JTASKbwpY3TfxajAUzAXcv2NmsQ== +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" @@ -13232,6 +13458,13 @@ tsutils@^2.27.2: dependencies: tslib "^1.8.1" +tsutils@^3.14.0: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.14.1.tgz#f1d2b93d2a0876481f2f1f98c25ba42bbd7ee860" + integrity sha512-kiuZzD1uUA5DxGj/uxbde+ymp6VVdAxdzOIlAFbYKrPyla8/uiJ9JLBm1QsPhOm4Muj0/+cWEDP99yoCUcSl6Q== + dependencies: + tslib "^1.8.1" + tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" @@ -13576,6 +13809,11 @@ uuid@^2.0.1: resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho= +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" @@ -14045,6 +14283,13 @@ write-file-atomic@^2.0.0: 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"