diff --git a/.eslintignore b/.eslintignore index 7afc022878ec..b8051d24687b 100644 --- a/.eslintignore +++ b/.eslintignore @@ -3,3 +3,4 @@ dist/ coverage/ api-docs/ /sandbox +**/*.d.ts diff --git a/.gitignore b/.gitignore index ab1492530c26..ff5c782b407f 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,7 @@ packages/tsdocs/fixtures/monorepo/docs /sandbox/* !/sandbox/README.md !/sandbox/example/ + +# ESLint cache +.eslintcache + diff --git a/.travis.yml b/.travis.yml index 8ee4c16121a3..cb2849380772 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ matrix: env: TASK=code-lint # Running Code Linter -- Requires @loopback/build so it's bootstrapped script: - - lerna bootstrap --scope @loopback/build --scope @loopback/tslint-config --scope @loopback/eslint-config + - lerna bootstrap --scope @loopback/build --scope @loopback/eslint-config - npm run lint - node_js: "8" os: linux diff --git a/.vscode/settings.json b/.vscode/settings.json index cbfd84958981..fdd336aa9754 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -26,7 +26,15 @@ }, "files.insertFinalNewline": true, "files.trimTrailingWhitespace": true, - "tslint.ignoreDefinitionFiles": true, - "tslint.nodePath": "./packages/build/node_modules", - "typescript.tsdk": "./packages/build/node_modules/typescript/lib" + "typescript.tsdk": "./packages/build/node_modules/typescript/lib", + "eslint.autoFixOnSave": true, + "eslint.run": "onSave", + "eslint.nodePath": "./packages/build/node_modules", + "eslint.validate": [ + "javascript", + { + "language": "typescript", + "autoFix": true + } + ] } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 92a5e189e9a4..aab004b9fc64 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -34,7 +34,7 @@ "args": [ "test" ], - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] }, { "label": "Lint all packages", @@ -47,10 +47,11 @@ "lint" ], "problemMatcher": [ - "$tslint5", + "$eslint-stylish", + "$eslint-compact", { // compilation errors - relative paths - "owner": "tslint", + "owner": "eslint", "fileLocation": [ "relative", "${workspaceRoot}" @@ -66,7 +67,7 @@ }, { // compilation errors - absolute paths - "owner": "tslint", + "owner": "eslint", "fileLocation": "absolute", "severity": "error", "pattern": { diff --git a/benchmark/src/__tests__/benchmark.integration.ts b/benchmark/src/__tests__/benchmark.integration.ts index d6d919077f74..46223b999d3d 100644 --- a/benchmark/src/__tests__/benchmark.integration.ts +++ b/benchmark/src/__tests__/benchmark.integration.ts @@ -17,7 +17,7 @@ const DUMMY_STATS: EndpointStats = { describe('Benchmark (SLOW)', function() { // Unfortunately, the todo app requires one second to start - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(5000); it('works', async () => { const bench = new Benchmark(); @@ -37,7 +37,7 @@ describe('Benchmark (SLOW)', function() { async execute( title: string, urlPath: string, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any options?: any, ): Promise { if (!options) options = {}; diff --git a/benchmark/src/rest-routing/routing-table.ts b/benchmark/src/rest-routing/routing-table.ts index 9e365e1bf4de..8e032215f29d 100644 --- a/benchmark/src/rest-routing/routing-table.ts +++ b/benchmark/src/rest-routing/routing-table.ts @@ -90,7 +90,7 @@ function givenRouter(router: RestRouter, spec: OpenApiSpec, count: number) { // Make it not found group = 'groupX'; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const request: any = { method: 'get', path: `/my/hello/${group}/version_${i}`, diff --git a/bin/build-docs-site.sh b/bin/build-docs-site.sh index 016932b5680d..2c26993f1703 100755 --- a/bin/build-docs-site.sh +++ b/bin/build-docs-site.sh @@ -22,7 +22,7 @@ REPO_ROOT=$DIR/.. pushd $REPO_ROOT >/dev/null # Update apidocs -lerna bootstrap --scope @loopback/tsdocs +lerna bootstrap lerna run --scope @loopback/docs prepack # Clean up sandbox/loopback.io directory @@ -31,8 +31,8 @@ rm -rf sandbox/loopback.io/ # Shadow clone the `strongloop/loopback.io` github repo git clone --depth 1 https://github.com/strongloop/loopback.io.git sandbox/loopback.io -# Bootstrap the `loopback.io` package -lerna bootstrap --scope loopback.io-workflow-scripts --scope @loopback/docs +# Add loopback.io-workflow-scripts with @loopback/docs linked +lerna bootstrap --scope @loopback/docs --scope loopback.io-workflow-scripts pushd $REPO_ROOT/sandbox/loopback.io/ >/dev/null diff --git a/bin/run-lerna.js b/bin/run-lerna.js index 310f85cd901d..91bfa11b0890 100755 --- a/bin/run-lerna.js +++ b/bin/run-lerna.js @@ -19,7 +19,7 @@ async function run(argv, options) { const rootPath = project.rootPath; process.env.LERNA_ROOT_PATH = rootPath; - let args = argv.slice(2); + const args = argv.slice(2); return build.runCLI('lerna/cli', args, options); } diff --git a/bin/sync-dev-deps.js b/bin/sync-dev-deps.js index 33446a89c746..5627632f6ef5 100755 --- a/bin/sync-dev-deps.js +++ b/bin/sync-dev-deps.js @@ -25,13 +25,27 @@ async function syncDevDeps() { const buildDeps = require(path.join(rootPath, 'packages/build/package.json')) .dependencies; - const masterDeps = { - typescript: buildDeps.typescript, - tslint: buildDeps.tslint, - }; + const deps = [ + 'typescript', + 'eslint', + '@typescript-eslint/eslint-plugin', + '@typescript-eslint/parser', + 'eslint-plugin-eslint-plugin', + ]; + const masterDeps = {}; + for (const d of deps) { + if (buildDeps[d] == null) { + console.error( + 'Dependency %s is missing in packages/build/package.json', + d, + ); + } + masterDeps[d] = buildDeps[d]; + } - // Update typescript & tslint dependencies in individual packages + // Update typescript & eslint dependencies in individual packages for (const pkg of packages) { + if (pkg.name === '@loopback/build') continue; const pkgFile = pkg.manifestLocation; updatePackageJson(pkgFile, masterDeps); } @@ -48,9 +62,20 @@ async function syncDevDeps() { */ function updatePackageJson(pkgFile, masterDeps) { const data = readJsonFile(pkgFile); + const isExample = data.name.startsWith('@loopback/example-'); + const isRoot = data.name === 'loopback-next'; + let modified = false; + if (isExample && data.devDependencies && data.devDependencies.tslint) { + delete data.devDependencies.tslint; + modified = true; + } for (const dep in masterDeps) { - if (data.devDependencies && dep in data.devDependencies) { + if ( + data.devDependencies && + // Force update for examples and loopback-next + (isExample || isRoot || dep in data.devDependencies) + ) { modified = modified || data.devDependencies[dep] !== masterDeps[dep]; data.devDependencies[dep] = masterDeps[dep]; } diff --git a/docs/site/Application-generator.md b/docs/site/Application-generator.md index 629accc0c5e0..641b00ebebb3 100644 --- a/docs/site/Application-generator.md +++ b/docs/site/Application-generator.md @@ -22,7 +22,7 @@ lb4 [app] [options] [] `--outDir` : Project root directory for the application. -`--tslint` : Add TSLint to LoopBack4 application project. +`--eslint` : Add ESLint to LoopBack4 application project. `--prettier` : Add Prettier to LoopBack4 application project. @@ -65,7 +65,7 @@ The tool will prompt you for: help format, test, and build a LoopBack4 application. Defaults to `true` for all of the modules. The prompted modules are: - - [`tslint`](https://www.npmjs.com/package/tslint) + - [`eslint`](https://www.npmjs.com/package/eslint) - [`prettier`](https://www.npmjs.com/package/prettier) - [`mocha`](https://www.npmjs.com/package/mocha) - [`@loopback/build`](https://www.npmjs.com/package/@loopback/build) diff --git a/docs/site/DEVELOPING.md b/docs/site/DEVELOPING.md index 13bcb4dfdaca..5099cff5828e 100644 --- a/docs/site/DEVELOPING.md +++ b/docs/site/DEVELOPING.md @@ -23,7 +23,7 @@ See [Monorepo overview](./MONOREPO.md) for a list of all packages. - [Making breaking changes](#making-breaking-changes) - [Releasing new versions](#releasing-new-versions) - [Adding a new package](#adding-a-new-package) -- [Upgrading TypeScript/tslint](#upgrading-typescripttslint) +- [Upgrading TypeScript/eslint](#upgrading-typescripteslint) - [How to test infrastructure changes](#how-to-test-infrastructure-changes) ## Setting up development environment @@ -91,7 +91,7 @@ It does all you need: - Compile TypeScript - Run all tests - Check code formatting using [Prettier](https://prettier.io/) -- Lint the code using [TSLint](https://palantir.github.io/tslint/) +- Lint the code using [ESLint](https://typescript-eslint.io/) ## Coding rules @@ -107,8 +107,8 @@ It does all you need: We use two tools to keep our codebase healthy: -- [TSLint](https://palantir.github.io/tslint/) to statically analyse our source - code and detect common problems. +- [ESLint](https://typescript-eslint.io/) to statically analyse our source code + and detect common problems. - [Prettier](https://prettier.io/) to keep our code always formatted the same way, avoid style discussions in code reviews, and save everybody's time an energy. @@ -427,7 +427,7 @@ The `release` script will automatically perform the tasks for all packages: - Install/link dependencies - Transpile TypeScript files into JavaScript - Run mocha tests -- Check lint (tslint and prettier) issues +- Check lint (eslint and prettier) issues If all steps are successful, it prompts you to publish packages into npm repository. @@ -501,19 +501,19 @@ Please register the new package in the following files: [@raymondfeng](https://github.com/raymondfeng) to enlist the new package on . -## Upgrading TypeScript/tslint +## Upgrading TypeScript/eslint -In order to support tslint extensions with a peer dependency on tslint, we have -to specify `typescript` and `tslint` dependency in multiple places in our +In order to support eslint extensions with a peer dependency on eslint, we have +to specify `typescript` and `eslint` dependency in multiple places in our monorepo. -Steps to upgrade `typescript` or `tslint` to a newer version: +Steps to upgrade `typescript` or `eslint` to a newer version: 1. Update the dependencies in `@loopback/build`, this is the source of truth for the rest of the monorepo. ```shell - $ (cd packages/build && npm update typescript tslint) + $ (cd packages/build && npm update typescript eslint) ``` 2. Propagate the change to other places to keep everything consistent. @@ -524,7 +524,7 @@ Steps to upgrade `typescript` or `tslint` to a newer version: ## How to test infrastructure changes -When making changes to project infrastructure, e.g. modifying `tsc` or `tslint` +When making changes to project infrastructure, e.g. modifying `tsc` or `eslint` configuration, it's important to verify that all usage scenarios keep working. ### Verify TypeScript setup @@ -545,7 +545,7 @@ configuration, it's important to verify that all usage scenarios keep working. 5. Test integration with supported IDEs: - [VS Code](./VSCODE.md#how-to-verify-typescript-setup) -### Verify TSLint setup +### Verify ESLint setup 1. Open any existing TypeScript file, e.g. `packages/src/index.ts` @@ -568,7 +568,7 @@ configuration, it's important to verify that all usage scenarios keep working. 5. Test integration with supported IDEs: - - [VS Code](./VSCODE.md#how-to-verify-tslint-setup) + - [VS Code](./VSCODE.md#how-to-verify-eslint-setup) ### tsconfig files diff --git a/docs/site/Extension-generator.md b/docs/site/Extension-generator.md index 7e7c83132b14..25a1d5c50a84 100644 --- a/docs/site/Extension-generator.md +++ b/docs/site/Extension-generator.md @@ -20,7 +20,7 @@ lb4 extension [options] [] `--outDir` : Project root directory for the extension. -`--tslint` : Add TSLint to LoopBack4 extension project. +`--eslint` : Add ESLint to LoopBack4 extension project. `--prettier` : Add Prettier to LoopBack4 extension project. @@ -56,7 +56,7 @@ The tool will prompt you for: help format, test, and build a LoopBack4 extension. Defaults to `true` for all of the modules. The prompted modules are: - - [`tslint`](https://www.npmjs.com/package/tslint) + - [`eslint`](https://www.npmjs.com/package/eslint) - [`prettier`](https://www.npmjs.com/package/prettier) - [`mocha`](https://www.npmjs.com/package/mocha) - [`@loopback/build`](https://www.npmjs.com/package/@loopback/build) diff --git a/docs/site/Getting-started.md b/docs/site/Getting-started.md index f22537b03b2e..71553dcd4664 100644 --- a/docs/site/Getting-started.md +++ b/docs/site/Getting-started.md @@ -42,10 +42,10 @@ Answer the prompts as follows: ? Project root directory: (getting-started) ? Application class name: StarterApplication ? Select features to enable in the project: -❯◉ Enable tslint: add a linter with pre-configured lint rules +❯◉ Enable eslint: add a linter with pre-configured lint rules ◉ Enable prettier: install prettier to format code conforming to rules ◉ Enable mocha: install mocha to run tests - ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-tslint) + ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-eslint) ◉ Enable vscode: add VSCode config files ◉ Enable docker: include Dockerfile and .dockerignore ◉ Enable repositories: include repository imports and RepositoryMixin diff --git a/docs/site/OpenAPI-generator.md b/docs/site/OpenAPI-generator.md index 354463e5f201..1afdedcf97f1 100644 --- a/docs/site/OpenAPI-generator.md +++ b/docs/site/OpenAPI-generator.md @@ -232,7 +232,7 @@ additional model files are generated: {% include code-caption.html content="src/models/perform-search-body.model.ts" %} ```ts -/* tslint:disable:no-any */ +/* eslint-disable @typescript-eslint/no-explicit-any */ import {model, property} from '@loopback/repository'; /** diff --git a/docs/site/Parsing-requests.md b/docs/site/Parsing-requests.md index 7c1258341402..d3e824ee3210 100644 --- a/docs/site/Parsing-requests.md +++ b/docs/site/Parsing-requests.md @@ -330,7 +330,7 @@ class FileUploadController { else { resolve({ files: request.files, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any fields: (request as any).fields, }); } diff --git a/docs/site/Testing-your-application.md b/docs/site/Testing-your-application.md index 0d301881de72..d835cca269b0 100644 --- a/docs/site/Testing-your-application.md +++ b/docs/site/Testing-your-application.md @@ -859,7 +859,7 @@ const Dredd = require('dredd'); describe('API (acceptance)', () => { let app: HelloWorldApplication; - // tslint:disable no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ let dredd: any; before(initEnvironment); after(async () => { diff --git a/docs/site/VSCODE.md b/docs/site/VSCODE.md index 8b3d3d6026e1..b76edd450dfa 100644 --- a/docs/site/VSCODE.md +++ b/docs/site/VSCODE.md @@ -6,8 +6,8 @@ extensions installed: - [Prettier - Code Formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) for automatic formatting of source files on save. -- [TSLint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint) to - highlight and auto-fix linting problems directly in the editor. +- [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + to highlight and auto-fix linting problems directly in the editor. Our monorepo comes with few preconfigured [VSCode Tasks](https://code.visualstudio.com/docs/editor/tasks): @@ -38,10 +38,10 @@ Our monorepo comes with few preconfigured 4. Check VS Code's [PROBLEMS Window](https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_errors-and-warnings). - There should be an entry showing the same tslint error. When you click on + There should be an entry showing the same eslint error. When you click on the entry, it should jump on the problematic line. -5. Close the editor tab. (This will clear the PROBLEMS entry reported by TSLint +5. Close the editor tab. (This will clear the PROBLEMS entry reported by ESLint extension). 6. Run the test task ("Tasks: Run test task"). This will invoke package scripts @@ -67,15 +67,15 @@ using the renamed entity. Two different scenarios to verify: rename at the place where the entity is defined, rename at the place where the entity is used. (You can e.g. rename `inject` to test.) -## How to verify TSLint setup +## How to verify ESLint setup 1. Open any existing TypeScript file, e.g. `packages/src/index.ts` -2. Verify that TSLint extension is not reporting any warnings in the output +2. Verify that ESLint extension is not reporting any warnings in the output window: - pres _Cmd+shift+P_ or _Ctrl+shift+P_ to open task selector - - find and run the task `TSLint: Show Output` + - find and run the task `ESLint: Show Output` - check the logs An example of a warning we want to **avoid**: @@ -97,21 +97,21 @@ can e.g. rename `inject` to test.) e.g. ```text - [tslint] Type declaration of 'any' loses type-safety. Consider replacing it with a more precise type. (no-any) + [eslint] Type declaration of 'any' loses type-safety. Consider replacing it with a more precise type. (no-any) ``` 5. Check VS Code's [PROBLEMS Window](https://code.visualstudio.com/docs/getstarted/tips-and-tricks#_errors-and-warnings). - There should be an entry showing the same tslint error. When you click on + There should be an entry showing the same eslint error. When you click on the entry, it should jump on the problematic line. -6. Close the editor tab. (This will clear the PROBLEMS entry reported by TSLint +6. Close the editor tab. (This will clear the PROBLEMS entry reported by ESLint extension). 7. Run the test task ("Tasks: Run test task"). This will invoke package scripts like `npm test` under the hood. -8. Open "Tasks" OUTPUT window and verify that two tslint problems were +8. Open "Tasks" OUTPUT window and verify that two eslint problems were reported: ```text diff --git a/docs/site/deployment/Deploying_to_ibm_cloud_kubernetes.md b/docs/site/deployment/Deploying_to_ibm_cloud_kubernetes.md index b2ab6b6ba91f..b67ade74eaa9 100644 --- a/docs/site/deployment/Deploying_to_ibm_cloud_kubernetes.md +++ b/docs/site/deployment/Deploying_to_ibm_cloud_kubernetes.md @@ -45,10 +45,10 @@ $ lb4 app ? Project root directory: lb4-simple-web-app ? Application class name: Lb4SimpleWebAppApplication ? Select features to enable in the project (Press to select, to toggle all, to invert selection) - ◉ Enable tslint: add a linter with pre-configured lint rules + ◉ Enable eslint: add a linter with pre-configured lint rules ◉ Enable prettier: install prettier to format code conforming to rules ◉ Enable mocha: install mocha to run tests - ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-tslint) + ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-eslint) ◉ Enable vscode: add VSCode config files ◉ Enable docker: include Dockerfile and .dockerignore ◉ Enable repositories: include repository imports and RepositoryMixin diff --git a/docs/site/express-with-lb4-rest-tutorial.md b/docs/site/express-with-lb4-rest-tutorial.md index dbd7041ee6f3..99094b05c174 100644 --- a/docs/site/express-with-lb4-rest-tutorial.md +++ b/docs/site/express-with-lb4-rest-tutorial.md @@ -64,10 +64,10 @@ $ lb4 app ? Project description: An application for recording notes. ? Project root directory: (note) ? Application class name: (NoteApplication) - ◉ Enable tslint: add a linter with pre-configured lint rules + ◉ Enable eslint: add a linter with pre-configured lint rules ◉ Enable prettier: install prettier to format code conforming to rules ◉ Enable mocha: install mocha to run tests - ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-tslint) + ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-eslint) ◉ Enable vscode: add VSCode config files ❯◯ Enable docker: include Dockerfile and .dockerignore ◉ Enable repositories: include repository imports and RepositoryMixin diff --git a/docs/site/tutorials/soap-calculator/soap-calculator-tutorial-scaffolding.md b/docs/site/tutorials/soap-calculator/soap-calculator-tutorial-scaffolding.md index e409e5ffd42a..c2aedc79e119 100644 --- a/docs/site/tutorials/soap-calculator/soap-calculator-tutorial-scaffolding.md +++ b/docs/site/tutorials/soap-calculator/soap-calculator-tutorial-scaffolding.md @@ -44,10 +44,10 @@ Enable all options besides `docker`, unless you know what you are doing, see ```sh ? Select features to enable in the project: - ◉ Enable tslint: add a linter with pre-configured lint rules + ◉ Enable eslint: add a linter with pre-configured lint rules ◉ Enable prettier: install prettier to format code conforming to rules ◉ Enable mocha: install mocha to run tests - ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-tslint) + ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-eslint) ◉ Enable vscode: add VSCode config files ❯◯ Enable docker: include Dockerfile and .dockerignore ◉ Enable repositories: include repository imports and RepositoryMixin diff --git a/docs/site/tutorials/todo/todo-tutorial-scaffolding.md b/docs/site/tutorials/todo/todo-tutorial-scaffolding.md index b1bfd1eefa75..929209fe33fc 100644 --- a/docs/site/tutorials/todo/todo-tutorial-scaffolding.md +++ b/docs/site/tutorials/todo/todo-tutorial-scaffolding.md @@ -23,10 +23,10 @@ $ lb4 app ? Project root directory: (todo-list) ? Application class name: (TodoListApplication) ? Select features to enable in the project: - ◉ Enable tslint: add a linter with pre-configured lint rules + ◉ Enable eslint: add a linter with pre-configured lint rules ◉ Enable prettier: install prettier to format code conforming to rules ◉ Enable mocha: install mocha to run tests - ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-tslint) + ◉ Enable loopbackBuild: use @loopback/build helpers (e.g. lb-eslint) ◉ Enable vscode: add VSCode config files ❯◯ Enable docker: include Dockerfile and .dockerignore ◉ Enable repositories: include repository imports and RepositoryMixin @@ -36,7 +36,7 @@ $ lb4 app ``` For this tutorial, when prompted with the options for enabling certain project -features (LoopBack's build, tslint, mocha, etc.), leave them all enabled except +features (LoopBack's build, eslint, mocha, etc.), leave them all enabled except for `docker`. ### Structure @@ -76,8 +76,8 @@ index.js index.ts package.json tsconfig.json -tslint.build.json -tslint.json +eslint.build.json +eslint.json .mocharc.json ``` @@ -87,8 +87,8 @@ tslint.json | `index.js` | Top-level file connecting components of the application. | | `package.json` | Your application's package manifest. See [package.json](https://docs.npmjs.com/files/package.json) for details. | | `tsconfig.json` | The TypeScript project configuration. See [tsconfig.json](http://www.typescriptlang.org/docs/handbook/tsconfig-json.html) for details. | -| `tslint.json` | [TSLint configuration](https://palantir.github.io/tslint/usage/tslint-json/) | -| `tslint.build.json` | [TSLint configuration (build only)](https://palantir.github.io/tslint/usage/tslint-json/) | +| `eslint.json` | [ESLint configuration](https://palantir.github.io/eslint/usage/eslint-json/) | +| `eslint.build.json` | [ESLint configuration (build only)](https://palantir.github.io/eslint/usage/eslint-json/) | | `README.md` | The Markdown-based README generated for your application. | | `LICENSE` | A copy of the MIT license. If you do not wish to use this license, please delete this file. | | `src/application.ts` | The application class, which extends [`RestApplication`](http://apidocs.strongloop.com/@loopback%2fdocs/rest.html#RestApplication) by default. This is the root of your application, and is where your application will be configured. It also extends [`RepositoryMixin`](https://apidocs.strongloop.com/@loopback%2fdocs/repository.html#RepositoryMixin) which defines the datasource. | diff --git a/examples/context/package-lock.json b/examples/context/package-lock.json index 809369ea18f6..85b02a8f8330 100644 --- a/examples/context/package-lock.json +++ b/examples/context/package-lock.json @@ -30,6 +30,88 @@ "integrity": "sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "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": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + } + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "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-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -48,6 +130,12 @@ "sprintf-js": "~1.0.2" } }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -64,10 +152,10 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "chalk": { @@ -81,6 +169,27 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -96,22 +205,53 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "escape-string-regexp": { @@ -120,24 +260,209 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + }, + "dependencies": { + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + } + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -152,12 +477,49 @@ "path-is-absolute": "^1.0.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -174,6 +536,62 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -190,6 +608,46 @@ "esprima": "^4.0.0" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -214,6 +672,30 @@ "minimist": "0.0.8" } }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -223,39 +705,210 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-promise": "^2.1.0" } }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -265,40 +918,89 @@ "has-flag": "^3.0.0" } }, + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tslib": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", + "tsutils": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.12.0.tgz", + "integrity": "sha512-64KxDOb3+5ZVbz6NDZlCtOHstLk9+W96Y7d5Z/s5ge92gLaunxDeXYahvB7Rhl1dbaa3ifyq/W53o4mshIV1Tw==", "dev": true, "requires": { - "@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.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" + "tslib": "^1.8.1" } }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "tslib": "^1.8.1" + "prelude-ls": "~1.1.2" } }, "typescript": { @@ -307,11 +1009,44 @@ "integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==", "dev": true }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } } } } diff --git a/examples/context/package.json b/examples/context/package.json index 3ef596dbc3ff..96e8df17114c 100644 --- a/examples/context/package.json +++ b/examples/context/package.json @@ -44,8 +44,11 @@ "@loopback/testlab": "^1.3.0", "@loopback/tslint-config": "^2.0.4", "@types/node": "^10.11.2", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" }, "keywords": [ "loopback", diff --git a/examples/context/src/dependency-injection.ts b/examples/context/src/dependency-injection.ts index 136b8d8f24b4..eda2aa936ded 100644 --- a/examples/context/src/dependency-injection.ts +++ b/examples/context/src/dependency-injection.ts @@ -109,7 +109,7 @@ export async function main() { .tag('greeter'); // Get an instance of the greeting service - let greetingService = await ctx.get(GREETING_SERVICE); + const greetingService = await ctx.get(GREETING_SERVICE); // Invoke `greet` as a method let greeting = await greetingService.greet('en', 'Jane'); diff --git a/examples/express-composition/.vscode/tasks.json b/examples/express-composition/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/express-composition/.vscode/tasks.json +++ b/examples/express-composition/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/express-composition/package-lock.json b/examples/express-composition/package-lock.json index 24fdeb7fe634..f8406ed56190 100644 --- a/examples/express-composition/package-lock.json +++ b/examples/express-composition/package-lock.json @@ -92,6 +92,71 @@ "@types/mime": "*" } }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -101,6 +166,42 @@ "negotiator": "0.6.2" } }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "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-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -124,6 +225,12 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -157,17 +264,17 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -179,6 +286,27 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -194,12 +322,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -229,6 +351,19 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -237,6 +372,12 @@ "ms": "2.0.0" } }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -247,17 +388,26 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -274,12 +424,136 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -328,6 +602,53 @@ "vary": "~1.1.2" } }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -342,6 +663,23 @@ "unpipe": "~1.0.0" } }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -358,6 +696,12 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -372,6 +716,12 @@ "path-is-absolute": "^1.0.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -398,6 +748,28 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -413,11 +785,67 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "ipaddr.js": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -434,6 +862,40 @@ "esprima": "^4.0.0" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -467,6 +929,12 @@ "mime-db": "1.40.0" } }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -496,11 +964,29 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -518,6 +1004,35 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, "p-event": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.1.0.tgz", @@ -539,6 +1054,15 @@ "p-finally": "^1.0.0" } }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -550,10 +1074,16 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, "path-to-regexp": { @@ -561,6 +1091,18 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "proxy-addr": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", @@ -570,6 +1112,12 @@ "ipaddr.js": "1.9.0" } }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -591,13 +1139,59 @@ "unpipe": "1.0.0" } }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", "dev": true, "requires": { - "path-parse": "^1.0.6" + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -659,6 +1253,38 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -670,6 +1296,31 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -679,6 +1330,67 @@ "has-flag": "^3.0.0" } }, + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", @@ -690,34 +1402,13 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", - "dev": true, - "requires": { - "@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.1", - "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": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "tslib": "^1.8.1" + "prelude-ls": "~1.1.2" } }, "type-is": { @@ -740,6 +1431,15 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -750,11 +1450,35 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } } } } diff --git a/examples/express-composition/package.json b/examples/express-composition/package.json index f2b050ea1345..e07140a63d87 100644 --- a/examples/express-composition/package.json +++ b/examples/express-composition/package.json @@ -18,13 +18,13 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc --watch", "clean": "lb-clean dist", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run clean && npm run build", "test": "lb-mocha \"dist/__tests__/**/*.js\"", "posttest": "npm run lint", @@ -57,10 +57,13 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/express": "^4.16.1", "@types/node": "^10.11.2", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" } } diff --git a/examples/express-composition/src/__tests__/acceptance/test-helper.ts b/examples/express-composition/src/__tests__/acceptance/test-helper.ts index 7477c9d50b21..a667a8e39f08 100644 --- a/examples/express-composition/src/__tests__/acceptance/test-helper.ts +++ b/examples/express-composition/src/__tests__/acceptance/test-helper.ts @@ -13,7 +13,7 @@ export async function setupExpressApplication(): Promise { await server.boot(); await server.start(); - let lbApp = server.lbApp; + const lbApp = server.lbApp; const client = supertest('http://127.0.0.1:3000'); diff --git a/examples/express-composition/tslint.build.json b/examples/express-composition/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/express-composition/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/express-composition/tslint.json b/examples/express-composition/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/express-composition/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/examples/greeter-extension/.vscode/tasks.json b/examples/greeter-extension/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/greeter-extension/.vscode/tasks.json +++ b/examples/greeter-extension/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/greeter-extension/package-lock.json b/examples/greeter-extension/package-lock.json index 46e01f01bcb4..ac3883c38886 100644 --- a/examples/greeter-extension/package-lock.json +++ b/examples/greeter-extension/package-lock.json @@ -36,6 +36,107 @@ "integrity": "sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "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-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -53,6 +154,12 @@ "sprintf-js": "~1.0.2" } }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -69,10 +176,10 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "chalk": { @@ -85,6 +192,27 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -98,18 +226,25 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -118,10 +253,25 @@ "ms": "^2.1.1" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "escape-string-regexp": { @@ -129,24 +279,201 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -161,11 +488,48 @@ "path-is-absolute": "^1.0.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -182,6 +546,62 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -198,6 +618,46 @@ "esprima": "^4.0.0" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -227,6 +687,24 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -236,39 +714,210 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-promise": "^2.1.0" } }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -277,40 +926,80 @@ "has-flag": "^3.0.0" } }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "@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.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" + "os-tmpdir": "~1.0.2" } }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "tslib": "^1.8.1" + "prelude-ls": "~1.1.2" } }, "typescript": { @@ -319,11 +1008,44 @@ "integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==", "dev": true }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } } } } diff --git a/examples/greeter-extension/package.json b/examples/greeter-extension/package.json index c7eeda053ea2..7f67fd1b72b5 100644 --- a/examples/greeter-extension/package.json +++ b/examples/greeter-extension/package.json @@ -11,13 +11,13 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc es2017 --outDir dist --watch", "clean": "lb-clean *example-greeter-extension-*.tgz dist package api-docs", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run clean && npm run build", "test": "lb-mocha \"dist/__tests__/**/*.js\"", "posttest": "npm run lint", @@ -45,11 +45,14 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "4.1.4", "@types/node": "^10.11.2", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" }, "dependencies": { "@loopback/context": "^1.17.1", diff --git a/examples/greeter-extension/src/greeting-service.ts b/examples/greeter-extension/src/greeting-service.ts index aa6507129874..22662ca5d7e6 100644 --- a/examples/greeter-extension/src/greeting-service.ts +++ b/examples/greeter-extension/src/greeting-service.ts @@ -52,7 +52,7 @@ export class GreetingService { * @param name - Name */ async greet(language: string, name: string): Promise { - let greeting: string = ''; + let greeting = ''; const greeter = await this.findGreeter(language); if (greeter) { diff --git a/examples/greeter-extension/tslint.build.json b/examples/greeter-extension/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/greeter-extension/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/greeter-extension/tslint.json b/examples/greeter-extension/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/greeter-extension/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/examples/greeting-app/.vscode/settings.json b/examples/greeting-app/.vscode/settings.json index 4a90df17452c..69a94271422a 100644 --- a/examples/greeting-app/.vscode/settings.json +++ b/examples/greeting-app/.vscode/settings.json @@ -15,7 +15,5 @@ }, "files.insertFinalNewline": true, "files.trimTrailingWhitespace": true, - - "tslint.ignoreDefinitionFiles": true, "typescript.tsdk": "./node_modules/typescript/lib" } diff --git a/examples/greeting-app/.vscode/tasks.json b/examples/greeting-app/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/greeting-app/.vscode/tasks.json +++ b/examples/greeting-app/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/greeting-app/package-lock.json b/examples/greeting-app/package-lock.json index c03eb9b1381d..e70b3de60d35 100644 --- a/examples/greeting-app/package-lock.json +++ b/examples/greeting-app/package-lock.json @@ -36,6 +36,107 @@ "integrity": "sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.12.0.tgz", + "integrity": "sha512-64KxDOb3+5ZVbz6NDZlCtOHstLk9+W96Y7d5Z/s5ge92gLaunxDeXYahvB7Rhl1dbaa3ifyq/W53o4mshIV1Tw==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "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-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -53,6 +154,12 @@ "sprintf-js": "~1.0.2" } }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -69,10 +176,10 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "chalk": { @@ -85,6 +192,27 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -98,18 +226,25 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -118,10 +253,25 @@ "ms": "^2.1.1" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "escape-string-regexp": { @@ -129,24 +279,201 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -161,11 +488,48 @@ "path-is-absolute": "^1.0.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -182,6 +546,62 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -198,6 +618,46 @@ "esprima": "^4.0.0" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -227,6 +687,24 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -236,39 +714,210 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-promise": "^2.1.0" } }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -277,40 +926,80 @@ "has-flag": "^3.0.0" } }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "@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.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" + "os-tmpdir": "~1.0.2" } }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "tslib": "^1.8.1" + "prelude-ls": "~1.1.2" } }, "typescript": { @@ -319,11 +1008,44 @@ "integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==", "dev": true }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } } } } diff --git a/examples/greeting-app/package.json b/examples/greeting-app/package.json index a5616ad0468f..a4236122d7c9 100644 --- a/examples/greeting-app/package.json +++ b/examples/greeting-app/package.json @@ -11,13 +11,13 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc es2017 --outDir dist --watch", "clean": "lb-clean *example-greeting-app-*.tgz dist package api-docs", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run clean && npm run build", "test": "lb-mocha \"dist/__tests__/**/*.js\"", "posttest": "npm run lint", @@ -45,11 +45,14 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "4.1.4", "@types/node": "^10.11.2", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" }, "dependencies": { "@loopback/boot": "^1.2.10", diff --git a/examples/greeting-app/tslint.build.json b/examples/greeting-app/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/greeting-app/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/greeting-app/tslint.json b/examples/greeting-app/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/greeting-app/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/examples/hello-world/.vscode/tasks.json b/examples/hello-world/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/hello-world/.vscode/tasks.json +++ b/examples/hello-world/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/hello-world/package-lock.json b/examples/hello-world/package-lock.json index f65151371812..4b2c861b82b0 100644 --- a/examples/hello-world/package-lock.json +++ b/examples/hello-world/package-lock.json @@ -30,6 +30,107 @@ "integrity": "sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "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-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -48,6 +149,12 @@ "sprintf-js": "~1.0.2" } }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -64,10 +171,10 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "chalk": { @@ -81,6 +188,27 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -96,22 +224,53 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "escape-string-regexp": { @@ -120,24 +279,201 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -152,12 +488,49 @@ "path-is-absolute": "^1.0.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -174,6 +547,62 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -190,6 +619,46 @@ "esprima": "^4.0.0" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -214,6 +683,30 @@ "minimist": "0.0.8" } }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -223,39 +716,210 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", "dev": true }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "requires": { - "path-parse": "^1.0.6" + "glob": "^7.1.3" } }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -265,40 +929,80 @@ "has-flag": "^3.0.0" } }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "@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.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" + "os-tmpdir": "~1.0.2" } }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "tslib": "^1.8.1" + "prelude-ls": "~1.1.2" } }, "typescript": { @@ -307,11 +1011,44 @@ "integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==", "dev": true }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } } } } diff --git a/examples/hello-world/package.json b/examples/hello-world/package.json index 0f8ef6fab1b5..765747725b45 100644 --- a/examples/hello-world/package.json +++ b/examples/hello-world/package.json @@ -14,13 +14,13 @@ "build:watch": "lb-tsc es2017 --outDir dist --watch", "clean": "lb-clean *example-hello-world*.tgz dist package api-docs", "verify": "npm pack && tar xf *example-hello-world*.tgz && tree package && npm run clean", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run clean && npm run build", "test": "lb-mocha --allow-console-logs \"dist/__tests__/**/*.js\"", "posttest": "npm run lint", @@ -43,10 +43,13 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/node": "^10.11.2", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" }, "keywords": [ "loopback", diff --git a/examples/hello-world/tslint.build.json b/examples/hello-world/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/hello-world/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/hello-world/tslint.json b/examples/hello-world/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/hello-world/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/examples/lb3-application/.vscode/tasks.json b/examples/lb3-application/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/lb3-application/.vscode/tasks.json +++ b/examples/lb3-application/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/lb3-application/package-lock.json b/examples/lb3-application/package-lock.json index 392edcae9ed1..333b6195316f 100644 --- a/examples/lb3-application/package-lock.json +++ b/examples/lb3-application/package-lock.json @@ -90,6 +90,71 @@ "@types/mime": "*" } }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, "JSONStream": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", @@ -117,6 +182,18 @@ "negotiator": "0.6.1" } }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, "ajv": { "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", @@ -128,6 +205,18 @@ "uri-js": "^4.2.2" } }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -163,6 +252,12 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", @@ -273,17 +368,17 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "camelize": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/camelize/-/camelize-1.0.0.tgz", @@ -310,6 +405,12 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "charenc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", @@ -320,6 +421,21 @@ "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.1.tgz", "integrity": "sha512-xyiP8uAm8K1IhmpDndZLraloW1yqu0L+HYdQ7O1aGPxx9Cr+BMnPANlNhSt++UKfxytL2hd2NPXgTjiy7k43Ew==" }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -479,6 +595,12 @@ } } }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -494,17 +616,20 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, "dns-prefetch-control": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/dns-prefetch-control/-/dns-prefetch-control-0.1.0.tgz", "integrity": "sha1-YN20V3dOF48flBXwyrsOhbCzALI=" }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dont-sniff-mimetype": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dont-sniff-mimetype/-/dont-sniff-mimetype-1.0.0.tgz", @@ -539,6 +664,12 @@ "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==" }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -575,12 +706,119 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -735,6 +973,17 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -755,11 +1004,35 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, "feature-policy": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/feature-policy/-/feature-policy-0.3.0.tgz", "integrity": "sha512-ZtijOTFN7TzCujt1fnNhfWPFPSHeZkesff9AXZj+UEjYBynWNUIYpC87Ve4wHzyexQsImicLu7WsC2LHq7/xrQ==" }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, "finalhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", @@ -789,6 +1062,23 @@ } } }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -824,6 +1114,12 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -861,6 +1157,12 @@ "cldrjs": "^0.5.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -1005,6 +1307,28 @@ "resolved": "https://registry.npmjs.org/ienoopen/-/ienoopen-1.1.0.tgz", "integrity": "sha512-MFs36e/ca6ohEKtinTJ5VvAJ6oDRAYFdYXweUnGY9L9vcoqFOU4n2ZhmJ0C4z/cwGZ3YIQRSB3XZ1+ghZkY5NQ==" }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflection": { "version": "1.12.0", "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.12.0.tgz", @@ -1024,6 +1348,44 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", @@ -1039,6 +1401,18 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -1128,6 +1502,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -1157,11 +1537,27 @@ "invert-kv": "^2.0.0" } }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, "loopback": { "version": "3.25.1", "resolved": "https://registry.npmjs.org/loopback/-/loopback-3.25.1.tgz", @@ -1502,6 +1898,12 @@ "safe-buffer": "^5.1.2" } }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, "mux-demux": { "version": "3.7.9", "resolved": "https://registry.npmjs.org/mux-demux/-/mux-demux-3.7.9.tgz", @@ -1521,6 +1923,12 @@ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.0.1.tgz", "integrity": "sha512-k1u2uemjIGsn25zmujKnotgniC/gxQ9sdegdezeDiKdkDW56THUMqlz3urndKCXJxA6yPzSZbXx/QCMe/pxqsA==" }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", @@ -1607,6 +2015,37 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, "options": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/options/-/options-0.0.6.tgz", @@ -1622,6 +2061,12 @@ "mem": "^4.0.0" } }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", @@ -1637,6 +2082,15 @@ "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==" }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -1647,17 +2101,17 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -1673,11 +2127,23 @@ "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.5.tgz", "integrity": "sha512-TuvHS8AOIZNAlE77WUDiR4rySV/VMptyMfcfeoMgs4P8apaZM3JrnbzBiixKUv+XR6i+BXrQh8WAnjaSPFO65Q==" }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "proxy-addr": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", @@ -1746,6 +2212,12 @@ "resolved": "https://registry.npmjs.org/referrer-policy/-/referrer-policy-1.2.0.tgz", "integrity": "sha512-LgQJIuS6nAy1Jd88DCQRemyE3mS+ispwlqMk3b0yjZ257fI1v9c+/p6SD5gP5FGyXUIgrNOAfmyioHwZtYv2VA==" }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -1780,13 +2252,53 @@ } } }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -1926,6 +2438,17 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "smtp-connection": { "version": "2.12.0", "resolved": "https://registry.npmjs.org/smtp-connection/-/smtp-connection-2.12.0.tgz", @@ -1987,6 +2510,16 @@ "resolved": "https://registry.npmjs.org/stream-serializer/-/stream-serializer-1.1.2.tgz", "integrity": "sha1-wfl9FdolH1lK4n1B7IraCahG408=" }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -1995,11 +2528,26 @@ "safe-buffer": "~5.1.0" } }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "strong-error-handler": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/strong-error-handler/-/strong-error-handler-3.2.0.tgz", @@ -2110,11 +2658,66 @@ "has-flag": "^3.0.0" } }, + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "to-utf8": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/to-utf8/-/to-utf8-0.0.1.tgz", @@ -2157,36 +2760,6 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", - "dev": true, - "requires": { - "@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.1", - "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": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -2200,6 +2773,15 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, "type-is": { "version": "1.6.17", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.17.tgz", @@ -2285,11 +2867,26 @@ "isexe": "^2.0.0" } }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, "x-xss-protection": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/x-xss-protection/-/x-xss-protection-1.1.0.tgz", diff --git a/examples/lb3-application/package.json b/examples/lb3-application/package.json index 842568883c08..9240a8458e8f 100644 --- a/examples/lb3-application/package.json +++ b/examples/lb3-application/package.json @@ -12,13 +12,13 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc es2017 --outDir dist --watch", "clean": "lb-clean *example-lb3-application*.tgz dist package api-docs", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run build", "test": "lb-mocha \"dist/__tests__/**/*.js\"", "test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest", @@ -54,12 +54,15 @@ "@loopback/build": "^1.6.1", "@loopback/rest": "^1.11.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/lodash": "^4.14.130", "@types/node": "^10.11.2", "lodash": "^4.17.11", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" }, "keywords": [ "loopback", diff --git a/examples/lb3-application/src/__tests__/acceptance/lb3app.acceptance.ts b/examples/lb3-application/src/__tests__/acceptance/lb3app.acceptance.ts index f97265a7e36c..391533dc28d1 100644 --- a/examples/lb3-application/src/__tests__/acceptance/lb3app.acceptance.ts +++ b/examples/lb3-application/src/__tests__/acceptance/lb3app.acceptance.ts @@ -54,7 +54,7 @@ describe('CoffeeShopApplication', () => { }); context('LoopBack 3 authentication', () => { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let User: any; before(() => { diff --git a/examples/lb3-application/tslint.build.json b/examples/lb3-application/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/lb3-application/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/lb3-application/tslint.json b/examples/lb3-application/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/lb3-application/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/examples/log-extension/.vscode/tasks.json b/examples/log-extension/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/log-extension/.vscode/tasks.json +++ b/examples/log-extension/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/log-extension/README.md b/examples/log-extension/README.md index e598171aa9b4..6d2c9cb5d9bc 100644 --- a/examples/log-extension/README.md +++ b/examples/log-extension/README.md @@ -132,7 +132,7 @@ export interface LogFn { ( req: Request, args: OperationArgs, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any result: any, startTime?: HighResTime, ): Promise; @@ -232,10 +232,10 @@ import {Constructor} from '@loopback/context'; import {EXAMPLE_LOG_BINDINGS} from '../keys'; import {LogComponent} from '../component'; -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function LogMixin>(superClass: T) { return class extends superClass { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(...args: any[]) { super(...args); if (this.options && this.options.logLevel) { @@ -319,7 +319,7 @@ export class LogActionProvider implements Provider { const fn = (( req: Request, args: OperationArgs, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any result: any, start?: HighResTime, ) => { @@ -336,7 +336,7 @@ export class LogActionProvider implements Provider { private async action( req: Request, args: OperationArgs, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any result: any, start?: HighResTime, ): Promise { diff --git a/examples/log-extension/package-lock.json b/examples/log-extension/package-lock.json index 7d63f73c6b6c..07dd84cddc42 100644 --- a/examples/log-extension/package-lock.json +++ b/examples/log-extension/package-lock.json @@ -36,6 +36,107 @@ "integrity": "sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "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-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -53,6 +154,12 @@ "sprintf-js": "~1.0.2" } }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -69,10 +176,10 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "chalk": { @@ -85,6 +192,27 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -98,18 +226,25 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -118,10 +253,25 @@ "ms": "^2.1.1" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", "dev": true }, "escape-string-regexp": { @@ -129,24 +279,201 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", "dev": true }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -161,11 +488,48 @@ "path-is-absolute": "^1.0.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -182,6 +546,62 @@ "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -198,6 +618,46 @@ "esprima": "^4.0.0" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -227,6 +687,24 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -236,39 +714,210 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-promise": "^2.1.0" } }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, "semver": { "version": "5.7.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -277,40 +926,80 @@ "has-flag": "^3.0.0" } }, - "tslib": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", - "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "@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.1", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.29.0" + "os-tmpdir": "~1.0.2" } }, - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "tslib": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz", + "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "tslib": "^1.8.1" + "prelude-ls": "~1.1.2" } }, "typescript": { @@ -319,11 +1008,44 @@ "integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==", "dev": true }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } } } } diff --git a/examples/log-extension/package.json b/examples/log-extension/package.json index e1cefbf0c7ac..cf798cd59803 100644 --- a/examples/log-extension/package.json +++ b/examples/log-extension/package.json @@ -12,13 +12,13 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc es2017 --outDir dist --watch", "clean": "lb-clean *example-log-extension-*.tgz dist package api-docs", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run clean && npm run build", "test": "lb-mocha \"dist/__tests__/**/*.js\"", "posttest": "npm run lint", @@ -44,11 +44,14 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "^4.1.4", "@types/node": "^10.11.2", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" }, "dependencies": { "@loopback/context": "^1.17.1", diff --git a/examples/log-extension/src/__tests__/acceptance/log.extension.acceptance.ts b/examples/log-extension/src/__tests__/acceptance/log.extension.acceptance.ts index c1a0cefe7113..c8b6ed8ad25d 100644 --- a/examples/log-extension/src/__tests__/acceptance/log.extension.acceptance.ts +++ b/examples/log-extension/src/__tests__/acceptance/log.extension.acceptance.ts @@ -215,9 +215,9 @@ describe('log extension acceptance test', () => { async handle(context: RequestContext): Promise { const {request, response} = context; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let args: any = []; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let result: any; try { diff --git a/examples/log-extension/src/mixins/log.mixin.ts b/examples/log-extension/src/mixins/log.mixin.ts index aa77cdfb5e3a..d5f00b8d38b3 100644 --- a/examples/log-extension/src/mixins/log.mixin.ts +++ b/examples/log-extension/src/mixins/log.mixin.ts @@ -17,11 +17,11 @@ import {LogComponent} from '../component'; * class MyApplication extends LogMixin(Application) {} * ``` */ -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function LogMixin>(superClass: T) { return class extends superClass { // A mixin class has to take in a type any[] argument! - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(...args: any[]) { super(...args); if (this.options && this.options.logLevel) { diff --git a/examples/log-extension/src/providers/log-action.provider.ts b/examples/log-extension/src/providers/log-action.provider.ts index dd4117e95880..74b81a3223ee 100644 --- a/examples/log-extension/src/providers/log-action.provider.ts +++ b/examples/log-extension/src/providers/log-action.provider.ts @@ -3,19 +3,19 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {inject, Provider, Constructor, Getter} from '@loopback/context'; +import {Constructor, Getter, inject, Provider} from '@loopback/context'; import {CoreBindings} from '@loopback/core'; import {OperationArgs, Request} from '@loopback/rest'; +import chalk from 'chalk'; import {getLogMetadata} from '../decorators'; import {EXAMPLE_LOG_BINDINGS, LOG_LEVEL} from '../keys'; import { - LogFn, - TimerFn, HighResTime, LevelMetadata, + LogFn, LogWriterFn, + TimerFn, } from '../types'; -import chalk from 'chalk'; export class LogActionProvider implements Provider { // LogWriteFn is an optional dependency and it falls back to `logToConsole` @@ -37,7 +37,7 @@ export class LogActionProvider implements Provider { const fn = (( req: Request, args: OperationArgs, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any result: any, start?: HighResTime, ) => { @@ -54,7 +54,7 @@ export class LogActionProvider implements Provider { private async action( req: Request, args: OperationArgs, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any result: any, start?: HighResTime, ): Promise { diff --git a/examples/log-extension/src/types.ts b/examples/log-extension/src/types.ts index b5c33439b2a7..975b3bd39dd4 100644 --- a/examples/log-extension/src/types.ts +++ b/examples/log-extension/src/types.ts @@ -14,7 +14,7 @@ export interface LogFn { ( req: Request, args: OperationArgs, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any result: any, startTime?: HighResTime, ): Promise; diff --git a/examples/log-extension/tslint.build.json b/examples/log-extension/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/log-extension/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/log-extension/tslint.json b/examples/log-extension/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/log-extension/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/examples/rpc-server/.vscode/tasks.json b/examples/rpc-server/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/rpc-server/.vscode/tasks.json +++ b/examples/rpc-server/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/rpc-server/package-lock.json b/examples/rpc-server/package-lock.json index 32d82c7fa09f..82c6822dcc4e 100644 --- a/examples/rpc-server/package-lock.json +++ b/examples/rpc-server/package-lock.json @@ -92,6 +92,71 @@ "@types/mime": "*" } }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, "accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz", @@ -101,6 +166,42 @@ "negotiator": "0.6.2" } }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, + "ajv": { + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", + "dev": true, + "requires": { + "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-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -124,6 +225,12 @@ "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -157,17 +264,17 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, "bytes": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -179,6 +286,27 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -194,12 +322,6 @@ "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -229,6 +351,19 @@ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", @@ -237,6 +372,12 @@ "ms": "2.0.0" } }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", @@ -247,17 +388,26 @@ "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", @@ -274,12 +424,136 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true + } + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -328,6 +602,53 @@ "vary": "~1.1.2" } }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -342,6 +663,23 @@ "unpipe": "~1.0.0" } }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", @@ -358,6 +696,12 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", @@ -372,6 +716,12 @@ "path-is-absolute": "^1.0.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", @@ -398,6 +748,28 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -413,11 +785,67 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "ipaddr.js": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz", "integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==" }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -434,6 +862,40 @@ "esprima": "^4.0.0" } }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", @@ -467,6 +929,12 @@ "mime-db": "1.40.0" } }, + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", @@ -496,11 +964,29 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "negotiator": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz", "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", @@ -518,6 +1004,35 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, "p-event": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.1.0.tgz", @@ -539,6 +1054,15 @@ "p-finally": "^1.0.0" } }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parseurl": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", @@ -550,10 +1074,16 @@ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", "dev": true }, "path-to-regexp": { @@ -561,6 +1091,18 @@ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "proxy-addr": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz", @@ -570,6 +1112,12 @@ "ipaddr.js": "1.9.0" } }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, "qs": { "version": "6.7.0", "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", @@ -591,13 +1139,59 @@ "unpipe": "1.0.0" } }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", "dev": true, "requires": { - "path-parse": "^1.0.6" + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -659,6 +1253,38 @@ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "signal-exit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -670,6 +1296,31 @@ "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -679,6 +1330,67 @@ "has-flag": "^3.0.0" } }, + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "toidentifier": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", @@ -690,34 +1402,13 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", - "dev": true, - "requires": { - "@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.1", - "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": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "dev": true, "requires": { - "tslib": "^1.8.1" + "prelude-ls": "~1.1.2" } }, "type-is": { @@ -740,6 +1431,15 @@ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", @@ -750,11 +1450,35 @@ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } } } } diff --git a/examples/rpc-server/package.json b/examples/rpc-server/package.json index 2937897e5c48..91fab0737b8a 100644 --- a/examples/rpc-server/package.json +++ b/examples/rpc-server/package.json @@ -14,13 +14,13 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc es2017 --outDir dist --watch", "clean": "lb-clean dist", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run clean && npm run build", "test": "lb-mocha \"dist/__tests__/**/*.js\"", "posttest": "npm run lint", @@ -46,10 +46,13 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/express": "^4.11.1", "@types/node": "^10.11.2", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" } } diff --git a/examples/rpc-server/src/__tests__/unit/rpc.router.unit.ts b/examples/rpc-server/src/__tests__/unit/rpc.router.unit.ts index 8735b823cf8f..6c2bf45779d6 100644 --- a/examples/rpc-server/src/__tests__/unit/rpc.router.unit.ts +++ b/examples/rpc-server/src/__tests__/unit/rpc.router.unit.ts @@ -10,7 +10,7 @@ import {RPCServer} from '../../rpc.server'; describe('rpcRouter', () => { describe('routeHandler', () => { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let server: any; let request: express.Request; let response: express.Response; @@ -51,7 +51,7 @@ describe('rpcRouter', () => { it('throws 500 on unhandled error', async () => { class ControllerThrowingError extends FakeController { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any getFoo(input: any): string { throw new Error('>:('); } @@ -99,7 +99,7 @@ describe('rpcRouter', () => { } class FakeController { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any getFoo(input: any) { return `Hello, ${input.name}!`; } diff --git a/examples/rpc-server/src/rpc.router.ts b/examples/rpc-server/src/rpc.router.ts index 22cf6aa51680..b3e6895d717e 100644 --- a/examples/rpc-server/src/rpc.router.ts +++ b/examples/rpc-server/src/rpc.router.ts @@ -47,7 +47,7 @@ export type Controller = { function sendErrResponse( resp: express.Response, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any send: any, statusCode: number, ) { diff --git a/examples/rpc-server/src/rpc.server.ts b/examples/rpc-server/src/rpc.server.ts index 58a2283754c5..adba38f2ff98 100644 --- a/examples/rpc-server/src/rpc.server.ts +++ b/examples/rpc-server/src/rpc.server.ts @@ -45,6 +45,6 @@ export class RPCServer extends Context implements Server { export type RPCServerConfig = { port?: number; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [key: string]: any; }; diff --git a/examples/rpc-server/tslint.build.json b/examples/rpc-server/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/rpc-server/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/rpc-server/tslint.json b/examples/rpc-server/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/rpc-server/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/examples/soap-calculator/.vscode/tasks.json b/examples/soap-calculator/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/soap-calculator/.vscode/tasks.json +++ b/examples/soap-calculator/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/soap-calculator/package-lock.json b/examples/soap-calculator/package-lock.json index 9d6b0bc528fc..8b9b58fa33bb 100644 --- a/examples/soap-calculator/package-lock.json +++ b/examples/soap-calculator/package-lock.json @@ -36,6 +36,71 @@ "integrity": "sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, "accept-language": { "version": "3.0.18", "resolved": "https://registry.npmjs.org/accept-language/-/accept-language-3.0.18.tgz", @@ -45,6 +110,18 @@ "stable": "^0.1.6" } }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, "ajv": { "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", @@ -62,6 +139,12 @@ "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", "dev": true }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, "ansi-regex": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", @@ -98,6 +181,12 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -166,10 +255,10 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "camelcase": { @@ -205,6 +294,12 @@ } } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "charenc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", @@ -215,6 +310,21 @@ "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.1.tgz", "integrity": "sha512-xyiP8uAm8K1IhmpDndZLraloW1yqu0L+HYdQ7O1aGPxx9Cr+BMnPANlNhSt++UKfxytL2hd2NPXgTjiy7k43Ew==" }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -255,12 +365,6 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "compress": { "version": "0.99.0", "resolved": "https://registry.npmjs.org/compress/-/compress-0.99.0.tgz", @@ -323,6 +427,12 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -343,6 +453,15 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", "dev": true }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, "dotsplit.js": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/dotsplit.js/-/dotsplit.js-1.1.0.tgz", @@ -402,12 +521,119 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -433,6 +659,17 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -453,6 +690,30 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, "file-uri-to-path": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", @@ -485,6 +746,23 @@ } } }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -511,6 +789,12 @@ "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -554,6 +838,12 @@ "cldrjs": "^0.5.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "growl": { "version": "1.10.5", "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", @@ -625,6 +915,37 @@ "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", "integrity": "sha1-QzX/2CzZaWaKOUZckprGHWOTYn8=" }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -639,6 +960,44 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", @@ -667,6 +1026,12 @@ "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-regex": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.0.4.tgz", @@ -736,6 +1101,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -760,6 +1131,16 @@ "invert-kv": "^2.0.0" } }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, "locate-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", @@ -775,6 +1156,12 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -919,12 +1306,24 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, "nan": { "version": "2.13.2", "resolved": "https://registry.npmjs.org/nan/-/nan-2.13.2.tgz", "integrity": "sha512-TghvYc72wlMGMVMluVo9WRJc0mB8KxxF/gZ4YYFy7V2ZQX9l7rgbPg7vjS9mt6U5HXODVFVI2bOduCzwOMv/lw==", "optional": true }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -1003,11 +1402,34 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + } + }, "optional": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/optional/-/optional-0.1.4.tgz", "integrity": "sha512-gtvrrCfkE08wKcgXaVwQVgwEQ8vel2dc5DDBn9RLQZ3YtmtkBss6A2HY6BnJH4N/4Ku97Ri/SF8sNWE2225WJw==" }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -1018,6 +1440,12 @@ "mem": "^4.0.0" } }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", @@ -1057,6 +1485,15 @@ "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path": { "version": "0.12.7", "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz", @@ -1077,27 +1514,39 @@ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", @@ -1117,6 +1566,12 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -1163,13 +1618,53 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", "dev": true, "requires": { - "path-parse": "^1.0.6" + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", + "dev": true, + "requires": { + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -1242,6 +1737,17 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "source-map-support": { "version": "0.5.10", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.10.tgz", @@ -1371,6 +1877,67 @@ "has-flag": "^3.0.0" } }, + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -1393,36 +1960,6 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", - "dev": true, - "requires": { - "@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.1", - "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": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -1436,6 +1973,15 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, "typescript": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz", @@ -1501,6 +2047,12 @@ "string-width": "^1.0.2 || 2" } }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", @@ -1553,6 +2105,15 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, "xml-crypto": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/xml-crypto/-/xml-crypto-1.3.0.tgz", diff --git a/examples/soap-calculator/package.json b/examples/soap-calculator/package.json index a37280d57497..a382dd1ef52e 100644 --- a/examples/soap-calculator/package.json +++ b/examples/soap-calculator/package.json @@ -19,13 +19,13 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc es2017 --outDir dist --watch", "clean": "lb-clean *example-soap*.tgz dist package api-docs dist", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run clean && npm run build", "test": "lb-mocha \"dist/__tests__/**/*.js\"", "posttest": "npm run lint", @@ -54,12 +54,15 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/mocha": "^5.0.0", "@types/node": "^10.11.2", "mocha": "^6.1.3", "source-map-support": "^0.5.5", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" } } diff --git a/examples/soap-calculator/src/__tests__/acceptance/application.acceptance.ts b/examples/soap-calculator/src/__tests__/acceptance/application.acceptance.ts index fd71c99dacf7..150baa9dab2c 100644 --- a/examples/soap-calculator/src/__tests__/acceptance/application.acceptance.ts +++ b/examples/soap-calculator/src/__tests__/acceptance/application.acceptance.ts @@ -10,7 +10,7 @@ describe('Application', function() { let app: SoapCalculatorApplication; let client: Client; - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(30000); before(givenAnApplication); diff --git a/examples/soap-calculator/src/__tests__/integration/services/calculator.service.integration.ts b/examples/soap-calculator/src/__tests__/integration/services/calculator.service.integration.ts index e377db96b1e4..0b5bf265f065 100644 --- a/examples/soap-calculator/src/__tests__/integration/services/calculator.service.integration.ts +++ b/examples/soap-calculator/src/__tests__/integration/services/calculator.service.integration.ts @@ -3,21 +3,20 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT +import {expect} from '@loopback/testlab'; import { - CalculatorService, CalculatorParameters, + CalculatorService, + CalculatorServiceProvider, } from '../../../services/calculator.service'; -import {CalculatorServiceProvider} from '../../../services/calculator.service'; import {givenAConnectedDataSource} from '../../helpers'; -import {expect} from '@loopback/testlab'; - describe('CalculatorService', function() { let calculatorService: CalculatorService; // The calculator soap server is hosted in the cloud and it takes some time // to wake up and respond to api requests - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(30000); before(givenACalculatorService); @@ -55,7 +54,7 @@ describe('CalculatorService', function() { }); async function givenACalculatorService() { - let calculatorDataSource = await givenAConnectedDataSource(); + const calculatorDataSource = await givenAConnectedDataSource(); calculatorService = await new CalculatorServiceProvider( calculatorDataSource, ).value(); diff --git a/examples/soap-calculator/tslint.build.json b/examples/soap-calculator/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/soap-calculator/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/soap-calculator/tslint.json b/examples/soap-calculator/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/soap-calculator/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/examples/todo-list/.vscode/tasks.json b/examples/todo-list/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/todo-list/.vscode/tasks.json +++ b/examples/todo-list/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/todo-list/package-lock.json b/examples/todo-list/package-lock.json index 5bff7255ae69..225093b51bb9 100644 --- a/examples/todo-list/package-lock.json +++ b/examples/todo-list/package-lock.json @@ -36,6 +36,71 @@ "integrity": "sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, "accept-language": { "version": "3.0.18", "resolved": "https://registry.npmjs.org/accept-language/-/accept-language-3.0.18.tgz", @@ -45,6 +110,18 @@ "stable": "^0.1.6" } }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, "ajv": { "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", @@ -56,6 +133,18 @@ "uri-js": "^4.2.2" } }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -86,6 +175,12 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -128,10 +223,10 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "caseless": { @@ -150,6 +245,12 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "charenc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", @@ -160,6 +261,21 @@ "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.1.tgz", "integrity": "sha512-xyiP8uAm8K1IhmpDndZLraloW1yqu0L+HYdQ7O1aGPxx9Cr+BMnPANlNhSt++UKfxytL2hd2NPXgTjiy7k43Ew==" }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -183,12 +299,6 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -232,16 +342,25 @@ "ms": "^2.1.1" } }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } }, "ecc-jsbn": { "version": "0.1.2", @@ -252,6 +371,12 @@ "safer-buffer": "^2.1.0" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "end-of-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", @@ -266,12 +391,119 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -297,6 +529,17 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -312,6 +555,47 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -332,6 +616,12 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -369,6 +659,12 @@ "cldrjs": "^0.5.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -399,6 +695,37 @@ "sshpk": "^1.7.0" } }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -413,6 +740,44 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", @@ -423,6 +788,18 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -474,6 +851,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -503,11 +886,27 @@ "invert-kv": "^2.0.0" } }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, "loopback-connector-rest": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/loopback-connector-rest/-/loopback-connector-rest-3.4.1.tgz", @@ -608,6 +1007,18 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -634,6 +1045,37 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -644,6 +1086,12 @@ "mem": "^4.0.0" } }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", @@ -659,27 +1107,48 @@ "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==" }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", @@ -704,6 +1173,12 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -738,13 +1213,53 @@ } } }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -780,6 +1295,17 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -806,11 +1332,36 @@ "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "strong-globalize": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-4.1.3.tgz", @@ -835,6 +1386,67 @@ "has-flag": "^3.0.0" } }, + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -862,36 +1474,6 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", - "dev": true, - "requires": { - "@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.1", - "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": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -905,6 +1487,15 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, "typescript": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz", @@ -942,11 +1533,26 @@ "isexe": "^2.0.0" } }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, "yamljs": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", diff --git a/examples/todo-list/package.json b/examples/todo-list/package.json index fc228bdfe37c..d0ce137004ca 100644 --- a/examples/todo-list/package.json +++ b/examples/todo-list/package.json @@ -12,13 +12,13 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc es2017 --outDir dist --watch", "clean": "lb-clean *example-todo-list*.tgz dist package api-docs", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run build", "test": "lb-mocha \"dist/__tests__/**/*.js\"", "test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest", @@ -51,12 +51,15 @@ "@loopback/build": "^1.6.1", "@loopback/http-caching-proxy": "^1.0.22", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/lodash": "^4.14.130", "@types/node": "^10.11.2", "lodash": "^4.17.10", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" }, "keywords": [ "loopback", diff --git a/examples/todo-list/src/__tests__/unit/controllers/todo-list-todo.controller.unit.ts b/examples/todo-list/src/__tests__/unit/controllers/todo-list-todo.controller.unit.ts index 616636c6ce82..49511c3780a2 100644 --- a/examples/todo-list/src/__tests__/unit/controllers/todo-list-todo.controller.unit.ts +++ b/examples/todo-list/src/__tests__/unit/controllers/todo-list-todo.controller.unit.ts @@ -25,6 +25,7 @@ describe('TodoController', () => { HasManyRepository >; + /* eslint-disable @typescript-eslint/no-explicit-any */ /* ============================================================================= REPOSITORY FACTORY STUB @@ -33,7 +34,6 @@ describe('TodoController', () => { in our tests themselves. ============================================================================= */ - // tslint:disable:no-any let todos: sinon.SinonStub; /* @@ -48,7 +48,7 @@ describe('TodoController', () => { let find: sinon.SinonStub>; let patch: sinon.SinonStub>; let del: sinon.SinonStub>; - // tslint:enable:no-any + /* eslint-enable @typescript-eslint/no-explicit-any */ /* ============================================================================= @@ -154,11 +154,11 @@ describe('TodoController', () => { .withArgs(aTodoListWithId.id!) .returns(constrainedTodoRepo); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (todoListRepo as any).todos = todos; // Setup CRUD fakes - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any ({create, find, patch, delete: del} = constrainedTodoRepo.stubs as any); controller = new TodoListTodoController(todoListRepo); diff --git a/examples/todo-list/tslint.build.json b/examples/todo-list/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/todo-list/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/todo-list/tslint.json b/examples/todo-list/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/todo-list/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/examples/todo/.vscode/tasks.json b/examples/todo/.vscode/tasks.json index c3003aa764e3..555f092d81eb 100644 --- a/examples/todo/.vscode/tasks.json +++ b/examples/todo/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-stylish", "$eslint-compact"] } ] } diff --git a/examples/todo/package-lock.json b/examples/todo/package-lock.json index 9e15325d22b5..909fe8a35789 100644 --- a/examples/todo/package-lock.json +++ b/examples/todo/package-lock.json @@ -36,6 +36,71 @@ "integrity": "sha512-nsqTN6zUcm9xtdJiM9OvOJ5EF0kOI8f1Zuug27O/rgtxCRJHGqncSWfCMZUP852dCKPsDsYXGvBhxfRjDBkF5Q==", "dev": true }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "dev": true, + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "dev": true, + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + } + } + }, "accept-language": { "version": "3.0.18", "resolved": "https://registry.npmjs.org/accept-language/-/accept-language-3.0.18.tgz", @@ -45,6 +110,18 @@ "stable": "^0.1.6" } }, + "acorn": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", + "integrity": "sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==", + "dev": true + }, + "acorn-jsx": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", + "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "dev": true + }, "ajv": { "version": "6.10.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", @@ -56,6 +133,18 @@ "uri-js": "^4.2.2" } }, + "ansi-escapes": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", + "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", + "dev": true + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -86,6 +175,12 @@ "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -128,10 +223,10 @@ "concat-map": "0.0.1" } }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "caseless": { @@ -150,6 +245,12 @@ "supports-color": "^5.3.0" } }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, "charenc": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", @@ -160,6 +261,21 @@ "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.1.tgz", "integrity": "sha512-xyiP8uAm8K1IhmpDndZLraloW1yqu0L+HYdQ7O1aGPxx9Cr+BMnPANlNhSt++UKfxytL2hd2NPXgTjiy7k43Ew==" }, + "cli-cursor": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", + "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "dev": true, + "requires": { + "restore-cursor": "^2.0.0" + } + }, + "cli-width": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", + "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", + "dev": true + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -183,12 +299,6 @@ "delayed-stream": "~1.0.0" } }, - "commander": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", - "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true - }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -232,16 +342,25 @@ "ms": "^2.1.1" } }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } }, "ecc-jsbn": { "version": "0.1.2", @@ -252,6 +371,12 @@ "safer-buffer": "^2.1.0" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "end-of-stream": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", @@ -266,12 +391,119 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", "dev": true }, + "eslint": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.16.0.tgz", + "integrity": "sha512-S3Rz11i7c8AA5JPv7xAH+dOyq/Cu/VXHiHXBPOU1k/JAM5dXqQPt3qcrhpHSorXmrpu2g0gkIBVXAqCpzfoZIg==", + "dev": true, + "requires": { + "@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" + } + }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==", + "dev": true + }, + "eslint-scope": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.3.1.tgz", + "integrity": "sha512-Z7YjnIldX+2XMcjr7ZkgEsOj/bREONV60qYeB/bjMAqqqZ4zxKyWX+BOUkdmRmA9riiIPVvo5x86m5elviOk0Q==", + "dev": true + }, + "eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "dev": true + }, + "espree": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-5.0.1.tgz", + "integrity": "sha512-qWAZcWh4XE/RwzLJejfcofscgMc9CamR6Tn1+XRXNzrvUSSbiAjGOI/fggztjIi7y9VLPqnICMIPiGyr8JaZ0A==", + "dev": true, + "requires": { + "acorn": "^6.0.7", + "acorn-jsx": "^5.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, + "esquery": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.0.1.tgz", + "integrity": "sha512-SmiyZ5zIWH9VM+SRUReLS5Q8a7GxtRdxEBVZpm98rJM7Sb+A9DVCndXfkeFUd3byderg+EbDkfnevfCwynWaNA==", + "dev": true, + "requires": { + "estraverse": "^4.0.0" + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", + "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "dev": true + }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", @@ -297,6 +529,17 @@ "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, + "external-editor": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.3.tgz", + "integrity": "sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", @@ -312,6 +555,47 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "figures": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", + "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + } + }, + "flatted": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.0.tgz", + "integrity": "sha512-R+H8IZclI8AAkSBRQJLVOsxwAoHd6WC40b4QTNWIjzAa6BXOBfQcM587MXDTVPeYaopFNWHUFLx7eNmHDSxMWg==", + "dev": true + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -332,6 +616,12 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, "get-stream": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", @@ -369,6 +659,12 @@ "cldrjs": "^0.5.0" } }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + }, "har-schema": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", @@ -399,6 +695,37 @@ "sshpk": "^1.7.0" } }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.0.0.tgz", + "integrity": "sha512-pOnA9tfM3Uwics+SaBLCNyZZZbK+4PTu0OPZtLlMIrv17EdBoC15S9Kn8ckJ9TZTyKb3ywNE5y1yeDxxGA7nTQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -413,6 +740,44 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, + "inquirer": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.3.1.tgz", + "integrity": "sha512-MmL624rfkFt4TG9y/Jvmt8vdmOo836U7Y0Hxr2aFk3RelZEGX4Igk0KabWrcaaZaTv9uzglOqWh1Vly+FAWAXA==", + "dev": true, + "requires": { + "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" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, "invert-kv": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", @@ -423,6 +788,18 @@ "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", + "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", + "dev": true + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -474,6 +851,12 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, "json-stringify-safe": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", @@ -503,11 +886,27 @@ "invert-kv": "^2.0.0" } }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "dev": true + }, "loopback-connector-rest": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/loopback-connector-rest/-/loopback-connector-rest-3.4.1.tgz", @@ -608,6 +1007,18 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" }, + "mute-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", + "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -634,6 +1045,37 @@ "wrappy": "1" } }, + "onetime": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", + "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "dev": true, + "requires": { + "mimic-fn": "^1.0.0" + }, + "dependencies": { + "mimic-fn": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", + "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", + "dev": true + } + } + }, + "optionator": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", + "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.4", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "wordwrap": "~1.0.0" + } + }, "os-locale": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", @@ -644,6 +1086,12 @@ "mem": "^4.0.0" } }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, "p-defer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", @@ -659,27 +1107,48 @@ "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.0.0.tgz", "integrity": "sha512-pzQPhYMCAgLAKPWD2jC3Se9fEfrD9npNos0y150EeqZll7akhEgGhTW/slB6lHku8AvYGiJ+YJ5hfHKePPgFWg==" }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, + "path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "dev": true + }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, - "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", - "dev": true - }, "performance-now": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "psl": { "version": "1.1.31", "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", @@ -704,6 +1173,12 @@ "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, "request": { "version": "2.88.0", "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", @@ -738,13 +1213,53 @@ } } }, - "resolve": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.11.0.tgz", - "integrity": "sha512-WL2pBDjqT6pGUNSUzMw00o4T7If+z4H2x3Gz893WoUQ5KW8Vr9txp00ykiP16VBaZF5+j/OcXJHZ9+PCvdiDKw==", + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "restore-cursor": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", + "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "dev": true, + "requires": { + "onetime": "^2.0.0", + "signal-exit": "^3.0.2" + } + }, + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "run-async": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", + "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", "dev": true, "requires": { - "path-parse": "^1.0.6" + "is-promise": "^2.1.0" + } + }, + "rxjs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.2.tgz", + "integrity": "sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -780,6 +1295,17 @@ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=" }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", @@ -806,11 +1332,36 @@ "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, "strip-eof": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", + "dev": true + }, "strong-globalize": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-4.1.3.tgz", @@ -835,6 +1386,67 @@ "has-flag": "^3.0.0" } }, + "table": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.0.tgz", + "integrity": "sha512-nHFDrxmbrkU7JAFKqKbDJXfzrX2UBsWmrieXFTGxiI5e4ncg3VqsZeI4EzNmX0ncp4XNGVeoxIWJXfCIXwrsvw==", + "dev": true, + "requires": { + "ajv": "^6.9.1", + "lodash": "^4.17.11", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, "tough-cookie": { "version": "2.4.3", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", @@ -862,36 +1474,6 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", - "dev": true, - "requires": { - "@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.1", - "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": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, "tunnel-agent": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", @@ -905,6 +1487,15 @@ "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, "typescript": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz", @@ -942,11 +1533,26 @@ "isexe": "^2.0.0" } }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + } + }, "yamljs": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", diff --git a/examples/todo/package.json b/examples/todo/package.json index d78abbd483b5..cca1e2e86a3c 100644 --- a/examples/todo/package.json +++ b/examples/todo/package.json @@ -12,13 +12,13 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc es2017 --outDir dist --watch", "clean": "lb-clean *example-todo*.tgz dist package api-docs", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", "prettier:cli": "lb-prettier \"**/*.ts\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run build", "test": "lb-mocha \"dist/__tests__/**/*.js\"", "test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest", @@ -51,12 +51,15 @@ "@loopback/build": "^1.6.1", "@loopback/http-caching-proxy": "^1.0.22", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/lodash": "^4.14.130", "@types/node": "^10.11.2", "lodash": "^4.17.10", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "eslint": "^5.16.0", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", + "eslint-plugin-eslint-plugin": "^2.1.0" }, "keywords": [ "loopback", diff --git a/examples/todo/src/__tests__/acceptance/todo.acceptance.ts b/examples/todo/src/__tests__/acceptance/todo.acceptance.ts index 9b029e3ac25f..e072ce724731 100644 --- a/examples/todo/src/__tests__/acceptance/todo.acceptance.ts +++ b/examples/todo/src/__tests__/acceptance/todo.acceptance.ts @@ -46,7 +46,7 @@ describe('TodoApplication', () => { it('creates a todo', async function() { // Set timeout to 30 seconds as `post /todos` triggers geocode look up // over the internet and it takes more than 2 seconds - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(30000); const todo = givenTodo(); const response = await client @@ -69,7 +69,7 @@ describe('TodoApplication', () => { it('creates an address-based reminder', async function() { // Increase the timeout to accommodate slow network connections - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(30000); const todo = givenTodo({remindAtAddress: aLocation.address}); diff --git a/examples/todo/src/__tests__/helpers.ts b/examples/todo/src/__tests__/helpers.ts index c3fd9b5407d7..76bdceca5ff6 100644 --- a/examples/todo/src/__tests__/helpers.ts +++ b/examples/todo/src/__tests__/helpers.ts @@ -6,9 +6,9 @@ import {HttpCachingProxy} from '@loopback/http-caching-proxy'; import {merge} from 'lodash'; import * as path from 'path'; +import * as GEO_CODER_CONFIG from '../datasources/geocoder.datasource.json'; import {Todo} from '../models/index'; import {GeoPoint} from '../services/geocoder.service'; -import * as GEO_CODER_CONFIG from '../datasources/geocoder.datasource.json'; /* ============================================================================== @@ -50,7 +50,6 @@ export const aLocation = { address: '1 New Orchard Road, Armonk, 10504', geopoint: {y: 41.109653, x: -73.72467}, get geostring() { - // tslint:disable-next-line:no-invalid-this return `${this.geopoint.y},${this.geopoint.x}`; }, }; diff --git a/examples/todo/src/__tests__/integration/services/geocoder.service.integration.ts b/examples/todo/src/__tests__/integration/services/geocoder.service.integration.ts index 96396f703400..a4cdacffb877 100644 --- a/examples/todo/src/__tests__/integration/services/geocoder.service.integration.ts +++ b/examples/todo/src/__tests__/integration/services/geocoder.service.integration.ts @@ -4,16 +4,16 @@ // License text available at https://opensource.org/licenses/MIT import {expect} from '@loopback/testlab'; +import {GeocoderDataSource} from '../../../datasources/geocoder.datasource'; import {GeocoderService, GeocoderServiceProvider} from '../../../services'; import { - HttpCachingProxy, - givenCachingProxy, getProxiedGeoCoderConfig, + givenCachingProxy, + HttpCachingProxy, } from '../../helpers'; -import {GeocoderDataSource} from '../../../datasources/geocoder.datasource'; describe('GeoLookupService', function() { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(30 * 1000); let cachingProxy: HttpCachingProxy; diff --git a/examples/todo/tslint.build.json b/examples/todo/tslint.build.json deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/examples/todo/tslint.build.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/examples/todo/tslint.json b/examples/todo/tslint.json deleted file mode 100644 index 2bb931e66a64..000000000000 --- a/examples/todo/tslint.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.common.json"] -} diff --git a/package-lock.json b/package-lock.json index 4ddd3de5570b..eb24c862d885 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1348,17 +1348,6 @@ "regexpp": "^2.0.1", "requireindex": "^1.2.0", "tsutils": "^3.7.0" - }, - "dependencies": { - "tsutils": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.10.0.tgz", - "integrity": "sha512-q20XSMq7jutbGB8luhKKsQldRKWvyBO2BGqni3p4yq8Ys9bEP/xQw3KepKmMRt9gJ4lvQSScrihJrcKdKoSU7Q==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - } } }, "@typescript-eslint/experimental-utils": { @@ -1792,12 +1781,6 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, "builtins": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz", @@ -2114,7 +2097,8 @@ "version": "2.20.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", - "dev": true + "dev": true, + "optional": true }, "compare-func": { "version": "1.3.2", @@ -2811,12 +2795,6 @@ "wrappy": "1" } }, - "diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true - }, "dir-glob": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.0.0.tgz", @@ -3071,9 +3049,9 @@ } }, "eslint-scope": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.2.tgz", - "integrity": "sha512-5q1+B/ogmHl8+paxtOKx38Z8LtWkVGuNt3+GQNErqwLl6ViNp/gdJGMCjZNxZ8j/VYjDNZ2Fo+eQc1TAVPIzbg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", + "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -7208,31 +7186,10 @@ "integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ==", "dev": true }, - "tslint": { - "version": "5.17.0", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.17.0.tgz", - "integrity": "sha512-pflx87WfVoYepTet3xLfDOLDm9Jqi61UXIKePOuca0qoAZyrGWonDG9VTbji58Fy+8gciUn8Bt7y69+KEVjc/w==", - "dev": true, - "requires": { - "@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.1", - "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": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.12.0.tgz", + "integrity": "sha512-64KxDOb3+5ZVbz6NDZlCtOHstLk9+W96Y7d5Z/s5ge92gLaunxDeXYahvB7Rhl1dbaa3ifyq/W53o4mshIV1Tw==", "dev": true, "requires": { "tslib": "^1.8.1" diff --git a/package.json b/package.json index 4d78d9005d21..f46496a19c78 100644 --- a/package.json +++ b/package.json @@ -15,8 +15,6 @@ "@commitlint/config-conventional": "^8.0.0", "@commitlint/travis-cli": "^8.0.0", "@types/mocha": "^5.2.7", - "@typescript-eslint/eslint-plugin": "^1.4.2", - "@typescript-eslint/parser": "^1.4.2", "coveralls": "^3.0.0", "cz-conventional-changelog": "^2.1.0", "eslint": "^5.16.0", @@ -25,8 +23,9 @@ "eslint-plugin-mocha": "^5.3.0", "husky": "^2.3.0", "lerna": "^3.14.1", - "tslint": "^5.17.0", - "typescript": "~3.5.1" + "typescript": "~3.5.1", + "@typescript-eslint/parser": "^1.9.0", + "@typescript-eslint/eslint-plugin": "^1.9.0" }, "scripts": { "postinstall": "lerna bootstrap", @@ -44,12 +43,10 @@ "coverage:ci": "node packages/build/bin/run-nyc report --reporter=text-lcov | coveralls", "precoverage": "npm test", "coverage": "open coverage/index.html", - "lint": "npm run prettier:check && npm run tslint && node bin/check-package-locks", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", - "eslint": "node packages/build/bin/run-eslint .", + "lint": "npm run prettier:check && npm run eslint && node bin/check-package-locks", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", + "eslint": "node packages/build/bin/run-eslint --report-unused-disable-directives --cache .", "eslint:fix": "npm run eslint -- --fix", - "tslint": "node packages/build/bin/run-tslint --project tsconfig.json", - "tslint:fix": "npm run tslint -- --fix", "prettier:cli": "node packages/build/bin/run-prettier \"**/*.ts\" \"**/*.js\" \"**/*.md\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", diff --git a/packages/authentication/package.json b/packages/authentication/package.json index 53ea801b34b5..884920bf1866 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -32,7 +32,7 @@ "@loopback/build": "^1.6.1", "@loopback/openapi-spec-builder": "^1.1.13", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/node": "^10.11.2", "@types/passport": "^1.0.0", "@types/passport-http": "^0.3.8", diff --git a/packages/authentication/src/__tests__/fixtures/strategies/basic-strategy.ts b/packages/authentication/src/__tests__/fixtures/strategies/basic-strategy.ts index c9cbb69f6a6b..734a63c3b2fb 100644 --- a/packages/authentication/src/__tests__/fixtures/strategies/basic-strategy.ts +++ b/packages/authentication/src/__tests__/fixtures/strategies/basic-strategy.ts @@ -38,7 +38,7 @@ export class BasicAuthenticationStrategy implements AuthenticationStrategy { } // for example : Basic Z2l6bW9AZ21haWwuY29tOnBhc3N3b3Jk - let authHeaderValue = request.headers.authorization; + const authHeaderValue = request.headers.authorization; if (!authHeaderValue.startsWith('Basic')) { throw new HttpErrors.Unauthorized( diff --git a/packages/authentication/src/__tests__/unit/strategy-adapter.unit.ts b/packages/authentication/src/__tests__/unit/strategy-adapter.unit.ts index f42f0a2557c0..a71c0d9a4e48 100644 --- a/packages/authentication/src/__tests__/unit/strategy-adapter.unit.ts +++ b/packages/authentication/src/__tests__/unit/strategy-adapter.unit.ts @@ -35,7 +35,7 @@ describe('Strategy Adapter', () => { strategy.setMockUser(mockUser); const adapter = new StrategyAdapter(strategy); const request = {}; - const user: Object = await adapter.authenticate(request); + const user: object = await adapter.authenticate(request); expect(user).to.be.eql(mockUser); }); diff --git a/packages/authentication/src/decorators/authenticate.decorator.ts b/packages/authentication/src/decorators/authenticate.decorator.ts index be86d89fdb47..c2f6524b5c9b 100644 --- a/packages/authentication/src/decorators/authenticate.decorator.ts +++ b/packages/authentication/src/decorators/authenticate.decorator.ts @@ -15,7 +15,7 @@ import {AUTHENTICATION_METADATA_KEY} from '../keys'; */ export interface AuthenticationMetadata { strategy: string; - options?: Object; + options?: object; } /** diff --git a/packages/authentication/src/providers/auth-action.provider.ts b/packages/authentication/src/providers/auth-action.provider.ts index 7f5a5759e779..85e013b769ae 100644 --- a/packages/authentication/src/providers/auth-action.provider.ts +++ b/packages/authentication/src/providers/auth-action.provider.ts @@ -52,7 +52,7 @@ export class AuthenticateActionProvider implements Provider { const userProfile = await strategy.authenticate(request); if (!userProfile) { // important to throw a non-protocol-specific error here - let error = new Error( + const error = new Error( `User profile not returned from strategy's authenticate function`, ); Object.assign(error, { diff --git a/packages/authentication/src/providers/auth-strategy.provider.ts b/packages/authentication/src/providers/auth-strategy.provider.ts index 5a52c80f83f1..93e448b927ae 100644 --- a/packages/authentication/src/providers/auth-strategy.provider.ts +++ b/packages/authentication/src/providers/auth-strategy.provider.ts @@ -41,7 +41,7 @@ export class AuthenticationStrategyProvider const strategy = await this.findAuthenticationStrategy(name); if (!strategy) { // important to throw a non-protocol-specific error here - let error = new Error(`The strategy '${name}' is not available.`); + const error = new Error(`The strategy '${name}' is not available.`); Object.assign(error, { code: AUTHENTICATION_STRATEGY_NOT_FOUND, }); diff --git a/packages/authentication/src/strategy-adapter.ts b/packages/authentication/src/strategy-adapter.ts index 359efcdaacaa..f516f3f6f56a 100644 --- a/packages/authentication/src/strategy-adapter.ts +++ b/packages/authentication/src/strategy-adapter.ts @@ -42,7 +42,7 @@ export class StrategyAdapter { return new Promise((resolve, reject) => { // mix-in passport additions like req.logIn and req.logOut for (const key in passportRequestMixin) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (request as any)[key] = passportRequestMixin[key]; } diff --git a/packages/boot/package.json b/packages/boot/package.json index 0e6b43e98845..29a7fec8d120 100644 --- a/packages/boot/package.json +++ b/packages/boot/package.json @@ -37,7 +37,7 @@ "@loopback/openapi-v3": "^1.5.1", "@loopback/rest": "^1.13.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/node": "^10.11.2" }, "files": [ diff --git a/packages/boot/src/__tests__/fixtures/application.ts b/packages/boot/src/__tests__/fixtures/application.ts index 771ba2392e28..7ad7acc0e148 100644 --- a/packages/boot/src/__tests__/fixtures/application.ts +++ b/packages/boot/src/__tests__/fixtures/application.ts @@ -10,7 +10,7 @@ import {ServiceMixin} from '@loopback/service-proxy'; import {BootMixin} from '../..'; // Force package.json to be copied to `dist` by `tsc` -//tslint:disable-next-line:no-unused +// eslint-disable-next-line @typescript-eslint/no-unused-vars import * as pkg from './package.json'; export class BooterApp extends BootMixin( diff --git a/packages/boot/src/__tests__/unit/booters/datasource.booter.unit.ts b/packages/boot/src/__tests__/unit/booters/datasource.booter.unit.ts index 8c4103c83d68..a5d8ee8e0b90 100644 --- a/packages/boot/src/__tests__/unit/booters/datasource.booter.unit.ts +++ b/packages/boot/src/__tests__/unit/booters/datasource.booter.unit.ts @@ -22,7 +22,7 @@ describe('datasource booter unit tests', () => { class AppWithRepo extends RepositoryMixin(Application) {} let app: AppWithRepo; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let stub: sinon.SinonStub<[any?, ...any[]], void>; beforeEach('reset sandbox', () => sandbox.reset()); diff --git a/packages/boot/src/__tests__/unit/booters/repository.booter.unit.ts b/packages/boot/src/__tests__/unit/booters/repository.booter.unit.ts index 171da84fd2ce..b2c67d9d3ea1 100644 --- a/packages/boot/src/__tests__/unit/booters/repository.booter.unit.ts +++ b/packages/boot/src/__tests__/unit/booters/repository.booter.unit.ts @@ -22,7 +22,7 @@ describe('repository booter unit tests', () => { class RepoApp extends RepositoryMixin(Application) {} let app: RepoApp; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let stub: sinon.SinonStub<[any?, ...any[]], void>; beforeEach('reset sandbox', () => sandbox.reset()); diff --git a/packages/boot/src/__tests__/unit/booters/service.booter.unit.ts b/packages/boot/src/__tests__/unit/booters/service.booter.unit.ts index 58305c319051..7407fd728485 100644 --- a/packages/boot/src/__tests__/unit/booters/service.booter.unit.ts +++ b/packages/boot/src/__tests__/unit/booters/service.booter.unit.ts @@ -19,7 +19,7 @@ describe('service booter unit tests', () => { class AppWithRepo extends ServiceMixin(Application) {} let app: AppWithRepo; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let stub: sinon.SinonStub<[any?, ...any[]], void>; beforeEach('reset sandbox', () => sandbox.reset()); diff --git a/packages/boot/src/booters/base-artifact.booter.ts b/packages/boot/src/booters/base-artifact.booter.ts index e977786a4ed6..680f0b6bc3d1 100644 --- a/packages/boot/src/booters/base-artifact.booter.ts +++ b/packages/boot/src/booters/base-artifact.booter.ts @@ -57,7 +57,7 @@ export class BaseArtifactBooter implements Booter { /** * List of exported classes discovered in the files */ - classes: Array>; + classes: Constructor<{}>[]; constructor(projectRoot: string, options: ArtifactOptions) { this.projectRoot = projectRoot; diff --git a/packages/boot/src/booters/booter-utils.ts b/packages/boot/src/booters/booter-utils.ts index 3c190a2d67e3..79f0bd30cbeb 100644 --- a/packages/boot/src/booters/booter-utils.ts +++ b/packages/boot/src/booters/booter-utils.ts @@ -31,7 +31,7 @@ export async function discoverFiles( * @param target - The function to check if it's a class or not. * @returns True if target is a class. False otherwise. */ -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isClass(target: any): target is Constructor { return ( typeof target === 'function' && target.toString().indexOf('class') === 0 @@ -51,7 +51,7 @@ export function loadClassesFromFiles( files: string[], projectRootDir: string, ): Constructor<{}>[] { - const classes: Array> = []; + const classes: Constructor<{}>[] = []; for (const file of files) { debug('Loading artifact file %j', path.relative(projectRootDir, file)); const moduleObj = require(file); diff --git a/packages/boot/src/booters/datasource.booter.ts b/packages/boot/src/booters/datasource.booter.ts index 54f87fdf1a87..40cc724d000b 100644 --- a/packages/boot/src/booters/datasource.booter.ts +++ b/packages/boot/src/booters/datasource.booter.ts @@ -59,7 +59,6 @@ export class DataSourceBooter extends BaseArtifactBooter { ); } else { this.classes.forEach(cls => { - // tslint:disable-next-line:no-any this.app.dataSource(cls as Class); }); } diff --git a/packages/boot/src/booters/repository.booter.ts b/packages/boot/src/booters/repository.booter.ts index de36be7a70b9..7504468e8352 100644 --- a/packages/boot/src/booters/repository.booter.ts +++ b/packages/boot/src/booters/repository.booter.ts @@ -55,7 +55,6 @@ export class RepositoryBooter extends BaseArtifactBooter { ); } else { this.classes.forEach(cls => { - // tslint:disable-next-line:no-any this.app.repository(cls); }); } diff --git a/packages/boot/src/bootstrapper.ts b/packages/boot/src/bootstrapper.ts index cdfa53a72972..04cf044e067c 100644 --- a/packages/boot/src/bootstrapper.ts +++ b/packages/boot/src/bootstrapper.ts @@ -84,11 +84,11 @@ export class Bootstrapper { const bindings = bootCtx.findByTag(BootBindings.BOOTER_TAG); // Prefix length. +1 because of `.` => 'booters.' - const prefix_length = BootBindings.BOOTER_PREFIX.length + 1; + const prefixLength = BootBindings.BOOTER_PREFIX.length + 1; // Names of all registered booters. const defaultBooterNames = bindings.map(binding => - binding.key.slice(prefix_length), + binding.key.slice(prefixLength), ); // Determining the booters to be run. If a user set a booters filter (class @@ -102,7 +102,7 @@ export class Bootstrapper { // Filter bindings by names const filteredBindings = bindings.filter(binding => - names.includes(binding.key.slice(prefix_length)), + names.includes(binding.key.slice(prefixLength)), ); // Resolve Booter Instances diff --git a/packages/boot/src/interfaces.ts b/packages/boot/src/interfaces.ts index 5ceb881bc85c..bb50f5e68951 100644 --- a/packages/boot/src/interfaces.ts +++ b/packages/boot/src/interfaces.ts @@ -70,7 +70,7 @@ export type BootOptions = { /** * Additional Properties */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [prop: string]: any; }; @@ -98,7 +98,7 @@ export type BootExecutionOptions = { /** * Additional Properties */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [prop: string]: any; }; diff --git a/packages/boot/src/mixins/boot.mixin.ts b/packages/boot/src/mixins/boot.mixin.ts index 90168e367777..8e0b10083a33 100644 --- a/packages/boot/src/mixins/boot.mixin.ts +++ b/packages/boot/src/mixins/boot.mixin.ts @@ -40,13 +40,13 @@ export {Binding}; * Example (class MyApp extends BootMixin(RepositoryMixin(Application))) {}; ********************* END OF NOTE ******************** */ -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function BootMixin>(superClass: T) { return class extends superClass implements Bootable { projectRoot: string; bootOptions?: BootOptions; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(...args: any[]) { super(...args); this.component(BootComponent); diff --git a/packages/booter-lb3app/fixtures/lb3app/common/models/coffee-shop.js b/packages/booter-lb3app/fixtures/lb3app/common/models/coffee-shop.js index 121f04702bb6..05b209b5a72f 100644 --- a/packages/booter-lb3app/fixtures/lb3app/common/models/coffee-shop.js +++ b/packages/booter-lb3app/fixtures/lb3app/common/models/coffee-shop.js @@ -2,12 +2,12 @@ module.exports = function(CoffeeShop) { CoffeeShop.status = function(cb) { - var currentDate = new Date(); - var currentHour = currentDate.getHours(); - var OPEN_HOUR = 6; - var CLOSE_HOUR = 20; + const currentDate = new Date(); + const currentHour = currentDate.getHours(); + const OPEN_HOUR = 6; + const CLOSE_HOUR = 20; - var response; + let response; if (currentHour >= OPEN_HOUR && currentHour < CLOSE_HOUR) { response = 'We are open for business.'; } else { @@ -27,7 +27,7 @@ module.exports = function(CoffeeShop) { }); CoffeeShop.getName = function(shopId, cb) { CoffeeShop.findById(shopId, function(err, instance) { - var response = 'Name of coffee shop is ' + instance.name; + const response = 'Name of coffee shop is ' + instance.name; cb(null, response); }); }; diff --git a/packages/booter-lb3app/fixtures/lb3app/server/boot/create-sample-models.js b/packages/booter-lb3app/fixtures/lb3app/server/boot/create-sample-models.js index 22386896ae19..8db62fd5235d 100644 --- a/packages/booter-lb3app/fixtures/lb3app/server/boot/create-sample-models.js +++ b/packages/booter-lb3app/fixtures/lb3app/server/boot/create-sample-models.js @@ -19,8 +19,8 @@ module.exports = function(app) { city: 'Vancouver', }, ], - function(err, coffeeShops) { - if (err) throw err; + function(err2, coffeeShops) { + if (err2) throw err2; }, ); }); diff --git a/packages/booter-lb3app/fixtures/lb3app/server/server.js b/packages/booter-lb3app/fixtures/lb3app/server/server.js index 0b9e2eb867f2..04286cc94c26 100644 --- a/packages/booter-lb3app/fixtures/lb3app/server/server.js +++ b/packages/booter-lb3app/fixtures/lb3app/server/server.js @@ -1,9 +1,9 @@ 'use strict'; -var loopback = require('loopback'); -var boot = require('loopback-boot'); +const loopback = require('loopback'); +const boot = require('loopback-boot'); -var app = (module.exports = loopback()); +const app = (module.exports = loopback()); boot(app, __dirname, function(err) { if (err) throw err; diff --git a/packages/booter-lb3app/fixtures/minimal-app.js b/packages/booter-lb3app/fixtures/minimal-app.js index 4375ece76008..461426a17c62 100644 --- a/packages/booter-lb3app/fixtures/minimal-app.js +++ b/packages/booter-lb3app/fixtures/minimal-app.js @@ -1,9 +1,9 @@ 'use strict'; -var loopback = require('loopback'); -var boot = require('loopback-boot'); +const loopback = require('loopback'); +const boot = require('loopback-boot'); -var app = (module.exports = loopback()); +const app = (module.exports = loopback()); app.get('/hello', (req, res) => { res.send('hello'); diff --git a/packages/booter-lb3app/package.json b/packages/booter-lb3app/package.json index 4d66cb3e4c8c..35de4516eeae 100644 --- a/packages/booter-lb3app/package.json +++ b/packages/booter-lb3app/package.json @@ -36,7 +36,7 @@ "@loopback/repository": "^1.5.8", "@loopback/rest": "^1.13.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "^4.1.4", "@types/lodash": "^4.14.130", "@types/node": "^10.11.2", diff --git a/packages/build/README.md b/packages/build/README.md index 5b9b97ec0ab9..8eb90750bd26 100644 --- a/packages/build/README.md +++ b/packages/build/README.md @@ -6,6 +6,7 @@ LoopBack 4 or other TypeScript modules, including: - lb-tsc: Use [`tsc`](https://www.typescriptlang.org/docs/handbook/compiler-options.html) to compile typescript files +- lb-eslint: Run [`eslint`](https://typescript-eslint.io/) - lb-tslint: Run [`tslint`](https://github.com/palantir/tslint) - lb-prettier: Run [`prettier`](https://github.com/prettier/prettier) - lb-mocha: Run [`mocha`](https://mochajs.org/) to execute test cases @@ -32,13 +33,13 @@ To use `@loopback/build` for your package: "build": "lb-tsc", "build:watch": "lb-tsc --watch", "clean": "lb-clean", - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run prettier:fix && npm run tslint:fix", + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run prettier:fix && npm run eslint:fix", "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", "pretest": "npm run clean && npm run build", "test": "lb-mocha \"dist/__tests__\"", "posttest": "npm run lint", @@ -54,7 +55,7 @@ Now you run the scripts, such as: - `npm run build` - Compile TypeScript files and copy resources (non `.ts` files) to outDir - `npm test` - Run all mocha tests -- `npm run lint` - Run `tslint` and `prettier` on source files +- `npm run lint` - Run `eslint` and `prettier` on source files 3. Override default configurations in your project diff --git a/packages/build/bin/compile-package.js b/packages/build/bin/compile-package.js index 1244560c52c0..52b9dcc7121f 100755 --- a/packages/build/bin/compile-package.js +++ b/packages/build/bin/compile-package.js @@ -36,7 +36,7 @@ function run(argv, options) { '--copy-resources', ); - var target; + let target; // --copy-resources is not a TS Compiler option so we remove it from the // list of compiler options to avoid compiler errors. @@ -47,7 +47,7 @@ function run(argv, options) { if (!isTargetSet) { // Find the last non-option argument as the `target` // For example `-p tsconfig.json es2017` or `es2017 -p tsconfig.json` - for (var i = compilerOpts.length - 1; i >= 0; i--) { + for (let i = compilerOpts.length - 1; i >= 0; i--) { target = compilerOpts[i]; // It's an option if (target.indexOf('-') === 0) { @@ -69,7 +69,7 @@ function run(argv, options) { } } - var outDir; + let outDir; if (isOutDirSet) { const outDirIx = compilerOpts.indexOf('--outDir'); @@ -79,14 +79,15 @@ function run(argv, options) { outDir = path.join(packageDir, utils.getDistribution(target)); } - var tsConfigFile; + let tsConfigFile; + let rootDir; if (!isProjectSet) { - var rootDir = utils.getRootDir(); + rootDir = utils.getRootDir(); tsConfigFile = utils.getConfigFile('tsconfig.build.json', 'tsconfig.json'); if (tsConfigFile === path.join(rootDir, 'config/tsconfig.build.json')) { // No local tsconfig.build.json or tsconfig.json found - var baseConfigFile = path.join(rootDir, 'config/tsconfig.common.json'); + let baseConfigFile = path.join(rootDir, 'config/tsconfig.common.json'); baseConfigFile = path.relative(packageDir, baseConfigFile); if (baseConfigFile.indexOf('..' + path.sep) !== 0) { // tsconfig only supports relative or rooted path diff --git a/packages/build/bin/generate-apidocs.js b/packages/build/bin/generate-apidocs.js index b384e703f686..15b1e40b335f 100755 --- a/packages/build/bin/generate-apidocs.js +++ b/packages/build/bin/generate-apidocs.js @@ -10,7 +10,7 @@ function run(argv, options) { const utils = require('./utils'); const fs = require('fs-extra'); const path = require('path'); - var tsPath; + let tsPath; try { tsPath = require.resolve('typedoc/node_modules/typescript/package.json'); } catch (e) { diff --git a/packages/build/bin/run-clean.js b/packages/build/bin/run-clean.js index 0fc54c40cec4..6f06a9522ff8 100755 --- a/packages/build/bin/run-clean.js +++ b/packages/build/bin/run-clean.js @@ -27,8 +27,8 @@ function run(argv, options) { const rimraf = require('rimraf'); const path = require('path'); const utils = require('./utils'); - var globPatterns = argv.slice(2); - var removed = []; + let globPatterns = argv.slice(2); + const removed = []; if (!globPatterns.length) { globPatterns = [utils.getDistribution()]; } @@ -36,7 +36,7 @@ function run(argv, options) { if (typeof options === 'boolean') options = {dryRun: options}; options = options || {}; globPatterns.forEach(pattern => { - var relativePath = path.relative(process.cwd(), pattern); + const relativePath = path.relative(process.cwd(), pattern); if (relativePath.indexOf('..') !== -1) { if (!options.dryRun) { console.error( diff --git a/packages/build/bin/utils.js b/packages/build/bin/utils.js index 2aed68dbf403..5b946ac288f0 100644 --- a/packages/build/bin/utils.js +++ b/packages/build/bin/utils.js @@ -31,7 +31,7 @@ function getDistribution(target) { if (!target) { target = getCompilationTarget(); } - var dist; + let dist; switch (target) { case 'es2018': dist = 'dist10'; @@ -71,8 +71,8 @@ function getPackageDir() { * @param {string} defaultName Default file */ function getConfigFile(name, defaultName) { - var dir = getPackageDir(); - var configFile = path.join(dir, name); + const dir = getPackageDir(); + let configFile = path.join(dir, name); if (!fs.existsSync(configFile)) { debug('%s does not exist', configFile); if (defaultName) { @@ -132,7 +132,7 @@ function runCLI(cli, args, options) { args = options.nodeArgs.concat(args); } debug('Spawn %s %s', process.execPath, args.join(' ')); - var child = spawn( + const child = spawn( process.execPath, // Typically '/usr/local/bin/node' args, Object.assign( @@ -167,7 +167,7 @@ function runShell(command, args, options) { if (options.dryRun) { return util.format('%s %s', command, args.join(' ')); } - var child = spawn( + const child = spawn( command, args, Object.assign( diff --git a/packages/build/docs.json b/packages/build/docs.json index d7ddb4e64409..1ee63d926425 100644 --- a/packages/build/docs.json +++ b/packages/build/docs.json @@ -8,6 +8,7 @@ "bin/run-mocha.js", "bin/run-prettier.js", "bin/run-tslint.js", + "bin/run-eslint.js", "bin/select-dist.js", "bin/utils.js" ], diff --git a/packages/build/package-lock.json b/packages/build/package-lock.json index f50f1043259a..7ba639e27176 100644 --- a/packages/build/package-lock.json +++ b/packages/build/package-lock.json @@ -171,6 +171,65 @@ "@types/node": "*" } }, + "@typescript-eslint/eslint-plugin": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.9.0.tgz", + "integrity": "sha512-FOgfBorxjlBGpDIw+0LaZIXRX6GEEUfzj8LXwaQIUCp+gDOvkI+1WgugJ7SmWiISqK9Vj5r8S7NDKO/LB+6X9A==", + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/parser": "1.9.0", + "eslint-utils": "^1.3.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^2.0.1", + "requireindex": "^1.2.0", + "tsutils": "^3.7.0" + }, + "dependencies": { + "tsutils": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.11.0.tgz", + "integrity": "sha512-RRtGX1FVfHm1+P9XVqN+RxqUa8ZCZ2LjaPyaRUQH7Wvn9cYAkpz/cZKy+BWU/+fncFqjW/+PVgRWF4Ky5IGbjQ==", + "requires": { + "tslib": "^1.8.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.9.0.tgz", + "integrity": "sha512-1s2dY9XxBwtS9IlSnRIlzqILPyeMly5tz1bfAmQ84Ul687xBBve5YsH5A5EKeIcGurYYqY2w6RkHETXIwnwV0A==", + "requires": { + "@typescript-eslint/typescript-estree": "1.9.0" + } + }, + "@typescript-eslint/parser": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.9.0.tgz", + "integrity": "sha512-CWgC1XrQ34H/+LwAU7vY5xteZDkNqeAkeidEpJnJgkKu0yqQ3ZhQ7S+dI6MX4vmmM1TKRbOrKuXc6W0fIHhdbA==", + "requires": { + "@typescript-eslint/experimental-utils": "1.9.0", + "@typescript-eslint/typescript-estree": "1.9.0", + "eslint-scope": "^4.0.0", + "eslint-visitor-keys": "^1.0.0" + } + }, + "@typescript-eslint/typescript-estree": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.9.0.tgz", + "integrity": "sha512-7Eg0TEQpCkTsEwsl1lIzd6i7L3pJLQFWesV08dS87bNz0NeSjbL78gNAP1xCKaCejkds4PhpLnZkaAjx9SU8OA==", + "requires": { + "lodash.unescape": "4.0.1", + "semver": "5.5.0" + }, + "dependencies": { + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==" + } + } + }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", @@ -672,6 +731,11 @@ "text-table": "^0.2.0" } }, + "eslint-plugin-eslint-plugin": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-eslint-plugin/-/eslint-plugin-eslint-plugin-2.1.0.tgz", + "integrity": "sha512-kT3A/ZJftt28gbl/Cv04qezb/NQ1dwYIbi8lyf806XMxkus7DvOVCLIfTXMrorp322Pnoez7+zabXH29tADIDg==" + }, "eslint-plugin-mocha": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/eslint-plugin-mocha/-/eslint-plugin-mocha-5.3.0.tgz", @@ -1468,6 +1532,11 @@ "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=" }, + "lodash.unescape": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", + "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=" + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -2148,6 +2217,11 @@ "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==" }, + "requireindex": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/requireindex/-/requireindex-1.2.0.tgz", + "integrity": "sha512-L9jEkOi3ASd9PYit2cwRfyppc9NoABujTP8/5gFcbERmo5jUoAKovIC3fsF17pkTnGsrByysqX+Kxd2OTNI1ww==" + }, "resolve": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", diff --git a/packages/build/package.json b/packages/build/package.json index 3ef485fdb819..b2fb000a55b1 100644 --- a/packages/build/package.json +++ b/packages/build/package.json @@ -18,9 +18,12 @@ "@loopback/tslint-config": "^2.0.4", "@types/mocha": "^5.2.7", "@types/node": "^10.11.2", + "@typescript-eslint/eslint-plugin": "^1.9.0", + "@typescript-eslint/parser": "^1.9.0", "cross-spawn": "^6.0.5", "debug": "^4.0.1", "eslint": "^5.16.0", + "eslint-plugin-eslint-plugin": "^2.1.0", "eslint-plugin-mocha": "^5.3.0", "fs-extra": "^8.0.1", "glob": "^7.1.4", diff --git a/packages/build/src/fail-on-console-logs.js b/packages/build/src/fail-on-console-logs.js index 1371b6019538..5e0b8a31ecfb 100644 --- a/packages/build/src/fail-on-console-logs.js +++ b/packages/build/src/fail-on-console-logs.js @@ -47,7 +47,7 @@ process.on('warning', warning => { process.on('exit', code => { if (!warnings.length) { - for (w of warnings) { + for (const w of warnings) { originalConsole.warn(w); } } diff --git a/packages/build/test/integration/scripts.integration.js b/packages/build/test/integration/scripts.integration.js index 276de4dbba02..089b15481521 100644 --- a/packages/build/test/integration/scripts.integration.js +++ b/packages/build/test/integration/scripts.integration.js @@ -10,12 +10,13 @@ const path = require('path'); const fs = require('fs-extra'); describe('build', function() { + // eslint-disable-next-line no-invalid-this this.timeout(30000); - var cwd = process.cwd(); - var projectDir = path.resolve(__dirname, './fixtures'); + const cwd = process.cwd(); + const projectDir = path.resolve(__dirname, './fixtures'); function cleanup() { - var run = require('../../bin/run-clean'); + const run = require('../../bin/run-clean'); run([ 'node', 'bin/run-clean', @@ -37,8 +38,8 @@ describe('build', function() { }); it('compiles ts files', done => { - var run = require('../../bin/compile-package'); - var childProcess = run(['node', 'bin/compile-package', 'es2015']); + const run = require('../../bin/compile-package'); + const childProcess = run(['node', 'bin/compile-package', 'es2015']); childProcess.on('close', code => { assert.equal(code, 0); assert( @@ -49,7 +50,7 @@ describe('build', function() { fs.existsSync(path.join(projectDir, 'tsconfig.json')), 'tsconfig.json should have been created', ); - var tsConfig = fs.readJSONSync(path.join(projectDir, 'tsconfig.json')); + const tsConfig = fs.readJSONSync(path.join(projectDir, 'tsconfig.json')); assert.equal(tsConfig.extends, '../../../config/tsconfig.common.json'); done(); }); @@ -66,8 +67,8 @@ describe('build', function() { include: ['src', 'test'], exclude: ['node_modules/**', 'packages/*/node_modules/**', '**/*.d.ts'], }); - var run = require('../../bin/compile-package'); - var command = run(['node', 'bin/compile-package'], true); + const run = require('../../bin/compile-package'); + const command = run(['node', 'bin/compile-package'], true); assert( command.indexOf('-p tsconfig.build.json') !== -1, 'project level tsconfig.build.json should be honored', @@ -80,8 +81,8 @@ describe('build', function() { include: ['src', 'test'], exclude: ['node_modules/**', 'packages/*/node_modules/**', '**/*.d.ts'], }); - var run = require('../../bin/compile-package'); - var command = run(['node', 'bin/compile-package'], true); + const run = require('../../bin/compile-package'); + const command = run(['node', 'bin/compile-package'], true); assert( command.indexOf('-p tsconfig.json') !== -1, 'project level tsconfig.json should be honored', @@ -89,8 +90,8 @@ describe('build', function() { }); it('honors -p option for tsc', () => { - var run = require('../../bin/compile-package'); - var command = run( + const run = require('../../bin/compile-package'); + const command = run( ['node', 'bin/compile-package', '-p', 'tsconfig.my.json'], true, ); @@ -101,8 +102,8 @@ describe('build', function() { }); it('honors --project option for tsc', () => { - var run = require('../../bin/compile-package'); - var command = run( + const run = require('../../bin/compile-package'); + const command = run( ['node', 'bin/compile-package', '--project', 'tsconfig.my.json'], true, ); @@ -113,8 +114,8 @@ describe('build', function() { }); it('honors --target option for tsc', () => { - var run = require('../../bin/compile-package'); - var command = run( + const run = require('../../bin/compile-package'); + const command = run( ['node', 'bin/compile-package', '--target', 'es2015'], true, ); @@ -125,8 +126,8 @@ describe('build', function() { }); it('honors no-option as target for tsc', () => { - var run = require('../../bin/compile-package'); - var command = run(['node', 'bin/compile-package', 'es2015'], true); + const run = require('../../bin/compile-package'); + const command = run(['node', 'bin/compile-package', 'es2015'], true); assert( command.indexOf('--target es2015') !== -1, '--target should be honored', @@ -134,8 +135,8 @@ describe('build', function() { }); it('honors no-option as target with -p for tsc', () => { - var run = require('../../bin/compile-package'); - var command = run( + const run = require('../../bin/compile-package'); + const command = run( ['node', 'bin/compile-package', 'es2015', '-p', 'tsconfig.my.json'], true, ); @@ -150,8 +151,8 @@ describe('build', function() { }); it('honors --outDir option for tsc', () => { - var run = require('../../bin/compile-package'); - var command = run( + const run = require('../../bin/compile-package'); + const command = run( ['node', 'bin/compile-package', '--outDir', './dist'], true, ); @@ -162,8 +163,8 @@ describe('build', function() { }); it('generates apidocs', done => { - var run = require('../../bin/generate-apidocs'); - var childProcess = run(['node', 'bin/generate-apidocs'], { + const run = require('../../bin/generate-apidocs'); + const childProcess = run(['node', 'bin/generate-apidocs'], { stdio: [process.stdin, 'ignore', process.stderr], }); childProcess.on('close', code => { @@ -172,7 +173,7 @@ describe('build', function() { fs.existsSync(path.join(projectDir, 'api-docs')), 'api-docs should have been created', ); - var typedocDir = require.resolve('typedoc/package.json'); + let typedocDir = require.resolve('typedoc/package.json'); typedocDir = path.resolve(typedocDir, '..'); assert( !fs.existsSync(path.join(typedocDir, './node_modules/typescript')), @@ -189,8 +190,8 @@ describe('build', function() { }); it('honors --tsconfig for apidocs', () => { - var run = require('../../bin/generate-apidocs'); - var command = run( + const run = require('../../bin/generate-apidocs'); + const command = run( ['node', 'bin/generate-apidocs', '--tsconfig', 'tsconfig.my.json'], true, ); @@ -201,8 +202,8 @@ describe('build', function() { }); it('honors --tstarget for apidocs', () => { - var run = require('../../bin/generate-apidocs'); - var command = run( + const run = require('../../bin/generate-apidocs'); + const command = run( ['node', 'bin/generate-apidocs', '--tstarget', 'es2017'], true, ); @@ -213,8 +214,8 @@ describe('build', function() { }); it('honors --skip-public-assets for apidocs', () => { - var run = require('../../bin/generate-apidocs'); - var command = run( + const run = require('../../bin/generate-apidocs'); + const command = run( ['node', 'bin/generate-apidocs', '--skip-public-assets'], true, ); @@ -225,8 +226,8 @@ describe('build', function() { }); it('honors --html-file for apidocs', () => { - var run = require('../../bin/generate-apidocs'); - var command = run( + const run = require('../../bin/generate-apidocs'); + const command = run( ['node', 'bin/generate-apidocs', '--html-file=my.html'], true, ); @@ -237,8 +238,8 @@ describe('build', function() { }); it('runs tslint against ts files', done => { - var run = require('../../bin/run-tslint'); - var childProcess = run(['node', 'bin/run-tslint']); + const run = require('../../bin/run-tslint'); + const childProcess = run(['node', 'bin/run-tslint']); childProcess.on('close', code => { assert.equal(code, 0); done(); @@ -246,14 +247,17 @@ describe('build', function() { }); it('honors -c option for tslint', () => { - var run = require('../../bin/run-tslint'); - var command = run(['node', 'bin/un-tslint', '-c', 'tslint.my.json'], true); + const run = require('../../bin/run-tslint'); + const command = run( + ['node', 'bin/un-tslint', '-c', 'tslint.my.json'], + true, + ); assert(command.indexOf('-c tslint.my.json') !== -1, '-c should be honored'); }); it('honors --config option for tslint', () => { - var run = require('../../bin/run-tslint'); - var command = run( + const run = require('../../bin/run-tslint'); + const command = run( ['node', 'bin/un-tslint', '--config', 'tslint.my.json'], true, ); @@ -264,15 +268,18 @@ describe('build', function() { }); it('honors -p option for tslint', () => { - var run = require('../../bin/run-tslint'); - var command = run(['node', 'bin/un-tslint', '-p', 'tsonfig.my.json'], true); + const run = require('../../bin/run-tslint'); + const command = run( + ['node', 'bin/un-tslint', '-p', 'tsonfig.my.json'], + true, + ); assert(command.indexOf('-p tsonfig') !== -1, '-p should be honored'); }); it('honors --project option for tslint', () => { - var run = require('../../bin/run-tslint'); - var command = run( - ['node', 'bin/un-tslint', '--project', 'tsonfig.my.json'], + const run = require('../../bin/run-tslint'); + const command = run( + ['node', 'bin/run-tslint', '--project', 'tsonfig.my.json'], true, ); assert( @@ -282,8 +289,8 @@ describe('build', function() { }); it('runs prettier against ts files', done => { - var run = require('../../bin/run-prettier'); - var childProcess = run( + const run = require('../../bin/run-prettier'); + const childProcess = run( ['node', 'bin/run-prettier', '**/src/*.ts', '--', '-l'], { stdio: [process.stdin, 'ignore', process.stderr], @@ -296,8 +303,8 @@ describe('build', function() { }); it('removes directories/files', () => { - var run = require('../../bin/run-clean'); - var command = run( + const run = require('../../bin/run-clean'); + const command = run( ['node', 'bin/run-clean', 'tsconfig.json', 'dist', 'api-docs'], true, ); @@ -305,8 +312,8 @@ describe('build', function() { }); it('does not remove directories/files outside the project', () => { - var run = require('../../bin/run-clean'); - var command = run( + const run = require('../../bin/run-clean'); + const command = run( [ 'node', 'bin/run-clean', @@ -324,8 +331,8 @@ describe('build', function() { before(() => (process.env.LERNA_ROOT_PATH = repoRoot)); it('sets --skip-public-assets for apidocs', () => { - var run = require('../../bin/generate-apidocs'); - var command = run(['node', 'bin/generate-apidocs'], true); + const run = require('../../bin/generate-apidocs'); + const command = run(['node', 'bin/generate-apidocs'], true); assert( command.indexOf('--skip-public-assets') !== -1, '--skip-public-assets should be set by default', @@ -333,8 +340,8 @@ describe('build', function() { }); it('sets --html-file for apidocs', () => { - var run = require('../../bin/generate-apidocs'); - var command = run(['node', 'bin/generate-apidocs'], true); + const run = require('../../bin/generate-apidocs'); + const command = run(['node', 'bin/generate-apidocs'], true); assert( command.indexOf('--html-file ts-test-proj.html') !== -1, '--html-file should be set to the package name by default', @@ -342,8 +349,8 @@ describe('build', function() { }); it('sets --project option for tsc', () => { - var run = require('../../bin/compile-package'); - var command = run(['node', 'bin/compile-package'], true); + const run = require('../../bin/compile-package'); + const command = run(['node', 'bin/compile-package'], true); const tsConfig = path.relative( repoRoot, path.join(__dirname, './fixtures/tsconfig.json'), @@ -359,12 +366,13 @@ describe('build', function() { }); describe('mocha', function() { + // eslint-disable-next-line no-invalid-this this.timeout(30000); - var cwd = process.cwd(); - var projectDir = path.resolve(__dirname, './fixtures'); + const cwd = process.cwd(); + const projectDir = path.resolve(__dirname, './fixtures'); function cleanup() { - var run = require('../../bin/run-clean'); + const run = require('../../bin/run-clean'); run(['node', 'bin/run-clean', '.mocharc.json']); } @@ -379,8 +387,8 @@ describe('mocha', function() { }); it('loads built-in .mocharc.json file', () => { - var run = require('../../bin/run-mocha'); - var command = run(['node', 'bin/run-mocha', '"dist/__tests__"'], true); + const run = require('../../bin/run-mocha'); + const command = run(['node', 'bin/run-mocha', '"dist/__tests__"'], true); const builtInMochaOptsFile = path.join( __dirname, '../../config/.mocharc.json', @@ -392,8 +400,8 @@ describe('mocha', function() { }); it('honors --config option', () => { - var run = require('../../bin/run-mocha'); - var command = run( + const run = require('../../bin/run-mocha'); + const command = run( [ 'node', 'bin/run-mocha', @@ -409,7 +417,7 @@ describe('mocha', function() { }); it('loads .mocharc.json specific project file', () => { - var run = require('../../bin/run-mocha'); + const run = require('../../bin/run-mocha'); const buitInMochaOptsPath = path.join( __dirname, '../../config/.mocharc.json', @@ -418,7 +426,7 @@ describe('mocha', function() { fs.copyFileSync(buitInMochaOptsPath, destPath); - var command = run(['node', 'bin/run-mocha', '"dist/__tests__"'], true); + const command = run(['node', 'bin/run-mocha', '"dist/__tests__"'], true); assert( command.indexOf('--config') === -1, 'should skip built-in .mocharc.json file when specific project file exist', diff --git a/packages/cli/README.md b/packages/cli/README.md index 6ca2aea37909..d04214081f07 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -29,7 +29,7 @@ Run the following command to install the CLI. --services # Include service-proxy imports and ServiceMixin --description # Description for the application --outdir # Project root directory for the application - --tslint # Enable tslint + --eslint # Enable eslint --prettier # Enable prettier --mocha # Enable mocha --loopbackBuild # Use @loopback/build @@ -59,7 +59,7 @@ Run the following command to install the CLI. --componentName # Component name --description # Description for the extension --outdir # Project root directory for the extension - --tslint # Enable tslint + --eslint # Enable eslint --prettier # Enable prettier --mocha # Enable mocha --loopbackBuild # Use @loopback/build diff --git a/packages/cli/bin/download-connector-list.js b/packages/cli/bin/download-connector-list.js index 15f68ba36375..706696655f5c 100644 --- a/packages/cli/bin/download-connector-list.js +++ b/packages/cli/bin/download-connector-list.js @@ -3,7 +3,6 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -const https = require('https'); const fs = require('fs'); const path = require('path'); const util = require('util'); diff --git a/packages/cli/generators/discover/index.js b/packages/cli/generators/discover/index.js index 10b70616fa52..b76f20bbcbba 100644 --- a/packages/cli/generators/discover/index.js +++ b/packages/cli/generators/discover/index.js @@ -1,5 +1,4 @@ -path = require('path'); -const fs = require('fs'); +const path = require('path'); const ArtifactGenerator = require('../../lib/artifact-generator'); const modelMaker = require('../../lib/model-discoverer'); const debug = require('../../lib/debug')('discover-generator'); @@ -187,6 +186,7 @@ module.exports = class DiscoveryGenerator extends ArtifactGenerator { */ async getAllModelDefs() { this.artifactInfo.modelDefinitions = []; + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < this.discoveringModels.length; i++) { const modelInfo = this.discoveringModels[i]; debug(`Discovering: ${modelInfo.name}...`); @@ -211,6 +211,7 @@ module.exports = class DiscoveryGenerator extends ArtifactGenerator { // Exit if needed if (this.shouldExit()) return false; + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < this.artifactInfo.modelDefinitions.length; i++) { const modelDefinition = this.artifactInfo.modelDefinitions[i]; Object.entries(modelDefinition.properties).forEach(([k, v]) => diff --git a/packages/cli/generators/extension/index.js b/packages/cli/generators/extension/index.js index 660dad9e05a6..6acccec248b9 100644 --- a/packages/cli/generators/extension/index.js +++ b/packages/cli/generators/extension/index.js @@ -4,7 +4,6 @@ // License text available at https://opensource.org/licenses/MIT 'use strict'; -const Generator = require('yeoman-generator'); const utils = require('../../lib/utils'); const ProjectGenerator = require('../../lib/project-generator'); diff --git a/packages/cli/generators/model/index.js b/packages/cli/generators/model/index.js index ca2ddab837b1..230154a13abd 100644 --- a/packages/cli/generators/model/index.js +++ b/packages/cli/generators/model/index.js @@ -6,7 +6,6 @@ 'use strict'; const modelDiscoverer = require('../../lib/model-discoverer'); -const fs = require('fs'); const ArtifactGenerator = require('../../lib/artifact-generator'); const debug = require('../../lib/debug')('model-generator'); @@ -150,8 +149,7 @@ module.exports = class ModelGenerator extends ArtifactGenerator { async discoverModelPropertiesWithDatasource() { if (this.shouldExit()) return false; if (!this.options.dataSource) return; - if (!this.artifactInfo.dataSource) { - } + if (!this.artifactInfo.dataSource) return; const schemaDef = await modelDiscoverer.discoverSingleModel( this.artifactInfo.dataSource, @@ -315,13 +313,13 @@ module.exports = class ModelGenerator extends ArtifactGenerator { isValidBaseClass(availableModelBaseClasses, classname, isClassNameNullable) { if (!classname && !isClassNameNullable) return false; - for (var i in availableModelBaseClasses) { - var baseClass = ''; + for (const i in availableModelBaseClasses) { + let baseClass = ''; if (typeof availableModelBaseClasses[i] == 'object') baseClass = availableModelBaseClasses[i].value; else baseClass = availableModelBaseClasses[i]; - if (classname == baseClass) { + if (classname === baseClass) { return true; } } diff --git a/packages/cli/generators/observer/index.js b/packages/cli/generators/observer/index.js index ac7da2d43f02..5c3dd316957d 100644 --- a/packages/cli/generators/observer/index.js +++ b/packages/cli/generators/observer/index.js @@ -4,7 +4,6 @@ // License text available at https://opensource.org/licenses/MIT 'use strict'; -const _ = require('lodash'); const ArtifactGenerator = require('../../lib/artifact-generator'); const debug = require('../../lib/debug')('observer-generator'); const inspect = require('util').inspect; diff --git a/packages/cli/generators/openapi/templates/src/controllers/controller-template.ts.ejs b/packages/cli/generators/openapi/templates/src/controllers/controller-template.ts.ejs index d629be7ae96b..380a1a3e6cbf 100644 --- a/packages/cli/generators/openapi/templates/src/controllers/controller-template.ts.ejs +++ b/packages/cli/generators/openapi/templates/src/controllers/controller-template.ts.ejs @@ -1,4 +1,4 @@ -/* tslint:disable:no-any */ +/* eslint-disable @typescript-eslint/no-explicit-any */ import {operation, param, requestBody} from '@loopback/rest'; <%_ imports.forEach(i => { diff --git a/packages/cli/generators/openapi/templates/src/models/model-template.ts.ejs b/packages/cli/generators/openapi/templates/src/models/model-template.ts.ejs index b3c88ce7ad57..f738c8507ce1 100644 --- a/packages/cli/generators/openapi/templates/src/models/model-template.ts.ejs +++ b/packages/cli/generators/openapi/templates/src/models/model-template.ts.ejs @@ -1,4 +1,4 @@ -/* tslint:disable:no-any */ +/* eslint-disable @typescript-eslint/no-explicit-any */ <%_ const _properties = locals.properties || []; if (_properties.length) { diff --git a/packages/cli/generators/openapi/templates/src/models/type-template.ts.ejs b/packages/cli/generators/openapi/templates/src/models/type-template.ts.ejs index 6d64e1c44bc1..5d67aa9b3033 100644 --- a/packages/cli/generators/openapi/templates/src/models/type-template.ts.ejs +++ b/packages/cli/generators/openapi/templates/src/models/type-template.ts.ejs @@ -1,4 +1,4 @@ -/* tslint:disable:no-any */ +/* eslint-disable @typescript-eslint/no-explicit-any */ <%_ imports.forEach(i => { -%> diff --git a/packages/cli/generators/openapi/utils.js b/packages/cli/generators/openapi/utils.js index 8b971dbf9226..230f7b7dce7e 100644 --- a/packages/cli/generators/openapi/utils.js +++ b/packages/cli/generators/openapi/utils.js @@ -8,6 +8,7 @@ const fs = require('fs'); const util = require('util'); const _ = require('lodash'); const json5 = require('json5'); +const url = require('url'); const utils = require('../../lib/utils'); const debug = require('../../lib/debug')('openapi-generator'); @@ -47,11 +48,11 @@ function validateUrlOrFile(specUrlStr) { if (!specUrlStr) { return 'API spec url or file path is required.'; } - var specUrl = url.parse(specUrlStr); + const specUrl = url.parse(specUrlStr); if (specUrl.protocol === 'http:' || specUrl.protocol === 'https:') { return true; } else { - var stat = fs.existsSync(specUrlStr) && fs.statSync(specUrlStr); + const stat = fs.existsSync(specUrlStr) && fs.statSync(specUrlStr); if (stat && stat.isFile()) { return true; } else { diff --git a/packages/cli/generators/project/templates/.eslintignore b/packages/cli/generators/project/templates/.eslintignore new file mode 100644 index 000000000000..dbf8bd7a83d8 --- /dev/null +++ b/packages/cli/generators/project/templates/.eslintignore @@ -0,0 +1,4 @@ +node_modules/ +dist/ +coverage/ +api-docs/ diff --git a/packages/cli/generators/project/templates/.eslintrc.js.ejs b/packages/cli/generators/project/templates/.eslintrc.js.ejs new file mode 100644 index 000000000000..978b9dcca27f --- /dev/null +++ b/packages/cli/generators/project/templates/.eslintrc.js.ejs @@ -0,0 +1,3 @@ +module.exports = { + extends: '@loopback/eslint-config', +}; diff --git a/packages/cli/generators/project/templates/.vscode/settings.json b/packages/cli/generators/project/templates/.vscode/settings.json index 4a90df17452c..d118fa60079e 100644 --- a/packages/cli/generators/project/templates/.vscode/settings.json +++ b/packages/cli/generators/project/templates/.vscode/settings.json @@ -16,6 +16,15 @@ "files.insertFinalNewline": true, "files.trimTrailingWhitespace": true, - "tslint.ignoreDefinitionFiles": true, - "typescript.tsdk": "./node_modules/typescript/lib" + "typescript.tsdk": "./node_modules/typescript/lib", + "eslint.autoFixOnSave": true, + "eslint.run": "onSave", + "eslint.nodePath": "./node_modules", + "eslint.validate": [ + "javascript", + { + "language": "typescript", + "autoFix": true + } + ] } diff --git a/packages/cli/generators/project/templates/.vscode/tasks.json b/packages/cli/generators/project/templates/.vscode/tasks.json index c3003aa764e3..004717d8e87e 100644 --- a/packages/cli/generators/project/templates/.vscode/tasks.json +++ b/packages/cli/generators/project/templates/.vscode/tasks.json @@ -23,7 +23,7 @@ "kind": "test", "isDefault": true }, - "problemMatcher": ["$tsc", "$tslint5"] + "problemMatcher": ["$tsc", "$eslint-compact", "$eslint-stylish"] } ] } diff --git a/packages/cli/generators/project/templates/DEVELOPING.md b/packages/cli/generators/project/templates/DEVELOPING.md index cb323292391c..db33626e7da7 100644 --- a/packages/cli/generators/project/templates/DEVELOPING.md +++ b/packages/cli/generators/project/templates/DEVELOPING.md @@ -7,7 +7,7 @@ users. Install the following extensions: - - [tslint](https://marketplace.visualstudio.com/items?itemName=eg2.tslint) + - [eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - [prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) ## Development workflow diff --git a/packages/cli/generators/project/templates/package.json.ejs b/packages/cli/generators/project/templates/package.json.ejs index 87caf18d348f..5b0b451876a7 100644 --- a/packages/cli/generators/project/templates/package.json.ejs +++ b/packages/cli/generators/project/templates/package.json.ejs @@ -15,33 +15,33 @@ "build": "lb-tsc es2017 --outDir dist", "build:watch": "lb-tsc --watch", "clean": "lb-clean dist", -<% if (project.prettier && project.tslint) { -%> - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", +<% if (project.prettier && project.eslint) { -%> + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", <% } else if (project.prettier) { -%> "lint": "npm run prettier:check", "lint:fix": "npm run prettier:fix", -<% } else if (project.tslint) { -%> - "lint": "npm run tslint", - "lint:fix": "npm run tslint:fix", +<% } else if (project.eslint) { -%> + "lint": "npm run eslint", + "lint:fix": "npm run eslint:fix", <% } -%> <% if (project.prettier) { -%> "prettier:cli": "lb-prettier \"**/*.ts\" \"**/*.js\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", <% } -%> -<% if (project.tslint) { -%> - "tslint": "lb-tslint", - "tslint:fix": "npm run tslint -- --fix", +<% if (project.eslint) { -%> + "eslint": "lb-eslint", + "eslint:fix": "npm run eslint -- --fix", <% } -%> "pretest": "npm run clean && npm run build", <% if (project.mocha) { -%> "test": "lb-mocha --allow-console-logs \"dist/__tests__\"", <% } -%> -<% if (project.prettier || project.tslint) { -%> +<% if (project.prettier || project.eslint) { -%> "posttest": "npm run lint", <% } -%> -<% if (project.mocha && (project.prettier || project.tslint)) { -%> +<% if (project.mocha && (project.prettier || project.eslint)) { -%> "test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js && npm run posttest", <% } else if (project.mocha) { -%> "test:dev": "lb-mocha --allow-console-logs dist/__tests__/**/*.js", @@ -96,10 +96,10 @@ "devDependencies": { "@loopback/build": "<%= project.dependencies['@loopback/build'] -%>", "@loopback/testlab": "<%= project.dependencies['@loopback/testlab'] -%>", - "@loopback/tslint-config": "<%= project.dependencies['@loopback/tslint-config'] -%>", + "@loopback/eslint-config": "<%= project.dependencies['@loopback/eslint-config'] -%>", "@types/node": "<%= project.dependencies['@types/node'] -%>", - <% if (project.tslint) { -%> - "tslint": "<%= project.dependencies['tslint'] -%>", + <% if (project.eslint) { -%> + "eslint": "<%= project.dependencies['eslint'] -%>", <% } -%> "typescript": "<%= project.dependencies['typescript'] -%>" } diff --git a/packages/cli/generators/project/templates/package.plain.json.ejs b/packages/cli/generators/project/templates/package.plain.json.ejs index d29688d60114..8c728e089080 100644 --- a/packages/cli/generators/project/templates/package.plain.json.ejs +++ b/packages/cli/generators/project/templates/package.plain.json.ejs @@ -14,33 +14,33 @@ "build": "tsc --outDir dist --target es2017", "build:watch": "tsc --outDir dist --target es2017 --watch", "clean": "rimraf dist", -<% if (project.prettier && project.tslint) { -%> - "lint": "npm run prettier:check && npm run tslint", - "lint:fix": "npm run tslint:fix && npm run prettier:fix", +<% if (project.prettier && project.eslint) { -%> + "lint": "npm run prettier:check && npm run eslint", + "lint:fix": "npm run eslint:fix && npm run prettier:fix", <% } else if (project.prettier) { -%> "lint": "npm run prettier:check", "lint:fix": "npm run prettier:fix", -<% } else if (project.tslint) { -%> - "lint": "npm run tslint", - "lint:fix": "npm run tslint:fix", +<% } else if (project.eslint) { -%> + "lint": "npm run eslint", + "lint:fix": "npm run eslint:fix", <% } -%> <% if (project.prettier) { -%> "prettier:cli": "prettier \"**/*.ts\" \"**/*.js\"", "prettier:check": "npm run prettier:cli -- -l", "prettier:fix": "npm run prettier:cli -- --write", <% } -%> -<% if (project.tslint) { -%> - "tslint": "tslint -p .", - "tslint:fix": "npm run tslint -- --fix", +<% if (project.eslint) { -%> + "eslint": "eslint -p .", + "eslint:fix": "npm run eslint -- --fix", <% } -%> "pretest": "npm run clean && npm run build", <% if (project.mocha) { -%> "test": "mocha dist/__tests__", <% } -%> -<% if (project.prettier || project.tslint) { -%> +<% if (project.prettier || project.eslint) { -%> "posttest": "npm run lint", <% } -%> -<% if (project.mocha && (project.prettier || project.tslint)) { -%> +<% if (project.mocha && (project.prettier || project.eslint)) { -%> "test:dev": "mocha dist/__tests__/**/*.js && npm run posttest", <% } else if (project.mocha) { -%> "test:dev": "mocha dist/__tests__/**/*.js", @@ -100,8 +100,9 @@ <% if (project.mocha) { -%> "source-map-support": "<%= project.dependencies['source-map-support'] -%>", <% } -%> -<% if (project.tslint) { -%> - "tslint": "<%= project.dependencies['tslint'] -%>", +<% if (project.eslint) { -%> + "eslint": "<%= project.dependencies['eslint'] -%>", + "@loopback/eslint-config": "<%= project.dependencies['@loopback/eslint-config'] -%>", <% } -%> "typescript": "<%= project.dependencies['typescript'] -%>" } diff --git a/packages/cli/generators/project/templates/tslint.build.json.ejs b/packages/cli/generators/project/templates/tslint.build.json.ejs deleted file mode 100644 index 121b8adb21a3..000000000000 --- a/packages/cli/generators/project/templates/tslint.build.json.ejs +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["@loopback/tslint-config/tslint.build.json"] -} diff --git a/packages/cli/generators/project/templates/tslint.json.ejs b/packages/cli/generators/project/templates/tslint.json.ejs deleted file mode 100644 index ba2c5312b7d2..000000000000 --- a/packages/cli/generators/project/templates/tslint.json.ejs +++ /dev/null @@ -1,32 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", -<% if (project.loopbackBuild) { -%> - "extends": ["@loopback/tslint-config/tslint.common.json"] -<% } else { -%> - // See https://palantir.github.io/tslint/rules/ - "rules": { - // These rules find errors related to TypeScript features. - "adjacent-overload-signatures": true, - "prefer-for-of": true, - "unified-signatures": true, - "no-any": true, - - // These rules catch common errors in JS programming or otherwise - // confusing constructs that are prone to producing bugs. - - "label-position": true, - "no-arg": true, - "no-construct": true, - "no-duplicate-variable": true, - - "no-invalid-this": true, - "no-misused-new": true, - "no-shadowed-variable": true, - "no-string-throw": true, - "no-unused-expression": true, - "no-unused-variable": true, - "no-var-keyword": true, - "triple-equals": [true, "allow-null-check", "allow-undefined-check"] - } -<% } -%> -} diff --git a/packages/cli/generators/relation/base-relation.generator.js b/packages/cli/generators/relation/base-relation.generator.js index 0ef4f21ddbb3..02c626d6a75d 100644 --- a/packages/cli/generators/relation/base-relation.generator.js +++ b/packages/cli/generators/relation/base-relation.generator.js @@ -47,12 +47,12 @@ module.exports = class BaseRelationGenerator extends ArtifactGenerator { await this.generateRepositories(options); } - generateControllers(options) { + async generateControllers(options) { /* istanbul ignore next */ throw new Error('Not implemented'); } - generateModels(options) { + async generateModels(options) { /* istanbul ignore next */ throw new Error('Not implemented'); } diff --git a/packages/cli/generators/relation/belongs-to-relation.generator.js b/packages/cli/generators/relation/belongs-to-relation.generator.js index 17c000f370d5..9d82e217db6f 100644 --- a/packages/cli/generators/relation/belongs-to-relation.generator.js +++ b/packages/cli/generators/relation/belongs-to-relation.generator.js @@ -75,10 +75,6 @@ module.exports = class BelongsToRelationGenerator extends BaseRelationGenerator async generateModels(options) { const modelDir = this.artifactInfo.modelDir; const sourceModel = options.sourceModel; - const sourceModelFile = path.resolve( - modelDir, - utils.getModelFileName(sourceModel), - ); const targetModel = options.destinationModel; const relationType = options.relationType; @@ -114,7 +110,7 @@ module.exports = class BelongsToRelationGenerator extends BaseRelationGenerator } _getRepositoryRequiredImports(dstModelClassName, dstRepositoryClassName) { - let importsArray = super._getRepositoryRequiredImports( + const importsArray = super._getRepositoryRequiredImports( dstModelClassName, dstRepositoryClassName, ); diff --git a/packages/cli/generators/relation/has-many-relation.generator.js b/packages/cli/generators/relation/has-many-relation.generator.js index 7d4ce336c337..5f22cfb52536 100644 --- a/packages/cli/generators/relation/has-many-relation.generator.js +++ b/packages/cli/generators/relation/has-many-relation.generator.js @@ -74,16 +74,8 @@ module.exports = class HasManyRelationGenerator extends BaseRelationGenerator { async generateModels(options) { const modelDir = this.artifactInfo.modelDir; const sourceModel = options.sourceModel; - const sourceModelFile = path.resolve( - modelDir, - utils.getModelFileName(sourceModel), - ); const targetModel = options.destinationModel; - const targetModelFile = path.resolve( - modelDir, - utils.getModelFileName(targetModel), - ); const relationType = options.relationType; const relationName = options.relationName; @@ -162,7 +154,7 @@ module.exports = class HasManyRelationGenerator extends BaseRelationGenerator { } _getRepositoryRequiredImports(dstModelClassName, dstRepositoryClassName) { - let importsArray = super._getRepositoryRequiredImports( + const importsArray = super._getRepositoryRequiredImports( dstModelClassName, dstRepositoryClassName, ); diff --git a/packages/cli/generators/relation/index.js b/packages/cli/generators/relation/index.js index c4915d921fd8..71c238ddc787 100644 --- a/packages/cli/generators/relation/index.js +++ b/packages/cli/generators/relation/index.js @@ -5,7 +5,6 @@ 'use strict'; -const _ = require('lodash'); const ArtifactGenerator = require('../../lib/artifact-generator'); const debug = require('../../lib/debug')('relation-generator'); const inspect = require('util').inspect; diff --git a/packages/cli/generators/relation/utils.generator.js b/packages/cli/generators/relation/utils.generator.js index 02e300356222..d70507003fb1 100644 --- a/packages/cli/generators/relation/utils.generator.js +++ b/packages/cli/generators/relation/utils.generator.js @@ -144,7 +144,7 @@ exports.getPropertyType = function(classObj, propertyName) { */ exports.isValidPropertyType = function(classObj, propertyName, propertyType) { - return this.getPropertyType(classObj, propertyName) == propertyType; + return this.getPropertyType(classObj, propertyName) === propertyType; }; exports.doesParameterExist = function(classConstructor, parameterName) { @@ -184,7 +184,7 @@ exports.getPropertyStartPos = function(classObj) { }; exports.addRequiredImports = function(sourceFile, imports) { - for (let currentImport of imports) { + for (const currentImport of imports) { this.addCurrentImport(sourceFile, currentImport); } }; @@ -228,7 +228,7 @@ exports.doesImportExistInModule = function(sourceFile, currentImport) { if (relevantImports.length > 0) { identicalImport = relevantImports[0] .getNamedImports() - .filter(imp => imp.getName() == currentImport.name); + .filter(imp => imp.getName() === currentImport.name); } return identicalImport && identicalImport.length > 0; @@ -236,5 +236,5 @@ exports.doesImportExistInModule = function(sourceFile, currentImport) { exports.getNamedImportsFromModule = function(sourceFile, moduleName) { const allImports = sourceFile.getImportDeclarations(); - return allImports.filter(imp => imp.getModuleSpecifierValue() == moduleName); + return allImports.filter(imp => imp.getModuleSpecifierValue() === moduleName); }; diff --git a/packages/cli/generators/repository/index.js b/packages/cli/generators/repository/index.js index c4f256d7b6d4..1ae2f37785f3 100644 --- a/packages/cli/generators/repository/index.js +++ b/packages/cli/generators/repository/index.js @@ -12,9 +12,7 @@ const inspect = require('util').inspect; const path = require('path'); const chalk = require('chalk'); const utils = require('../../lib/utils'); -const connectors = require('../datasource/connectors.json'); const tsquery = require('../../lib/ast-helper'); -const pascalCase = require('change-case').pascalCase; const VALID_CONNECTORS_FOR_REPOSITORY = ['KeyValueModel', 'PersistedModel']; const KEY_VALUE_CONNECTOR = ['KeyValueModel']; @@ -96,7 +94,7 @@ module.exports = class RepositoryGenerator extends ArtifactGenerator { */ async _getModelIdProperty(modelName) { let fileContent = ''; - let modelFile = path.join( + const modelFile = path.join( this.artifactInfo.modelDir, utils.getModelFileName(modelName), ); @@ -117,7 +115,7 @@ module.exports = class RepositoryGenerator extends ArtifactGenerator { if (!this.artifactInfo.dataSourceClass) { return; } - let result = utils.isConnectorOfType( + const result = utils.isConnectorOfType( KEY_VALUE_CONNECTOR, this.artifactInfo.datasourcesDir, this.artifactInfo.dataSourceClass, @@ -233,11 +231,10 @@ module.exports = class RepositoryGenerator extends ArtifactGenerator { if (this.shouldExit()) return false; debug('Prompting for a datasource '); - let cmdDatasourceName; let datasourcesList; // grab the datasourcename from the command line - cmdDatasourceName = this.options.datasource + const cmdDatasourceName = this.options.datasource ? utils.toClassName(this.options.datasource) + 'Datasource' : ''; @@ -444,7 +441,7 @@ module.exports = class RepositoryGenerator extends ArtifactGenerator { return this.exit(new Error(`${ERROR_NO_MODEL_SELECTED}`)); } else { // iterate thru each selected model, infer or ask for the ID type - for (let item of this.artifactInfo.modelNameList) { + for (const item of this.artifactInfo.modelNameList) { this.artifactInfo.modelName = item; const prompts = [ diff --git a/packages/cli/generators/service/index.js b/packages/cli/generators/service/index.js index aade18ae48bd..1d1ed80875d1 100644 --- a/packages/cli/generators/service/index.js +++ b/packages/cli/generators/service/index.js @@ -4,7 +4,6 @@ // License text available at https://opensource.org/licenses/MIT 'use strict'; -const _ = require('lodash'); const ArtifactGenerator = require('../../lib/artifact-generator'); const fs = require('fs'); const debug = require('../../lib/debug')('service-generator'); @@ -80,11 +79,10 @@ module.exports = class ServiceGenerator extends ArtifactGenerator { async promptDataSourceName() { debug('Prompting for a datasource '); if (this.shouldExit()) return; - let cmdDatasourceName; let datasourcesList; // grab the datasource name from the command line - cmdDatasourceName = this.options.datasource + const cmdDatasourceName = this.options.datasource ? utils.toClassName(this.options.datasource) + 'Datasource' : ''; @@ -195,7 +193,7 @@ module.exports = class ServiceGenerator extends ArtifactGenerator { */ async inferInterfaces() { if (this.shouldExit()) return; - let connectorType = utils.getDataSourceConnectorName( + const connectorType = utils.getDataSourceConnectorName( this.artifactInfo.datasourcesDir, this.artifactInfo.dataSourceClass, ); diff --git a/packages/cli/lib/artifact-generator.js b/packages/cli/lib/artifact-generator.js index ca8dbb65b820..d9aa446754c7 100644 --- a/packages/cli/lib/artifact-generator.js +++ b/packages/cli/lib/artifact-generator.js @@ -85,7 +85,7 @@ module.exports = class ArtifactGenerator extends BaseGenerator { } // Check all files being generated to ensure they succeeded - let generationStatus = !!Object.entries( + const generationStatus = !!Object.entries( this.conflicter.generationStatus, ).find(([key, val]) => { // If a file was modified, update the indexes and say stuff about it diff --git a/packages/cli/lib/ast-helper.js b/packages/cli/lib/ast-helper.js index 317a22d2533f..258204bdd850 100644 --- a/packages/cli/lib/ast-helper.js +++ b/packages/cli/lib/ast-helper.js @@ -15,7 +15,6 @@ const tsArtifact = { CallExpression: 'CallExpression', ObjectLiteralExpression: 'ObjectLiteralExpression', PropertyAssignment: 'PropertyAssignment', - PropertyDeclaration: 'PropertyDeclaration', TrueKeywordTrue: 'TrueKeyword[value="true"]', // the following are placed in case it is needed to explore more artifacts IfStatement: 'IfStatement', @@ -113,14 +112,14 @@ exports.getIdFromModel = async function(fileContent) { let retVal = null; const ast = tsquery.ast(fileContent); - for (let rootNodes of RootNodesFindID) { + for (const rootNodes of RootNodesFindID) { const propertyArr = []; const stRootNode = rootNodes.join('>'); const nodes = tsquery(ast, stRootNode); debug(`rootNode ${stRootNode}`); - for (let a of nodes) { + for (const a of nodes) { propertyArr.push(a.escapedText); } @@ -128,7 +127,7 @@ exports.getIdFromModel = async function(fileContent) { const subnodes = tsquery(ast, stChildNode); let i = 0; - for (let a of subnodes) { + for (const a of subnodes) { if (a.parent.name.escapedText === 'id') { // we found the primary key for the model retVal = propertyArr[i]; diff --git a/packages/cli/lib/base-generator.js b/packages/cli/lib/base-generator.js index fe97e976e621..235dfdc8ed97 100644 --- a/packages/cli/lib/base-generator.js +++ b/packages/cli/lib/base-generator.js @@ -67,8 +67,9 @@ module.exports = class BaseGenerator extends Generator { ); } + let jsonStr; try { - const jsonStr = await readTextFromStdin(); + jsonStr = await readTextFromStdin(); return JSON.parse(jsonStr); } catch (e) { if (!process.stdin.isTTY) { diff --git a/packages/cli/lib/cli.js b/packages/cli/lib/cli.js index da03677010b2..c8c29eafd568 100644 --- a/packages/cli/lib/cli.js +++ b/packages/cli/lib/cli.js @@ -48,7 +48,7 @@ function runCommand(env, opts, log, dryRun) { * Set up yeoman generators */ function setupGenerators() { - var env = yeoman.createEnv(); + const env = yeoman.createEnv(); env.register(path.join(__dirname, '../generators/app'), PREFIX + 'app'); env.register( path.join(__dirname, '../generators/extension'), @@ -117,7 +117,7 @@ function printVersions(log) { */ function printCommands(env, log) { log('Available commands: '); - var list = Object.keys(env.getGeneratorsMeta()) + const list = Object.keys(env.getGeneratorsMeta()) .filter(name => /^loopback4:/.test(name)) .map(name => name.replace(/^loopback4:/, ' lb4 ')); log(list.join('\n')); @@ -130,7 +130,7 @@ function main(opts, log, dryRun) { return; } - var env = setupGenerators(); + const env = setupGenerators(); // list generators if (opts.commands) { diff --git a/packages/cli/lib/model-discoverer.js b/packages/cli/lib/model-discoverer.js index 3ac94d07a927..85756dd30cab 100644 --- a/packages/cli/lib/model-discoverer.js +++ b/packages/cli/lib/model-discoverer.js @@ -34,11 +34,11 @@ async function discoverSingleModel(ds, modelName, options) { * Loads a DataSource from a file * If the path provided is a JSON, it instantiates a juggler.DataSource with the config as the only argument * Else it requires it like a compiled loopback datasource - * @param path + * @param modulePath * @returns juggler.DataSource */ -function loadDataSource(path) { - const ds = require(path); +function loadDataSource(modulePath) { + const ds = require(modulePath); const key = Object.keys(ds)[0]; const val = new ds[key](); return val; @@ -54,6 +54,7 @@ function loadDataSourceByName(name) { const dataSourceFiles = getAllDataSourceFiles(); debug(`Loaded ${dataSourceFiles.length} dataSource files`); + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < dataSourceFiles.length; i++) { const f = dataSourceFiles[i]; const ds = loadDataSource(path.resolve(DEFAULT_DATASOURCE_DIRECTORY, f)); diff --git a/packages/cli/lib/project-generator.js b/packages/cli/lib/project-generator.js index 95bded8e8c47..43e9059904e5 100644 --- a/packages/cli/lib/project-generator.js +++ b/packages/cli/lib/project-generator.js @@ -17,7 +17,7 @@ module.exports = class ProjectGenerator extends BaseGenerator { // build settings for their project. this.buildOptions = [ { - name: 'tslint', + name: 'eslint', description: 'add a linter with pre-configured lint rules', }, { @@ -30,7 +30,7 @@ module.exports = class ProjectGenerator extends BaseGenerator { }, { name: 'loopbackBuild', - description: 'use @loopback/build helpers (e.g. lb-tslint)', + description: 'use @loopback/build helpers (e.g. lb-eslint)', }, {name: 'vscode', description: 'add VSCode config files'}, ]; @@ -53,9 +53,9 @@ module.exports = class ProjectGenerator extends BaseGenerator { description: 'Project root directory for the ' + this.projectType, }); - this.option('tslint', { + this.option('eslint', { type: Boolean, - description: 'Enable tslint', + description: 'Enable eslint', }); this.option('prettier', { @@ -237,8 +237,9 @@ module.exports = class ProjectGenerator extends BaseGenerator { }, ); - if (!this.projectInfo.tslint) { - this.fs.delete(this.destinationPath('tslint.*json.ejs')); + if (!this.projectInfo.eslint) { + this.fs.delete(this.destinationPath('.eslintrc.*.ejs')); + this.fs.delete(this.destinationPath('.eslintignore')); } if (!this.projectInfo.prettier) { diff --git a/packages/cli/lib/utils.js b/packages/cli/lib/utils.js index 9d50c1ef75f5..d6db3e27b90c 100644 --- a/packages/cli/lib/utils.js +++ b/packages/cli/lib/utils.js @@ -11,7 +11,7 @@ const path = require('path'); const util = require('util'); const stream = require('stream'); const readline = require('readline'); -var semver = require('semver'); +const semver = require('semver'); const regenerate = require('regenerate'); const _ = require('lodash'); const pascalCase = require('change-case').pascalCase; @@ -43,13 +43,13 @@ function generateValidRegex() { const get = function(what) { return require('unicode-10.0.0/' + what + '/code-points.js'); }; - const ID_Start = get('Binary_Property/ID_Start'); - const ID_Continue = get('Binary_Property/ID_Continue'); + const idStart = get('Binary_Property/ID_Start'); + const idContinue = get('Binary_Property/ID_Continue'); const compileRegex = _.template( '^(?:<%= identifierStart %>)(?:<%= identifierPart %>)*$', ); - const identifierStart = regenerate(ID_Start).add('$', '_'); - const identifierPart = regenerate(ID_Continue).add( + const identifierStart = regenerate(idStart).add('$', '_'); + const identifierPart = regenerate(idContinue).add( '$', '_', '\u200C', @@ -100,9 +100,9 @@ exports.validateClassName = function(name) { /** * Validate project directory to not exist */ -exports.validateNotExisting = function(path) { - if (fs.existsSync(path)) { - return util.format('Directory %s already exists.', path); +exports.validateNotExisting = function(projDir) { + if (fs.existsSync(projDir)) { + return util.format('Directory %s already exists.', projDir); } return true; }; @@ -111,7 +111,7 @@ exports.validateNotExisting = function(path) { * Converts a name to class name after validation */ exports.toClassName = function(name) { - if (name == '') return new Error('no input'); + if (name === '') return new Error('no input'); if (typeof name != 'string' || name == null) return new Error('bad input'); return pascalCase(name); }; @@ -167,7 +167,7 @@ exports.StatusConflicter = class StatusConflicter extends Conflicter { checkForCollision(filepath, contents, callback) { super.checkForCollision(filepath, contents, (err, status) => { - let filename = filepath.split('/').pop(); + const filename = filepath.split('/').pop(); this.generationStatus[filename] = status; callback(err, status); }); @@ -186,12 +186,12 @@ exports.StatusConflicter = class StatusConflicter extends Conflicter { * paths. Must return a Promise. * @returns {Promise} The filtered list of paths. */ -exports.findArtifactPaths = async function(path, artifactType, reader) { +exports.findArtifactPaths = async function(dir, artifactType, reader) { const readdir = reader || readdirAsync; - debug(`Finding artifact paths at: ${path}`); + debug(`Finding artifact paths at: ${dir}`); // Wrapping readdir in case it's not a promise. - const files = await readdir(path); + const files = await readdir(dir); return _.filter(files, f => { return ( _.endsWith(f, `${artifactType}.js`) || _.endsWith(f, `${artifactType}.ts`) @@ -233,7 +233,7 @@ exports.getDependencies = function() { version = pkg.config.loopbackVersion; } // Set it to be `^x.y.0` - let loopbackVersion = + const loopbackVersion = '^' + semver.major(version) + '.' + semver.minor(version) + '.0'; const deps = {}; @@ -276,7 +276,7 @@ exports.renameEJS = function() { * @param {String} type 'object' OR 'array' */ exports.validateStringObject = function(type) { - return function validate(val) { + return function validateStringified(val) { if (val === null || val === '') { return true; } @@ -288,7 +288,7 @@ exports.validateStringObject = function(type) { } try { - var result = JSON.parse(val); + const result = JSON.parse(val); if (type === 'array' && !Array.isArray(result)) { return err; } @@ -339,7 +339,7 @@ exports.readTextFromStdin = function() { * @returns {String|Boolean} */ exports.checkPropertyName = function(name) { - var result = exports.validateRequiredName(name); + const result = exports.validateRequiredName(name); if (result !== true) return result; if (RESERVED_PROPERTY_NAMES.includes(name)) { return `${name} is a reserved keyword. Please use another name`; @@ -417,7 +417,7 @@ exports.getDataSourceConnectorName = function(datasourcesDir, dataSourceClass) { let result; let jsonFileContent; - let datasourceJSONFile = path.join( + const datasourceJSONFile = path.join( datasourcesDir, exports.dataSourceToJSONFileName(dataSourceClass), ); @@ -456,7 +456,7 @@ exports.isConnectorOfType = function( return false; } - let datasourceJSONFile = path.join( + const datasourceJSONFile = path.join( datasourcesDir, exports.dataSourceToJSONFileName(dataSourceClass), ); @@ -469,7 +469,7 @@ exports.isConnectorOfType = function( throw err; } - for (let connector of Object.values(connectors)) { + for (const connector of Object.values(connectors)) { const matchedConnector = jsonFileContent.connector === connector.name || jsonFileContent.connector === `loopback-connector-${connector.name}`; @@ -494,7 +494,7 @@ exports.getDataSourceName = function(datasourcesDir, dataSourceClass) { let result; let jsonFileContent; - let datasourceJSONFile = path.join( + const datasourceJSONFile = path.join( datasourcesDir, exports.dataSourceToJSONFileName(dataSourceClass), ); diff --git a/packages/cli/package.json b/packages/cli/package.json index 85497235f3fa..20fe2406d394 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -24,7 +24,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/ejs": "^2.6.0", "@types/node": "^10.11.2", "glob": "^7.1.4", @@ -116,13 +116,13 @@ "@loopback/example-todo-list": "^1.6.3", "@loopback/dist-util": "^0.4.0", "@loopback/rest-explorer": "^1.1.25", + "@loopback/eslint-config": "^1.0.0", "@loopback/tslint-config": "^2.0.4", "express-composition": "^1.1.0", "@loopback/example-express-composition": "^1.3.3", "@loopback/example-greeter-extension": "^1.2.7", "@loopback/booter-lb3app": "^1.1.6", "@loopback/example-lb3-application": "^1.0.3", - "@loopback/eslint-config": "^1.0.0", "eslint": "^5.16.0", "eslint-plugin-mocha": "^5.3.0", "@loopback/example-greeting-app": "^1.0.0", diff --git a/packages/cli/smoke-test/openapi/real-world-apis.smoke.js b/packages/cli/smoke-test/openapi/real-world-apis.smoke.js index 66f44ed08be2..a35ad0947dbf 100644 --- a/packages/cli/smoke-test/openapi/real-world-apis.smoke.js +++ b/packages/cli/smoke-test/openapi/real-world-apis.smoke.js @@ -5,14 +5,11 @@ 'use strict'; -const {supertest, TestSandbox} = require('@loopback/testlab'); -const path = require('path'); -const assert = require('yeoman-assert'); +const {supertest} = require('@loopback/testlab'); const { createAppProject, generateOpenApiArtifacts, - cleanSandbox, runLintFix, runNpmTest, } = require('./code-gen-utils'); @@ -49,6 +46,7 @@ describe('Real-world APIs', () => { } // This hook sometimes takes several seconds, due to the large download + // eslint-disable-next-line no-invalid-this this.timeout(10000); // Download a list of over 1500 real-world Swagger APIs from apis.guru @@ -60,7 +58,7 @@ describe('Real-world APIs', () => { } // Remove certain APIs that are known to cause problems - var apis = res.body; + const apis = res.body; // GitHub's CORS policy blocks this request delete apis['googleapis.com:adsense']; @@ -83,6 +81,7 @@ describe('Real-world APIs', () => { }); it('generates all the proper files', async function() { + // eslint-disable-next-line no-invalid-this this.timeout(0); let count = 0; for (const api of realWorldAPIs) { diff --git a/packages/cli/test/acceptance/app-run.acceptance.js b/packages/cli/test/acceptance/app-run.acceptance.js index 7d171967557d..471071c3c8d5 100644 --- a/packages/cli/test/acceptance/app-run.acceptance.js +++ b/packages/cli/test/acceptance/app-run.acceptance.js @@ -25,6 +25,7 @@ describe('app-generator (SLOW)', function() { before('scaffold a new application', async function createAppProject() { // Increase the timeout to 1 minute to accommodate slow CI build machines + // eslint-disable-next-line no-invalid-this this.timeout(60 * 1000); await helpers .run(generator) @@ -37,14 +38,20 @@ describe('app-generator (SLOW)', function() { before('install dependencies', async function installDependencies() { // Run `lerna bootstrap --scope @loopback/sandbox-app` // WARNING: It takes a while to run `lerna bootstrap` + // eslint-disable-next-line no-invalid-this this.timeout(15 * 60 * 1000); process.chdir(rootDir); - await lernaBootstrap(appName); + await lernaBootstrap([ + appName, + '@loopback/build', + '@loopback/eslint-config', + ]); }); it('passes `npm test` for the generated project', function() { // Increase the timeout to 5 minutes, // the tests can take more than 2 seconds to run. + // eslint-disable-next-line no-invalid-this this.timeout(5 * 60 * 1000); return new Promise((resolve, reject) => { @@ -63,6 +70,7 @@ describe('app-generator (SLOW)', function() { after(function() { // Increase the timeout to accommodate slow CI build machines + // eslint-disable-next-line no-invalid-this this.timeout(30 * 1000); process.chdir(rootDir); diff --git a/packages/cli/test/integration/generators/app.integration.js b/packages/cli/test/integration/generators/app.integration.js index 83008b8f2dfa..276cd7c04ca5 100644 --- a/packages/cli/test/integration/generators/app.integration.js +++ b/packages/cli/test/integration/generators/app.integration.js @@ -157,6 +157,7 @@ describe('app-generator with --applicationName', () => { // The test takes about 1 min to install dependencies function testFormat() { before(function() { + // eslint-disable-next-line no-invalid-this this.timeout(90 * 1000); return helpers .run(generator) @@ -188,6 +189,7 @@ function testFormat() { } // Skip the test for CI +// eslint-disable-next-line no-unused-expressions process.env.CI && !process.env.DEBUG ? describe.skip : describe('app-generator with --format', testFormat); diff --git a/packages/cli/test/integration/generators/belongsto.relation.integration.js b/packages/cli/test/integration/generators/belongsto.relation.integration.js index b4daece6e760..442e6742a1ab 100644 --- a/packages/cli/test/integration/generators/belongsto.relation.integration.js +++ b/packages/cli/test/integration/generators/belongsto.relation.integration.js @@ -10,7 +10,6 @@ const assert = require('yeoman-assert'); const testlab = require('@loopback/testlab'); const fs = require('fs'); -const expect = testlab.expect; const TestSandbox = testlab.TestSandbox; const generator = path.join(__dirname, '../../../generators/relation'); @@ -24,11 +23,6 @@ const CONTROLLER_PATH = 'src/controllers'; const REPOSITORY_APP_PATH = 'src/repositories'; const sandbox = new TestSandbox(SANDBOX_PATH); -const targetFileName = [ - 'customer.model.ts', - 'customer-class.model.ts', - 'customer-class-type.model.ts', -]; const sourceFileName = [ 'order.model.ts', 'order-class.model.ts', @@ -46,7 +40,7 @@ const repositoryFileName = [ ]; describe('lb4 relation', function() { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(50000); beforeEach('reset sandbox', async () => { @@ -57,9 +51,9 @@ describe('lb4 relation', function() { context('generate model relation - ', () => { const expectedImport = /import {Entity, model, property, belongsTo} from \'\@loopback\/repository\';\n/; const expectedDecoretor = [ - /@belongsTo\(\(\) => Customer\)\n myCustomer: number;\n/, - /@belongsTo\(\(\) => CustomerClass\)\n myCustomer: number;\n/, - /@belongsTo\(\(\) => CustomerClassType\)\n myCustomer: number;\n/, + /@belongsTo\(\(\) => Customer\)\n {2}myCustomer: number;\n/, + /@belongsTo\(\(\) => CustomerClass\)\n {2}myCustomer: number;\n/, + /@belongsTo\(\(\) => CustomerClassType\)\n {2}myCustomer: number;\n/, ]; const promptArray = [ { @@ -108,9 +102,9 @@ describe('lb4 relation', function() { context('generate model relation with custom relation name - ', () => { const expectedDecoretor = [ - /@belongsTo\(\(\) => Customer\)\n customerPK: number;\n/, - /@belongsTo\(\(\) => CustomerClass\)\n customerPK: number;\n/, - /@belongsTo\(\(\) => CustomerClassType\)\n customerPK: number;\n/, + /@belongsTo\(\(\) => Customer\)\n {2}customerPK: number;\n/, + /@belongsTo\(\(\) => CustomerClass\)\n {2}customerPK: number;\n/, + /@belongsTo\(\(\) => CustomerClassType\)\n {2}customerPK: number;\n/, ]; const promptArray = [ @@ -157,9 +151,9 @@ describe('lb4 relation', function() { context('generate model relation with default relation name', () => { const expectedDecoretor = [ - /@belongsTo\(\(\) => Customer\)\n customerId: number;\n/, - /@belongsTo\(\(\) => CustomerClass\)\n customerClassCustNumber: number;\n/, - /@belongsTo\(\(\) => CustomerClassType\)\n customerClassTypeCustNumber: number;\n/, + /@belongsTo\(\(\) => Customer\)\n {2}customerId: number;\n/, + /@belongsTo\(\(\) => CustomerClass\)\n {2}customerClassCustNumber: number;\n/, + /@belongsTo\(\(\) => CustomerClassType\)\n {2}customerClassTypeCustNumber: number;\n/, ]; const defaultRelationName = [ 'customerId', @@ -230,9 +224,9 @@ context('check if the controller file created ', () => { /class OrderClassTypeCustomerClassTypeController/, ]; const controllerConstructor = [ - /constructor\(\n \@repository\(OrderRepository\)\n public orderRepository: OrderRepository,\n \) \{ \}\n/, - /constructor\(\n \@repository\(OrderClassRepository\)\n public orderClassRepository: OrderClassRepository,\n \) \{ \}\n/, - /constructor\(\n \@repository\(OrderClassTypeRepository\)\n public orderClassTypeRepository: OrderClassTypeRepository,\n \) \{ \}\n/, + /constructor\(\n {4}\@repository\(OrderRepository\)\n {4}public orderRepository: OrderRepository,\n {2}\) \{ \}\n/, + /constructor\(\n {4}\@repository\(OrderClassRepository\)\n {4}public orderClassRepository: OrderClassRepository,\n {2}\) \{ \}\n/, + /constructor\(\n {4}\@repository\(OrderClassTypeRepository\)\n {4}public orderClassTypeRepository: OrderClassTypeRepository,\n {2}\) \{ \}\n/, ]; const indexExport = [ /export \* from '.\/order-customer.controller';/, @@ -284,26 +278,26 @@ context('check if the controller file created ', () => { sourceClassnames[i], async () => { const getOrdersByCustomerIdRegEx = [ - /\@get\('\/orders\/{id}\/customer', \{\n responses: \{\n '200': \{\n/, - /content: \{\n 'application\/json': \{\n/, - /async getCustomer\(\n \@param\.path\.number\('id'\) id: typeof Order\.prototype\.id,\n/, + /\@get\('\/orders\/{id}\/customer', \{\n {4}responses: \{\n {6}'200': \{\n/, + /content: \{\n {10}'application\/json': \{\n/, + /async getCustomer\(\n {4}\@param\.path\.number\('id'\) id: typeof Order\.prototype\.id,\n/, /\)\: Promise \{\n/, - /return await this\.orderRepository\.customer\(id\);\n \}\n/, + /return await this\.orderRepository\.customer\(id\);\n {2}\}\n/, ]; const getOrdersClassByCustomerClassIdRegEx = [ - /\@get\('\/order-classes\/{id}\/customer-class', \{\n responses: \{\n '200': \{\n/, - /content: \{\n 'application\/json': \{\n/, - /async getCustomerClass\(\n \@param\.path\.number\('id'\) id: typeof OrderClass\.prototype\.orderNumber,\n/, + /\@get\('\/order-classes\/{id}\/customer-class', \{\n {4}responses: \{\n {6}'200': \{\n/, + /content: \{\n {10}'application\/json': \{\n/, + /async getCustomerClass\(\n {4}\@param\.path\.number\('id'\) id: typeof OrderClass\.prototype\.orderNumber,\n/, /\)\: Promise \{\n/, - /return await this\.orderClassRepository\.customerClass\(id\);\n \}\n/, + /return await this\.orderClassRepository\.customerClass\(id\);\n {2}\}\n/, ]; const getOrdersClassTypeByCustomerClassTypeIdRegEx = [ - /\@get\('\/order-class-types\/{id}\/customer-class-type', \{\n responses: \{\n '200': \{\n/, - /content: \{\n 'application\/json': \{\n/, - /async getCustomerClassType\(\n \@param\.path\.string\('id'\) id: typeof OrderClassType\.prototype\.orderString,\n/, + /\@get\('\/order-class-types\/{id}\/customer-class-type', \{\n {4}responses: \{\n {6}'200': \{\n/, + /content: \{\n {10}'application\/json': \{\n/, + /async getCustomerClassType\(\n {4}\@param\.path\.string\('id'\) id: typeof OrderClassType\.prototype\.orderString,\n/, /\)\: Promise \{\n/, - /return await this\.orderClassTypeRepository\.customerClassType\(id\);\n \}\n/, + /return await this\.orderClassTypeRepository\.customerClassType\(id\);\n {2}\}\n/, ]; const getRegEx = [ @@ -401,19 +395,19 @@ context('check source class repository ', () => { const singleWordClassConstractor = [ /public readonly customer: BelongsToAccessor;\n/, /constructor\(@inject\('datasources\.db'\) dataSource: DbDataSource, @repository\.getter\('CustomerRepository'\) protected customerRepositoryGetter: Getter,\) \{\n/, - /super\(Order, dataSource\);\n this\.customer = this\.createBelongsToAccessorFor\('customer', customerRepositoryGetter,\);\n \}\n/, + /super\(Order, dataSource\);\n {4}this\.customer = this\.createBelongsToAccessorFor\('customer', customerRepositoryGetter,\);\n {2}\}\n/, ]; const multiWordClassConstractor = [ /public readonly customerClass: BelongsToAccessor;\n/, /constructor\(@inject\('datasources\.myDB'\) dataSource: MyDBDataSource, @repository\.getter\('CustomerClassRepository'\) protected customerClassRepositoryGetter: Getter,\) \{\n/, - /super\(OrderClass, dataSource\);\n this\.customerClass = this\.createBelongsToAccessorFor\('customerClassCustNumber', customerClassRepositoryGetter,\);\n \}\n/, + /super\(OrderClass, dataSource\);\n {4}this\.customerClass = this\.createBelongsToAccessorFor\('customerClassCustNumber', customerClassRepositoryGetter,\);\n {2}\}\n/, ]; const typeClassConstractor = [ /public readonly customerClassType: BelongsToAccessor;\n/, /constructor\(@inject\('datasources\.myDB'\) dataSource: MyDBDataSource, @repository\.getter\('CustomerClassTypeRepository'\) protected customerClassTypeRepositoryGetter: Getter,\) \{\n/, - /super\(OrderClassType, dataSource\);\n this\.customerClassType = this\.createBelongsToAccessorFor\('customerClassTypeCustNumber', customerClassTypeRepositoryGetter,\);\n \}\n/, + /super\(OrderClassType, dataSource\);\n {4}this\.customerClassType = this\.createBelongsToAccessorFor\('customerClassTypeCustNumber', customerClassTypeRepositoryGetter,\);\n {2}\}\n/, ]; const sourceRepositoryFile = path.join( @@ -435,11 +429,11 @@ context('check source class repository ', () => { // Verify is property name that already exist will overwriting. context('generate model relation - ', () => { const expectedDecoretor = [ - /@belongsTo\(\(\) => Customer\)\n myCustomer: number;\n/, - /@belongsTo\(\(\) => CustomerClass\)\n myCustomer: number;\n/, - /@belongsTo\(\(\) => CustomerClassType\)\n myCustomer: number;\n/, + /@belongsTo\(\(\) => Customer\)\n {2}myCustomer: number;\n/, + /@belongsTo\(\(\) => CustomerClass\)\n {2}myCustomer: number;\n/, + /@belongsTo\(\(\) => CustomerClassType\)\n {2}myCustomer: number;\n/, ]; - const promptArray = [ + const promptList = [ { relationType: 'belongsTo', sourceModel: 'Order', @@ -456,7 +450,7 @@ context('check source class repository ', () => { additionalFiles: SANDBOX_FILES, }), ) - .withPrompts(promptArray[0]); + .withPrompts(promptList[0]); await testUtils .executeGenerator(generator) .inDir(SANDBOX_PATH, () => @@ -464,7 +458,7 @@ context('check source class repository ', () => { additionalFiles: SANDBOX_FILES, }), ) - .withPrompts(promptArray[0]); + .withPrompts(promptList[0]); const expectedSourceFile = path.join( SANDBOX_PATH, @@ -477,8 +471,8 @@ context('check source class repository ', () => { fs.readFile(expectedSourceFile, (err, data) => { if (err) throw err; - var indexOfFirstRelation = data.indexOf('@belongsTo'); - var lastIndexOfRelation = data.lastIndexOf('@belongsTo'); + const indexOfFirstRelation = data.indexOf('@belongsTo'); + const lastIndexOfRelation = data.lastIndexOf('@belongsTo'); assert.equal(indexOfFirstRelation, lastIndexOfRelation); }); }).timeout(20000); diff --git a/packages/cli/test/integration/generators/clone-example.integration.js b/packages/cli/test/integration/generators/clone-example.integration.js index 919ee35eee77..018044ec32e8 100644 --- a/packages/cli/test/integration/generators/clone-example.integration.js +++ b/packages/cli/test/integration/generators/clone-example.integration.js @@ -21,6 +21,7 @@ const SANDBOX_PATH = path.resolve(__dirname, '..', '.sandbox'); const sandbox = new TestSandbox(SANDBOX_PATH); describe('cloneExampleFromGitHub (SLOW)', function() { + // eslint-disable-next-line no-invalid-this this.timeout(20000); beforeEach('reset sandbox', () => sandbox.reset()); diff --git a/packages/cli/test/integration/generators/discover.integration.js b/packages/cli/test/integration/generators/discover.integration.js index ebd7888dad5d..32ee03633ad9 100644 --- a/packages/cli/test/integration/generators/discover.integration.js +++ b/packages/cli/test/integration/generators/discover.integration.js @@ -71,6 +71,7 @@ describe('lb4 discover integration', () => { beforeEach('reset sandbox', () => sandbox.reset()); it('generates all models without prompts using --all --dataSource', async function() { + // eslint-disable-next-line no-invalid-this this.timeout(10000); await testUtils .executeGenerator(generator) diff --git a/packages/cli/test/integration/generators/example.integration.js b/packages/cli/test/integration/generators/example.integration.js index 390b37e41d2e..a11c45182a1a 100644 --- a/packages/cli/test/integration/generators/example.integration.js +++ b/packages/cli/test/integration/generators/example.integration.js @@ -6,7 +6,6 @@ 'use strict'; const assert = require('yeoman-assert'); -const fs = require('fs'); const expect = require('@loopback/testlab').expect; const path = require('path'); @@ -18,6 +17,7 @@ const ALL_EXAMPLES = require('../../../generators/example').getAllExamples(); const VALID_EXAMPLE = 'todo'; describe('lb4 example', function() { + // eslint-disable-next-line no-invalid-this this.timeout(10000); describe('correctly extends BaseGenerator', baseTests); diff --git a/packages/cli/test/integration/generators/hasmany.relation.integration.js b/packages/cli/test/integration/generators/hasmany.relation.integration.js index ec0dd997af63..154cee37f7e6 100644 --- a/packages/cli/test/integration/generators/hasmany.relation.integration.js +++ b/packages/cli/test/integration/generators/hasmany.relation.integration.js @@ -8,9 +8,6 @@ const path = require('path'); const assert = require('yeoman-assert'); const testlab = require('@loopback/testlab'); -const fs = require('fs'); - -const expect = testlab.expect; const TestSandbox = testlab.TestSandbox; const generator = path.join(__dirname, '../../../generators/relation'); @@ -48,7 +45,7 @@ const repositoryFileName = [ ]; describe('lb4 relation', function() { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(30000); beforeEach('reset sandbox', async () => { @@ -81,7 +78,7 @@ describe('lb4 relation', function() { /import \{OrderClassType\} from '\.\/order-class-type\.model';\n/, ]; const expectedDecoretor = [ - /\@hasMany\(\(\) => Order\)\n orders: Order\[\];\n/, + /\@hasMany\(\(\) => Order\)\n {2}orders: Order\[\];\n/, /\@hasMany\(\(\) => OrderClass ,\{keyTo: 'customerClassCustNumber'\}\)/, /\@hasMany\(\(\) => OrderClassType ,\{keyTo: 'customerClassTypeCustNumber'\}\)/, ]; @@ -140,14 +137,14 @@ describe('lb4 relation', function() { /import \{OrderClassType\} from '\.\/order-class-type\.model';\n/, ]; const expectedDecoretor = [ - /\@hasMany\(\(\) => Order\)\n myOrders: Order\[\];\n/, + /\@hasMany\(\(\) => Order\)\n {2}myOrders: Order\[\];\n/, /\@hasMany\(\(\) => OrderClass ,\{keyTo: 'customerClassCustNumber'\}\)/, /\@hasMany\(\(\) => OrderClassType ,\{keyTo: 'customerClassTypeCustNumber'\}\)/, ]; const expectedProperty = [ - /@property\(\{\n type: 'number',\n \}\)\n customerId\?\: number;\n/, - /@property\(\{\n type: 'number',\n \}\)\n customerClassCustNumber\?\: number;\n/, - /@property\(\{\n type: 'number',\n \}\)\n customerClassTypeCustNumber\?\: number;\n/, + /@property\(\{\n {4}type: 'number',\n {2}\}\)\n {2}customerId\?\: number;\n/, + /@property\(\{\n {4}type: 'number',\n {2}\}\)\n {2}customerClassCustNumber\?\: number;\n/, + /@property\(\{\n {4}type: 'number',\n {2}\}\)\n {2}customerClassTypeCustNumber\?\: number;\n/, ]; promptArray.forEach(function(multiItemPrompt, i) { @@ -212,11 +209,11 @@ describe('lb4 relation', function() { /import \{OrderClassType\} from '\.\/order-class-type\.model';\n/, ]; const expectedDecoretor = [ - /\@hasMany\(\(\) => Order ,\{keyTo: 'mykey'\}\)\n orders: Order\[\];\n/, - /\@hasMany\(\(\) => OrderClass ,\{keyTo: 'mykey'\}\)\n orderClasses: OrderClass\[\];\n/, - /\@hasMany\(\(\) => OrderClassType ,\{keyTo: 'mykey'\}\)\n orderClassTypes: OrderClassType\[\];\n/, + /\@hasMany\(\(\) => Order ,\{keyTo: 'mykey'\}\)\n {2}orders: Order\[\];\n/, + /\@hasMany\(\(\) => OrderClass ,\{keyTo: 'mykey'\}\)\n {2}orderClasses: OrderClass\[\];\n/, + /\@hasMany\(\(\) => OrderClassType ,\{keyTo: 'mykey'\}\)\n {2}orderClassTypes: OrderClassType\[\];\n/, ]; - const expectedProperty = /@property\(\{\n type: 'number',\n \}\)\n mykey\?\: number;\n/; + const expectedProperty = /@property\(\{\n {4}type: 'number',\n {2}\}\)\n {2}mykey\?\: number;\n/; promptArray.forEach(function(multiItemPrompt, i) { it('add the keyTo to the source model', async () => { @@ -272,7 +269,7 @@ describe('lb4 relation', function() { ]; const expectedDecoretor = [ - /\@hasMany\(\(\) => Order\)\n orders: Order\[\];\n/, + /\@hasMany\(\(\) => Order\)\n {2}orders: Order\[\];\n/, /\@hasMany\(\(\) => OrderClass ,\{keyTo: 'customerClassCustNumber'\}\)\n/, /\@hasMany\(\(\) => OrderClassType ,\{keyTo: 'customerClassTypeCustNumber'\}\)\n/, ]; @@ -324,9 +321,9 @@ context('check if the controller file created ', () => { /class CustomerClassTypeOrderClassTypeController/, ]; const controllerConstructor = [ - /constructor\(\n \@repository\(CustomerRepository\) protected customerRepository: CustomerRepository,\n \) \{ \}\n/, - /constructor\(\n \@repository\(CustomerClassRepository\) protected customerClassRepository: CustomerClassRepository,\n \) \{ \}\n/, - /constructor\(\n \@repository\(CustomerClassTypeRepository\) protected customerClassTypeRepository: CustomerClassTypeRepository,\n \) \{ \}\n/, + /constructor\(\n {4}\@repository\(CustomerRepository\) protected customerRepository: CustomerRepository,\n {2}\) \{ \}\n/, + /constructor\(\n {4}\@repository\(CustomerClassRepository\) protected customerClassRepository: CustomerClassRepository,\n {2}\) \{ \}\n/, + /constructor\(\n {4}\@repository\(CustomerClassTypeRepository\) protected customerClassTypeRepository: CustomerClassTypeRepository,\n {2}\) \{ \}\n/, ]; const indexExport = [ @@ -383,37 +380,37 @@ context('check if the controller file created ', () => { sourceClassnames[i], async () => { const getOrdersByCustomerIdRegEx = [ - /\@get\('\/customers\/{id}\/orders', {\n responses: {\n '200': {\n/, + /\@get\('\/customers\/{id}\/orders', {\n {4}responses: {\n {6}'200': {\n/, /description: 'Array of Order\\'s belonging to Customer',\n/, - /content: {\n 'application\/json': {\n/, + /content: {\n {10}'application\/json': {\n/, /schema: { type: 'array', items: { 'x-ts-type': Order } },/, - /},\n . },\n . },\n . },\n }\)\n/, - /async find\(\n . \@param.path.number\('id'\) id: number,\n/, + /},\n . {6}},\n . {4}},\n . {2}},\n {2}}\)\n/, + /async find\(\n . {2}\@param.path.number\('id'\) id: number,\n/, /\@param.query.object\('filter'\) filter\?: Filter,\n/, /\)\: Promise {\n/, - /return await this\.customerRepository\.orders\(id\)\.find\(filter\);\n }\n/, + /return await this\.customerRepository\.orders\(id\)\.find\(filter\);\n {2}}\n/, ]; const getOrdersClassByCustomerClassIdRegEx = [ - /\@get\('\/customer-classes\/{id}\/order-classes', {\n responses: {\n '200': {\n/, + /\@get\('\/customer-classes\/{id}\/order-classes', {\n {4}responses: {\n {6}'200': {\n/, /description: 'Array of OrderClass\\'s belonging to CustomerClass',\n/, - /content: {\n 'application\/json': {\n/, + /content: {\n {10}'application\/json': {\n/, /schema: { type: 'array', items: { 'x-ts-type': OrderClass } },/, - /},\n . },\n . },\n . },\n }\)\n/, - /async find\(\n . \@param.path.number\('id'\) id: number,\n/, + /},\n . {6}},\n . {4}},\n . {2}},\n {2}}\)\n/, + /async find\(\n . {2}\@param.path.number\('id'\) id: number,\n/, /\@param.query.object\('filter'\) filter\?: Filter,\n/, /\)\: Promise {\n/, - /return await this\.customerClassRepository\.orderClasses\(id\)\.find\(filter\);\n }\n/, + /return await this\.customerClassRepository\.orderClasses\(id\)\.find\(filter\);\n {2}}\n/, ]; const getOrdersClassTypeByCustomerClassTypeIdRegEx = [ - /\@get\('\/customer-class-types\/{id}\/order-class-types', {\n responses: {\n '200': {\n/, + /\@get\('\/customer-class-types\/{id}\/order-class-types', {\n {4}responses: {\n {6}'200': {\n/, /description: 'Array of OrderClassType\\'s belonging to CustomerClassType',\n/, - /content: {\n 'application\/json': {\n/, + /content: {\n {10}'application\/json': {\n/, /schema: { type: 'array', items: { 'x-ts-type': OrderClassType } },/, - /},\n . },\n . },\n . },\n }\)\n/, - /async find\(\n . \@param.path.number\('id'\) id: number,\n/, + /},\n . {6}},\n . {4}},\n . {2}},\n {2}}\)\n/, + /async find\(\n . {2}\@param.path.number\('id'\) id: number,\n/, /\@param.query.object\('filter'\) filter\?: Filter,\n/, /\)\: Promise {\n/, - /return await this\.customerClassTypeRepository\.orderClassTypes\(id\).find\(filter\);\n }\n/, + /return await this\.customerClassTypeRepository\.orderClassTypes\(id\).find\(filter\);\n {2}}\n/, ]; const getRegEx = [ @@ -437,34 +434,34 @@ context('check if the controller file created ', () => { 'controller POST ' + targetClassnames[i] + ' to ' + sourceClassnames[i], async () => { const postClassCreateRegEx = [ - /\@post\('\/customers\/{id}\/orders', {\n responses: {\n '200': {\n/, + /\@post\('\/customers\/{id}\/orders', {\n {4}responses: {\n {6}'200': {\n/, /description: 'Customer model instance',\n/, /content: { 'application\/json': { schema: { 'x-ts-type': Order } } },\n/, - /},\n . },\n .}\)\n async create\(\n/, + /},\n . {2}},\n .}\)\n {2}async create\(\n/, /\@param\.path\.number\('id'\) id: typeof Customer\.prototype\.id,\n/, /\@requestBody\(\) order: Order,\n/, /\): Promise {\n/, - /return await this\.customerRepository\.orders\(id\)\.create\(order\);\n }\n/, + /return await this\.customerRepository\.orders\(id\)\.create\(order\);\n {2}}\n/, ]; const postMultiWordClassCreateRegEx = [ - /\@post\('\/customer-classes\/{id}\/order-classes', {\n responses: {\n '200': {\n/, + /\@post\('\/customer-classes\/{id}\/order-classes', {\n {4}responses: {\n {6}'200': {\n/, /description: 'CustomerClass model instance',\n/, /content: { 'application\/json': { schema: { 'x-ts-type': OrderClass } } },\n/, - /},\n . },\n .}\)\n async create\(\n/, + /},\n . {2}},\n .}\)\n {2}async create\(\n/, /\@param\.path\.number\('id'\) id: typeof CustomerClass\.prototype\.custNumber,\n/, /\@requestBody\(\) orderClass: OrderClass,\n/, /\): Promise {\n/, - /return await this\.customerClassRepository\.orderClasses\(id\)\.create\(orderClass\);\n }\n/, + /return await this\.customerClassRepository\.orderClasses\(id\)\.create\(orderClass\);\n {2}}\n/, ]; const postTypeClassCreateRegEx = [ - /\@post\('\/customer-class-types\/{id}\/order-class-types', {\n responses: {\n '200': {\n/, + /\@post\('\/customer-class-types\/{id}\/order-class-types', {\n {4}responses: {\n {6}'200': {\n/, /description: 'CustomerClassType model instance',\n/, /content: { 'application\/json': { schema: { 'x-ts-type': OrderClassType } } },\n/, - /},\n . },\n .}\)\n async create\(\n/, + /},\n . {2}},\n .}\)\n {2}async create\(\n/, /\@param\.path\.number\('id'\) id: typeof CustomerClassType\.prototype\.custNumber,\n/, /\@requestBody\(\) orderClassType: OrderClassType,\n/, /\): Promise {\n/, - /return await this\.customerClassTypeRepository\.orderClassTypes\(id\)\.create\(orderClassType\);\n }\n/, + /return await this\.customerClassTypeRepository\.orderClassTypes\(id\)\.create\(orderClassType\);\n {2}}\n/, ]; const expectedControllerFile = path.join( @@ -493,36 +490,36 @@ context('check if the controller file created ', () => { ' id', async () => { const updateOrderByCustomerIdRegEx = [ - /\@patch\('\/customers\/{id}\/orders', {\n responses: {\n '200': {\n/, + /\@patch\('\/customers\/{id}\/orders', {\n {4}responses: {\n {6}'200': {\n/, /description: 'Customer.Order PATCH success count',\n/, /content: { 'application\/json': { schema: CountSchema } },\n/, - /},\n },\n }\)\n async patch\(\n/, - /\@param\.path\.number\('id'\) id: number,\n \@requestBody\(\) order: Partial,\n/, + /},\n {4}},\n {2}}\)\n {2}async patch\(\n/, + /\@param\.path\.number\('id'\) id: number,\n {4}\@requestBody\(\) order: Partial,\n/, /\@param\.query\.object\('where', getWhereSchemaFor\(Order\)\) where\?: Where,\n/, /\): Promise {\n/, - /return await this\.customerRepository\.orders\(id\).patch\(order, where\);\n }\n/, + /return await this\.customerRepository\.orders\(id\).patch\(order, where\);\n {2}}\n/, ]; const updateOrderClassByCustomerClassIdRegEx = [ - /\@patch\('\/customer-classes\/{id}\/order-classes', {\n responses: {\n '200': {\n/, + /\@patch\('\/customer-classes\/{id}\/order-classes', {\n {4}responses: {\n {6}'200': {\n/, /description: 'CustomerClass.OrderClass PATCH success count',\n/, /content: { 'application\/json': { schema: CountSchema } },\n/, - /},\n },\n }\)\n async patch\(\n/, - /\@param\.path\.number\('id'\) id: number,\n \@requestBody\(\) orderClass: Partial,\n/, + /},\n {4}},\n {2}}\)\n {2}async patch\(\n/, + /\@param\.path\.number\('id'\) id: number,\n {4}\@requestBody\(\) orderClass: Partial,\n/, /\@param\.query\.object\('where', getWhereSchemaFor\(OrderClass\)\) where\?: Where,\n/, /\): Promise {\n/, - /return await this\.customerClassRepository\.orderClasses\(id\)\.patch\(orderClass, where\);\n }\n/, + /return await this\.customerClassRepository\.orderClasses\(id\)\.patch\(orderClass, where\);\n {2}}\n/, ]; const updateOrderClassByCustomerClassTypeIdRegEx = [ - /\@patch\('\/customer-class-types\/{id}\/order-class-types', {\n responses: {\n '200': {\n/, + /\@patch\('\/customer-class-types\/{id}\/order-class-types', {\n {4}responses: {\n {6}'200': {\n/, /description: 'CustomerClassType.OrderClassType PATCH success count',\n/, /content: { 'application\/json': { schema: CountSchema } },\n/, - /},\n },\n }\)\n async patch\(\n/, - /\@param\.path\.number\('id'\) id: number,\n \@requestBody\(\) orderClassType: Partial,\n/, + /},\n {4}},\n {2}}\)\n {2}async patch\(\n/, + /\@param\.path\.number\('id'\) id: number,\n {4}\@requestBody\(\) orderClassType: Partial,\n/, /\@param\.query\.object\('where', getWhereSchemaFor\(OrderClassType\)\) where\?: Where,\n/, /\): Promise {\n/, - /return await this\.customerClassTypeRepository\.orderClassTypes\(id\).patch\(orderClassType, where\);\n }\n/, + /return await this\.customerClassTypeRepository\.orderClassTypes\(id\).patch\(orderClassType, where\);\n {2}}\n/, ]; const expectedControllerFile = path.join( @@ -551,36 +548,36 @@ context('check if the controller file created ', () => { ' id', async () => { const deleteOrderByCustomerIdRegEx = [ - /\@del\('\/customers\/{id}\/orders', {\n responses: {\n '200': {\n/, + /\@del\('\/customers\/{id}\/orders', {\n {4}responses: {\n {6}'200': {\n/, /description: 'Customer.Order DELETE success count',\n/, /content: { 'application\/json': { schema: CountSchema } },\n/, - /},\n },\n }\)\n async delete\(\n/, + /},\n {4}},\n {2}}\)\n {2}async delete\(\n/, /\@param\.path\.number\('id'\) id: number,\n /, /\@param\.query\.object\('where', getWhereSchemaFor\(Order\)\) where\?: Where,\n/, /\): Promise {\n/, - /return await this\.customerRepository\.orders\(id\)\.delete\(where\);\n }\n}\n/, + /return await this\.customerRepository\.orders\(id\)\.delete\(where\);\n {2}}\n}\n/, ]; const deleteOrderClassByCustomerClassIdRegEx = [ - /\@del\('\/customer-classes\/{id}\/order-classes', {\n responses: {\n '200': {\n/, + /\@del\('\/customer-classes\/{id}\/order-classes', {\n {4}responses: {\n {6}'200': {\n/, /description: 'CustomerClass.OrderClass DELETE success count',\n/, /content: { 'application\/json': { schema: CountSchema } },\n/, - /},\n },\n }\)\n async delete\(\n/, + /},\n {4}},\n {2}}\)\n {2}async delete\(\n/, /\@param\.path\.number\('id'\) id: number,\n /, /\@param\.query\.object\('where', getWhereSchemaFor\(OrderClass\)\) where\?: Where,\n/, /\): Promise {\n/, - /return await this\.customerClassRepository\.orderClasses\(id\)\.delete\(where\);\n }\n}\n/, + /return await this\.customerClassRepository\.orderClasses\(id\)\.delete\(where\);\n {2}}\n}\n/, ]; const deleteOrderClassTypeByCustomerClassTypeIdRegEx = [ - /\@del\('\/customer-class-types\/{id}\/order-class-types', {\n responses: {\n '200': {\n/, + /\@del\('\/customer-class-types\/{id}\/order-class-types', {\n {4}responses: {\n {6}'200': {\n/, /description: 'CustomerClassType.OrderClassType DELETE success count',\n/, /content: { 'application\/json': { schema: CountSchema } },\n/, - /},\n },\n }\)\n async delete\(\n/, + /},\n {4}},\n {2}}\)\n {2}async delete\(\n/, /\@param\.path\.number\('id'\) id: number,\n /, /\@param\.query\.object\('where', getWhereSchemaFor\(OrderClassType\)\) where\?: Where,\n/, /\): Promise {\n/, - /return await this\.customerClassTypeRepository\.orderClassTypes\(id\)\.delete\(where\);\n }\n}\n/, + /return await this\.customerClassTypeRepository\.orderClassTypes\(id\)\.delete\(where\);\n {2}}\n}\n/, ]; const expectedControllerFile = path.join( @@ -678,18 +675,18 @@ context('check source class repository ', () => { const singleWordClassConstractor = [ /public readonly orders: HasManyRepositoryFactory;\n/, /constructor\(\@inject\('datasources\.db'\) dataSource: DbDataSource, \@repository\.getter\('OrderRepository'\) protected orderRepositoryGetter: Getter,\) \{\n/, - /super\(Customer, dataSource\);\n this.orders = this.createHasManyRepositoryFactoryFor\('orders', orderRepositoryGetter,\);\n \}\n/, + /super\(Customer, dataSource\);\n {4}this.orders = this.createHasManyRepositoryFactoryFor\('orders', orderRepositoryGetter,\);\n {2}\}\n/, ]; const multiWordClassConstractor = [ /public readonly orderClasses: HasManyRepositoryFactory;\n/, /constructor\(\@inject\('datasources\.myDB'\) dataSource: MyDBDataSource, \@repository\.getter\('OrderClassRepository'\) protected orderClassRepositoryGetter: Getter,\) \{\n/, - /super\(CustomerClass, dataSource\);\n this\.orderClasses = this\.createHasManyRepositoryFactoryFor\('orderClasses', orderClassRepositoryGetter,\);\n \}\n/, + /super\(CustomerClass, dataSource\);\n {4}this\.orderClasses = this\.createHasManyRepositoryFactoryFor\('orderClasses', orderClassRepositoryGetter,\);\n {2}\}\n/, ]; const typeClassConstractor = [ /public readonly orderClassTypes: HasManyRepositoryFactory;\n/, /constructor\(@inject\('datasources\.myDB'\) dataSource: MyDBDataSource, @repository\.getter\('OrderClassTypeRepository'\) protected orderClassTypeRepositoryGetter: Getter,\) \{\n/, - /super\(CustomerClassType, dataSource\);\n this\.orderClassTypes = this\.createHasManyRepositoryFactoryFor\('orderClassTypes', orderClassTypeRepositoryGetter,\);\n \}/, + /super\(CustomerClassType, dataSource\);\n {4}this\.orderClassTypes = this\.createHasManyRepositoryFactoryFor\('orderClassTypes', orderClassTypeRepositoryGetter,\);\n {2}\}/, ]; const sourceRepositoryFile = path.join( diff --git a/packages/cli/test/integration/generators/model.integration.js b/packages/cli/test/integration/generators/model.integration.js index 6f5794e203c5..1501c2e8dfb9 100644 --- a/packages/cli/test/integration/generators/model.integration.js +++ b/packages/cli/test/integration/generators/model.integration.js @@ -225,7 +225,7 @@ describe('lb4 model integration', () => { ); assert.fileContent( expectedModelFile, - /export interface TestRelations {\n \/\/ describe navigational properties here\n}/, + /export interface TestRelations {\n {2}\/\/ describe navigational properties here\n}/, ); }); @@ -285,7 +285,7 @@ describe('model generator using --config option', () => { assert.fileContent( expectedModelFile, - /@model\({\n settings: {\n annotations: \[{destinationClass: 'class1', argument: 0}],\n foreignKeys: {fk_destination: {name: 'fk_destination'}},\n strict: false\n }\n}\)/, + /@model\({\n {2}settings: {\n {4}annotations: \[{destinationClass: 'class1', argument: 0}],\n {4}foreignKeys: {fk_destination: {name: 'fk_destination'}},\n {4}strict: false\n {2}}\n}\)/, ); }); }); diff --git a/packages/cli/test/integration/generators/openapi-petstore.integration.js b/packages/cli/test/integration/generators/openapi-petstore.integration.js index ed1015e28cd8..2093a3f91e52 100644 --- a/packages/cli/test/integration/generators/openapi-petstore.integration.js +++ b/packages/cli/test/integration/generators/openapi-petstore.integration.js @@ -27,6 +27,7 @@ const props = { describe('openapi-generator specific files', function() { // These tests take longer to execute, they used to time out on Travis CI + // eslint-disable-next-line no-invalid-this this.timeout(10000); const index = path.resolve(SANDBOX_PATH, 'src/controllers/index.ts'); diff --git a/packages/cli/test/integration/generators/relation.integration.js b/packages/cli/test/integration/generators/relation.integration.js index 7e5cc5a2bc99..2bb84c8982c4 100644 --- a/packages/cli/test/integration/generators/relation.integration.js +++ b/packages/cli/test/integration/generators/relation.integration.js @@ -8,7 +8,6 @@ const path = require('path'); const assert = require('yeoman-assert'); const testlab = require('@loopback/testlab'); -const fs = require('fs'); const expect = testlab.expect; const TestSandbox = testlab.TestSandbox; const generator = path.join(__dirname, '../../../generators/relation'); @@ -20,14 +19,11 @@ const testUtils = require('../../test-utils'); // Test Sandbox const SANDBOX_PATH = path.resolve(__dirname, '..', '.sandbox'); -const MODEL_APP_PATH = 'src/models'; const CONTROLLER_PATH = 'src/controllers'; -const REPOSITORY_APP_PATH = 'src/repositories'; const sandbox = new TestSandbox(SANDBOX_PATH); describe('lb4 relation', function() { - // tslint:disable-next-line:no-invalid-this - + // eslint-disable-next-line no-invalid-this this.timeout(30000); beforeEach('reset sandbox', async () => { diff --git a/packages/cli/test/integration/generators/repository.integration.js b/packages/cli/test/integration/generators/repository.integration.js index a4911bb10b74..ccefc73ad42b 100644 --- a/packages/cli/test/integration/generators/repository.integration.js +++ b/packages/cli/test/integration/generators/repository.integration.js @@ -8,7 +8,6 @@ const path = require('path'); const assert = require('yeoman-assert'); const testlab = require('@loopback/testlab'); -const fs = require('fs'); const expect = testlab.expect; const TestSandbox = testlab.TestSandbox; @@ -22,7 +21,7 @@ const SANDBOX_PATH = path.resolve(__dirname, '..', '.sandbox'); const sandbox = new TestSandbox(SANDBOX_PATH); describe('lb4 repository', function() { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(30000); beforeEach('reset sandbox', async () => { diff --git a/packages/cli/test/integration/lib/artifact-generator.js b/packages/cli/test/integration/lib/artifact-generator.js index c9e8169ed277..dd8950e2795d 100644 --- a/packages/cli/test/integration/lib/artifact-generator.js +++ b/packages/cli/test/integration/lib/artifact-generator.js @@ -8,7 +8,7 @@ const assert = require('yeoman-assert'); const sinon = require('sinon'); const chalk = require('chalk'); const testUtils = require('../../test-utils'); -var fs = require('mem-fs-editor').create(require('mem-fs').create()); +const fs = require('mem-fs-editor').create(require('mem-fs').create()); module.exports = function(artiGenerator) { return function() { @@ -41,8 +41,8 @@ module.exports = function(artiGenerator) { }); it('has name argument set up', () => { - let gen = testUtils.testSetUpGen(artiGenerator); - let helpText = gen.help(); + const gen = testUtils.testSetUpGen(artiGenerator); + const helpText = gen.help(); assert(helpText.match(/\[\]/)); assert(helpText.match(/# Name for the /)); assert(helpText.match(/Type: String/)); @@ -50,7 +50,7 @@ module.exports = function(artiGenerator) { }); it('sets up artifactInfo', async () => { - let gen = testUtils.testSetUpGen(artiGenerator, {args: ['test']}); + const gen = testUtils.testSetUpGen(artiGenerator, {args: ['test']}); await gen.setOptions(); assert(gen.artifactInfo); assert.equal(gen.artifactInfo.name, 'test'); diff --git a/packages/cli/test/integration/lib/project-generator.js b/packages/cli/test/integration/lib/project-generator.js index 38f433ce74d4..009f1520a3a7 100644 --- a/packages/cli/test/integration/lib/project-generator.js +++ b/packages/cli/test/integration/lib/project-generator.js @@ -17,6 +17,7 @@ module.exports = function(projGenerator, props, projectType) { return function() { // Increase the timeout to 60 seconds to accomodate // for possibly slow CI build machines + // eslint-disable-next-line no-invalid-this this.timeout(60 * 1000); describe('help', () => { @@ -68,8 +69,8 @@ module.exports = function(projGenerator, props, projectType) { }); describe('argument and options setup', () => { it('has name argument set up', () => { - let gen = testUtils.testSetUpGen(projGenerator); - let helpText = gen.help(); + const gen = testUtils.testSetUpGen(projGenerator); + const helpText = gen.help(); assert(helpText.match(/\[\]/)); assert(helpText.match(/# Project name for the /)); assert(helpText.match(/Type: String/)); @@ -77,22 +78,22 @@ module.exports = function(projGenerator, props, projectType) { }); it('has description option set up', () => { - let gen = testUtils.testSetUpGen(projGenerator); - let helpText = gen.help(); + const gen = testUtils.testSetUpGen(projGenerator); + const helpText = gen.help(); assert(helpText.match(/--description/)); assert(helpText.match(/# Description for the /)); }); it('has outdir option set up', () => { - let gen = testUtils.testSetUpGen(projGenerator); - let helpText = gen.help(); + const gen = testUtils.testSetUpGen(projGenerator); + const helpText = gen.help(); assert(helpText.match(/--outdir/)); assert(helpText.match(/# Project root directory /)); }); it('has private option set up', () => { - let gen = testUtils.testSetUpGen(projGenerator); - let helpText = gen.help(); + const gen = testUtils.testSetUpGen(projGenerator); + const helpText = gen.help(); assert(helpText.match(/--private/)); assert( helpText.match( @@ -101,37 +102,37 @@ module.exports = function(projGenerator, props, projectType) { ); }); - it('has tslint option set up', () => { - let gen = testUtils.testSetUpGen(projGenerator); - let helpText = gen.help(); - assert(helpText.match(/--tslint/)); - assert(helpText.match(/# Enable tslint/)); + it('has eslint option set up', () => { + const gen = testUtils.testSetUpGen(projGenerator); + const helpText = gen.help(); + assert(helpText.match(/--eslint/)); + assert(helpText.match(/# Enable eslint/)); }); it('has prettier option set up', () => { - let gen = testUtils.testSetUpGen(projGenerator); - let helpText = gen.help(); + const gen = testUtils.testSetUpGen(projGenerator); + const helpText = gen.help(); assert(helpText.match(/--prettier/)); assert(helpText.match(/# Enable prettier/)); }); it('has mocha option set up', () => { - let gen = testUtils.testSetUpGen(projGenerator); - let helpText = gen.help(); + const gen = testUtils.testSetUpGen(projGenerator); + const helpText = gen.help(); assert(helpText.match(/--mocha/)); assert(helpText.match(/# Enable mocha/)); }); it('has loopbackBuild option set up', () => { - let gen = testUtils.testSetUpGen(projGenerator); - let helpText = gen.help(); + const gen = testUtils.testSetUpGen(projGenerator); + const helpText = gen.help(); assert(helpText.match(/--loopbackBuild/)); assert(helpText.match(/# Use @loopback\/build/)); }); it('has vscode option set up', () => { - let gen = testUtils.testSetUpGen(projGenerator); - let helpText = gen.help(); + const gen = testUtils.testSetUpGen(projGenerator); + const helpText = gen.help(); assert(helpText.match(/--vscode/)); assert(helpText.match(/# Use preconfigured VSCode settings/)); }); @@ -140,12 +141,12 @@ module.exports = function(projGenerator, props, projectType) { describe('setOptions', () => { it('has projectInfo set up', async () => { - let gen = testUtils.testSetUpGen(projGenerator); + const gen = testUtils.testSetUpGen(projGenerator); gen.options = { name: 'foobar', description: null, outdir: null, - tslint: null, + eslint: null, prettier: true, mocha: null, loopbackBuild: null, @@ -168,7 +169,7 @@ module.exports = function(projGenerator, props, projectType) { describe('promptProjectName', () => { it('incorporates user input into projectInfo', () => { - let gen = testUtils.testSetUpGen(projGenerator); + const gen = testUtils.testSetUpGen(projGenerator); return testPrompt( gen, { @@ -188,7 +189,7 @@ module.exports = function(projGenerator, props, projectType) { describe('promptProjectDir', () => { it('incorporates user input into projectInfo', () => { - let gen = testUtils.testSetUpGen(projGenerator); + const gen = testUtils.testSetUpGen(projGenerator); return testPrompt( gen, { @@ -205,12 +206,12 @@ module.exports = function(projGenerator, props, projectType) { describe('promptOptions', () => { it('incorporates user input into projectInfo', () => { - let gen = testUtils.testSetUpGen(projGenerator); + const gen = testUtils.testSetUpGen(projGenerator); return testPrompt( gen, { settings: [ - 'Enable tslint', + 'Enable eslint', 'Enable prettier', 'Enable mocha', 'Enable loopbackBuild', @@ -220,7 +221,7 @@ module.exports = function(projGenerator, props, projectType) { 'promptOptions', ).then(() => { gen.prompt.restore(); - assert(gen.projectInfo.tslint === true); + assert(gen.projectInfo.eslint === true); assert(gen.projectInfo.prettier === true); assert(gen.projectInfo.mocha === true); assert(gen.projectInfo.loopbackBuild === true); @@ -241,7 +242,7 @@ module.exports = function(projGenerator, props, projectType) { '.prettierrc', '.gitignore', '.npmrc', - 'tslint.json', + '.eslintrc.js', 'src/index.ts', '.vscode/settings.json', '.vscode/tasks.json', @@ -250,11 +251,11 @@ module.exports = function(projGenerator, props, projectType) { assert.fileContent([ ['package.json', '@loopback/build'], ['package.json', '"typescript"'], - ['package.json', '"tslint"'], - ['tslint.json', '@loopback/tslint-config'], + ['package.json', '"eslint"'], + ['.eslintrc.js', '@loopback/eslint-config'], ['tsconfig.json', '@loopback/build'], ]); - assert.noFileContent([['tslint.json', '"rules"']]); + assert.noFileContent([['.eslintrc.js', '"rules"']]); if (projectType === 'application') { assert.fileContent( @@ -307,7 +308,7 @@ module.exports = function(projGenerator, props, projectType) { settings: [ // Force Enable loopbackBuild to be unchecked 'Disable loopbackBuild', - 'Enable tslint', + 'Enable eslint', 'Enable prettier', 'Enable mocha', 'Enable vscode', @@ -332,15 +333,14 @@ module.exports = function(projGenerator, props, projectType) { assert.noFileContent([ ['package.json', '@loopback/build'], ['package.json', '@loopback/dist-util'], - ['tslint.json', '@loopback/build'], ['tsconfig.json', '@loopback/build'], ]); assert.fileContent([ ['package.json', '"clean": "rimraf dist"'], ['package.json', '"typescript"'], - ['package.json', '"tslint"'], + ['package.json', '"eslint"'], ['package.json', '"prettier"'], - ['tslint.json', '"rules"'], + ['.eslintrc.js', "extends: '@loopback/eslint-config'"], ['tsconfig.json', '"compilerOptions"'], ['tsconfig.json', '"resolveJsonModule": true'], ['index.js', "require('./dist')"], @@ -355,7 +355,7 @@ module.exports = function(projGenerator, props, projectType) { { settings: [ 'Enable loopbackBuild', - 'Enable tslint', + 'Enable eslint', 'Disable prettier', // Force Enable prettier to be unchecked 'Enable mocha', 'Enable vscode', @@ -372,14 +372,14 @@ module.exports = function(projGenerator, props, projectType) { }); }); - describe('with tslint disabled', () => { + describe('with eslint disabled', () => { before(() => { return helpers.run(projGenerator).withPrompts( Object.assign( { settings: [ 'Enable loopbackBuild', - 'Disable tslint', // Force Enable tslint to be unchecked + 'Disable eslint', // Force Enable eslint to be unchecked 'Enable prettier', 'Enable mocha', 'Enable vscode', @@ -391,12 +391,12 @@ module.exports = function(projGenerator, props, projectType) { }); it('creates files', () => { - assert.noFile(['tslint.json', 'tslint.build.json']); + assert.noFile(['.eslintrc.js', 'eslint.build.json']); assert.jsonFileContent('package.json', props); }); }); - describe('with loopbackBuild & tslint disabled', () => { + describe('with loopbackBuild & eslint disabled', () => { before(() => { return helpers.run(projGenerator).withPrompts( Object.assign( @@ -404,8 +404,8 @@ module.exports = function(projGenerator, props, projectType) { settings: [ // Force Enable loopbackBuild to be unchecked 'Disable loopbackBuild', - // Force Enable tslint to be unchecked - 'Disable tslint', + // Force Enable eslint to be unchecked + 'Disable eslint', 'Enable prettier', 'Enable mocha', 'Enable vscode', @@ -418,10 +418,10 @@ module.exports = function(projGenerator, props, projectType) { it('creates files', () => { assert.jsonFileContent('package.json', props); - assert.noFile(['tslint.json', 'tslint.build.json']); + assert.noFile(['.eslintrc.js', 'eslint.build.json']); assert.noFileContent([ ['package.json', '@loopback/build'], - ['package.json', '"tslint"'], + ['package.json', '"eslint"'], ['tsconfig.json', '@loopback/build'], ]); assert.fileContent([ @@ -429,7 +429,7 @@ module.exports = function(projGenerator, props, projectType) { ['package.json', '"prettier"'], ['tsconfig.json', '"compilerOptions"'], ]); - assert.noFileContent([['package.json', '"tslint"']]); + assert.noFileContent([['package.json', '"eslint"']]); }); }); @@ -440,7 +440,7 @@ module.exports = function(projGenerator, props, projectType) { { settings: [ 'Enable loopbackBuild', - 'Enable tslint', + 'Enable eslint', 'Enable prettier', 'Enable mocha', 'Disable vscode', // Force Enable vscode to be unchecked @@ -472,10 +472,10 @@ module.exports = function(projGenerator, props, projectType) { }); }); - async function testPrompt(gen, props, fnName) { + async function testPrompt(gen, prompts, fnName) { await gen.setOptions(); gen.prompt = sinon.stub(gen, 'prompt'); - gen.prompt.resolves(props); + gen.prompt.resolves(prompts); return await gen[fnName](); } }; diff --git a/packages/cli/test/test-utils.js b/packages/cli/test/test-utils.js index a3d49d8a0641..21b2006ca238 100644 --- a/packages/cli/test/test-utils.js +++ b/packages/cli/test/test-utils.js @@ -121,7 +121,7 @@ exports.givenLBProject = function(rootDir, options) { } if (sandBoxFiles.length > 0) { - for (let theFile of sandBoxFiles) { + for (const theFile of sandBoxFiles) { const fullPath = path.join(rootDir, theFile.path, theFile.file); if (!fs.existsSync(fullPath)) { fs.ensureDirSync(path.dirname(fullPath)); diff --git a/packages/context/package.json b/packages/context/package.json index df80a12f6417..ac7a8327e0d1 100644 --- a/packages/context/package.json +++ b/packages/context/package.json @@ -27,7 +27,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/bluebird": "^3.5.20", "@types/debug": "^4.1.4", "@types/node": "^10.11.2", diff --git a/packages/context/src/__tests__/acceptance/bind-decorator.acceptance.ts b/packages/context/src/__tests__/acceptance/bind-decorator.acceptance.ts index 76830a3a6146..9ae9f99bf46c 100644 --- a/packages/context/src/__tests__/acceptance/bind-decorator.acceptance.ts +++ b/packages/context/src/__tests__/acceptance/bind-decorator.acceptance.ts @@ -99,7 +99,7 @@ describe('@bind - customize classes with binding attributes', () => { }); it('honors binding scope from @bind over defaultScope', () => { - let binding = createBindingFromClass(MySingletonController, { + const binding = createBindingFromClass(MySingletonController, { defaultScope: BindingScope.TRANSIENT, }); expect(binding.scope).to.equal(BindingScope.SINGLETON); diff --git a/packages/context/src/__tests__/acceptance/class-level-bindings.acceptance.ts b/packages/context/src/__tests__/acceptance/class-level-bindings.acceptance.ts index bbc3865ac003..305ffc6c2903 100644 --- a/packages/context/src/__tests__/acceptance/class-level-bindings.acceptance.ts +++ b/packages/context/src/__tests__/acceptance/class-level-bindings.acceptance.ts @@ -94,7 +94,6 @@ describe('Context bindings - Injecting dependencies of classes', () => { expect(instance).to.have.property('isAuthenticated', false); }); - // tslint:disable-next-line:max-line-length it('creates instance synchronously when all dependencies are sync too', () => { ctx.bind('appName').to('CodeHub'); class InfoController { @@ -128,7 +127,6 @@ describe('Context bindings - Injecting dependencies of classes', () => { expect(instance).to.have.property('isAuthenticated', false); }); - // tslint:disable-next-line:max-line-length it('creates instance synchronously when property/constructor dependencies are sync too', () => { ctx.bind('appName').to('CodeHub'); ctx.bind('authenticated').to(false); diff --git a/packages/context/src/__tests__/acceptance/context-view.acceptance.ts b/packages/context/src/__tests__/acceptance/context-view.acceptance.ts index ab096bad729c..2ae0f19c9326 100644 --- a/packages/context/src/__tests__/acceptance/context-view.acceptance.ts +++ b/packages/context/src/__tests__/acceptance/context-view.acceptance.ts @@ -48,7 +48,7 @@ describe('ContextView', () => { } async function getControllers() { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (await viewOfControllers.values()).map((v: any) => v.name); } }); diff --git a/packages/context/src/__tests__/acceptance/inject-multiple-values.acceptance.ts b/packages/context/src/__tests__/acceptance/inject-multiple-values.acceptance.ts index 62ee27dc7946..00a1f0b2cc99 100644 --- a/packages/context/src/__tests__/acceptance/inject-multiple-values.acceptance.ts +++ b/packages/context/src/__tests__/acceptance/inject-multiple-values.acceptance.ts @@ -95,7 +95,7 @@ describe('@inject.* to receive multiple values matching a filter', () => { it('throws error if bindingComparator is provided without a filter', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class ControllerWithInvalidInject { constructor( @inject('my-key', { diff --git a/packages/context/src/__tests__/acceptance/interception-proxy.acceptance.ts b/packages/context/src/__tests__/acceptance/interception-proxy.acceptance.ts index 00a652031425..bb3457739a9e 100644 --- a/packages/context/src/__tests__/acceptance/interception-proxy.acceptance.ts +++ b/packages/context/src/__tests__/acceptance/interception-proxy.acceptance.ts @@ -88,7 +88,7 @@ describe('Interception proxy', () => { const proxy = createProxyWithInterceptors(new MyController(), ctx); // Enforce compile time check to ensure the AsyncProxy typing works for TS - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars const check: ExpectedAsyncProxyForMyController = proxy; }); diff --git a/packages/context/src/__tests__/acceptance/interceptor.acceptance.ts b/packages/context/src/__tests__/acceptance/interceptor.acceptance.ts index 0467725e04d7..4706851a3592 100644 --- a/packages/context/src/__tests__/acceptance/interceptor.acceptance.ts +++ b/packages/context/src/__tests__/acceptance/interceptor.acceptance.ts @@ -235,7 +235,7 @@ describe('Interceptor', () => { it('does not allow @intercept on properties', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyControllerWithProps { @intercept(log) private status: string; diff --git a/packages/context/src/__tests__/unit/binding-sorter.unit.ts b/packages/context/src/__tests__/unit/binding-sorter.unit.ts index 5f5a329da651..856e237309a7 100644 --- a/packages/context/src/__tests__/unit/binding-sorter.unit.ts +++ b/packages/context/src/__tests__/unit/binding-sorter.unit.ts @@ -92,8 +92,8 @@ describe('BindingComparator', () => { } function assertOrder(...keys: string[]) { - let prev: number = -1; - let prevKey: string = ''; + let prev = -1; + let prevKey = ''; for (const key of keys) { const current = sortedBindingKeys.indexOf(key); expect(current).to.greaterThan( diff --git a/packages/context/src/__tests__/unit/inject.unit.ts b/packages/context/src/__tests__/unit/inject.unit.ts index 58be798a5dfb..b107eaee6b0a 100644 --- a/packages/context/src/__tests__/unit/inject.unit.ts +++ b/packages/context/src/__tests__/unit/inject.unit.ts @@ -13,7 +13,7 @@ import { describe('function argument injection', () => { it('can decorate class constructor arguments', () => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class TestClass { constructor(@inject('foo') foo: string) {} } @@ -30,7 +30,6 @@ describe('function argument injection', () => { }); it('can retrieve information about injected method arguments', () => { - // tslint:disable-next-line:no-unused class TestClass { test(@inject('foo') foo: string) {} } @@ -136,7 +135,7 @@ describe('function argument injection', () => { describe('property injection', () => { it('can decorate properties', () => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class TestClass { @inject('foo') foo: string; @@ -165,7 +164,7 @@ describe('property injection', () => { it('cannot decorate static properties', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class TestClass { @inject('foo') static foo: string; @@ -175,7 +174,7 @@ describe('property injection', () => { it('cannot decorate a method', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class TestClass { @inject('bar') foo() {} diff --git a/packages/context/src/__tests__/unit/provider.unit.ts b/packages/context/src/__tests__/unit/provider.unit.ts index 06bf2eb1e14f..e7d34b572557 100644 --- a/packages/context/src/__tests__/unit/provider.unit.ts +++ b/packages/context/src/__tests__/unit/provider.unit.ts @@ -7,7 +7,7 @@ import {expect} from '@loopback/testlab'; import {Provider} from '../../'; describe('Provider', () => { - let provider: Provider; + let provider: Provider; beforeEach(givenProvider); @@ -22,9 +22,9 @@ describe('Provider', () => { } }); -class MyProvider implements Provider { +class MyProvider implements Provider { constructor(private _msg: string) {} - value(): String { + value(): string { return this._msg + ' world'; } } diff --git a/packages/context/src/__tests__/unit/resolution-session.unit.ts b/packages/context/src/__tests__/unit/resolution-session.unit.ts index 59f8eb09367e..19e95a7ccdf8 100644 --- a/packages/context/src/__tests__/unit/resolution-session.unit.ts +++ b/packages/context/src/__tests__/unit/resolution-session.unit.ts @@ -8,7 +8,6 @@ import {Binding, inject, Injection, ResolutionSession} from '../..'; describe('ResolutionSession', () => { class MyController { - // tslint:disable-next-line:no-unused constructor(@inject('b') private b: string) {} } function givenInjection(): Injection { diff --git a/packages/context/src/__tests__/unit/resolver.unit.ts b/packages/context/src/__tests__/unit/resolver.unit.ts index 24acc56b44a1..8aef86df2ad9 100644 --- a/packages/context/src/__tests__/unit/resolver.unit.ts +++ b/packages/context/src/__tests__/unit/resolver.unit.ts @@ -41,7 +41,7 @@ describe('constructor injection', () => { ) {} } - let theNonInjectedArg = 'BAZ'; + const theNonInjectedArg = 'BAZ'; const test = instantiateClass(TestClass, ctx, undefined, [ theNonInjectedArg, @@ -111,7 +111,6 @@ describe('constructor injection', () => { expect(t.fooBar).to.eql('FOO:BAR'); }); - // tslint:disable-next-line:max-line-length it('resolves constructor arguments with custom resolve function and no binding key', () => { class TestClass { constructor( @@ -201,7 +200,6 @@ describe('constructor injection', () => { ); }); - // tslint:disable-next-line:max-line-length it('will not report circular dependencies if a binding is injected twice', () => { const context = new Context(); class XClass {} @@ -350,7 +348,6 @@ describe('async constructor injection', () => { expect(t.foo).to.eql('FOO'); }); - // tslint:disable-next-line:max-line-length it('resolves constructor arguments with custom async decorator', async () => { class TestClass { constructor(@customAsyncDecorator({x: 'bar'}) public fooBar: string) {} @@ -405,7 +402,6 @@ describe('property injection', () => { expect(t.fooBar).to.eql('FOO:BAR'); }); - // tslint:disable-next-line:max-line-length it('resolves inject properties with custom resolve function and no binding key', () => { class TestClass { @inject('', {x: 'bar'}, (c: Context, injection: Injection) => { @@ -600,7 +596,7 @@ describe('sync constructor & async property injection', () => { }); }); -function customDecorator(def: Object) { +function customDecorator(def: object) { return inject('foo', def, (c: Context, injection: Injection) => { const barKey = injection.metadata.x; const b = c.getSync(barKey); @@ -609,7 +605,7 @@ function customDecorator(def: Object) { }); } -function customAsyncDecorator(def: Object) { +function customAsyncDecorator(def: object) { return inject('foo', def, async (c: Context, injection: Injection) => { const barKey = injection.metadata.x; const b = await c.get(barKey); diff --git a/packages/context/src/binding-filter.ts b/packages/context/src/binding-filter.ts index a97a61f33c9f..7d28ea85670c 100644 --- a/packages/context/src/binding-filter.ts +++ b/packages/context/src/binding-filter.ts @@ -38,7 +38,6 @@ import {BindingAddress} from './binding-key'; * 2. `(binding: Readonly>) => binding is Readonly>` * */ -// tslint:disable-next-line:no-unused export type BindingFilter = ( binding: Readonly>, ) => boolean; diff --git a/packages/context/src/binding-key.ts b/packages/context/src/binding-key.ts index d5088cc91b4f..68afa5737cfd 100644 --- a/packages/context/src/binding-key.ts +++ b/packages/context/src/binding-key.ts @@ -5,7 +5,6 @@ export type BindingAddress = string | BindingKey; -// tslint:disable-next-line:no-unused export class BindingKey { static readonly PROPERTY_SEPARATOR = '#'; diff --git a/packages/context/src/binding.ts b/packages/context/src/binding.ts index 9b27e446272b..88bcc6b4df4c 100644 --- a/packages/context/src/binding.ts +++ b/packages/context/src/binding.ts @@ -126,7 +126,7 @@ export enum BindingType { ALIAS = 'Alias', } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type TagMap = MapObject; /** @@ -289,7 +289,7 @@ export class Binding { } const options = asResolutionOptions(optionsOrSession); if (this._getValue) { - let result = ResolutionSession.runWithBinding( + const result = ResolutionSession.runWithBinding( s => { const optionsWithSession = Object.assign({}, options, {session: s}); return this._getValue(ctx, optionsWithSession); @@ -579,7 +579,7 @@ export class Binding { * Convert to a plain JSON object */ toJSON(): Object { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const json: {[name: string]: any} = { key: this.key, scope: this.scope, diff --git a/packages/context/src/context.ts b/packages/context/src/context.ts index 02486a348374..8e5533a404f2 100644 --- a/packages/context/src/context.ts +++ b/packages/context/src/context.ts @@ -41,7 +41,7 @@ import { * See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-3.html */ if (!Symbol.asyncIterator) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (Symbol as any).asyncIterator = Symbol.for('Symbol.asyncIterator'); } /** @@ -82,7 +82,7 @@ export class Context extends EventEmitter { protected _parentEventListeners: | Map< string, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (...args: any[]) => void > | undefined; @@ -141,7 +141,7 @@ export class Context extends EventEmitter { * as the prefix * @param args - Arguments for the debug */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private _debug(...args: any[]) { /* istanbul ignore if */ if (!debug.enabled) return; diff --git a/packages/context/src/interception-proxy.ts b/packages/context/src/interception-proxy.ts index 09bfdb36e11d..e06aff67f1fd 100644 --- a/packages/context/src/interception-proxy.ts +++ b/packages/context/src/interception-proxy.ts @@ -21,8 +21,7 @@ export type AsValueOrPromise = T extends Promise */ export type AsInterceptedFunction = T extends ( ...args: InvocationArgs -) => // tslint:disable-next-line:no-unused (possible tslint bug to treat `R` as unused) -infer R +) => infer R ? (...args: InvocationArgs) => AsValueOrPromise : T; @@ -66,7 +65,7 @@ export class InterceptionHandler implements ProxyHandler { constructor(private context = new Context()) {} get(target: T, propertyName: PropertyKey, receiver: unknown) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const targetObj = target as any; if (typeof propertyName !== 'string') return targetObj[propertyName]; const propertyOrMethod = targetObj[propertyName]; diff --git a/packages/context/src/interceptor.ts b/packages/context/src/interceptor.ts index 2fcacc81328c..36507875464e 100644 --- a/packages/context/src/interceptor.ts +++ b/packages/context/src/interceptor.ts @@ -27,24 +27,25 @@ import { const debug = debugFactory('loopback:context:interceptor'); const getTargetName = DecoratorFactory.getTargetName; +/* eslint-disable @typescript-eslint/no-explicit-any */ + /** * Array of arguments for a method invocation */ -// tslint:disable-next-line:no-any export type InvocationArgs = any[]; /** * Return value for a method invocation */ -// tslint:disable-next-line:no-any export type InvocationResult = any; /** * A type for class or its prototype */ -// tslint:disable-next-line:no-any type ClassOrPrototype = any; +/* eslint-enable @typescript-eslint/no-explicit-any */ + /** * InvocationContext represents the context to invoke interceptors for a method. * The context can be used to access metadata about the invocation as well as @@ -342,7 +343,7 @@ export function intercept(...interceptorOrKeys: InterceptorOrKey[]) { method?: string, // Use `any` to for `TypedPropertyDescriptor` // See https://github.com/strongloop/loopback-next/pull/2704 - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any methodDescriptor?: TypedPropertyDescriptor, ) { if (method && methodDescriptor) { diff --git a/packages/context/src/resolution-session.ts b/packages/context/src/resolution-session.ts index e89a03b042d0..a3ecc76182e3 100644 --- a/packages/context/src/resolution-session.ts +++ b/packages/context/src/resolution-session.ts @@ -167,7 +167,7 @@ export class ResolutionSession { targetName: name, bindingSelector: injection.bindingSelector, // Cast to Object so that we don't have to expose InjectionMetadata - metadata: injection.metadata as Object, + metadata: injection.metadata as object, }; } diff --git a/packages/context/src/resolver.ts b/packages/context/src/resolver.ts index b2f3d841b0fa..399d62f556c2 100644 --- a/packages/context/src/resolver.ts +++ b/packages/context/src/resolver.ts @@ -46,7 +46,7 @@ export function instantiateClass( ctor: Constructor, ctx: Context, session?: ResolutionSession, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any nonInjectedArgs?: any[], ): ValueOrPromise { /* istanbul ignore if */ @@ -137,7 +137,7 @@ function resolve( } ctx = resolveContext(ctx, injection, session); - let resolved = ResolutionSession.runWithInjection( + const resolved = ResolutionSession.runWithInjection( s => { if (injection.resolve) { // A custom resolve function is provided @@ -179,11 +179,11 @@ function resolve( * @param nonInjectedArgs - Optional array of args for non-injected parameters */ export function resolveInjectedArguments( - target: Object, + target: object, method: string, ctx: Context, session?: ResolutionSession, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any nonInjectedArgs?: any[], ): ValueOrPromise { /* istanbul ignore if */ @@ -257,10 +257,10 @@ export function resolveInjectedArguments( * @param nonInjectedArgs - Optional array of args for non-injected parameters */ export function invokeMethod( - target: Object, + target: object, method: string, ctx: Context, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any nonInjectedArgs?: any[], ): ValueOrPromise { const methodName = getTargetName(target, method); diff --git a/packages/context/src/value-promise.ts b/packages/context/src/value-promise.ts index 2c7fe3905125..99f036500437 100644 --- a/packages/context/src/value-promise.ts +++ b/packages/context/src/value-promise.ts @@ -12,10 +12,10 @@ * A class constructor accepting arbitrary arguments. */ export type Constructor = - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any new (...args: any[]) => T; -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type BoundValue = any; /** @@ -164,7 +164,6 @@ export function resolveList( result[index] = val; }; - // tslint:disable-next-line:prefer-for-of for (let ix = 0; ix < list.length; ix++) { const valueOrPromise = resolver(list[ix], ix, list); if (isPromiseLike(valueOrPromise)) { @@ -232,6 +231,7 @@ export function resolveUntil( evaluator: (sourceVal: T, targetVal: V | undefined) => boolean, ): ValueOrPromise { // Do iteration in loop for synchronous values to avoid stack overflow + // eslint-disable-next-line no-constant-condition while (true) { const next = source.next(); if (next.done) return undefined; // End of the iterator diff --git a/packages/core/package.json b/packages/core/package.json index 5e20e38890a6..2a9efff6bb4f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "^4.1.4", "@types/node": "^10.11.2" }, diff --git a/packages/core/src/application.ts b/packages/core/src/application.ts index e0635ec642df..2e96555e6c64 100644 --- a/packages/core/src/application.ts +++ b/packages/core/src/application.ts @@ -250,11 +250,11 @@ export interface ApplicationConfig { /** * Other properties */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [prop: string]: any; } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type ControllerClass = Constructor; /** diff --git a/packages/core/src/component.ts b/packages/core/src/component.ts index 8e4159f7b957..77fd8e4906be 100644 --- a/packages/core/src/component.ts +++ b/packages/core/src/component.ts @@ -85,7 +85,7 @@ export interface Component { /** * Other properties */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [prop: string]: any; } diff --git a/packages/core/src/extension-point.ts b/packages/core/src/extension-point.ts index f7039b1eb177..7f117668a1d1 100644 --- a/packages/core/src/extension-point.ts +++ b/packages/core/src/extension-point.ts @@ -90,7 +90,7 @@ function inferExtensionPointName( currentBinding?: Readonly>, ): string { if (currentBinding) { - let name = + const name = currentBinding.tagMap[CoreTags.EXTENSION_POINT] || currentBinding.tagMap[ContextTags.NAME]; diff --git a/packages/eslint-config/eslintrc.js b/packages/eslint-config/eslintrc.js index 60ce1a77189f..8ca35821e7da 100644 --- a/packages/eslint-config/eslintrc.js +++ b/packages/eslint-config/eslintrc.js @@ -21,6 +21,11 @@ module.exports = { }, parserOptions: { sourceType: 'module', + /* + * The `project` setting is required for `@typescript-eslint/await-thenable` + * but it causes significant performance overhead (1m13s vs 13s) + * See https://github.com/typescript-eslint/typescript-eslint/issues/389 + */ project: './tsconfig.json', ecmaFeatures: { ecmaVersion: 2017, @@ -38,6 +43,7 @@ module.exports = { 'prettier/@typescript-eslint', ], rules: { + 'prefer-const': 'error', 'no-mixed-operators': 'off', 'no-console': 'off', // 'no-undef': 'off', @@ -54,7 +60,6 @@ module.exports = { */ '@typescript-eslint/array-type': 'off', '@typescript-eslint/indent': 'off', - // '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-non-null-assertion': 'off', '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-member-accessibility': 'off', @@ -65,7 +70,6 @@ module.exports = { '@typescript-eslint/no-angle-bracket-type-assertion': 'off', '@typescript-eslint/prefer-interface': 'off', '@typescript-eslint/no-namespace': 'off', - // '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/ban-types': 'off', '@typescript-eslint/no-triple-slash-reference': 'off', '@typescript-eslint/no-empty-interface': 'off', @@ -78,7 +82,7 @@ module.exports = { '@typescript-eslint/adjacent-overload-signatures': 'error', // tslint:adjacent-overload-signatures '@typescript-eslint/prefer-for-of': 'error', // tslint:prefer-for-of '@typescript-eslint/unified-signatures': 'error', // tslint:unified-signatures - '@typescript-eslint/no-explicit-any': 'error', // tslint:no-explicit-any + '@typescript-eslint/no-explicit-any': 'error', // tslint:no-any 'no-unused-labels': 'error', // tslint:label-position 'no-caller': 'error', // tslint:no-arg @@ -95,6 +99,21 @@ module.exports = { { vars: 'all', args: 'none', // none - do not check arguments + /* + * The following is a workaround to the issue that parameter decorators + * are treated as `unused-vars`. + * + * See https://github.com/typescript-eslint/typescript-eslint/issues/571 + * + * @example + * ```ts + * import {inject} from '@loopback/context'; + * class MyController { + * constructor(@inject('foo') foo: string) {} + * } + * ``` + */ + varsIgnorePattern: 'inject|(\\w+)Bindings', ignoreRestSiblings: false, }, ], // tslint:no-unused-variable diff --git a/packages/http-caching-proxy/package.json b/packages/http-caching-proxy/package.json index 63d26dd29845..23c76d3d1334 100644 --- a/packages/http-caching-proxy/package.json +++ b/packages/http-caching-proxy/package.json @@ -27,7 +27,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "^4.1.4", "@types/node": "^10.11.2", "@types/request-promise-native": "^1.0.16", diff --git a/packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts b/packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts index 92fe6aaa46ac..2292ebaf2c97 100644 --- a/packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts +++ b/packages/http-caching-proxy/src/__tests__/integration/http-caching-proxy.integration.ts @@ -16,7 +16,6 @@ import {HttpCachingProxy, ProxyOptions} from '../../http-caching-proxy'; const CACHE_DIR = path.join(__dirname, '.cache'); -// tslint:disable:await-promise const rimraf = util.promisify(rimrafCb); describe('HttpCachingProxy', () => { @@ -41,7 +40,7 @@ describe('HttpCachingProxy', () => { it('proxies HTTP requests', async function() { // Increase the timeout to accomodate slow network connections - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(30000); await givenRunningProxy(); @@ -57,7 +56,7 @@ describe('HttpCachingProxy', () => { it('proxies HTTPs requests (no tunneling)', async function() { // Increase the timeout to accomodate slow network connections - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(30000); await givenRunningProxy(); diff --git a/packages/http-caching-proxy/src/__tests__/unit/http-caching-proxy.test.ts b/packages/http-caching-proxy/src/__tests__/unit/http-caching-proxy.test.ts index 6c3a5765be4f..05c68b77de48 100644 --- a/packages/http-caching-proxy/src/__tests__/unit/http-caching-proxy.test.ts +++ b/packages/http-caching-proxy/src/__tests__/unit/http-caching-proxy.test.ts @@ -10,7 +10,7 @@ describe('HttpCachingProxy', () => { describe('constructor', () => { it('rejects missing cachePath option', () => { expect( - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any () => new HttpCachingProxy({cachedPath: undefined} as any), ).throwError(/required option.*cachePath/i); }); diff --git a/packages/http-caching-proxy/src/http-caching-proxy.ts b/packages/http-caching-proxy/src/http-caching-proxy.ts index 699a81c41a70..c1c7f31b42d4 100644 --- a/packages/http-caching-proxy/src/http-caching-proxy.ts +++ b/packages/http-caching-proxy/src/http-caching-proxy.ts @@ -5,11 +5,11 @@ import * as debugFactory from 'debug'; import { + createServer, + IncomingMessage, OutgoingHttpHeaders, Server as HttpServer, - IncomingMessage, ServerResponse, - createServer, } from 'http'; import {AddressInfo} from 'net'; import pEvent from 'p-event'; @@ -174,7 +174,6 @@ export class HttpCachingProxy { clientRequest: IncomingMessage, clientResponse: ServerResponse, ) { - // tslint:disable-next-line:await-promise const backendResponse = await makeRequest({ resolveWithFullResponse: true, simple: false, diff --git a/packages/http-server/package.json b/packages/http-server/package.json index 33c0cfd808d4..ca4430f9b3c5 100644 --- a/packages/http-server/package.json +++ b/packages/http-server/package.json @@ -23,7 +23,7 @@ "@loopback/build": "^1.6.1", "@loopback/core": "^1.7.3", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/node": "^10.11.2" }, "files": [ diff --git a/packages/metadata/package.json b/packages/metadata/package.json index 7639cff35060..1c98ebe0116f 100644 --- a/packages/metadata/package.json +++ b/packages/metadata/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "^4.1.4", "@types/lodash": "^4.14.130", "@types/node": "^10.11.2" diff --git a/packages/metadata/src/__tests__/unit/decorator-factory.unit.ts b/packages/metadata/src/__tests__/unit/decorator-factory.unit.ts index 995bc430d21b..03a72ab7a059 100644 --- a/packages/metadata/src/__tests__/unit/decorator-factory.unit.ts +++ b/packages/metadata/src/__tests__/unit/decorator-factory.unit.ts @@ -6,11 +6,11 @@ import {expect} from '@loopback/testlab'; import { ClassDecoratorFactory, - PropertyDecoratorFactory, + DecoratorFactory, MethodDecoratorFactory, - ParameterDecoratorFactory, MethodParameterDecoratorFactory, - DecoratorFactory, + ParameterDecoratorFactory, + PropertyDecoratorFactory, Reflector, } from '../..'; @@ -113,7 +113,7 @@ describe('ClassDecoratorFactory', () => { expect(() => { @classDecorator({x: 1}) @classDecorator({y: 2}) - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyController {} }).to.throw( /Decorator cannot be applied more than once on class MyController/, @@ -352,7 +352,7 @@ describe('PropertyDecoratorFactory', () => { it('throws if applied more than once on the same property', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyController { @propertyDecorator({x: 1}) @propertyDecorator({y: 2}) @@ -400,7 +400,7 @@ describe('PropertyDecoratorFactory for static properties', () => { it('throws if applied more than once on the same static property', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyController { @propertyDecorator({x: 1}) @propertyDecorator({y: 2}) @@ -448,7 +448,7 @@ describe('MethodDecoratorFactory', () => { it('throws if applied more than once on the same method', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyController { @methodDecorator({x: 1}) @methodDecorator({y: 2}) @@ -496,7 +496,7 @@ describe('MethodDecoratorFactory for static methods', () => { it('throws if applied more than once on the same static method', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyController { @methodDecorator({x: 1}) @methodDecorator({y: 2}) @@ -545,7 +545,7 @@ describe('ParameterDecoratorFactory', () => { it('throws if applied more than once on the same parameter', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyController { myMethod( @parameterDecorator({x: 1}) @@ -634,7 +634,7 @@ describe('ParameterDecoratorFactory for a static method', () => { it('throws if applied more than once on the same parameter', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyController { static myMethod( @parameterDecorator({x: 1}) @@ -695,7 +695,7 @@ describe('MethodParameterDecoratorFactory with invalid decorations', () => { it('reports error if the # of decorations exceeeds the # of params', () => { expect(() => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyController { @methodParameterDecorator({x: 1}) // Causing error @methodParameterDecorator({x: 2}) // For a diff --git a/packages/metadata/src/__tests__/unit/reflect.unit.ts b/packages/metadata/src/__tests__/unit/reflect.unit.ts index 930fc48b99db..f8d88629e83a 100644 --- a/packages/metadata/src/__tests__/unit/reflect.unit.ts +++ b/packages/metadata/src/__tests__/unit/reflect.unit.ts @@ -37,7 +37,7 @@ describe('Reflect Context', () => { afterEach(resetMetadata); it('adds metadata to a class', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata('key', metadataValue, SubClass); @@ -63,7 +63,7 @@ describe('Reflect Context', () => { }); it('adds metadata to a static method', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata( 'key', @@ -99,7 +99,7 @@ describe('Reflect Context', () => { }); it('adds metadata to a prototype method', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata( 'key', @@ -139,7 +139,7 @@ describe('Reflect Context', () => { }); it('deletes metadata from a class', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata('key', metadataValue, SubClass); @@ -164,7 +164,7 @@ describe('Reflect Context', () => { }); it('deletes metadata from a class static menthod', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata( 'key', @@ -218,7 +218,7 @@ describe('Reflect Context', () => { }); it('deletes metadata from a class prototype menthod', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata( 'key', @@ -248,7 +248,7 @@ describe('Reflect Context', () => { }); it('adds metadata to a base class', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata('key', metadataValue, BaseClass); @@ -267,7 +267,7 @@ describe('Reflect Context', () => { }); it('adds metadata to a base static method', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata( 'key', @@ -309,7 +309,7 @@ describe('Reflect Context', () => { }); it('adds metadata to a base prototype method', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata( 'key', @@ -351,7 +351,7 @@ describe('Reflect Context', () => { }); it('lists metadata keys of classes', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata('key1', metadataValue, SubClass); reflectContext.defineMetadata('key2', {}, BaseClass); @@ -370,7 +370,7 @@ describe('Reflect Context', () => { }); it('lists metadata keys of class methods', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; reflectContext.defineMetadata( 'key3', @@ -433,7 +433,7 @@ describe('Reflect Context', () => { }); it('checks hasMetadata against a class', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata('key1', metadataValue, SubClass); reflectContext.defineMetadata('key2', {}, BaseClass); @@ -452,7 +452,7 @@ describe('Reflect Context', () => { }); it('checks hasOwnMetadata against a class', () => { - const metadataValue: Object = {value: 'sample'}; + const metadataValue: object = {value: 'sample'}; // define a metadata using the namespaced reflectContext reflectContext.defineMetadata('key1', metadataValue, SubClass); reflectContext.defineMetadata('key2', {}, BaseClass); @@ -470,7 +470,7 @@ describe('Reflect Context', () => { expect(result).to.be.true(); }); - function deleteMetadata(target: Object, propertyKey?: string) { + function deleteMetadata(target: object, propertyKey?: string) { if (propertyKey) { const keys = reflectContext.getOwnMetadataKeys(target, propertyKey); for (const k of keys) { diff --git a/packages/metadata/src/decorator-factory.ts b/packages/metadata/src/decorator-factory.ts index f1a720cdc7b7..08a1cba0c3e7 100644 --- a/packages/metadata/src/decorator-factory.ts +++ b/packages/metadata/src/decorator-factory.ts @@ -9,7 +9,8 @@ import {Reflector} from './reflect'; import {DecoratorType, MetadataKey, MetadataMap} from './types'; const debug = debugModule('loopback:metadata:decorator'); -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ + /** * Options for a decorator */ @@ -97,7 +98,7 @@ export class DecoratorFactory< protected inherit(inheritedMetadata: T | undefined | null): T { if (!this.allowInheritance()) return this.spec; if (inheritedMetadata == null) return this.spec; - if (this.spec == undefined) return inheritedMetadata; + if (this.spec == null) return inheritedMetadata; if (typeof inheritedMetadata !== 'object') return this.spec; if (Array.isArray(inheritedMetadata) || Array.isArray(this.spec)) { // For arrays, we don't merge @@ -716,7 +717,7 @@ export class MethodParameterDecoratorFactory extends DecoratorFactory< ownMetadata = ownMetadata || {}; const index = this.getParameterIndex(target, methodName, methodDescriptor); - let params = + const params = ownMetadata[methodName!] || new Array(index + 1).fill(undefined); params[index] = this.withTarget(this.inherit(params[index]), target); ownMetadata[methodName!] = params; diff --git a/packages/metadata/src/inspector.ts b/packages/metadata/src/inspector.ts index 4e540fc77e03..311dbd5a7bf0 100644 --- a/packages/metadata/src/inspector.ts +++ b/packages/metadata/src/inspector.ts @@ -3,12 +3,12 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Reflector, NamespacedReflect} from './reflect'; +import {NamespacedReflect, Reflector} from './reflect'; import { + DecoratorType, + DesignTimeMethodMetadata, MetadataKey, MetadataMap, - DesignTimeMethodMetadata, - DecoratorType, } from './types'; /** diff --git a/packages/metadata/src/reflect.ts b/packages/metadata/src/reflect.ts index d08b7ba6c08c..1c8f1d744a47 100644 --- a/packages/metadata/src/reflect.ts +++ b/packages/metadata/src/reflect.ts @@ -5,7 +5,8 @@ import 'reflect-metadata'; -/* tslint:disable:no-any */ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/unified-signatures */ /* * namespaced wrapper to handle reflect api @@ -178,7 +179,6 @@ export class NamespacedReflect { } } - /* tslint:disable-next-line:no-any */ metadata( metadataKey: string, metadataValue: any, @@ -191,5 +191,4 @@ export class NamespacedReflect { } } -/* tslint:disable-next-line:variable-name */ export const Reflector = new NamespacedReflect('loopback'); diff --git a/packages/metadata/src/types.ts b/packages/metadata/src/types.ts index 5cac05060e65..bfd5ebc39d0b 100644 --- a/packages/metadata/src/types.ts +++ b/packages/metadata/src/types.ts @@ -17,7 +17,6 @@ export type DecoratorType = * @typeParam T - Type of the metadata value * @typeParam D - Type of the decorator */ -// tslint:disable-next-line:no-unused export class MetadataAccessor { private constructor(public readonly key: string) {} diff --git a/packages/openapi-spec-builder/package.json b/packages/openapi-spec-builder/package.json index f3df4c5f0949..463544d0d47b 100644 --- a/packages/openapi-spec-builder/package.json +++ b/packages/openapi-spec-builder/package.json @@ -29,7 +29,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/node": "^10.11.2" }, "files": [ diff --git a/packages/openapi-spec-builder/src/openapi-spec-builder.ts b/packages/openapi-spec-builder/src/openapi-spec-builder.ts index c6b75ee4cf2e..451e21ad0771 100644 --- a/packages/openapi-spec-builder/src/openapi-spec-builder.ts +++ b/packages/openapi-spec-builder/src/openapi-spec-builder.ts @@ -45,7 +45,7 @@ export class BuilderBase { */ withExtension( key: string, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any value: any, ): this { assert( @@ -55,7 +55,7 @@ export class BuilderBase { // `this._spec[key] = value;` is broken in TypeScript 3.5 // See https://github.com/microsoft/TypeScript/issues/31661 - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this._spec as Record)[key] = value; return this; } diff --git a/packages/openapi-v3-types/package.json b/packages/openapi-v3-types/package.json index 286a63adfeb3..7502d759ed6a 100644 --- a/packages/openapi-v3-types/package.json +++ b/packages/openapi-v3-types/package.json @@ -11,7 +11,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/node": "^10.11.2" }, "scripts": { diff --git a/packages/openapi-v3-types/src/__tests__/unit/openapi-v3-spec-types.unit.ts b/packages/openapi-v3-types/src/__tests__/unit/openapi-v3-spec-types.unit.ts index 037c7b747dac..1987730c98e3 100644 --- a/packages/openapi-v3-types/src/__tests__/unit/openapi-v3-spec-types.unit.ts +++ b/packages/openapi-v3-types/src/__tests__/unit/openapi-v3-spec-types.unit.ts @@ -5,14 +5,14 @@ import {expect} from '@loopback/testlab'; import { - ExampleObject, - ReferenceObject, + createEmptyApiSpec, DiscriminatorObject, - XmlObject, + ExampleObject, ExternalDocumentationObject, ISpecificationExtension, - createEmptyApiSpec, OpenAPIObject, + ReferenceObject, + XmlObject, } from '../..'; describe('openapi-v3-types unit tests', () => { @@ -57,7 +57,7 @@ describe('openapi-v3-types unit tests', () => { * original OAS 3 definition. (Though some interfaces allow for extensibility). */ - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class TestObject implements ExampleObject { summary: 'test object'; description: 'test object'; @@ -66,12 +66,12 @@ describe('openapi-v3-types unit tests', () => { randomProperty: 'extension value'; } - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class ReferenceTestObject implements ReferenceObject { $ref: '#def/reference-object'; } - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class DiscriminatorTestObject implements DiscriminatorObject { propertyName: 'test'; mapping: { @@ -79,7 +79,7 @@ describe('openapi-v3-types unit tests', () => { }; } - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class XMLTestObject implements XmlObject { name: 'test'; namespace: 'test'; @@ -88,13 +88,13 @@ describe('openapi-v3-types unit tests', () => { wrapped: false; } - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class TestExternalDocumentationObject implements ExternalDocumentationObject { url: 'https://test.com/test.html'; } - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class TestISpecificationExtension implements ISpecificationExtension { test: 'test'; } diff --git a/packages/openapi-v3/package.json b/packages/openapi-v3/package.json index 7388e8dc8f6d..28365ec097db 100644 --- a/packages/openapi-v3/package.json +++ b/packages/openapi-v3/package.json @@ -10,7 +10,7 @@ "@loopback/openapi-spec-builder": "^1.1.13", "@loopback/repository": "^1.5.8", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "^4.1.4", "@types/lodash": "^4.14.130", "@types/node": "^10.11.2" diff --git a/packages/openapi-v3/src/__tests__/unit/decorators/param/param-query.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/param/param-query.decorator.unit.ts index ce2c9689b2bc..4fe10ade4394 100644 --- a/packages/openapi-v3/src/__tests__/unit/decorators/param/param-query.decorator.unit.ts +++ b/packages/openapi-v3/src/__tests__/unit/decorators/param/param-query.decorator.unit.ts @@ -225,7 +225,7 @@ describe('Routing metadata for parameters', () => { it('sets in:query style:deepObject and a default schema', () => { class MyController { @get('/greet') - greet(@param.query.object('filter') filter: Object) {} + greet(@param.query.object('filter') filter: object) {} } const expectedParamSpec = { name: 'filter', @@ -251,7 +251,7 @@ describe('Routing metadata for parameters', () => { limit: {type: 'number'}, }, }) - filter: Object, + filter: object, ) {} } const expectedParamSpec: ParameterObject = { diff --git a/packages/openapi-v3/src/__tests__/unit/decorators/param/param.decorator.unit.ts b/packages/openapi-v3/src/__tests__/unit/decorators/param/param.decorator.unit.ts index 1ba7c32c90d2..e1ba82907ea9 100644 --- a/packages/openapi-v3/src/__tests__/unit/decorators/param/param.decorator.unit.ts +++ b/packages/openapi-v3/src/__tests__/unit/decorators/param/param.decorator.unit.ts @@ -3,14 +3,14 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT +import {anOperationSpec} from '@loopback/openapi-spec-builder'; import { + OperationObject, ParameterObject, ResponsesObject, - OperationObject, } from '@loopback/openapi-v3-types'; -import {param, get, patch, operation, getControllerSpec} from '../../../../'; -import {anOperationSpec} from '@loopback/openapi-spec-builder'; import {expect} from '@loopback/testlab'; +import {get, getControllerSpec, operation, param, patch} from '../../../../'; describe('Routing metadata for parameters', () => { describe('@param', () => { @@ -167,7 +167,7 @@ describe('Routing metadata for parameters', () => { it('reports error if an array parameter type is not Array', () => { expect.throws( () => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class MyController { @get('/greet') greet( @@ -185,7 +185,7 @@ describe('Routing metadata for parameters', () => { @get('/greet') greet( @param.array('names', 'query', {type: 'string'}) - names: /* tslint:disable-next-line:no-any */ + names: // eslint-disable-next-line @typescript-eslint/no-explicit-any any, ) {} } diff --git a/packages/openapi-v3/src/__tests__/unit/json-to-schema.unit.ts b/packages/openapi-v3/src/__tests__/unit/json-to-schema.unit.ts index aa3461049788..052014a35d16 100644 --- a/packages/openapi-v3/src/__tests__/unit/json-to-schema.unit.ts +++ b/packages/openapi-v3/src/__tests__/unit/json-to-schema.unit.ts @@ -135,7 +135,7 @@ describe('jsonToSchemaObject', () => { // Helper function to check conversion of JSON Schema properties // to Swagger versions - function propertyConversionTest(property: Object, expected: Object) { + function propertyConversionTest(property: object, expected: object) { expect(jsonToSchemaObject(property)).to.deepEqual(expected); } }); diff --git a/packages/openapi-v3/src/controller-spec.ts b/packages/openapi-v3/src/controller-spec.ts index a7c8c60d056e..06251ba61532 100644 --- a/packages/openapi-v3/src/controller-spec.ts +++ b/packages/openapi-v3/src/controller-spec.ts @@ -29,8 +29,6 @@ import {OAI3Keys} from './keys'; const debug = require('debug')('loopback:openapi3:metadata:controller-spec'); -// tslint:disable:no-any - export interface ControllerSpec { /** * The base path on which the Controller API is served. diff --git a/packages/openapi-v3/src/decorators/parameter.decorator.ts b/packages/openapi-v3/src/decorators/parameter.decorator.ts index 107ef8f839d4..1149a1fea875 100644 --- a/packages/openapi-v3/src/decorators/parameter.decorator.ts +++ b/packages/openapi-v3/src/decorators/parameter.decorator.ts @@ -33,7 +33,7 @@ import {OAI3Keys} from '../keys'; * @param paramSpec - Parameter specification. */ export function param(paramSpec: ParameterObject) { - return function(target: Object, member: string, index: number) { + return function(target: object, member: string, index: number) { paramSpec = paramSpec || {}; // Get the design time method parameter metadata const methodSig = MetadataInspector.getDesignTypeForMethod(target, member); @@ -41,7 +41,7 @@ export function param(paramSpec: ParameterObject) { // Map design-time parameter type to the OpenAPI param type - let paramType = paramTypes[index]; + const paramType = paramTypes[index]; if (paramType) { if ( @@ -441,14 +441,14 @@ export namespace param { }; } -interface paramShortcutOptions { +interface ParamShortcutOptions { type: string; format?: string; } function createParamShortcut( source: ParameterLocation, - options: paramShortcutOptions, + options: ParamShortcutOptions, ) { return (name: string) => { return param({name, in: source, schema: {...options}}); diff --git a/packages/openapi-v3/src/decorators/request-body.decorator.ts b/packages/openapi-v3/src/decorators/request-body.decorator.ts index dcea5ab0e2cf..fab17afbf6d7 100644 --- a/packages/openapi-v3/src/decorators/request-body.decorator.ts +++ b/packages/openapi-v3/src/decorators/request-body.decorator.ts @@ -75,14 +75,14 @@ export const REQUEST_BODY_INDEX = 'x-parameter-index'; * } * ``` * - * @param requestBodySpec - The complete requestBody Object or partial of it. + * @param requestBodySpec - The complete requestBody object or partial of it. * "partial" for allowing no `content` in spec, for example: * ``` * @requestBody({description: 'a request body'}) user: User * ``` */ export function requestBody(requestBodySpec?: Partial) { - return function(target: Object, member: string, index: number) { + return function(target: object, member: string, index: number) { debug('@requestBody() on %s.%s', target.constructor.name, member); debug(' parameter index: %s', index); /* istanbul ignore if */ diff --git a/packages/repository-json-schema/package.json b/packages/repository-json-schema/package.json index c9bf65d981a8..88c4f8399cdc 100644 --- a/packages/repository-json-schema/package.json +++ b/packages/repository-json-schema/package.json @@ -32,7 +32,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/node": "^10.11.2", "ajv": "^6.5.0" }, diff --git a/packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts b/packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts index ba7af5084114..d5179b94435d 100644 --- a/packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts +++ b/packages/repository-json-schema/src/__tests__/integration/build-schema.integration.ts @@ -239,11 +239,11 @@ describe('build-schema', () => { @model() class TestModel { @property({type: 'string'}) - hardStr: Number; + hardStr: number; @property({type: 'boolean'}) - hardBool: String; + hardBool: string; @property({type: 'number'}) - hardNum: Boolean; + hardNum: boolean; } const jsonSchema = modelToJsonSchema(TestModel); @@ -281,7 +281,7 @@ describe('build-schema', () => { @model() class TestModel { @property({type: 'NotPrimitive'}) - bad: String; + bad: string; } expect(() => modelToJsonSchema(TestModel)).to.throw(/Unsupported type/); diff --git a/packages/repository-json-schema/src/__tests__/unit/json-schema.unit.ts b/packages/repository-json-schema/src/__tests__/unit/json-schema.unit.ts index 8369d8c1460f..bca99bf0a5e6 100644 --- a/packages/repository-json-schema/src/__tests__/unit/json-schema.unit.ts +++ b/packages/repository-json-schema/src/__tests__/unit/json-schema.unit.ts @@ -15,7 +15,7 @@ describe('JSON Schema type', () => { * Inspired by https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/json-schema/json-schema-tests.ts */ - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars const testSchema: JsonSchema = { $id: 'test', $ref: 'test/sub', diff --git a/packages/repository-json-schema/src/build-schema.ts b/packages/repository-json-schema/src/build-schema.ts index f8a73317ae44..839a7997da15 100644 --- a/packages/repository-json-schema/src/build-schema.ts +++ b/packages/repository-json-schema/src/build-schema.ts @@ -143,7 +143,6 @@ export function isArrayType(type: string | Function) { * @param meta */ export function metaToJsonProperty(meta: PropertyDefinition): JSONSchema { - // tslint:disable-next-line:no-any const propDef: JSONSchema = {}; let result: JSONSchema; let propertyType = meta.type as string | Function; diff --git a/packages/repository/examples/controllers/customer-with-constructor-di.controller.ts b/packages/repository/examples/controllers/customer-with-constructor-di.controller.ts index 93fbdf4df0b0..9a5c982142cd 100644 --- a/packages/repository/examples/controllers/customer-with-constructor-di.controller.ts +++ b/packages/repository/examples/controllers/customer-with-constructor-di.controller.ts @@ -3,8 +3,6 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -// tslint:disable:no-unused - import {EntityCrudRepository, repository} from '../..'; import {Customer} from '../models/customer.model'; /** @@ -15,7 +13,6 @@ import {Customer} from '../models/customer.model'; export class CustomerController { constructor( // Use constructor dependency injection - // tslint:disable-next-line:no-unused @repository('Customer', 'mongodbDataSource') private _repository: EntityCrudRepository, ) {} diff --git a/packages/repository/examples/controllers/customer-with-property-di.controller.ts b/packages/repository/examples/controllers/customer-with-property-di.controller.ts index 46cd641321a4..20b3f12d74bc 100644 --- a/packages/repository/examples/controllers/customer-with-property-di.controller.ts +++ b/packages/repository/examples/controllers/customer-with-property-di.controller.ts @@ -3,8 +3,6 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -// tslint:disable:no-unused - import {EntityCrudRepository, repository} from '../..'; import {Customer} from '../models/customer.model'; diff --git a/packages/repository/examples/juggler-bridge/note-with-repo-class.ts b/packages/repository/examples/juggler-bridge/note-with-repo-class.ts index 8e2c89620e30..9481830046d0 100644 --- a/packages/repository/examples/juggler-bridge/note-with-repo-class.ts +++ b/packages/repository/examples/juggler-bridge/note-with-repo-class.ts @@ -40,7 +40,7 @@ class MyNoteRepository extends DefaultCrudRepository { // FIXME For some reason ts-node fails by complaining that // juggler is undefined if the following is used: // @inject('dataSources.memory') dataSource: juggler.DataSource - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any @inject('dataSources.memory') dataSource: any, ) { super(myModel, dataSource); diff --git a/packages/repository/examples/models/customer.definition.js b/packages/repository/examples/models/customer.definition.js index 94f2354fa0c2..5682670de423 100644 --- a/packages/repository/examples/models/customer.definition.js +++ b/packages/repository/examples/models/customer.definition.js @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -var Address = require('./address').Address; +const Address = require('./address').Address; module.exports = { name: 'Customer', diff --git a/packages/repository/examples/models/order.model.ts b/packages/repository/examples/models/order.model.ts index 77e436179561..887de75261bd 100644 --- a/packages/repository/examples/models/order.model.ts +++ b/packages/repository/examples/models/order.model.ts @@ -6,7 +6,7 @@ import {belongsTo, Entity, model, property} from '../..'; import {Customer} from './customer.model'; -// tslint:disable:no-unused +/* eslint-disable @typescript-eslint/no-unused-vars */ @model() class Order extends Entity { diff --git a/packages/repository/package.json b/packages/repository/package.json index ec1bb2abb093..975fbe1864b1 100644 --- a/packages/repository/package.json +++ b/packages/repository/package.json @@ -21,7 +21,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/lodash": "^4.14.130", "@types/node": "^10.11.2" }, diff --git a/packages/repository/src/__tests__/acceptance/has-one.relation.acceptance.ts b/packages/repository/src/__tests__/acceptance/has-one.relation.acceptance.ts index ea70b66c8391..a3c086471bad 100644 --- a/packages/repository/src/__tests__/acceptance/has-one.relation.acceptance.ts +++ b/packages/repository/src/__tests__/acceptance/has-one.relation.acceptance.ts @@ -158,13 +158,11 @@ describe('hasOne relation', () => { }); it('throws an error when PATCH tries to change the foreignKey', async () => { - try { - await expect( - controller.patchCustomerAddress(existingCustomerId, { - customerId: existingCustomerId + 1, - }), - ).to.be.rejectedWith(/Property "customerId" cannot be changed!/); - } catch (err) {} + await expect( + controller.patchCustomerAddress(existingCustomerId, { + customerId: existingCustomerId + 1, + }), + ).to.be.rejectedWith(/Property "customerId" cannot be changed!/); }); it('can DELETE hasOne relation instances', async () => { diff --git a/packages/repository/src/__tests__/acceptance/repository.acceptance.ts b/packages/repository/src/__tests__/acceptance/repository.acceptance.ts index c096cb97b859..b6d68dc7f816 100644 --- a/packages/repository/src/__tests__/acceptance/repository.acceptance.ts +++ b/packages/repository/src/__tests__/acceptance/repository.acceptance.ts @@ -69,13 +69,13 @@ describe('Repository in Thinking in LoopBack', () => { @model() class Role extends Entity { @property() - name: String; + name: string; } @model() class Address extends Entity { @property() - street: String; + street: string; } @model() @@ -87,7 +87,7 @@ describe('Repository in Thinking in LoopBack', () => { id: number; @property({type: 'string'}) - name: String; + name: string; @property.array(Role) roles: Role[]; diff --git a/packages/repository/src/__tests__/fixtures/models/address.model.ts b/packages/repository/src/__tests__/fixtures/models/address.model.ts index 3f62ea9484b5..c886c6d76214 100644 --- a/packages/repository/src/__tests__/fixtures/models/address.model.ts +++ b/packages/repository/src/__tests__/fixtures/models/address.model.ts @@ -11,20 +11,20 @@ export class Address extends Entity { @property({ type: 'string', }) - street: String; + street: string; @property({ type: 'string', id: true, }) - zipcode: String; + zipcode: string; @property({ type: 'string', }) - city: String; + city: string; @property({ type: 'string', }) - province: String; + province: string; @belongsTo(() => Customer) customerId: number; diff --git a/packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts index af01e33e28da..1a4a31c1b7d8 100644 --- a/packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/model-and-relation.decorator.unit.ts @@ -351,7 +351,7 @@ describe('model decorator', () => { it('throws when @property.array is used on a non-array property', () => { expect.throws( () => { - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class Oops { @property.array(Product) product: Product; diff --git a/packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts index 49c7a4e4df92..84ab8deed712 100644 --- a/packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/repository-with-di.decorator.unit.ts @@ -3,16 +3,15 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {expect} from '@loopback/testlab'; import {Context, inject} from '@loopback/context'; - +import {expect} from '@loopback/testlab'; import { + DefaultCrudRepository, + Entity, juggler, + ModelDefinition, Repository, - Entity, repository, - DefaultCrudRepository, - ModelDefinition, } from '../../../'; describe('repository class', () => { @@ -20,7 +19,6 @@ describe('repository class', () => { before(givenCtx); - // tslint:disable-next-line:max-line-length it('supports referencing predefined repository by name via constructor', async () => { const myController = await ctx.get( 'controllers.StringBoundController', diff --git a/packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts index e6e266456516..fb3ed1c7acca 100644 --- a/packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/repository-with-value-provider.decorator.unit.ts @@ -3,16 +3,15 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {expect} from '@loopback/testlab'; import {Context, inject, Provider, ValueOrPromise} from '@loopback/context'; - +import {expect} from '@loopback/testlab'; import { + DefaultCrudRepository, + Entity, juggler, + ModelDefinition, Repository, - Entity, repository, - DefaultCrudRepository, - ModelDefinition, } from '../../../'; class MyController { @@ -59,7 +58,6 @@ describe('repository class', () => { ctx.bind('controllers.MyController').toClass(MyController); }); - // tslint:disable-next-line:max-line-length it('supports referencing predefined repository by name via constructor', async () => { const myController = await ctx.get( 'controllers.MyController', diff --git a/packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts b/packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts index 0c397c53a2c4..ee07614544b4 100644 --- a/packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts +++ b/packages/repository/src/__tests__/unit/decorator/repository.decorator.unit.ts @@ -61,7 +61,6 @@ describe('repository decorator', () => { ctx.bind('controllers.MyController').toClass(MyController); }); - // tslint:disable-next-line:max-line-length it('supports referencing predefined repository by name via constructor', async () => { const myController = await ctx.get( 'controllers.MyController', @@ -69,7 +68,6 @@ describe('repository decorator', () => { expect(myController.noteRepo).exactly(defaultRepo); }); - // tslint:disable-next-line:max-line-length it('supports referencing predefined repository by name via property', async () => { const myController = await ctx.get( 'controllers.MyController', @@ -80,7 +78,7 @@ describe('repository decorator', () => { it('throws not implemented for class-level @repository', () => { expect(() => { @repository('noteRepo') - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class Controller1 {} }).to.throw(/not implemented/); }); diff --git a/packages/repository/src/__tests__/unit/mixins/repository.mixin.unit.ts b/packages/repository/src/__tests__/unit/mixins/repository.mixin.unit.ts index 3b45f21784d5..9728a75a935d 100644 --- a/packages/repository/src/__tests__/unit/mixins/repository.mixin.unit.ts +++ b/packages/repository/src/__tests__/unit/mixins/repository.mixin.unit.ts @@ -16,7 +16,7 @@ import { RepositoryMixin, } from '../../..'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ describe('RepositoryMixin', () => { it('mixed class has .repository()', () => { diff --git a/packages/repository/src/__tests__/unit/model/model.unit.ts b/packages/repository/src/__tests__/unit/model/model.unit.ts index 3c5327a5ba32..6115b53b2ce0 100644 --- a/packages/repository/src/__tests__/unit/model/model.unit.ts +++ b/packages/repository/src/__tests__/unit/model/model.unit.ts @@ -4,8 +4,7 @@ // License text available at https://opensource.org/licenses/MIT import {expect} from '@loopback/testlab'; -import {STRING} from '../../../'; -import {Entity, ModelDefinition} from '../../../'; +import {Entity, ModelDefinition, STRING} from '../../../'; describe('model', () => { const customerDef = new ModelDefinition('Customer'); @@ -96,7 +95,7 @@ describe('model', () => { } } - // tslint:disable-next-line:no-unused + // eslint-disable-next-line @typescript-eslint/no-unused-vars class User extends Entity { static definition = userDef; id: string; diff --git a/packages/repository/src/__tests__/unit/repositories/belongs-to-repository-factory.unit.ts b/packages/repository/src/__tests__/unit/repositories/belongs-to-repository-factory.unit.ts index a4d19257a50d..5f86e5056deb 100644 --- a/packages/repository/src/__tests__/unit/repositories/belongs-to-repository-factory.unit.ts +++ b/packages/repository/src/__tests__/unit/repositories/belongs-to-repository-factory.unit.ts @@ -66,7 +66,7 @@ describe('createBelongsToAccessor', () => { it('rejects relations with a target that is not a type resolver', () => { const relationMeta = givenBelongsToDefinition({ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any target: Customer as any, // the cast to any above is necessary to disable compile check // we want to verify runtime assertion diff --git a/packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts b/packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts index 5e5b9ed6cd7f..f2253c6d85dc 100644 --- a/packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts +++ b/packages/repository/src/__tests__/unit/repositories/has-many-repository-factory.unit.ts @@ -48,7 +48,7 @@ describe('createHasManyRepositoryFactory', () => { it('rejects relations with a target that is not a type resolver', () => { const relationMeta = givenHasManyDefinition({ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any target: Customer as any, // the cast to any above is necessary to disable compile check // we want to verify runtime assertion diff --git a/packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts b/packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts index fc727dc2af9f..c086503579dc 100644 --- a/packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts +++ b/packages/repository/src/__tests__/unit/repositories/has-one-repository-factory.unit.ts @@ -48,7 +48,7 @@ describe('createHasOneRepositoryFactory', () => { it('rejects relations with a target that is not a type resolver', () => { const relationMeta = givenHasOneDefinition({ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any target: Address as any, // the cast to any above is necessary to disable compile check // we want to verify runtime assertion @@ -94,10 +94,10 @@ describe('createHasOneRepositoryFactory', () => { .addProperty('province', { type: 'string', }); - street: String; - zipcode: String; - city: String; - province: String; + street: string; + zipcode: string; + city: string; + province: string; } class Customer extends Entity { static definition = new ModelDefinition('Customer').addProperty('id', { diff --git a/packages/repository/src/__tests__/unit/repositories/legacy-juggler-bridge.unit.ts b/packages/repository/src/__tests__/unit/repositories/legacy-juggler-bridge.unit.ts index 9dc1740d15ef..5cafd3c795b9 100644 --- a/packages/repository/src/__tests__/unit/repositories/legacy-juggler-bridge.unit.ts +++ b/packages/repository/src/__tests__/unit/repositories/legacy-juggler-bridge.unit.ts @@ -28,13 +28,11 @@ describe('legacy loopback-datasource-juggler', () => { }); it('creates models', () => { - /* tslint:disable-next-line:variable-name */ const Note = ds.createModel( 'note', {title: 'string', content: 'string', id: {type: 'number', id: true}}, {}, ); - /* tslint:disable-next-line:variable-name */ const Note2 = bindModel(Note, ds); expect(Note2.modelName).to.eql('note'); expect(Note2.definition).to.eql(Note.definition); @@ -95,8 +93,8 @@ describe('DefaultCrudRepository', () => { }); created: Date; - toBuy: String[]; - toVisit: String[]; + toBuy: string[]; + toVisit: string[]; } it('converts PropertyDefinition with array type', () => { @@ -128,13 +126,13 @@ describe('DefaultCrudRepository', () => { @model() class Role { @property() - name: String; + name: string; } @model() class Address { @property() - street: String; + street: string; } @model() @@ -146,7 +144,7 @@ describe('DefaultCrudRepository', () => { id: number; @property({type: 'string'}) - name: String; + name: string; @property.array(Role) roles: Role[]; @@ -157,7 +155,6 @@ describe('DefaultCrudRepository', () => { expect(ds.getModel('User')).undefined(); - // tslint:disable-next-line:no-unused-expression new DefaultCrudRepository(User, ds); const JugglerUser = ds.getModel('User')!; @@ -180,7 +177,7 @@ describe('DefaultCrudRepository', () => { .of.length(1); // FIXME(bajtos) PropertyDefinition in juggler does not allow array type! - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const rolesModel = (rolesProperty.type as any)[0] as typeof juggler.ModelBase; expect(rolesModel).to.be.a.Function(); expect(rolesModel).to.equal(ds.getModel('Role')); diff --git a/packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts b/packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts index 80df7d26dab8..a59d024dc615 100644 --- a/packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts +++ b/packages/repository/src/__tests__/unit/repositories/relation.repository.unit.ts @@ -35,8 +35,8 @@ describe('relation repository', () => { * interface. The TS Compiler will complain if the interface changes. */ - // tslint:disable-next-line:no-unused - class testHasManyEntityCrudRepository + // eslint-disable-next-line @typescript-eslint/no-unused-vars + class TestHasManyEntityCrudRepository implements HasManyRepository { create( targetModelData: DataObject, diff --git a/packages/repository/src/common-types.ts b/packages/repository/src/common-types.ts index 8d70a00a96be..2d4d5a3860ab 100644 --- a/packages/repository/src/common-types.ts +++ b/packages/repository/src/common-types.ts @@ -6,7 +6,7 @@ /** * Common types/interfaces such as Class/Constructor/Options/Callback */ -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Interface for classes with `new` operator and static properties/methods @@ -82,7 +82,6 @@ export type NamedParameters = AnyObject; /** * Positional parameters, such as [1, 'a'] */ -// tslint:disable-next-line:no-any export type PositionalParameters = any[]; /** diff --git a/packages/repository/src/connectors/connector.ts b/packages/repository/src/connectors/connector.ts index fc67b9faaa67..ae3df1ce77cb 100644 --- a/packages/repository/src/connectors/connector.ts +++ b/packages/repository/src/connectors/connector.ts @@ -3,14 +3,14 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {Model} from '../model'; import { AnyObject, - Options, Command, NamedParameters, + Options, PositionalParameters, } from '../common-types'; +import {Model} from '../model'; /** * Common properties/operations for connectors @@ -24,7 +24,6 @@ export interface Connector { ping(): Promise; // Ping the underlying system execute?( command: Command, - // tslint:disable:no-any parameters: NamedParameters | PositionalParameters, options?: Options, ): Promise; diff --git a/packages/repository/src/datasource.ts b/packages/repository/src/datasource.ts index 34261488bdac..ce0dbdc5b5ad 100644 --- a/packages/repository/src/datasource.ts +++ b/packages/repository/src/datasource.ts @@ -14,7 +14,7 @@ export interface DataSource { connector?: Connector; // The underlying connector instance settings: AnyObject; // Settings - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [property: string]: any; // Other properties that vary by connectors } diff --git a/packages/repository/src/decorators/metadata.ts b/packages/repository/src/decorators/metadata.ts index 7a7eb5b9068a..7a1fc4a1f7c1 100644 --- a/packages/repository/src/decorators/metadata.ts +++ b/packages/repository/src/decorators/metadata.ts @@ -4,13 +4,13 @@ // License text available at https://opensource.org/licenses/MIT import {InspectionOptions, MetadataInspector} from '@loopback/context'; +import {ModelDefinition} from '../model'; import { MODEL_KEY, MODEL_PROPERTIES_KEY, MODEL_WITH_PROPERTIES_KEY, PropertyMap, } from './model.decorator'; -import {ModelDefinition} from '../model'; export class ModelMetadataHelper { /** @@ -24,8 +24,7 @@ export class ModelMetadataHelper { target: Function, options?: InspectionOptions, ): ModelDefinition | {} { - let classDef: ModelDefinition | undefined; - classDef = MetadataInspector.getClassMetadata( + const classDef = MetadataInspector.getClassMetadata( MODEL_WITH_PROPERTIES_KEY, target, options, diff --git a/packages/repository/src/decorators/model.decorator.ts b/packages/repository/src/decorators/model.decorator.ts index d88fd31791b2..9c4bbe82e68a 100644 --- a/packages/repository/src/decorators/model.decorator.ts +++ b/packages/repository/src/decorators/model.decorator.ts @@ -34,8 +34,6 @@ export const MODEL_WITH_PROPERTIES_KEY = MetadataAccessor.create< export type PropertyMap = MetadataMap; -// tslint:disable:no-any - /** * Decorator for model definitions * @param definition @@ -132,7 +130,7 @@ export namespace property { itemType: PropertyType, definition?: Partial, ) { - return function(target: Object, propertyName: string) { + return function(target: object, propertyName: string) { const propType = MetadataInspector.getDesignTypeForProperty( target, propertyName, diff --git a/packages/repository/src/decorators/repository.decorator.ts b/packages/repository/src/decorators/repository.decorator.ts index d8699210212e..3d862c5b6f33 100644 --- a/packages/repository/src/decorators/repository.decorator.ts +++ b/packages/repository/src/decorators/repository.decorator.ts @@ -17,7 +17,7 @@ import {juggler} from '../repositories/legacy-juggler-bridge'; export type RepositoryDecorator = ( target: Object, key?: string, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any descriptorOrIndex?: TypedPropertyDescriptor | number, ) => void; @@ -149,7 +149,7 @@ export function repository( return function( target: Object, key?: string, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any descriptorOrIndex?: TypedPropertyDescriptor | number, ) { if (key || typeof descriptorOrIndex === 'number') { diff --git a/packages/repository/src/errors/entity-not-found.error.ts b/packages/repository/src/errors/entity-not-found.error.ts index ce4456c68ffd..2620e2e460d6 100644 --- a/packages/repository/src/errors/entity-not-found.error.ts +++ b/packages/repository/src/errors/entity-not-found.error.ts @@ -34,7 +34,7 @@ export class EntityNotFoundError extends Error { } } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isEntityNotFoundError(e: any): e is EntityNotFoundError { return e instanceof EntityNotFoundError; } diff --git a/packages/repository/src/errors/invalid-relation.error.ts b/packages/repository/src/errors/invalid-relation.error.ts index 9ad74520453d..cb1e121c874c 100644 --- a/packages/repository/src/errors/invalid-relation.error.ts +++ b/packages/repository/src/errors/invalid-relation.error.ts @@ -33,7 +33,7 @@ export class InvalidRelationError extends Error { } } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isInvalidRelationError(e: any): e is InvalidRelationError { return e instanceof InvalidRelationError; } diff --git a/packages/repository/src/mixins/repository.mixin.ts b/packages/repository/src/mixins/repository.mixin.ts index e30d9934fd72..cefff66c8684 100644 --- a/packages/repository/src/mixins/repository.mixin.ts +++ b/packages/repository/src/mixins/repository.mixin.ts @@ -26,11 +26,11 @@ const debug = debugFactory('loopback:repository:mixin'); * called RepositoryMixinDoc * */ -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function RepositoryMixin>(superClass: T) { return class extends superClass { // A mixin class has to take in a type any[] argument! - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(...args: any[]) { super(...args); } @@ -63,7 +63,7 @@ export function RepositoryMixin>(superClass: T) { * app.repository(NoteRepo); * ``` */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any repository>( repoClass: Class, name?: string, @@ -83,7 +83,7 @@ export function RepositoryMixin>(superClass: T) { * * @param repo - The repository class to retrieve the instance of */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any async getRepository>(repo: Class): Promise { return await this.get(`repositories.${repo.name}`); } @@ -224,12 +224,12 @@ export function RepositoryMixin>(superClass: T) { * Interface for an Application mixed in with RepositoryMixin */ export interface ApplicationWithRepositories extends Application { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any repository>( repo: Class, name?: string, ): Binding; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any getRepository>(repo: Class): Promise; dataSource( dataSource: Class | D, @@ -248,7 +248,7 @@ export interface ApplicationWithRepositories extends Application { * RepositoryMixin */ export class RepositoryMixinDoc { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(...args: any[]) { throw new Error( 'This is a dummy class created for apidoc!' + 'Please do not use it!', @@ -283,7 +283,7 @@ export class RepositoryMixinDoc { * app.repository(NoteRepo); * ``` */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any repository(repo: Class>): Binding { throw new Error(); } @@ -293,7 +293,7 @@ export class RepositoryMixinDoc { * * @param repo - The repository class to retrieve the instance of */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any async getRepository>(repo: Class): Promise { return new repo() as R; } diff --git a/packages/repository/src/model.ts b/packages/repository/src/model.ts index 846c39c127cc..f46d415bfc0c 100644 --- a/packages/repository/src/model.ts +++ b/packages/repository/src/model.ts @@ -14,12 +14,12 @@ import {Type} from './types'; * See https://en.wikipedia.org/wiki/Domain-driven_design#Building_blocks */ -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export type PropertyType = | string | Function - | Object + | object | Type | TypeResolver; @@ -223,7 +223,7 @@ export abstract class Model { if (options && options.ignoreUnknownProperties === false) { obj = {}; for (const p in this) { - let val = (this as AnyObject)[p]; + const val = (this as AnyObject)[p]; obj[p] = asObject(val, options); } } else { diff --git a/packages/repository/src/query.ts b/packages/repository/src/query.ts index 0723148bf453..f26426e837f1 100644 --- a/packages/repository/src/query.ts +++ b/packages/repository/src/query.ts @@ -6,7 +6,7 @@ import * as assert from 'assert'; import {AnyObject} from './common-types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ const nonWhereFields = [ 'fields', diff --git a/packages/repository/src/relations/belongs-to/belongs-to-accessor.ts b/packages/repository/src/relations/belongs-to/belongs-to-accessor.ts index 7454dfdc89ed..f4e0c31887b9 100644 --- a/packages/repository/src/relations/belongs-to/belongs-to-accessor.ts +++ b/packages/repository/src/relations/belongs-to/belongs-to-accessor.ts @@ -38,7 +38,7 @@ export function createBelongsToAccessor< const primaryKey = meta.keyTo; const sourceModel = await sourceRepository.findById(sourceId); const foreignKeyValue = sourceModel[foreignKey as keyof Source]; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const constraint: any = {[primaryKey]: foreignKeyValue}; const constrainedRepo = new DefaultBelongsToRepository( targetRepoGetter, diff --git a/packages/repository/src/relations/has-many/has-many-repository.factory.ts b/packages/repository/src/relations/has-many/has-many-repository.factory.ts index 77f69f5dc0d0..54bd93a78a6a 100644 --- a/packages/repository/src/relations/has-many/has-many-repository.factory.ts +++ b/packages/repository/src/relations/has-many/has-many-repository.factory.ts @@ -46,7 +46,7 @@ export function createHasManyRepositoryFactory< const meta = resolveHasManyMetadata(relationMetadata); debug('Resolved HasMany relation metadata: %o', meta); return function(fkValue: ForeignKeyType) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const constraint: any = {[meta.keyTo]: fkValue}; return new DefaultHasManyRepository< Target, diff --git a/packages/repository/src/relations/has-many/has-many.decorator.ts b/packages/repository/src/relations/has-many/has-many.decorator.ts index be205febdf29..7be8f35f4955 100644 --- a/packages/repository/src/relations/has-many/has-many.decorator.ts +++ b/packages/repository/src/relations/has-many/has-many.decorator.ts @@ -19,7 +19,7 @@ export function hasMany( targetResolver: EntityResolver, definition?: Partial, ) { - return function(decoratedTarget: Object, key: string) { + return function(decoratedTarget: object, key: string) { const meta: HasManyDefinition = Object.assign( // default values, can be customized by the caller {name: key}, diff --git a/packages/repository/src/relations/has-one/has-one-repository.factory.ts b/packages/repository/src/relations/has-one/has-one-repository.factory.ts index a2bfa94a716f..e2e7a3fecc33 100644 --- a/packages/repository/src/relations/has-one/has-one-repository.factory.ts +++ b/packages/repository/src/relations/has-one/has-one-repository.factory.ts @@ -43,7 +43,7 @@ export function createHasOneRepositoryFactory< const meta = resolveHasOneMetadata(relationMetadata); debug('Resolved HasOne relation metadata: %o', meta); return function(fkValue: ForeignKeyType) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const constraint: any = {[meta.keyTo]: fkValue}; return new DefaultHasOneRepository< Target, diff --git a/packages/repository/src/relations/has-one/has-one.decorator.ts b/packages/repository/src/relations/has-one/has-one.decorator.ts index be1855eb5d70..b8e4fb325c14 100644 --- a/packages/repository/src/relations/has-one/has-one.decorator.ts +++ b/packages/repository/src/relations/has-one/has-one.decorator.ts @@ -18,7 +18,7 @@ export function hasOne( targetResolver: EntityResolver, definition?: Partial, ) { - return function(decoratedTarget: Object, key: string) { + return function(decoratedTarget: object, key: string) { // property.array(targetResolver)(decoratedTarget, key); const meta: HasOneDefinition = Object.assign( diff --git a/packages/repository/src/relations/relation.decorator.ts b/packages/repository/src/relations/relation.decorator.ts index f510e8055689..8031c737c99c 100644 --- a/packages/repository/src/relations/relation.decorator.ts +++ b/packages/repository/src/relations/relation.decorator.ts @@ -4,9 +4,9 @@ // License text available at https://opensource.org/licenses/MIT import {PropertyDecoratorFactory} from '@loopback/context'; +import {buildModelDefinition} from '../decorators'; import {Model, RelationDefinitionMap} from '../model'; import {RelationType} from './relation.types'; -import {buildModelDefinition} from '../decorators'; export const RELATIONS_KEY = 'loopback:relations'; diff --git a/packages/repository/src/repositories/kv.repository.bridge.ts b/packages/repository/src/repositories/kv.repository.bridge.ts index 6ed3c97f02e4..be7d25caaf09 100644 --- a/packages/repository/src/repositories/kv.repository.bridge.ts +++ b/packages/repository/src/repositories/kv.repository.bridge.ts @@ -16,9 +16,9 @@ import {juggler, ensurePromise} from './legacy-juggler-bridge'; * Polyfill for Symbol.asyncIterator * See https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-3.html */ -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any if (!(Symbol as any).asyncIterator) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (Symbol as any).asyncIterator = Symbol.for('Symbol.asyncIterator'); } @@ -59,7 +59,7 @@ export class DefaultKeyValueRepository if (modelData == null) return modelData; let data = modelData; if (typeof modelData.toObject === 'function') { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any data = (modelData as any).toObject(); } return new this.entityClass(data) as T; diff --git a/packages/repository/src/repositories/legacy-juggler-bridge.ts b/packages/repository/src/repositories/legacy-juggler-bridge.ts index e1869e715979..505eb07482cd 100644 --- a/packages/repository/src/repositories/legacy-juggler-bridge.ts +++ b/packages/repository/src/repositories/legacy-juggler-bridge.ts @@ -33,6 +33,7 @@ import {isTypeResolver, resolveType} from '../type-resolver'; import {EntityCrudRepository} from './repository'; export namespace juggler { + /* eslint-disable @typescript-eslint/no-unused-vars */ export import DataSource = legacy.DataSource; export import ModelBase = legacy.ModelBase; export import ModelBaseClass = legacy.ModelBaseClass; @@ -63,16 +64,15 @@ export function bindModel( modelClass: T, ds: juggler.DataSource, ): T { - const boundModelClass = class extends modelClass {}; - boundModelClass.attachTo(ds); - return boundModelClass; + const BoundModelClass = class extends modelClass {}; + BoundModelClass.attachTo(ds); + return BoundModelClass; } /** * Ensure the value is a promise * @param p - Promise or void */ -/* tslint:disable-next-line:no-any */ export function ensurePromise(p: legacy.PromiseOrVoid): Promise { if (p && isPromiseLike(p)) { // Juggler uses promise-like Bluebird instead of native Promise diff --git a/packages/repository/src/repositories/repository.ts b/packages/repository/src/repositories/repository.ts index 1e173ed9a35b..739a9e7c9f2e 100644 --- a/packages/repository/src/repositories/repository.ts +++ b/packages/repository/src/repositories/repository.ts @@ -18,7 +18,7 @@ import {EntityNotFoundError} from '../errors'; import {Entity, Model, ValueObject} from '../model'; import {Filter, Where} from '../query'; -// tslint:disable:no-unused +/* eslint-disable @typescript-eslint/no-unused-vars */ export interface Repository {} @@ -341,7 +341,6 @@ export class CrudRepositoryImpl ); } else { // FIXME: populate inst with all properties - // tslint:disable-next-line:no-unused const inst = data; const where = this.entityClass.buildWhereForId(id); const result = await this.updateAll(data, where, options); diff --git a/packages/repository/src/type-resolver.ts b/packages/repository/src/type-resolver.ts index f4f4e281f4df..68d495f9d489 100644 --- a/packages/repository/src/type-resolver.ts +++ b/packages/repository/src/type-resolver.ts @@ -33,8 +33,8 @@ export type TypeResolver< * A function that checks whether a function is a TypeResolver or not. * @param fn - The value to check. */ -export function isTypeResolver( - // tslint:disable-next-line:no-any +export function isTypeResolver( + // eslint-disable-next-line @typescript-eslint/no-explicit-any fn: any, ): fn is TypeResolver { // 1. A type provider must be a function diff --git a/packages/repository/src/types/any.ts b/packages/repository/src/types/any.ts index f5c92dd8a0e9..9542eb1d6c43 100644 --- a/packages/repository/src/types/any.ts +++ b/packages/repository/src/types/any.ts @@ -5,7 +5,7 @@ import {Type} from './type'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Any type diff --git a/packages/repository/src/types/array.ts b/packages/repository/src/types/array.ts index 8002650785c3..5c6285676249 100644 --- a/packages/repository/src/types/array.ts +++ b/packages/repository/src/types/array.ts @@ -6,12 +6,12 @@ import {Type} from './type'; import * as util from 'util'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Array type, such as string[] */ -export class ArrayType implements Type> { +export class ArrayType implements Type { constructor(public itemType: Type) {} readonly name = 'array'; @@ -21,7 +21,7 @@ export class ArrayType implements Type> { if (!Array.isArray(value)) { return false; } - const list = value as Array; + const list = value as (T | null | undefined)[]; return list.every(i => this.itemType.isInstance(i)); } @@ -33,7 +33,7 @@ export class ArrayType implements Type> { return value.every(i => this.itemType.isCoercible(i)); } - defaultValue(): Array { + defaultValue(): T[] { return []; } @@ -46,7 +46,7 @@ export class ArrayType implements Type> { return value.map(i => this.itemType.coerce(i)); } - serialize(value: Array | null | undefined) { + serialize(value: T[] | null | undefined) { if (value == null) return value; return value.map(i => this.itemType.serialize(i)); } diff --git a/packages/repository/src/types/boolean.ts b/packages/repository/src/types/boolean.ts index cb6e70e92620..5a87669f1749 100644 --- a/packages/repository/src/types/boolean.ts +++ b/packages/repository/src/types/boolean.ts @@ -5,7 +5,7 @@ import {Type} from './type'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Boolean type diff --git a/packages/repository/src/types/buffer.ts b/packages/repository/src/types/buffer.ts index 4ef55a004636..7a17d428a230 100644 --- a/packages/repository/src/types/buffer.ts +++ b/packages/repository/src/types/buffer.ts @@ -7,7 +7,7 @@ import * as util from 'util'; import {Type} from './type'; import {Options} from '../common-types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Buffer (binary) type diff --git a/packages/repository/src/types/date.ts b/packages/repository/src/types/date.ts index 5ad7544b8031..8ec9fae8a15f 100644 --- a/packages/repository/src/types/date.ts +++ b/packages/repository/src/types/date.ts @@ -6,7 +6,7 @@ import * as util from 'util'; import {Type} from './type'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Date type diff --git a/packages/repository/src/types/model.ts b/packages/repository/src/types/model.ts index 823dab4a295b..35f34d3f1d70 100644 --- a/packages/repository/src/types/model.ts +++ b/packages/repository/src/types/model.ts @@ -7,8 +7,6 @@ import {Class} from '../common-types'; import {Model} from '../model'; import {ObjectType} from './object'; -// tslint:disable:no-any - /** * Model type */ diff --git a/packages/repository/src/types/number.ts b/packages/repository/src/types/number.ts index f32b69510230..6808f9fc0966 100644 --- a/packages/repository/src/types/number.ts +++ b/packages/repository/src/types/number.ts @@ -6,7 +6,7 @@ import * as util from 'util'; import {Type} from './type'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Number type diff --git a/packages/repository/src/types/object.ts b/packages/repository/src/types/object.ts index 3cc1c1b9c2ce..3dd5c98d9387 100644 --- a/packages/repository/src/types/object.ts +++ b/packages/repository/src/types/object.ts @@ -7,7 +7,7 @@ import * as util from 'util'; import {Class, AnyObject} from '../common-types'; import {Type} from './type'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Object type diff --git a/packages/repository/src/types/string.ts b/packages/repository/src/types/string.ts index 61877e41abf4..4e21c42b92c9 100644 --- a/packages/repository/src/types/string.ts +++ b/packages/repository/src/types/string.ts @@ -5,7 +5,7 @@ import {Type} from './type'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * String type diff --git a/packages/repository/src/types/type.ts b/packages/repository/src/types/type.ts index a5ea9acaf17d..111a933e18ed 100644 --- a/packages/repository/src/types/type.ts +++ b/packages/repository/src/types/type.ts @@ -8,7 +8,7 @@ */ import {Options} from '../common-types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export interface Type { /** diff --git a/packages/repository/src/types/union.ts b/packages/repository/src/types/union.ts index b5bed57d6b0c..65b709fb0b3a 100644 --- a/packages/repository/src/types/union.ts +++ b/packages/repository/src/types/union.ts @@ -6,7 +6,7 @@ import * as util from 'util'; import {Type} from './type'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Union type, such as string | number diff --git a/packages/rest-explorer/package.json b/packages/rest-explorer/package.json index 1999a87b9ae5..4736b6409633 100644 --- a/packages/rest-explorer/package.json +++ b/packages/rest-explorer/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/ejs": "^2.6.0", "@types/express": "^4.16.1", "@types/node": "^10.1.1", diff --git a/packages/rest/package.json b/packages/rest/package.json index 33474fe73a2e..174733137174 100644 --- a/packages/rest/package.json +++ b/packages/rest/package.json @@ -54,7 +54,7 @@ "@loopback/openapi-spec-builder": "^1.1.13", "@loopback/repository": "^1.5.8", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "^4.1.4", "@types/js-yaml": "^3.12.1", "@types/lodash": "^4.14.130", diff --git a/packages/rest/src/__tests__/acceptance/coercion/coercion.acceptance.ts b/packages/rest/src/__tests__/acceptance/coercion/coercion.acceptance.ts index 45d32c88bb4f..36aa5ccb9248 100644 --- a/packages/rest/src/__tests__/acceptance/coercion/coercion.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/coercion/coercion.acceptance.ts @@ -48,7 +48,7 @@ describe('Coercion', () => { } @get('/object-from-query') - getObjectFromQuery(@param.query.object('filter') filter: Object) { + getObjectFromQuery(@param.query.object('filter') filter: object) { return filter; } } diff --git a/packages/rest/src/__tests__/acceptance/file-upload/file-upload-with-parser.acceptance.ts b/packages/rest/src/__tests__/acceptance/file-upload/file-upload-with-parser.acceptance.ts index 40187d8a5c0e..d064958d5b03 100644 --- a/packages/rest/src/__tests__/acceptance/file-upload/file-upload-with-parser.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/file-upload/file-upload-with-parser.acceptance.ts @@ -103,7 +103,7 @@ class MultipartFormDataBodyParser implements BodyParser { const storage = multer.memoryStorage(); const upload = multer({storage}); return new Promise((resolve, reject) => { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any upload.any()(request, {} as any, err => { if (err) reject(err); else { diff --git a/packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts b/packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts index b29fd4ab1de3..edc9e1dcde0a 100644 --- a/packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/file-upload/file-upload.acceptance.ts @@ -76,7 +76,7 @@ describe('multipart/form-data', () => { }) request: Request, @inject(RestBindings.Http.RESPONSE) response: Response, - ): Promise { + ): Promise { const storage = multer.memoryStorage(); const upload = multer({storage}); return new Promise((resolve, reject) => { @@ -85,7 +85,7 @@ describe('multipart/form-data', () => { else { resolve({ files: request.files, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any fields: (request as any).fields, }); } diff --git a/packages/rest/src/__tests__/acceptance/request-parsing/request-parsing.acceptance.ts b/packages/rest/src/__tests__/acceptance/request-parsing/request-parsing.acceptance.ts index cc33a8f17d5c..de548ca4f26f 100644 --- a/packages/rest/src/__tests__/acceptance/request-parsing/request-parsing.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/request-parsing/request-parsing.acceptance.ts @@ -21,7 +21,7 @@ import { describe('request parsing', () => { let client: Client; let app: RestApplication; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let parsedRequestBodyValue: any; beforeEach(givenAClient); @@ -116,7 +116,7 @@ describe('request parsing', () => { }, }, }) - request: // tslint:disable-next-line:no-any + request: // eslint-disable-next-line @typescript-eslint/no-explicit-any any, ): Promise { parsedRequestBodyValue = request; diff --git a/packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts b/packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts index f7710cb61c15..2ded222aa0c2 100644 --- a/packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts +++ b/packages/rest/src/__tests__/acceptance/routing/routing.acceptance.ts @@ -758,7 +758,7 @@ describe('Routing', () => { const server = await app.getServer(RestServer); const handler = await server.get(RestBindings.HANDLER); // Use a hack to verify the bound router is used by the handler - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any expect((handler as any)._routes._router).to.be.instanceof(RegExpRouter); }); diff --git a/packages/rest/src/__tests__/integration/express.integration.ts b/packages/rest/src/__tests__/integration/express.integration.ts index bb790a4fdecd..ff756e0a6125 100644 --- a/packages/rest/src/__tests__/integration/express.integration.ts +++ b/packages/rest/src/__tests__/integration/express.integration.ts @@ -59,8 +59,8 @@ describe('HttpHandler mounted as an express router', () => { let handler: HttpRequestListener; function givenControllerClass( - // tslint:disable-next-line:no-any - ctor: new (...args: any[]) => Object, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ctor: new (...args: any[]) => object, ) { server.controller(ctor); } diff --git a/packages/rest/src/__tests__/integration/http-handler.integration.ts b/packages/rest/src/__tests__/integration/http-handler.integration.ts index 7614357dd3f6..dfac50b9430b 100644 --- a/packages/rest/src/__tests__/integration/http-handler.integration.ts +++ b/packages/rest/src/__tests__/integration/http-handler.integration.ts @@ -444,7 +444,7 @@ describe('HttpHandler', () => { .build(); class RouteParamController { - async showBody(data: Object): Promise { + async showBody(data: object): Promise { bodyParamControllerInvoked = true; return data; } @@ -466,7 +466,7 @@ describe('HttpHandler', () => { .build(); class TestController { - public async getObject(): Promise { + public async getObject(): Promise { return {key: 'value'}; } } @@ -668,8 +668,8 @@ describe('HttpHandler', () => { } function givenControllerClass( - // tslint:disable-next-line:no-any - ctor: new (...args: any[]) => Object, + // eslint-disable-next-line @typescript-eslint/no-explicit-any + ctor: new (...args: any[]) => object, spec: ControllerSpec, ) { handler.registerController(spec, ctor); diff --git a/packages/rest/src/__tests__/unit/coercion/utils.ts b/packages/rest/src/__tests__/unit/coercion/utils.ts index 0b7717f36e99..7a802bf01f0e 100644 --- a/packages/rest/src/__tests__/unit/coercion/utils.ts +++ b/packages/rest/src/__tests__/unit/coercion/utils.ts @@ -68,11 +68,13 @@ export async function testCoercion(config: TestArgs) { pathParams.aparameter = config.rawValue; break; case 'query': - const q = qs.stringify( - {aparameter: config.rawValue}, - {encodeValuesOnly: true}, - ); - url += `?${q}`; + { + const q = qs.stringify( + {aparameter: config.rawValue}, + {encodeValuesOnly: true}, + ); + url += `?${q}`; + } break; case 'header': case 'cookie': diff --git a/packages/rest/src/__tests__/unit/re-export.unit.ts b/packages/rest/src/__tests__/unit/re-export.unit.ts index e661dd311122..f75102124af9 100644 --- a/packages/rest/src/__tests__/unit/re-export.unit.ts +++ b/packages/rest/src/__tests__/unit/re-export.unit.ts @@ -7,7 +7,7 @@ import {get} from '../..'; describe('re-export controller decorators', () => { it('exports functions from @loopback/openapi-v3', async () => { - /* tslint:disable-next-line:no-unused */ + // eslint-disable-next-line @typescript-eslint/no-unused-vars class Test { // Make sure the decorators are exported @get('/test') diff --git a/packages/rest/src/__tests__/unit/rest.application/rest.application.unit.ts b/packages/rest/src/__tests__/unit/rest.application/rest.application.unit.ts index 0ccd33a3bbc6..90935bdd1148 100644 --- a/packages/rest/src/__tests__/unit/rest.application/rest.application.unit.ts +++ b/packages/rest/src/__tests__/unit/rest.application/rest.application.unit.ts @@ -3,18 +3,17 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT +import {expect} from '@loopback/testlab'; import { + ERR_NO_MULTI_SERVER, RestApplication, - RestServer, RestComponent, - ERR_NO_MULTI_SERVER, + RestServer, } from '../../..'; -import {expect} from '@loopback/testlab'; describe('RestApplication', () => { describe('throws', () => { it('when attempting to bind another server', () => { - // tslint:disable-next-line:no-unused const app = new RestApplication(); expect.throws( () => { @@ -26,7 +25,6 @@ describe('RestApplication', () => { }); it('when attempting to bind an array of servers', () => { - // tslint:disable-next-line:no-unused const app = new RestApplication(); expect.throws( () => { @@ -41,7 +39,6 @@ describe('RestApplication', () => { class OtherRestComponent extends RestComponent {} expect.throws( () => { - // tslint:disable-next-line:no-unused const app = new RestApplication(); app.component(RestComponent); app.component(OtherRestComponent); diff --git a/packages/rest/src/__tests__/unit/rest.component.unit.ts b/packages/rest/src/__tests__/unit/rest.component.unit.ts index 5c3df5728a8a..835a3e28298d 100644 --- a/packages/rest/src/__tests__/unit/rest.component.unit.ts +++ b/packages/rest/src/__tests__/unit/rest.component.unit.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -import {BoundValue, Context, Provider, inject} from '@loopback/context'; +import {BoundValue, Context, inject, Provider} from '@loopback/context'; import { Application, Component, @@ -61,9 +61,8 @@ describe('RestComponent', () => { expect(logError.length).to.equal(3); // (err, statusCode, request) }); - // tslint:disable-next-line:max-line-length it('can be customized by extending RestComponent', async () => { - let lastLog: string = 'logError() was not called'; + let lastLog = 'logError() was not called'; class CustomRestComponent extends RestComponent { providers: ProviderMap = { diff --git a/packages/rest/src/__tests__/unit/rest.server/rest.server.redirect.unit.ts b/packages/rest/src/__tests__/unit/rest.server/rest.server.redirect.unit.ts index 196457b58d77..c32a5d60c59a 100644 --- a/packages/rest/src/__tests__/unit/rest.server/rest.server.redirect.unit.ts +++ b/packages/rest/src/__tests__/unit/rest.server/rest.server.redirect.unit.ts @@ -13,7 +13,7 @@ describe('RestServer.redirect()', () => { app.component(RestComponent); const server = await app.getServer(RestServer); server.redirect('/test', '/test/'); - let boundRoutes = server.find('routes.*').map(b => b.key); + const boundRoutes = server.find('routes.*').map(b => b.key); expect(boundRoutes).to.containEql('routes.get %2Ftest'); }); }); diff --git a/packages/rest/src/__tests__/unit/router/routing-table.unit.ts b/packages/rest/src/__tests__/unit/router/routing-table.unit.ts index 72cef9f49091..61b807101671 100644 --- a/packages/rest/src/__tests__/unit/router/routing-table.unit.ts +++ b/packages/rest/src/__tests__/unit/router/routing-table.unit.ts @@ -204,12 +204,12 @@ function runTestsWithRouter(router: RestRouter) { const table = givenRoutingTable(); table.registerController(spec, TestController); - let request = givenRequest({ + const request = givenRequest({ method: 'get', url: '/my/getProfile/1.json', }); - let route = table.find(request); + const route = table.find(request); expect(route.path).to.eql('/my/getProfile/{userId}.{format}'); expect(route.pathParams).to.containEql({userId: '1', format: 'json'}); }); @@ -245,7 +245,7 @@ function runTestsWithRouter(router: RestRouter) { table.registerController(spec, TestController); const findAndCheckRoute = (url: string, expectedPath: string) => { - let request = givenRequest({ + const request = givenRequest({ method: 'get', url, }); diff --git a/packages/rest/src/body-parsers/body-parser.helpers.ts b/packages/rest/src/body-parsers/body-parser.helpers.ts index 175afe1b7fa8..d9b373d94ead 100644 --- a/packages/rest/src/body-parsers/body-parser.helpers.ts +++ b/packages/rest/src/body-parsers/body-parser.helpers.ts @@ -44,7 +44,7 @@ export function normalizeParsingError(err: HttpError) { return err; } -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Parse the request body asynchronously diff --git a/packages/rest/src/body-parsers/types.ts b/packages/rest/src/body-parsers/types.ts index add5aa6616ea..410acfa74ab7 100644 --- a/packages/rest/src/body-parsers/types.ts +++ b/packages/rest/src/body-parsers/types.ts @@ -12,7 +12,7 @@ export type RequestBody = { /** * Parsed value of the request body */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any value: any | undefined; /** * Is coercion required? Some forms of request such as urlencoded don't diff --git a/packages/rest/src/coercion/validator.ts b/packages/rest/src/coercion/validator.ts index 00dc8bd00cef..6ca2fecbdd8e 100644 --- a/packages/rest/src/coercion/validator.ts +++ b/packages/rest/src/coercion/validator.ts @@ -61,7 +61,7 @@ export class Validator { * * @param value */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any isAbsent(value: any) { if (value === '' || value === undefined) return true; diff --git a/packages/rest/src/parse-json.ts b/packages/rest/src/parse-json.ts index 35601b47a084..aac2010980bf 100644 --- a/packages/rest/src/parse-json.ts +++ b/packages/rest/src/parse-json.ts @@ -3,7 +3,7 @@ // This file is licensed under the MIT License. // License text available at https://opensource.org/licenses/MIT -//tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ // These utilities are introduced to mitigate the prototype pollution issue // with `JSON.parse`. diff --git a/packages/rest/src/parser.ts b/packages/rest/src/parser.ts index 25cca14fd93d..0bbd8b4a7082 100644 --- a/packages/rest/src/parser.ts +++ b/packages/rest/src/parser.ts @@ -54,7 +54,7 @@ function buildOperationArguments( body: RequestBody, globalSchemas: SchemasObject, ): OperationArgs { - let requestBodyIndex: number = -1; + let requestBodyIndex = -1; if (operationSpec.requestBody) { // the type of `operationSpec.requestBody` could be `RequestBodyObject` // or `ReferenceObject`, resolving a `$ref` value is not supported yet. diff --git a/packages/rest/src/rest.server.ts b/packages/rest/src/rest.server.ts index 9bbac6b37b7a..8ff56b3d817a 100644 --- a/packages/rest/src/rest.server.ts +++ b/packages/rest/src/rest.server.ts @@ -951,7 +951,7 @@ export interface RestServerResolvedOptions { apiExplorer: ApiExplorerOptions; requestBodyParser?: RequestBodyParserOptions; sequence?: Constructor; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any expressSettings: {[name: string]: any}; router: RestRouterOptions; } diff --git a/packages/rest/src/router/controller-route.ts b/packages/rest/src/router/controller-route.ts index 74a4af102f42..9071aa556352 100644 --- a/packages/rest/src/router/controller-route.ts +++ b/packages/rest/src/router/controller-route.ts @@ -20,7 +20,7 @@ import {BaseRoute} from './base-route'; /* * A controller instance with open properties/methods */ -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type ControllerInstance = {[name: string]: any} & object; /** diff --git a/packages/rest/src/router/redirect-route.ts b/packages/rest/src/router/redirect-route.ts index ab78829bd04f..bb09d2f86dcd 100644 --- a/packages/rest/src/router/redirect-route.ts +++ b/packages/rest/src/router/redirect-route.ts @@ -15,7 +15,7 @@ export class RedirectRoute implements RouteEntry, ResolvedRoute { // RouteEntry implementation readonly verb: string = 'get'; - readonly path: string = this.sourcePath; + readonly path: string; readonly spec: OperationObject = { description: 'LoopBack Redirect route', 'x-visibility': 'undocumented', @@ -26,7 +26,9 @@ export class RedirectRoute implements RouteEntry, ResolvedRoute { private readonly sourcePath: string, private readonly targetLocation: string, private readonly statusCode: number = 303, - ) {} + ) { + this.path = sourcePath; + } async invokeHandler( {response}: RequestContext, diff --git a/packages/rest/src/router/router-base.ts b/packages/rest/src/router/router-base.ts index 6a22e67ebf88..7467ba88721f 100644 --- a/packages/rest/src/router/router-base.ts +++ b/packages/rest/src/router/router-base.ts @@ -44,7 +44,7 @@ export abstract class BaseRouter implements RestRouter { // Non-strict mode let path = request.path; // First try the exact match - let route = this.findRoute(request.method, path); + const route = this.findRoute(request.method, path); if (route || path === '/') return route; if (path.endsWith('/')) { // Fall back to the path without trailing slash @@ -58,7 +58,7 @@ export abstract class BaseRouter implements RestRouter { private findRoute(verb: string, path: string) { const key = this.getKey(verb, path); - let route = this.routesWithoutPathVars[key]; + const route = this.routesWithoutPathVars[key]; if (route) return createResolvedRoute(route, {}); else return this.findRouteWithPathVars(verb, path); } diff --git a/packages/rest/src/router/trie.ts b/packages/rest/src/router/trie.ts index 1e998560ed2a..03485beadb06 100644 --- a/packages/rest/src/router/trie.ts +++ b/packages/rest/src/router/trie.ts @@ -38,7 +38,6 @@ export type NodeWithValue = Node & {value: T}; export interface ResolvedNode { node: Node; - // tslint:disable-next-line:no-any params?: PathParameterValues; } @@ -148,7 +147,7 @@ function matchChildren(key: string, parent: Node): ResolvedNode[] { function search( keys: string[], index: number, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any params: {[name: string]: any}, parent: Node, ): ResolvedNode | undefined { diff --git a/packages/rest/src/types.ts b/packages/rest/src/types.ts index dee39076d31a..14b82b05751d 100644 --- a/packages/rest/src/types.ts +++ b/packages/rest/src/types.ts @@ -82,7 +82,7 @@ export type LogError = ( request: Request, ) => void; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Options for request body parsing @@ -105,7 +105,6 @@ export type OperationArgs = any[]; * operation results from other "any" typed values. */ export type OperationRetval = any; -// tslint:enable:no-any export type GetFromContext = (key: string) => Promise; export type BindElement = (key: string) => Binding; diff --git a/packages/rest/src/validation/request-body.validator.ts b/packages/rest/src/validation/request-body.validator.ts index e1501d4afe47..23266e29458a 100644 --- a/packages/rest/src/validation/request-body.validator.ts +++ b/packages/rest/src/validation/request-body.validator.ts @@ -4,16 +4,16 @@ // License text available at https://opensource.org/licenses/MIT import { + ReferenceObject, RequestBodyObject, SchemaObject, - ReferenceObject, SchemasObject, } from '@loopback/openapi-v3-types'; import * as AJV from 'ajv'; import * as debugModule from 'debug'; -import * as util from 'util'; -import {HttpErrors, RestHttpErrors, RequestBody} from '..'; import * as _ from 'lodash'; +import * as util from 'util'; +import {HttpErrors, RequestBody, RestHttpErrors} from '..'; const toJsonSchema = require('openapi-schema-to-json-schema'); const debug = debugModule('loopback:rest:validation'); @@ -37,7 +37,7 @@ export function validateRequestBody( ) { const required = requestBodySpec && requestBodySpec.required; - if (required && body.value == undefined) { + if (required && body.value == null) { const err = Object.assign( new HttpErrors.BadRequest('Request body is required'), { @@ -86,7 +86,7 @@ function convertToJsonSchema(openapiSchema: SchemaObject) { const compiledSchemaCache = new WeakMap(); function validateValueAgainstSchema( - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any body: any, schema: SchemaObject | ReferenceObject, globalSchemas?: SchemasObject, diff --git a/packages/service-proxy/package.json b/packages/service-proxy/package.json index de663a0fd42e..e99d4f057de5 100644 --- a/packages/service-proxy/package.json +++ b/packages/service-proxy/package.json @@ -26,7 +26,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/node": "^10.11.2" }, "dependencies": { diff --git a/packages/service-proxy/src/__tests__/mock-service.connector.ts b/packages/service-proxy/src/__tests__/mock-service.connector.ts index 1b742cb25d11..0efbbfa544f5 100644 --- a/packages/service-proxy/src/__tests__/mock-service.connector.ts +++ b/packages/service-proxy/src/__tests__/mock-service.connector.ts @@ -16,7 +16,7 @@ export class MockConnector { static initialize( dataSource: juggler.DataSource, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any cb: (err: any, result: any) => void, ) { const connector = new MockConnector(); @@ -26,7 +26,7 @@ export class MockConnector { } connect( - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any cb: (err: any, connected: boolean) => void, ) { this.connected = true; diff --git a/packages/service-proxy/src/__tests__/unit/mixin/service.mixin.unit.ts b/packages/service-proxy/src/__tests__/unit/mixin/service.mixin.unit.ts index 5bd6f1caba9f..81f2d5d014ca 100644 --- a/packages/service-proxy/src/__tests__/unit/mixin/service.mixin.unit.ts +++ b/packages/service-proxy/src/__tests__/unit/mixin/service.mixin.unit.ts @@ -13,8 +13,6 @@ import { import {expect} from '@loopback/testlab'; import {Class, ServiceMixin} from '../../../'; -// tslint:disable:no-any - describe('ServiceMixin', () => { it('mixed class has .serviceProvider()', () => { const myApp = new AppWithServiceMixin(); diff --git a/packages/service-proxy/src/decorators/service.decorator.ts b/packages/service-proxy/src/decorators/service.decorator.ts index 7f748983dc1a..2fb4409e670e 100644 --- a/packages/service-proxy/src/decorators/service.decorator.ts +++ b/packages/service-proxy/src/decorators/service.decorator.ts @@ -40,7 +40,7 @@ export class ServiceProxyMetadata implements InjectionMetadata { } export function serviceProxy(dataSource: string | juggler.DataSource) { - return function(target: Object, key: string, parameterIndex?: number) { + return function(target: object, key: string, parameterIndex?: number) { if (key || typeof parameterIndex === 'number') { const meta = new ServiceProxyMetadata(dataSource); inject('', meta, resolve)(target, key, parameterIndex); diff --git a/packages/service-proxy/src/legacy-juggler-bridge.ts b/packages/service-proxy/src/legacy-juggler-bridge.ts index 02a2c36d2111..b80b8614d3b9 100644 --- a/packages/service-proxy/src/legacy-juggler-bridge.ts +++ b/packages/service-proxy/src/legacy-juggler-bridge.ts @@ -6,6 +6,7 @@ import * as legacy from 'loopback-datasource-juggler'; export namespace juggler { + // eslint-disable-next-line @typescript-eslint/no-unused-vars export import DataSource = legacy.DataSource; } @@ -13,7 +14,7 @@ export namespace juggler { * A generic service interface with any number of methods that return a promise */ export interface GenericService { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [methodName: string]: (...args: any[]) => Promise; } @@ -28,6 +29,6 @@ export async function getService( ds: legacy.DataSource, ): Promise { await ds.connect(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return ds.DataAccessObject as any; } diff --git a/packages/service-proxy/src/mixins/service.mixin.ts b/packages/service-proxy/src/mixins/service.mixin.ts index be89fde01074..69dc1428a529 100644 --- a/packages/service-proxy/src/mixins/service.mixin.ts +++ b/packages/service-proxy/src/mixins/service.mixin.ts @@ -11,7 +11,7 @@ import {Application} from '@loopback/core'; */ export interface Class { // new MyClass(...args) ==> T - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any new (...args: any[]): T; } @@ -29,11 +29,11 @@ export interface Class { * called ServiceMixinDoc * */ -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function ServiceMixin>(superClass: T) { return class extends superClass { // A mixin class has to take in a type any[] argument! - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(...args: any[]) { super(...args); } @@ -127,7 +127,6 @@ export function ServiceMixin>(superClass: T) { * Interface for an Application mixed in with ServiceMixin */ export interface ApplicationWithServices extends Application { - // tslint:disable-next-line:no-any serviceProvider(provider: Class>, name?: string): Binding; component(component: Class<{}>, name?: string): Binding; mountComponentServices(component: Class<{}>): void; @@ -141,7 +140,7 @@ export interface ApplicationWithServices extends Application { * ServiceMixin */ export class ServiceMixinDoc { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(...args: any[]) { throw new Error( 'This is a dummy class created for apidoc! Please do not use it!', diff --git a/packages/testlab/package.json b/packages/testlab/package.json index 52c8cb3de17a..ffc46c15124d 100644 --- a/packages/testlab/package.json +++ b/packages/testlab/package.json @@ -32,7 +32,7 @@ }, "devDependencies": { "@loopback/build": "^1.6.1", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/node": "^10.11.2" }, "files": [ diff --git a/packages/testlab/should-as-function.d.ts b/packages/testlab/should-as-function.d.ts index 2e6c8e0abdaa..1d00da7eb79b 100644 --- a/packages/testlab/should-as-function.d.ts +++ b/packages/testlab/should-as-function.d.ts @@ -24,6 +24,9 @@ interface Object { } */ +/* eslint-disable @typescript-eslint/no-explicit-any */ +/* eslint-disable @typescript-eslint/unified-signatures */ + interface ShouldAssertion { // basic grammar a: ShouldAssertion; @@ -211,7 +214,6 @@ interface Internal extends ShouldInternal { } declare var should: Internal; -declare var Should: Internal; interface Window { Should: Internal; } diff --git a/packages/testlab/src/__tests__/integration/test-sandbox.integration.ts b/packages/testlab/src/__tests__/integration/test-sandbox.integration.ts index c9e0bb65c279..dd6bb6dbbe9e 100644 --- a/packages/testlab/src/__tests__/integration/test-sandbox.integration.ts +++ b/packages/testlab/src/__tests__/integration/test-sandbox.integration.ts @@ -58,7 +58,7 @@ describe('TestSandbox integration tests', () => { const sourceMapString = `//# sourceMappingURL=${resolvedFile}.map`; await sandbox.copyFile(resolvedFile); - let fileContents = (await readFile(resolve(path, file), 'utf8')).split( + const fileContents = (await readFile(resolve(path, file), 'utf8')).split( '\n', ); @@ -90,8 +90,7 @@ describe('TestSandbox integration tests', () => { }); describe('after deleting sandbox', () => { - const ERR: string = - 'TestSandbox instance was deleted. Create a new instance.'; + const ERR = 'TestSandbox instance was deleted. Create a new instance.'; beforeEach(callSandboxDelete); diff --git a/packages/testlab/src/__tests__/unit/to-json.test.ts b/packages/testlab/src/__tests__/unit/to-json.test.ts index 2b18b059034b..a1fd82c37cb7 100644 --- a/packages/testlab/src/__tests__/unit/to-json.test.ts +++ b/packages/testlab/src/__tests__/unit/to-json.test.ts @@ -64,7 +64,6 @@ describe('toJSON', () => { it('handles classes with custom toJSON', () => { class Customer { - // tslint:disable-next-line:no-unused private __data: object; constructor(public id: string, public email: string) { diff --git a/packages/testlab/src/shot.ts b/packages/testlab/src/shot.ts index accf5dc6c30a..35b17100bb14 100644 --- a/packages/testlab/src/shot.ts +++ b/packages/testlab/src/shot.ts @@ -8,7 +8,7 @@ * https://github.com/hapijs/shot */ -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ import * as express from 'express'; import {IncomingMessage, ServerResponse} from 'http'; @@ -27,7 +27,6 @@ const inject: ( export {inject, ShotRequestOptions}; -// tslint:disable-next-line:variable-name const ShotRequest: ShotRequestCtor = require('@hapi/shot/lib/request'); type ShotRequestCtor = new (options: ShotRequestOptions) => IncomingMessage; @@ -43,7 +42,6 @@ export function stubServerRequest( return stub; } -// tslint:disable-next-line:variable-name const ShotResponse: ShotResponseCtor = require('@hapi/shot/lib/response'); export type ShotCallback = (response: ResponseObject) => void; @@ -78,7 +76,7 @@ export function stubHandlerContext( ): HandlerContextStub { const request = stubServerRequest(requestOptions); let response: ServerResponse | undefined; - let result = new Promise(resolve => { + const result = new Promise(resolve => { response = new ShotResponse(request, resolve); }); @@ -114,7 +112,7 @@ export function stubExpressContext( parseQuery(request); let response: express.Response | undefined; - let result = new Promise(resolve => { + const result = new Promise(resolve => { response = new ShotResponse(request, resolve) as express.Response; // mix in Express Response API Object.assign(response, (express as any).response); diff --git a/packages/testlab/src/skip-travis.ts b/packages/testlab/src/skip-travis.ts index 479d08c365e1..794ffe149c31 100644 --- a/packages/testlab/src/skip-travis.ts +++ b/packages/testlab/src/skip-travis.ts @@ -15,9 +15,11 @@ export interface TestContext { timeout(ms: number | string): this; retries(n: number): this; slow(ms: number): this; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [index: string]: any; } +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type TestCallbackRetval = void | PromiseLike; /** * Helper function for skipping tests on Travis env diff --git a/packages/testlab/src/to-json.ts b/packages/testlab/src/to-json.ts index dd18deee73c7..caf06b1ececf 100644 --- a/packages/testlab/src/to-json.ts +++ b/packages/testlab/src/to-json.ts @@ -26,12 +26,10 @@ export function toJSON(value: object): object; // In practice, they should not be necessary, as they simply return the input // value without any modifications. -// tslint:disable-next-line:unified-signatures export function toJSON(value: undefined): undefined; export function toJSON(value: null): null; export function toJSON(value: number): number; export function toJSON(value: boolean): boolean; -// tslint:disable-next-line:unified-signatures export function toJSON(value: string): string; export function toJSON(value: T) { diff --git a/packages/testlab/src/validate-api-spec.ts b/packages/testlab/src/validate-api-spec.ts index 306a64ef8f5c..7001c6ed3368 100644 --- a/packages/testlab/src/validate-api-spec.ts +++ b/packages/testlab/src/validate-api-spec.ts @@ -8,7 +8,7 @@ import {promisify} from 'util'; const validateAsync = promisify(validator.validate); -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export async function validateApiSpec(spec: any): Promise { const opts = {}; diff --git a/packages/tsdocs/package.json b/packages/tsdocs/package.json index cc02c142530d..363d8ecb7840 100644 --- a/packages/tsdocs/package.json +++ b/packages/tsdocs/package.json @@ -29,7 +29,7 @@ "devDependencies": { "@loopback/build": "^1.6.1", "@loopback/testlab": "^1.3.0", - "@loopback/tslint-config": "^2.0.4", + "@loopback/eslint-config": "^1.0.0", "@types/debug": "^4.1.4", "@types/fs-extra": "^7.0.0", "@types/node": "^10.11.2", diff --git a/packages/tsdocs/src/__tests__/acceptance/tsdocs.acceptance.ts b/packages/tsdocs/src/__tests__/acceptance/tsdocs.acceptance.ts index e067b5b24943..4bb61d5fc7a1 100644 --- a/packages/tsdocs/src/__tests__/acceptance/tsdocs.acceptance.ts +++ b/packages/tsdocs/src/__tests__/acceptance/tsdocs.acceptance.ts @@ -16,7 +16,7 @@ const APIDOCS_ROOT = path.join(MONOREPO_ROOT, 'docs/apidocs'); const SITE_APIDOCS_ROOT = path.join(MONOREPO_ROOT, 'docs/site/apidocs'); describe('tsdocs', function() { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(10000); const API_MD_FILES = [ diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md index 1b5f6ed46422..43d4192a992a 100644 --- a/packages/tslint-config/README.md +++ b/packages/tslint-config/README.md @@ -19,7 +19,7 @@ An example `tslint.json` file: } ``` -An example `tslint.buid.json` file: +An example `tslint.build.json` file: ```json5 { diff --git a/tslint.build.json b/tslint.build.json deleted file mode 100644 index 9e06ad8757ed..000000000000 --- a/tslint.build.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["./packages/tslint-config/tslint.build.json"], - "linterOptions": { - "exclude": [ - "./packages/cli/generators/*/templates/**/*", - "./packages/cli/test/sandbox/**/*", - "**/*.json" - ] - } -} diff --git a/tslint.json b/tslint.json deleted file mode 100644 index ece2731de77f..000000000000 --- a/tslint.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/tslint", - "extends": ["./packages/tslint-config/tslint.common.json"], - "linterOptions": { - "exclude": [ - "./packages/cli/generators/*/templates/**/*", - "./packages/cli/test/sandbox/**/*", - "**/*.json" - ] - } -}