From 85b3315b34cdd053050d7aecc08bc4a667716fda Mon Sep 17 00:00:00 2001 From: Caleb Ukle Date: Fri, 14 Apr 2023 10:29:06 -0500 Subject: [PATCH] chore(misc): update snapshots to latest format (#16276) --- graph/client/jest.config.ts | 10 - jest.preset.js | 10 - nx-dev/nx-dev/jest.config.ts | 10 - .../__snapshots__/add-linting.spec.ts.snap | 64 +- .../__snapshots__/application.spec.ts.snap | 248 +-- .../application/application.spec.ts | 48 +- .../write-new-webpack-config.spec.ts.snap | 8 +- .../convert-tslint-to-eslint.spec.ts.snap | 644 +++--- .../host/__snapshots__/host.spec.ts.snap | 22 +- .../angular/src/generators/host/host.spec.ts | 8 +- .../src/generators/library/library.spec.ts | 44 +- .../migrate-from-angular-cli.spec.ts.snap | 108 +- .../migrators/projects/app.migrator.spec.ts | 6 +- .../migrators/projects/lib.migrator.spec.ts | 6 +- .../ngrx/__snapshots__/ngrx.spec.ts.snap | 4 +- .../remote/__snapshots__/remote.spec.ts.snap | 20 +- .../__snapshots__/setup-ssr.spec.ts.snap | 28 +- .../generators/setup-ssr/setup-ssr.spec.ts | 20 +- .../storybook-configuration.spec.ts.snap | 4 +- .../src/generators/utils/export-scam.spec.ts | 8 +- .../generators/web-worker/web-worker.spec.ts | 2 +- .../rename-webpack-server.spec.ts | 10 +- .../update-15-0-0/add-karma-inputs.spec.ts | 20 +- .../update-typescript-target.spec.ts | 4 +- .../install-required-packages.spec.ts | 24 +- .../convert-tslint-to-eslint.spec.ts.snap | 144 +- .../cypress-component-project.spec.ts.snap | 8 +- .../cypress-e2e-configuration.spec.ts.snap | 38 +- .../cypress-e2e-configuration.spec.ts | 28 +- .../cypress-project.spec.ts.snap | 150 +- .../migrate-to-cypress-11.spec.ts.snap | 76 +- .../update-cy-mount-usage.spec.ts.snap | 12 +- .../update-15-0-0/add-cypress-inputs.spec.ts | 40 +- .../update-to-cypress-12.spec.ts | 4 +- .../application/application.spec.ts | 80 +- .../jest/src/generators/init/init.spec.ts | 8 +- .../__snapshots__/jest-project.spec.ts.snap | 28 +- .../update-jest-config-ext.spec.ts.snap | 26 +- .../update-exports-jest-config.spec.ts.snap | 12 +- .../update-15-0-0/add-jest-inputs.spec.ts | 20 +- .../update-configs-jest-29.spec.ts.snap | 46 +- .../__snapshots__/ast-utils.spec.ts.snap | 8 +- .../__snapshots__/library.spec.ts.snap | 6 +- .../js/src/generators/library/library.spec.ts | 260 +-- .../update-lib-swcrc-exclude.spec.ts.snap | 48 +- .../exclude-jest-config-swcrc.spec.ts.snap | 48 +- .../package-json/update-package-json.spec.ts | 6 +- .../init/__snapshots__/init.spec.ts.snap | 64 +- .../__snapshots__/lint-project.spec.ts.snap | 36 +- .../lint-project/lint-project.spec.ts | 8 +- .../__snapshots__/workspace-rule.spec.ts.snap | 6 +- .../workspace-rules-project.spec.ts.snap | 42 +- .../workspace-rules-project.spec.ts | 14 +- ...t-config-if-no-type-checking-rules.spec.ts | 24 +- .../update-12-9-0/add-outputs.spec.ts | 20 +- .../update-13-3-0/eslint-8-updates.spec.ts | 2 +- .../experimental-to-utils-deps.spec.ts.snap | 26 +- .../experimental-to-utils-rules.spec.ts | 2 +- .../update-15-7-1/add-eslint-ignore.spec.ts | 10 +- .../convert-to-eslint-config.spec.ts.snap | 102 +- .../project-converter.spec.ts.snap | 202 +- .../convert-tslint-to-eslint.spec.ts.snap | 312 +-- .../__snapshots__/library.spec.ts.snap | 78 +- .../__snapshots__/application.spec.ts.snap | 380 ++-- .../application/application.spec.ts | 32 +- .../application/application.spec.ts | 50 +- .../src/generators/library/library.spec.ts | 50 +- .../update-configs-jest-29.spec.ts.snap | 46 +- .../utils/project-configuration.spec.ts | 16 +- .../update-15-0-0/migrate-to-inputs.spec.ts | 62 +- .../update-15-0-0/prefix-outputs.spec.ts | 6 +- .../plugins/js/lock-file/npm-parser.spec.ts | 32 +- .../plugins/js/lock-file/pnpm-parser.spec.ts | 16 +- .../plugins/js/lock-file/yarn-parser.spec.ts | 74 +- .../store-run-information-life-cycle.spec.ts | 10 +- packages/nx/src/utils/json.spec.ts | 18 +- packages/nx/src/utils/print-help.spec.ts | 2 +- .../update-15-0-0/add-babel-inputs.spec.ts | 20 +- .../__snapshots__/application.spec.ts.snap | 4 +- .../application/application.spec.ts | 42 +- .../src/generators/library/library.spec.ts | 34 +- .../webpack5-changes-utils.spec.ts.snap | 6 +- .../update-15-0-0/add-babel-inputs.spec.ts | 20 +- .../configuration-nested.spec.ts.snap | 84 +- .../configuration-v7.spec.ts.snap | 1802 ++++++++--------- .../__snapshots__/configuration.spec.ts.snap | 774 +++---- .../configuration/configuration-v7.spec.ts | 36 +- .../configuration/configuration.spec.ts | 60 +- .../init/__snapshots__/init.spec.ts.snap | 6 +- .../helper-functions.spec.ts.snap | 20 +- ...e-storybook-targets-generator.spec.ts.snap | 72 +- .../add-storybook-inputs.spec.ts | 40 +- .../refactor-executor-options.spec.ts.snap | 672 +++--- .../__snapshots__/configuration.spec.ts.snap | 440 ++-- .../init/__snapshots__/init.spec.ts.snap | 6 +- .../vitest/__snapshots__/vitest.spec.ts.snap | 6 +- .../vite/src/generators/vitest/vitest.spec.ts | 40 +- .../update-report-directory.spec.ts | 24 +- .../vite-config-edit-utils.spec.ts.snap | 22 +- .../application/application.spec.ts | 52 +- .../static-serve-configuration.spec.ts | 20 +- .../update-15-0-0/add-babel-inputs.spec.ts | 20 +- .../update-15-0-0/add-babel-inputs.spec.ts | 20 +- .../__snapshots__/ci-workflow.spec.ts.snap | 12 +- .../generate-workspace-files.spec.ts.snap | 38 +- .../new/__snapshots__/new.spec.ts.snap | 34 +- .../new/generate-workspace-files.spec.ts | 70 +- .../npm-package/npm-package.spec.ts | 10 +- .../preset/__snapshots__/preset.spec.ts.snap | 26 +- .../update-jest-config.spec.ts.snap | 2 +- .../remove/lib/check-targets.spec.ts | 2 +- .../change-npm-script-executor.spec.ts | 12 +- .../change-run-commands-executor.spec.ts | 12 +- 113 files changed, 4374 insertions(+), 4404 deletions(-) diff --git a/graph/client/jest.config.ts b/graph/client/jest.config.ts index b8ea2341af..d5dfecc2e5 100644 --- a/graph/client/jest.config.ts +++ b/graph/client/jest.config.ts @@ -16,14 +16,4 @@ export default { modulePathIgnorePatterns: [ '/graph/client/src/app/machines/match-media-mock.spec.ts', ], - /* TODO: Update to latest Jest snapshotFormat - * By default Nx has kept the older style of Jest Snapshot formats - * to prevent breaking of any existing tests with snapshots. - * It's recommend you update to the latest format. - * You can do this by removing snapshotFormat property - * and running tests with --update-snapshot flag. - * Example: From within the project directory, run "nx test --update-snapshot" - * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format - */ - snapshotFormat: { escapeString: true, printBasicPrototype: true }, }; diff --git a/jest.preset.js b/jest.preset.js index ecbe16c33b..a528c8f7df 100644 --- a/jest.preset.js +++ b/jest.preset.js @@ -14,14 +14,4 @@ module.exports = { moduleFileExtensions: ['ts', 'js', 'html'], coverageReporters: ['html'], maxWorkers: 1, - /* TODO: Update to latest Jest snapshotFormat - * By default Nx has kept the older style of Jest Snapshot formats - * to prevent breaking of any existing tests with snapshots. - * It's recommend you update to the latest format. - * You can do this by removing snapshotFormat property - * and running tests with --update-snapshot flag. - * Example: "nx affected --targets=test,run-e2e-tests,xtest --update-snapshot" - * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format - */ - snapshotFormat: { escapeString: true, printBasicPrototype: true }, }; diff --git a/nx-dev/nx-dev/jest.config.ts b/nx-dev/nx-dev/jest.config.ts index eeb8ad5bb3..418da000de 100644 --- a/nx-dev/nx-dev/jest.config.ts +++ b/nx-dev/nx-dev/jest.config.ts @@ -11,14 +11,4 @@ module.exports = { moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], coverageDirectory: '../../coverage/nx-dev/nx-dev', setupFilesAfterEnv: ['/test-setup.ts'], - /* TODO: Update to latest Jest snapshotFormat - * By default Nx has kept the older style of Jest Snapshot formats - * to prevent breaking of any existing tests with snapshots. - * It's recommend you update to the latest format. - * You can do this by removing snapshotFormat property - * and running tests with --update-snapshot flag. - * Example: From within the project directory, run "nx test --update-snapshot" - * More info: https://jestjs.io/docs/upgrading-to-jest29#snapshot-format - */ - snapshotFormat: { escapeString: true, printBasicPrototype: true }, }; diff --git a/packages/angular/src/generators/add-linting/__snapshots__/add-linting.spec.ts.snap b/packages/angular/src/generators/add-linting/__snapshots__/add-linting.spec.ts.snap index 3b491ff17a..8813b93d27 100644 --- a/packages/angular/src/generators/add-linting/__snapshots__/add-linting.spec.ts.snap +++ b/packages/angular/src/generators/add-linting/__snapshots__/add-linting.spec.ts.snap @@ -1,34 +1,34 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`addLinting generator should correctly generate the .eslintrc.json file 1`] = ` -Object { - "extends": Array [ +{ + "extends": [ "../../.eslintrc.json", ], - "ignorePatterns": Array [ + "ignorePatterns": [ "!**/*", ], - "overrides": Array [ - Object { - "extends": Array [ + "overrides": [ + { + "extends": [ "plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], - "files": Array [ + "files": [ "*.ts", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "my-org", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "myOrg", "style": "camelCase", "type": "attribute", @@ -36,48 +36,48 @@ Object { ], }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/angular-template", ], - "files": Array [ + "files": [ "*.html", ], - "rules": Object {}, + "rules": {}, }, ], } `; exports[`addLinting generator support angular v14 should correctly generate the .eslintrc.json file 1`] = ` -Object { - "extends": Array [ +{ + "extends": [ "../../.eslintrc.json", ], - "ignorePatterns": Array [ + "ignorePatterns": [ "!**/*", ], - "overrides": Array [ - Object { - "extends": Array [ + "overrides": [ + { + "extends": [ "plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], - "files": Array [ + "files": [ "*.ts", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "my-org", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "myOrg", "style": "camelCase", "type": "attribute", @@ -85,14 +85,14 @@ Object { ], }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/angular-template", ], - "files": Array [ + "files": [ "*.html", ], - "rules": Object {}, + "rules": {}, }, ], } diff --git a/packages/angular/src/generators/application/__snapshots__/application.spec.ts.snap b/packages/angular/src/generators/application/__snapshots__/application.spec.ts.snap index ce81e515bc..65f13c9565 100644 --- a/packages/angular/src/generators/application/__snapshots__/application.spec.ts.snap +++ b/packages/angular/src/generators/application/__snapshots__/application.spec.ts.snap @@ -335,14 +335,14 @@ describe('AppComponent', () => { `; exports[`app --strict should enable strict type checking: app tsconfig.json 1`] = ` -Object { - "angularCompilerOptions": Object { +{ + "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, "strictInputAccessModifiers": true, "strictTemplates": true, }, - "compilerOptions": Object { + "compilerOptions": { "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, @@ -353,16 +353,16 @@ Object { "useDefineForClassFields": false, }, "extends": "../../tsconfig.base.json", - "files": Array [], - "include": Array [], - "references": Array [ - Object { + "files": [], + "include": [], + "references": [ + { "path": "./tsconfig.app.json", }, - Object { + { "path": "./tsconfig.spec.json", }, - Object { + { "path": "./tsconfig.editor.json", }, ], @@ -370,8 +370,8 @@ Object { `; exports[`app --strict should enable strict type checking: e2e tsconfig.json 1`] = ` -Object { - "compilerOptions": Object { +{ + "compilerOptions": { "allowJs": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, @@ -381,13 +381,13 @@ Object { "outDir": "../../dist/out-tsc", "sourceMap": false, "strict": true, - "types": Array [ + "types": [ "cypress", "node", ], }, "extends": "../../tsconfig.base.json", - "include": Array [ + "include": [ "src/**/*.ts", "src/**/*.js", "cypress.config.ts", @@ -398,18 +398,18 @@ Object { exports[`app at the root should accept numbers in the path 1`] = `"src/9-websites/my-app"`; exports[`app nested should create project configs 1`] = ` -Object { +{ "$schema": "../../../node_modules/nx/schemas/project-schema.json", "name": "my-dir-my-app", "prefix": "proj", "projectType": "application", "root": "apps/my-dir/my-app", "sourceRoot": "apps/my-dir/my-app/src", - "tags": Array [], - "targets": Object { - "build": Object { - "configurations": Object { - "development": Object { + "tags": [], + "targets": { + "build": { + "configurations": { + "development": { "buildOptimizer": false, "extractLicenses": false, "namedChunks": true, @@ -417,14 +417,14 @@ Object { "sourceMap": true, "vendorChunk": true, }, - "production": Object { - "budgets": Array [ - Object { + "production": { + "budgets": [ + { "maximumError": "1mb", "maximumWarning": "500kb", "type": "initial", }, - Object { + { "maximumError": "4kb", "maximumWarning": "2kb", "type": "anyComponentStyle", @@ -435,76 +435,76 @@ Object { }, "defaultConfiguration": "production", "executor": "@angular-devkit/build-angular:browser", - "options": Object { - "assets": Array [ + "options": { + "assets": [ "apps/my-dir/my-app/src/favicon.ico", "apps/my-dir/my-app/src/assets", ], "index": "apps/my-dir/my-app/src/index.html", "main": "apps/my-dir/my-app/src/main.ts", "outputPath": "dist/apps/my-dir/my-app", - "polyfills": Array [ + "polyfills": [ "zone.js", ], - "scripts": Array [], - "styles": Array [ + "scripts": [], + "styles": [ "apps/my-dir/my-app/src/styles.css", ], "tsConfig": "apps/my-dir/my-app/tsconfig.app.json", }, - "outputs": Array [ + "outputs": [ "{options.outputPath}", ], }, - "extract-i18n": Object { + "extract-i18n": { "executor": "@angular-devkit/build-angular:extract-i18n", - "options": Object { + "options": { "browserTarget": "my-dir-my-app:build", }, }, - "lint": Object { + "lint": { "executor": "@nrwl/linter:eslint", - "options": Object { - "lintFilePatterns": Array [ + "options": { + "lintFilePatterns": [ "apps/my-dir/my-app/**/*.ts", "apps/my-dir/my-app/**/*.html", ], }, - "outputs": Array [ + "outputs": [ "{options.outputFile}", ], }, - "serve": Object { - "configurations": Object { - "development": Object { + "serve": { + "configurations": { + "development": { "browserTarget": "my-dir-my-app:build:development", }, - "production": Object { + "production": { "browserTarget": "my-dir-my-app:build:production", }, }, "defaultConfiguration": "development", "executor": "@angular-devkit/build-angular:dev-server", }, - "serve-static": Object { + "serve-static": { "executor": "@nrwl/web:file-server", - "options": Object { + "options": { "buildTarget": "my-dir-my-app:build", }, }, - "test": Object { - "configurations": Object { - "ci": Object { + "test": { + "configurations": { + "ci": { "ci": true, "codeCoverage": true, }, }, "executor": "@nrwl/jest:jest", - "options": Object { + "options": { "jestConfig": "apps/my-dir/my-app/jest.config.ts", "passWithNoTests": true, }, - "outputs": Array [ + "outputs": [ "{workspaceRoot}/coverage/{projectRoot}", ], }, @@ -513,41 +513,41 @@ Object { `; exports[`app nested should create project configs 2`] = ` -Object { +{ "$schema": "../../../node_modules/nx/schemas/project-schema.json", - "implicitDependencies": Array [ + "implicitDependencies": [ "my-dir-my-app", ], "name": "my-dir-my-app-e2e", "projectType": "application", "root": "apps/my-dir/my-app-e2e", "sourceRoot": "apps/my-dir/my-app-e2e/src", - "tags": Array [], - "targets": Object { - "e2e": Object { - "configurations": Object { - "ci": Object { + "tags": [], + "targets": { + "e2e": { + "configurations": { + "ci": { "devServerTarget": "my-dir-my-app:serve-static", }, - "production": Object { + "production": { "devServerTarget": "my-dir-my-app:serve:production", }, }, "executor": "@nrwl/cypress:cypress", - "options": Object { + "options": { "cypressConfig": "apps/my-dir/my-app-e2e/cypress.config.ts", "devServerTarget": "my-dir-my-app:serve:development", "testingType": "e2e", }, }, - "lint": Object { + "lint": { "executor": "@nrwl/linter:eslint", - "options": Object { - "lintFilePatterns": Array [ + "options": { + "lintFilePatterns": [ "apps/my-dir/my-app-e2e/**/*.{js,ts}", ], }, - "outputs": Array [ + "outputs": [ "{options.outputFile}", ], }, @@ -556,18 +556,18 @@ Object { `; exports[`app not nested should create project configs 1`] = ` -Object { +{ "$schema": "../../node_modules/nx/schemas/project-schema.json", "name": "my-app", "prefix": "proj", "projectType": "application", "root": "apps/my-app", "sourceRoot": "apps/my-app/src", - "tags": Array [], - "targets": Object { - "build": Object { - "configurations": Object { - "development": Object { + "tags": [], + "targets": { + "build": { + "configurations": { + "development": { "buildOptimizer": false, "extractLicenses": false, "namedChunks": true, @@ -575,14 +575,14 @@ Object { "sourceMap": true, "vendorChunk": true, }, - "production": Object { - "budgets": Array [ - Object { + "production": { + "budgets": [ + { "maximumError": "1mb", "maximumWarning": "500kb", "type": "initial", }, - Object { + { "maximumError": "4kb", "maximumWarning": "2kb", "type": "anyComponentStyle", @@ -593,76 +593,76 @@ Object { }, "defaultConfiguration": "production", "executor": "@angular-devkit/build-angular:browser", - "options": Object { - "assets": Array [ + "options": { + "assets": [ "apps/my-app/src/favicon.ico", "apps/my-app/src/assets", ], "index": "apps/my-app/src/index.html", "main": "apps/my-app/src/main.ts", "outputPath": "dist/apps/my-app", - "polyfills": Array [ + "polyfills": [ "zone.js", ], - "scripts": Array [], - "styles": Array [ + "scripts": [], + "styles": [ "apps/my-app/src/styles.css", ], "tsConfig": "apps/my-app/tsconfig.app.json", }, - "outputs": Array [ + "outputs": [ "{options.outputPath}", ], }, - "extract-i18n": Object { + "extract-i18n": { "executor": "@angular-devkit/build-angular:extract-i18n", - "options": Object { + "options": { "browserTarget": "my-app:build", }, }, - "lint": Object { + "lint": { "executor": "@nrwl/linter:eslint", - "options": Object { - "lintFilePatterns": Array [ + "options": { + "lintFilePatterns": [ "apps/my-app/**/*.ts", "apps/my-app/**/*.html", ], }, - "outputs": Array [ + "outputs": [ "{options.outputFile}", ], }, - "serve": Object { - "configurations": Object { - "development": Object { + "serve": { + "configurations": { + "development": { "browserTarget": "my-app:build:development", }, - "production": Object { + "production": { "browserTarget": "my-app:build:production", }, }, "defaultConfiguration": "development", "executor": "@angular-devkit/build-angular:dev-server", }, - "serve-static": Object { + "serve-static": { "executor": "@nrwl/web:file-server", - "options": Object { + "options": { "buildTarget": "my-app:build", }, }, - "test": Object { - "configurations": Object { - "ci": Object { + "test": { + "configurations": { + "ci": { "ci": true, "codeCoverage": true, }, }, "executor": "@nrwl/jest:jest", - "options": Object { + "options": { "jestConfig": "apps/my-app/jest.config.ts", "passWithNoTests": true, }, - "outputs": Array [ + "outputs": [ "{workspaceRoot}/coverage/{projectRoot}", ], }, @@ -671,41 +671,41 @@ Object { `; exports[`app not nested should create project configs 2`] = ` -Object { +{ "$schema": "../../node_modules/nx/schemas/project-schema.json", - "implicitDependencies": Array [ + "implicitDependencies": [ "my-app", ], "name": "my-app-e2e", "projectType": "application", "root": "apps/my-app-e2e", "sourceRoot": "apps/my-app-e2e/src", - "tags": Array [], - "targets": Object { - "e2e": Object { - "configurations": Object { - "ci": Object { + "tags": [], + "targets": { + "e2e": { + "configurations": { + "ci": { "devServerTarget": "my-app:serve-static", }, - "production": Object { + "production": { "devServerTarget": "my-app:serve:production", }, }, "executor": "@nrwl/cypress:cypress", - "options": Object { + "options": { "cypressConfig": "apps/my-app-e2e/cypress.config.ts", "devServerTarget": "my-app:serve:development", "testingType": "e2e", }, }, - "lint": Object { + "lint": { "executor": "@nrwl/linter:eslint", - "options": Object { - "lintFilePatterns": Array [ + "options": { + "lintFilePatterns": [ "apps/my-app-e2e/**/*.{js,ts}", ], }, - "outputs": Array [ + "outputs": [ "{options.outputFile}", ], }, @@ -714,8 +714,8 @@ Object { `; exports[`app not nested should generate files: e2e tsconfig.json 1`] = ` -Object { - "compilerOptions": Object { +{ + "compilerOptions": { "allowJs": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, @@ -725,13 +725,13 @@ Object { "outDir": "../../dist/out-tsc", "sourceMap": false, "strict": true, - "types": Array [ + "types": [ "cypress", "node", ], }, "extends": "../../tsconfig.base.json", - "include": Array [ + "include": [ "src/**/*.ts", "src/**/*.js", "cypress.config.ts", @@ -740,35 +740,35 @@ Object { `; exports[`app not nested should generate files: tsconfig.app.json 1`] = ` -Object { - "compilerOptions": Object { +{ + "compilerOptions": { "outDir": "../../dist/out-tsc", - "types": Array [], + "types": [], }, - "exclude": Array [ + "exclude": [ "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", ], "extends": "./tsconfig.json", - "files": Array [ + "files": [ "src/main.ts", ], - "include": Array [ + "include": [ "src/**/*.d.ts", ], } `; exports[`app not nested should generate files: tsconfig.json 1`] = ` -Object { - "angularCompilerOptions": Object { +{ + "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, "strictInputAccessModifiers": true, "strictTemplates": true, }, - "compilerOptions": Object { + "compilerOptions": { "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "noImplicitOverride": true, @@ -779,16 +779,16 @@ Object { "useDefineForClassFields": false, }, "extends": "../../tsconfig.base.json", - "files": Array [], - "include": Array [], - "references": Array [ - Object { + "files": [], + "include": [], + "references": [ + { "path": "./tsconfig.app.json", }, - Object { + { "path": "./tsconfig.spec.json", }, - Object { + { "path": "./tsconfig.editor.json", }, ], diff --git a/packages/angular/src/generators/application/application.spec.ts b/packages/angular/src/generators/application/application.spec.ts index 2e099d6245..b50813f7f8 100644 --- a/packages/angular/src/generators/application/application.spec.ts +++ b/packages/angular/src/generators/application/application.spec.ts @@ -462,29 +462,29 @@ describe('app', () => { await generateApp(appTree, 'myApp', { linter: Linter.EsLint }); expect(readProjectConfiguration(appTree, 'my-app').targets.lint) .toMatchInlineSnapshot(` - Object { + { "executor": "@nrwl/linter:eslint", - "options": Object { - "lintFilePatterns": Array [ + "options": { + "lintFilePatterns": [ "apps/my-app/**/*.ts", "apps/my-app/**/*.html", ], }, - "outputs": Array [ + "outputs": [ "{options.outputFile}", ], } `); expect(readProjectConfiguration(appTree, 'my-app-e2e').targets.lint) .toMatchInlineSnapshot(` - Object { + { "executor": "@nrwl/linter:eslint", - "options": Object { - "lintFilePatterns": Array [ + "options": { + "lintFilePatterns": [ "apps/my-app-e2e/**/*.{js,ts}", ], }, - "outputs": Array [ + "outputs": [ "{options.outputFile}", ], } @@ -496,34 +496,34 @@ describe('app', () => { const eslintConfig = readJson(appTree, 'apps/my-app/.eslintrc.json'); expect(eslintConfig).toMatchInlineSnapshot(` - Object { - "extends": Array [ + { + "extends": [ "../../.eslintrc.json", ], - "ignorePatterns": Array [ + "ignorePatterns": [ "!**/*", ], - "overrides": Array [ - Object { - "extends": Array [ + "overrides": [ + { + "extends": [ "plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], - "files": Array [ + "files": [ "*.ts", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "proj", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "proj", "style": "camelCase", "type": "attribute", @@ -531,14 +531,14 @@ describe('app', () => { ], }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/angular-template", ], - "files": Array [ + "files": [ "*.html", ], - "rules": Object {}, + "rules": {}, }, ], } diff --git a/packages/angular/src/generators/convert-to-with-mf/lib/__snapshots__/write-new-webpack-config.spec.ts.snap b/packages/angular/src/generators/convert-to-with-mf/lib/__snapshots__/write-new-webpack-config.spec.ts.snap index 812a607ab2..e3c044ee64 100644 --- a/packages/angular/src/generators/convert-to-with-mf/lib/__snapshots__/write-new-webpack-config.spec.ts.snap +++ b/packages/angular/src/generators/convert-to-with-mf/lib/__snapshots__/write-new-webpack-config.spec.ts.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`writeNewWebpackConfig should convert config that is both remote and host correctly 1`] = ` -Array [ +[ "const { withModuleFederation } = require('@nrwl/angular/module-federation'); const config = require('./module-federation.config'); module.exports = withModuleFederation(config);", @@ -17,7 +17,7 @@ Array [ `; exports[`writeNewWebpackConfig should convert config that is neither remote and host correctly 1`] = ` -Array [ +[ "const { withModuleFederation } = require('@nrwl/angular/module-federation'); const config = require('./module-federation.config'); module.exports = withModuleFederation(config);", @@ -29,7 +29,7 @@ Array [ `; exports[`writeNewWebpackConfig should convert host config correctly 1`] = ` -Array [ +[ "const { withModuleFederation } = require('@nrwl/angular/module-federation'); const config = require('./module-federation.config'); module.exports = withModuleFederation(config);", @@ -42,7 +42,7 @@ Array [ `; exports[`writeNewWebpackConfig should convert remote config correctly 1`] = ` -Array [ +[ "const { withModuleFederation } = require('@nrwl/angular/module-federation'); const config = require('./module-federation.config'); module.exports = withModuleFederation(config);", diff --git a/packages/angular/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap b/packages/angular/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap index 1ce34bc14f..3405b267f5 100644 --- a/packages/angular/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap +++ b/packages/angular/src/generators/convert-tslint-to-eslint/__snapshots__/convert-tslint-to-eslint.spec.ts.snap @@ -1,35 +1,35 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`convert-tslint-to-eslint should not override .eslint config if migration in progress 1`] = ` -Object { - "ignorePatterns": Array [ +{ + "ignorePatterns": [ "**/*", ], - "overrides": Array [ - Object { - "files": Array [ + "overrides": [ + { + "files": [ "*.ts", "*.tsx", "*.js", "*.jsx", ], - "rules": Object { - "@nrwl/nx/enforce-module-boundaries": Array [ + "rules": { + "@nrwl/nx/enforce-module-boundaries": [ "error", - Object { - "allow": Array [ + { + "allow": [ "@nx-example/shared/product/data/testing", ], - "depConstraints": Array [ - Object { - "onlyDependOnLibsWithTags": Array [ + "depConstraints": [ + { + "onlyDependOnLibsWithTags": [ "type:feature", "type:ui", ], "sourceTag": "type:app", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:ui", "type:data", "type:types", @@ -37,48 +37,48 @@ Object { ], "sourceTag": "type:feature", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", ], "sourceTag": "type:types", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:state", "type:types", "type:data", ], "sourceTag": "type:state", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", ], "sourceTag": "type:data", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:e2e-utils", ], "sourceTag": "type:e2e", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", "type:ui", ], "sourceTag": "type:ui", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "scope:products", "scope:shared", ], "sourceTag": "scope:products", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "scope:cart", "scope:shared", ], @@ -90,47 +90,47 @@ Object { ], }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/typescript", ], - "files": Array [ + "files": [ "*.ts", "*.tsx", ], - "rules": Object {}, + "rules": {}, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/javascript", ], - "files": Array [ + "files": [ "*.js", "*.jsx", ], - "rules": Object {}, + "rules": {}, }, - Object { - "files": Array [ + { + "files": [ "*.ts", ], - "plugins": Array [ + "plugins": [ "eslint-plugin-import", "@angular-eslint/eslint-plugin", "@typescript-eslint", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "app", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "app", "style": "camelCase", "type": "attribute", @@ -148,17 +148,17 @@ Object { "@angular-eslint/use-pipe-transform-interface": "error", "@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/dot-notation": "off", - "@typescript-eslint/explicit-member-accessibility": Array [ + "@typescript-eslint/explicit-member-accessibility": [ "off", - Object { + { "accessibility": "explicit", }, ], "@typescript-eslint/member-ordering": "error", - "@typescript-eslint/naming-convention": Array [ + "@typescript-eslint/naming-convention": [ "error", - Object { - "format": Array [ + { + "format": [ "camelCase", "UPPER_CASE", ], @@ -169,17 +169,17 @@ Object { ], "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-inferrable-types": Array [ + "@typescript-eslint/no-inferrable-types": [ "error", - Object { + { "ignoreParameters": true, }, ], "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-non-null-assertion": "error", - "@typescript-eslint/no-shadow": Array [ + "@typescript-eslint/no-shadow": [ "error", - Object { + { "hoist": "all", }, ], @@ -189,7 +189,7 @@ Object { "arrow-body-style": "error", "constructor-super": "error", "dot-notation": "off", - "eqeqeq": Array [ + "eqeqeq": [ "error", "smart", ], @@ -199,9 +199,9 @@ Object { "import/no-deprecated": "warn", "no-bitwise": "error", "no-caller": "error", - "no-console": Array [ + "no-console": [ "error", - Object {}, + {}, ], "no-debugger": "error", "no-empty": "off", @@ -209,7 +209,7 @@ Object { "no-eval": "error", "no-fallthrough": "error", "no-new-wrappers": "error", - "no-restricted-imports": Array [ + "no-restricted-imports": [ "error", "rxjs/Rx", ], @@ -223,21 +223,21 @@ Object { "radix": "error", }, }, - Object { - "files": Array [ + { + "files": [ "*.html", ], - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin-template", ], - "rules": Object { + "rules": { "@angular-eslint/template/banana-in-box": "error", "@angular-eslint/template/eqeqeq": "error", "@angular-eslint/template/no-negated-async": "error", }, }, ], - "plugins": Array [ + "plugins": [ "@nrwl/nx", ], "root": true, @@ -245,38 +245,38 @@ Object { `; exports[`convert-tslint-to-eslint should not override .eslint config if migration in progress 2`] = ` -Object { - "extends": Array [ +{ + "extends": [ "../../.eslintrc.json", ], - "ignorePatterns": Array [ + "ignorePatterns": [ "!**/*", ], - "overrides": Array [ - Object { - "extends": Array [ + "overrides": [ + { + "extends": [ "plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], - "files": Array [ + "files": [ "*.ts", ], - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin", "@typescript-eslint", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "angular-app", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "angular-app", "style": "camelCase", "type": "attribute", @@ -285,17 +285,17 @@ Object { "@typescript-eslint/no-empty-interface": "error", }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/angular-template", ], - "files": Array [ + "files": [ "*.html", ], - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin-template", ], - "rules": Object { + "rules": { "@angular-eslint/template/banana-in-box": "error", }, }, @@ -304,35 +304,35 @@ Object { `; exports[`convert-tslint-to-eslint should not override .eslint config if migration in progress 3`] = ` -Object { - "ignorePatterns": Array [ +{ + "ignorePatterns": [ "**/*", ], - "overrides": Array [ - Object { - "files": Array [ + "overrides": [ + { + "files": [ "*.ts", "*.tsx", "*.js", "*.jsx", ], - "rules": Object { - "@nrwl/nx/enforce-module-boundaries": Array [ + "rules": { + "@nrwl/nx/enforce-module-boundaries": [ "error", - Object { - "allow": Array [ + { + "allow": [ "@nx-example/shared/product/data/testing", ], - "depConstraints": Array [ - Object { - "onlyDependOnLibsWithTags": Array [ + "depConstraints": [ + { + "onlyDependOnLibsWithTags": [ "type:feature", "type:ui", ], "sourceTag": "type:app", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:ui", "type:data", "type:types", @@ -340,48 +340,48 @@ Object { ], "sourceTag": "type:feature", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", ], "sourceTag": "type:types", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:state", "type:types", "type:data", ], "sourceTag": "type:state", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", ], "sourceTag": "type:data", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:e2e-utils", ], "sourceTag": "type:e2e", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", "type:ui", ], "sourceTag": "type:ui", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "scope:products", "scope:shared", ], "sourceTag": "scope:products", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "scope:cart", "scope:shared", ], @@ -393,47 +393,47 @@ Object { ], }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/typescript", ], - "files": Array [ + "files": [ "*.ts", "*.tsx", ], - "rules": Object {}, + "rules": {}, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/javascript", ], - "files": Array [ + "files": [ "*.js", "*.jsx", ], - "rules": Object {}, + "rules": {}, }, - Object { - "files": Array [ + { + "files": [ "*.ts", ], - "plugins": Array [ + "plugins": [ "eslint-plugin-import", "@angular-eslint/eslint-plugin", "@typescript-eslint", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "app", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "app", "style": "camelCase", "type": "attribute", @@ -451,17 +451,17 @@ Object { "@angular-eslint/use-pipe-transform-interface": "error", "@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/dot-notation": "off", - "@typescript-eslint/explicit-member-accessibility": Array [ + "@typescript-eslint/explicit-member-accessibility": [ "off", - Object { + { "accessibility": "explicit", }, ], "@typescript-eslint/member-ordering": "error", - "@typescript-eslint/naming-convention": Array [ + "@typescript-eslint/naming-convention": [ "error", - Object { - "format": Array [ + { + "format": [ "camelCase", "UPPER_CASE", ], @@ -472,17 +472,17 @@ Object { ], "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-inferrable-types": Array [ + "@typescript-eslint/no-inferrable-types": [ "error", - Object { + { "ignoreParameters": true, }, ], "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-non-null-assertion": "error", - "@typescript-eslint/no-shadow": Array [ + "@typescript-eslint/no-shadow": [ "error", - Object { + { "hoist": "all", }, ], @@ -492,7 +492,7 @@ Object { "arrow-body-style": "error", "constructor-super": "error", "dot-notation": "off", - "eqeqeq": Array [ + "eqeqeq": [ "error", "smart", ], @@ -502,9 +502,9 @@ Object { "import/no-deprecated": "warn", "no-bitwise": "error", "no-caller": "error", - "no-console": Array [ + "no-console": [ "error", - Object {}, + {}, ], "no-debugger": "error", "no-empty": "off", @@ -512,7 +512,7 @@ Object { "no-eval": "error", "no-fallthrough": "error", "no-new-wrappers": "error", - "no-restricted-imports": Array [ + "no-restricted-imports": [ "error", "rxjs/Rx", ], @@ -526,21 +526,21 @@ Object { "radix": "error", }, }, - Object { - "files": Array [ + { + "files": [ "*.html", ], - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin-template", ], - "rules": Object { + "rules": { "@angular-eslint/template/banana-in-box": "error", "@angular-eslint/template/eqeqeq": "error", "@angular-eslint/template/no-negated-async": "error", }, }, ], - "plugins": Array [ + "plugins": [ "@nrwl/nx", ], "root": true, @@ -548,9 +548,9 @@ Object { `; exports[`convert-tslint-to-eslint should work for Angular applications 1`] = ` -Object { - "dependencies": Object {}, - "devDependencies": Object { +{ + "dependencies": {}, + "devDependencies": { "@angular-eslint/eslint-plugin": "~15.0.0", "@angular-eslint/eslint-plugin-template": "~15.0.0", "@angular-eslint/template-parser": "~15.0.0", @@ -567,22 +567,22 @@ Object { `; exports[`convert-tslint-to-eslint should work for Angular applications 2`] = ` -Object { +{ "$schema": "../../node_modules/nx/schemas/project-schema.json", "name": "angular-app-1", "prefix": "angular-app", "projectType": "application", "root": "apps/angular-app-1", - "targets": Object { - "lint": Object { + "targets": { + "lint": { "executor": "@nrwl/linter:eslint", - "options": Object { - "lintFilePatterns": Array [ + "options": { + "lintFilePatterns": [ "apps/angular-app-1/**/*.ts", "apps/angular-app-1/**/*.html", ], }, - "outputs": Array [ + "outputs": [ "{options.outputFile}", ], }, @@ -591,35 +591,35 @@ Object { `; exports[`convert-tslint-to-eslint should work for Angular applications 3`] = ` -Object { - "ignorePatterns": Array [ +{ + "ignorePatterns": [ "**/*", ], - "overrides": Array [ - Object { - "files": Array [ + "overrides": [ + { + "files": [ "*.ts", "*.tsx", "*.js", "*.jsx", ], - "rules": Object { - "@nrwl/nx/enforce-module-boundaries": Array [ + "rules": { + "@nrwl/nx/enforce-module-boundaries": [ "error", - Object { - "allow": Array [ + { + "allow": [ "@nx-example/shared/product/data/testing", ], - "depConstraints": Array [ - Object { - "onlyDependOnLibsWithTags": Array [ + "depConstraints": [ + { + "onlyDependOnLibsWithTags": [ "type:feature", "type:ui", ], "sourceTag": "type:app", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:ui", "type:data", "type:types", @@ -627,48 +627,48 @@ Object { ], "sourceTag": "type:feature", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", ], "sourceTag": "type:types", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:state", "type:types", "type:data", ], "sourceTag": "type:state", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", ], "sourceTag": "type:data", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:e2e-utils", ], "sourceTag": "type:e2e", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", "type:ui", ], "sourceTag": "type:ui", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "scope:products", "scope:shared", ], "sourceTag": "scope:products", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "scope:cart", "scope:shared", ], @@ -680,47 +680,47 @@ Object { ], }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/typescript", ], - "files": Array [ + "files": [ "*.ts", "*.tsx", ], - "rules": Object {}, + "rules": {}, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/javascript", ], - "files": Array [ + "files": [ "*.js", "*.jsx", ], - "rules": Object {}, + "rules": {}, }, - Object { - "files": Array [ + { + "files": [ "*.ts", ], - "plugins": Array [ + "plugins": [ "eslint-plugin-import", "@angular-eslint/eslint-plugin", "@typescript-eslint", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "app", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "app", "style": "camelCase", "type": "attribute", @@ -738,17 +738,17 @@ Object { "@angular-eslint/use-pipe-transform-interface": "error", "@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/dot-notation": "off", - "@typescript-eslint/explicit-member-accessibility": Array [ + "@typescript-eslint/explicit-member-accessibility": [ "off", - Object { + { "accessibility": "explicit", }, ], "@typescript-eslint/member-ordering": "error", - "@typescript-eslint/naming-convention": Array [ + "@typescript-eslint/naming-convention": [ "error", - Object { - "format": Array [ + { + "format": [ "camelCase", "UPPER_CASE", ], @@ -759,17 +759,17 @@ Object { ], "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-inferrable-types": Array [ + "@typescript-eslint/no-inferrable-types": [ "error", - Object { + { "ignoreParameters": true, }, ], "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-non-null-assertion": "error", - "@typescript-eslint/no-shadow": Array [ + "@typescript-eslint/no-shadow": [ "error", - Object { + { "hoist": "all", }, ], @@ -779,7 +779,7 @@ Object { "arrow-body-style": "error", "constructor-super": "error", "dot-notation": "off", - "eqeqeq": Array [ + "eqeqeq": [ "error", "smart", ], @@ -789,9 +789,9 @@ Object { "import/no-deprecated": "warn", "no-bitwise": "error", "no-caller": "error", - "no-console": Array [ + "no-console": [ "error", - Object {}, + {}, ], "no-debugger": "error", "no-empty": "off", @@ -799,7 +799,7 @@ Object { "no-eval": "error", "no-fallthrough": "error", "no-new-wrappers": "error", - "no-restricted-imports": Array [ + "no-restricted-imports": [ "error", "rxjs/Rx", ], @@ -813,21 +813,21 @@ Object { "radix": "error", }, }, - Object { - "files": Array [ + { + "files": [ "*.html", ], - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin-template", ], - "rules": Object { + "rules": { "@angular-eslint/template/banana-in-box": "error", "@angular-eslint/template/eqeqeq": "error", "@angular-eslint/template/no-negated-async": "error", }, }, ], - "plugins": Array [ + "plugins": [ "@nrwl/nx", ], "root": true, @@ -835,43 +835,43 @@ Object { `; exports[`convert-tslint-to-eslint should work for Angular applications 4`] = ` -Object { - "extends": Array [ +{ + "extends": [ "../../.eslintrc.json", ], - "ignorePatterns": Array [ + "ignorePatterns": [ "!**/*", ], - "overrides": Array [ - Object { - "extends": Array [ + "overrides": [ + { + "extends": [ "plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], - "files": Array [ + "files": [ "*.ts", ], - "parserOptions": Object { - "project": Array [ + "parserOptions": { + "project": [ "apps/angular-app-1/tsconfig.*?.json", ], }, - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin", "@typescript-eslint", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "angular-app", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "angular-app", "style": "camelCase", "type": "attribute", @@ -881,17 +881,17 @@ Object { "@typescript-eslint/no-empty-interface": "error", }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/angular-template", ], - "files": Array [ + "files": [ "*.html", ], - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin-template", ], - "rules": Object { + "rules": { "@angular-eslint/template/banana-in-box": "error", }, }, @@ -900,9 +900,9 @@ Object { `; exports[`convert-tslint-to-eslint should work for Angular libraries 1`] = ` -Object { - "dependencies": Object {}, - "devDependencies": Object { +{ + "dependencies": {}, + "devDependencies": { "@angular-eslint/eslint-plugin": "~15.0.0", "@angular-eslint/eslint-plugin-template": "~15.0.0", "@angular-eslint/template-parser": "~15.0.0", @@ -919,22 +919,22 @@ Object { `; exports[`convert-tslint-to-eslint should work for Angular libraries 2`] = ` -Object { +{ "$schema": "../../node_modules/nx/schemas/project-schema.json", "name": "angular-lib-1", "prefix": "angular-app", "projectType": "library", "root": "libs/angular-lib-1", - "targets": Object { - "lint": Object { + "targets": { + "lint": { "executor": "@nrwl/linter:eslint", - "options": Object { - "lintFilePatterns": Array [ + "options": { + "lintFilePatterns": [ "libs/angular-lib-1/**/*.ts", "libs/angular-lib-1/**/*.html", ], }, - "outputs": Array [ + "outputs": [ "{options.outputFile}", ], }, @@ -943,35 +943,35 @@ Object { `; exports[`convert-tslint-to-eslint should work for Angular libraries 3`] = ` -Object { - "ignorePatterns": Array [ +{ + "ignorePatterns": [ "**/*", ], - "overrides": Array [ - Object { - "files": Array [ + "overrides": [ + { + "files": [ "*.ts", "*.tsx", "*.js", "*.jsx", ], - "rules": Object { - "@nrwl/nx/enforce-module-boundaries": Array [ + "rules": { + "@nrwl/nx/enforce-module-boundaries": [ "error", - Object { - "allow": Array [ + { + "allow": [ "@nx-example/shared/product/data/testing", ], - "depConstraints": Array [ - Object { - "onlyDependOnLibsWithTags": Array [ + "depConstraints": [ + { + "onlyDependOnLibsWithTags": [ "type:feature", "type:ui", ], "sourceTag": "type:app", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:ui", "type:data", "type:types", @@ -979,48 +979,48 @@ Object { ], "sourceTag": "type:feature", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", ], "sourceTag": "type:types", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:state", "type:types", "type:data", ], "sourceTag": "type:state", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", ], "sourceTag": "type:data", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:e2e-utils", ], "sourceTag": "type:e2e", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "type:types", "type:ui", ], "sourceTag": "type:ui", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "scope:products", "scope:shared", ], "sourceTag": "scope:products", }, - Object { - "onlyDependOnLibsWithTags": Array [ + { + "onlyDependOnLibsWithTags": [ "scope:cart", "scope:shared", ], @@ -1032,47 +1032,47 @@ Object { ], }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/typescript", ], - "files": Array [ + "files": [ "*.ts", "*.tsx", ], - "rules": Object {}, + "rules": {}, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/javascript", ], - "files": Array [ + "files": [ "*.js", "*.jsx", ], - "rules": Object {}, + "rules": {}, }, - Object { - "files": Array [ + { + "files": [ "*.ts", ], - "plugins": Array [ + "plugins": [ "eslint-plugin-import", "@angular-eslint/eslint-plugin", "@typescript-eslint", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "app", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "app", "style": "camelCase", "type": "attribute", @@ -1090,17 +1090,17 @@ Object { "@angular-eslint/use-pipe-transform-interface": "error", "@typescript-eslint/consistent-type-definitions": "error", "@typescript-eslint/dot-notation": "off", - "@typescript-eslint/explicit-member-accessibility": Array [ + "@typescript-eslint/explicit-member-accessibility": [ "off", - Object { + { "accessibility": "explicit", }, ], "@typescript-eslint/member-ordering": "error", - "@typescript-eslint/naming-convention": Array [ + "@typescript-eslint/naming-convention": [ "error", - Object { - "format": Array [ + { + "format": [ "camelCase", "UPPER_CASE", ], @@ -1111,17 +1111,17 @@ Object { ], "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-inferrable-types": Array [ + "@typescript-eslint/no-inferrable-types": [ "error", - Object { + { "ignoreParameters": true, }, ], "@typescript-eslint/no-misused-new": "error", "@typescript-eslint/no-non-null-assertion": "error", - "@typescript-eslint/no-shadow": Array [ + "@typescript-eslint/no-shadow": [ "error", - Object { + { "hoist": "all", }, ], @@ -1131,7 +1131,7 @@ Object { "arrow-body-style": "error", "constructor-super": "error", "dot-notation": "off", - "eqeqeq": Array [ + "eqeqeq": [ "error", "smart", ], @@ -1141,9 +1141,9 @@ Object { "import/no-deprecated": "warn", "no-bitwise": "error", "no-caller": "error", - "no-console": Array [ + "no-console": [ "error", - Object {}, + {}, ], "no-debugger": "error", "no-empty": "off", @@ -1151,7 +1151,7 @@ Object { "no-eval": "error", "no-fallthrough": "error", "no-new-wrappers": "error", - "no-restricted-imports": Array [ + "no-restricted-imports": [ "error", "rxjs/Rx", ], @@ -1165,21 +1165,21 @@ Object { "radix": "error", }, }, - Object { - "files": Array [ + { + "files": [ "*.html", ], - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin-template", ], - "rules": Object { + "rules": { "@angular-eslint/template/banana-in-box": "error", "@angular-eslint/template/eqeqeq": "error", "@angular-eslint/template/no-negated-async": "error", }, }, ], - "plugins": Array [ + "plugins": [ "@nrwl/nx", ], "root": true, @@ -1187,38 +1187,38 @@ Object { `; exports[`convert-tslint-to-eslint should work for Angular libraries 4`] = ` -Object { - "extends": Array [ +{ + "extends": [ "../../.eslintrc.json", ], - "ignorePatterns": Array [ + "ignorePatterns": [ "!**/*", ], - "overrides": Array [ - Object { - "extends": Array [ + "overrides": [ + { + "extends": [ "plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates", ], - "files": Array [ + "files": [ "*.ts", ], - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin", "@typescript-eslint", ], - "rules": Object { - "@angular-eslint/component-selector": Array [ + "rules": { + "@angular-eslint/component-selector": [ "error", - Object { + { "prefix": "angular-app", "style": "kebab-case", "type": "element", }, ], - "@angular-eslint/directive-selector": Array [ + "@angular-eslint/directive-selector": [ "error", - Object { + { "prefix": "angular-app", "style": "camelCase", "type": "attribute", @@ -1227,17 +1227,17 @@ Object { "@typescript-eslint/no-empty-interface": "error", }, }, - Object { - "extends": Array [ + { + "extends": [ "plugin:@nrwl/nx/angular-template", ], - "files": Array [ + "files": [ "*.html", ], - "plugins": Array [ + "plugins": [ "@angular-eslint/eslint-plugin-template", ], - "rules": Object { + "rules": { "@angular-eslint/template/banana-in-box": "error", }, }, diff --git a/packages/angular/src/generators/host/__snapshots__/host.spec.ts.snap b/packages/angular/src/generators/host/__snapshots__/host.spec.ts.snap index e2fe53cb78..604c605858 100644 --- a/packages/angular/src/generators/host/__snapshots__/host.spec.ts.snap +++ b/packages/angular/src/generators/host/__snapshots__/host.spec.ts.snap @@ -161,24 +161,24 @@ export const appRoutes: Route[] = [ `; exports[`Host App Generator --ssr should generate the correct files 9`] = ` -Object { - "configurations": Object { - "development": Object { +{ + "configurations": { + "development": { "extractLicenses": false, "optimization": false, "sourceMap": true, }, - "production": Object { + "production": { "outputHashing": "media", }, }, "defaultConfiguration": "production", - "dependsOn": Array [ + "dependsOn": [ "build", ], "executor": "@nrwl/angular:webpack-server", - "options": Object { - "customWebpackConfig": Object { + "options": { + "customWebpackConfig": { "path": "apps/test/webpack.server.config.js", }, "main": "apps/test/server.ts", @@ -189,13 +189,13 @@ Object { `; exports[`Host App Generator --ssr should generate the correct files 10`] = ` -Object { - "configurations": Object { - "development": Object { +{ + "configurations": { + "development": { "browserTarget": "test:build:development", "serverTarget": "test:server:development", }, - "production": Object { + "production": { "browserTarget": "test:build:production", "serverTarget": "test:server:production", }, diff --git a/packages/angular/src/generators/host/host.spec.ts b/packages/angular/src/generators/host/host.spec.ts index 8800bd7ecf..e5f83d8c4c 100644 --- a/packages/angular/src/generators/host/host.spec.ts +++ b/packages/angular/src/generators/host/host.spec.ts @@ -64,10 +64,10 @@ describe('Host App Generator', () => { ).toContain(`'remote1', 'remote2'`); expect(tree.read('apps/host-app/src/app/app.component.html', 'utf-8')) .toMatchInlineSnapshot(` - "