diff --git a/.eslintrc.json b/.eslintrc.json index 2f9cae2..7e58514 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,42 +1,41 @@ { "root": true, - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaVersion": 2018, - "sourceType": "module", - "project": "./tsconfig.*?.json" - }, "ignorePatterns": ["**/*"], - "plugins": ["@typescript-eslint", "@nrwl/nx"], - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/eslint-recommended", - "plugin:@typescript-eslint/recommended", - "prettier", - "prettier/@typescript-eslint" - ], - "rules": { - "@typescript-eslint/explicit-member-accessibility": "off", - "@typescript-eslint/explicit-module-boundary-types": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-parameter-properties": "off", - "@nrwl/nx/enforce-module-boundaries": [ - "error", - { - "enforceBuildableLibDependency": true, - "allow": [], - "depConstraints": [ - { "sourceTag": "*", "onlyDependOnLibsWithTags": ["*"] } - ] - } - ] - }, + "plugins": ["@nrwl/nx"], "overrides": [ { - "files": ["*.tsx"], + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "parserOptions": { + "project": "./tsconfig.*?.json" + }, "rules": { - "@typescript-eslint/no-unused-vars": "off" + "@nrwl/nx/enforce-module-boundaries": [ + "error", + { + "enforceBuildableLibDependency": true, + "allow": [], + "depConstraints": [ + { + "sourceTag": "*", + "onlyDependOnLibsWithTags": ["*"] + } + ] + } + ] } + }, + { + "files": ["*.ts", "*.tsx"], + "extends": ["plugin:@nrwl/nx/typescript"], + "parserOptions": { + "project": "./tsconfig.*?.json" + }, + "rules": {} + }, + { + "files": ["*.js", "*.jsx"], + "extends": ["plugin:@nrwl/nx/javascript"], + "rules": {} } ] } diff --git a/apps/breadcrumb-demo/.eslintrc.json b/apps/breadcrumb-demo/.eslintrc.json index 54ac395..6c0f508 100644 --- a/apps/breadcrumb-demo/.eslintrc.json +++ b/apps/breadcrumb-demo/.eslintrc.json @@ -1 +1,5 @@ -{ "extends": "../../.eslintrc.json", "ignorePatterns": ["!**/*"], "rules": {} } +{ + "extends": "../../.eslintrc.json", + "ignorePatterns": ["!**/*"], + "rules": {} +} diff --git a/apps/demo/.eslintrc.json b/apps/demo/.eslintrc.json index 54ac395..6c0f508 100644 --- a/apps/demo/.eslintrc.json +++ b/apps/demo/.eslintrc.json @@ -1 +1,5 @@ -{ "extends": "../../.eslintrc.json", "ignorePatterns": ["!**/*"], "rules": {} } +{ + "extends": "../../.eslintrc.json", + "ignorePatterns": ["!**/*"], + "rules": {} +} diff --git a/apps/got-demo/.eslintrc.json b/apps/got-demo/.eslintrc.json index 54ac395..6c0f508 100644 --- a/apps/got-demo/.eslintrc.json +++ b/apps/got-demo/.eslintrc.json @@ -1 +1,5 @@ -{ "extends": "../../.eslintrc.json", "ignorePatterns": ["!**/*"], "rules": {} } +{ + "extends": "../../.eslintrc.json", + "ignorePatterns": ["!**/*"], + "rules": {} +} diff --git a/apps/simple-demo/.eslintrc.json b/apps/simple-demo/.eslintrc.json index 54ac395..6c0f508 100644 --- a/apps/simple-demo/.eslintrc.json +++ b/apps/simple-demo/.eslintrc.json @@ -1 +1,5 @@ -{ "extends": "../../.eslintrc.json", "ignorePatterns": ["!**/*"], "rules": {} } +{ + "extends": "../../.eslintrc.json", + "ignorePatterns": ["!**/*"], + "rules": {} +} diff --git a/migrations.json b/migrations.json index 8f3c878..d7f77c1 100644 --- a/migrations.json +++ b/migrations.json @@ -1,74 +1,46 @@ { "migrations": [ { - "version": "10.0.0-beta.0", - "description": "Add default branch to nx.json", - "factory": "./src/migrations/update-10-0-0/update-10-0-0", + "version": "10.4.0-beta.5", + "description": "Add an explicit dependency on @nrwl/tao", + "factory": "./src/migrations/update-10-4-0/add-explicit-dep-on-tao", "package": "@nrwl/workspace", - "name": "add-default-branch-to-nx-json" + "name": "add-explicit-dep-on-tao" }, { - "version": "10.0.0-beta.0", - "description": "Migrate tsconfigs to solution style tsconfigs", - "factory": "./src/migrations/update-10-0-0/solution-tsconfigs", - "package": "@nrwl/workspace", - "name": "solution-tsconfigs" - }, - { - "version": "10.0.1-beta.0", - "description": "Migrate .eslintrc files to reference new tsconfig", - "factory": "./src/migrations/update-10-0-1/migrate-eslintrc", - "package": "@nrwl/workspace", - "name": "migrate-eslintrc-tsconfig" - }, - { - "version": "10.1.0-beta.0", - "description": "Migrate .eslintrc files to use tsconfig with a wildcard", - "factory": "./src/migrations/update-10-1-0/migrate-eslintrc-tsconfig-wildcard", - "package": "@nrwl/workspace", - "name": "migrate-eslintrc-tsconfig-wildcard" - }, - { - "version": "10.0.0-beta", - "description": "Missing @Injectable and incomplete provider definition migration. As of Angular 9, enforcement of @Injectable decorators for DI is a bit stricter and incomplete provider definitions behave differently. Read more about this here: https://v9.angular.io/guide/migration-injectable", - "factory": "./migrations/missing-injectable/index", - "package": "@angular/core", - "name": "migration-v10-missing-injectable" - }, - { - "version": "10.0.0-beta", - "description": "ModuleWithProviders migration. As of Angular 10, the ModuleWithProviders type requires a generic. This migration adds the generic where it is missing. Read more about this here: https://v10.angular.io/guide/migration-module-with-providers", - "factory": "./migrations/module-with-providers/index", - "package": "@angular/core", - "name": "migration-v10-module-with-providers" + "version": "10.4.0-beta.3", + "description": "Adjust karma and protractor setup", + "factory": "./src/migrations/update-10-4-0/update-10-4-0", + "package": "@nrwl/angular", + "name": "update-10-4-0" }, { - "version": "10.0.0-beta", - "description": "Undecorated classes with Angular features migration. In version 10, classes that use Angular features and do not have an Angular decorator are no longer supported. Read more about this here: https://v10.angular.io/guide/migration-undecorated-classes", - "factory": "./migrations/undecorated-classes-with-decorated-fields/index", - "package": "@angular/core", - "name": "migration-v10-undecorated-classes-with-decorated-fields" + "version": "10.3.1-beta.1", + "description": "Fix ts-jest migration", + "factory": "./src/migrations/update-10-3-0/update-ts-jest", + "package": "@nrwl/jest", + "name": "update-ts-jest" }, { - "version": "10.0.0-beta.1", - "description": "Upgrades Angular and Angular CLI to 10.0.0", - "factory": "./src/migrations/update-10-0-0/update-10-0-0", - "package": "@nrwl/angular", - "name": "update-10-0-0" + "version": "10.3.1-beta.1", + "description": "Revert any node_modules lintFilesPatterns that were accidentally included by update-eslint-builder-and-config", + "factory": "./src/migrations/update-10-3-1/revert-node-modules-files-in-eslint-builder-options", + "package": "@nrwl/linter", + "name": "revert-node-modules-files-in-eslint-builder-options" }, { - "version": "10.0.0-beta.2", - "description": "update jest configs to include setup env files", - "factory": "./src/migrations/update-10-0-0/update-jest-configs", - "package": "@nrwl/jest", - "name": "update-10.0.0" + "version": "10.4.0-beta.0", + "description": "Update ESLint config files to use preset configs which eslint-plugin-nx exports", + "factory": "./src/migrations/update-10-4-0/update-eslint-configs-to-use-nx-presets", + "package": "@nrwl/linter", + "name": "update-eslint-configs-to-use-nx-presets" }, { - "version": "10.1.0-beta.4", - "description": "Update jest to v26", - "factory": "./src/migrations/update-10-1-0/update-10-1-0", - "package": "@nrwl/jest", - "name": "update-10.1.0" + "version": "10.4.0-beta.1", + "description": "Update root ESLint config to use overrides", + "factory": "./src/migrations/update-10-4-0/update-root-eslint-config-to-use-overrides", + "package": "@nrwl/linter", + "name": "update-root-eslint-config-to-use-overrides" } ] } diff --git a/package.json b/package.json index 61f0826..1d8e029 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@angular/platform-browser": "^10.1.0", "@angular/platform-browser-dynamic": "^10.1.0", "@angular/router": "^10.1.0", - "@nrwl/angular": "10.3.0", + "@nrwl/angular": "10.4.0", "angular-in-memory-web-api": "^0.11.0", "faker": "^4.1.0", "rxjs": "~6.5.5", @@ -62,10 +62,10 @@ "@commitlint/cli": "^9.1.2", "@commitlint/config-conventional": "^9.1.2", "@nrwl/cli": "10.3.0", - "@nrwl/cypress": "10.3.0", - "@nrwl/eslint-plugin-nx": "10.3.0", - "@nrwl/jest": "10.3.0", - "@nrwl/workspace": "10.3.0", + "@nrwl/cypress": "10.4.0", + "@nrwl/eslint-plugin-nx": "10.4.0", + "@nrwl/jest": "10.4.0", + "@nrwl/workspace": "10.4.0", "@types/faker": "^4.1.12", "@types/jest": "26.0.8", "@types/node": "~8.9.4", @@ -85,7 +85,7 @@ "netlify": "^4.3.8", "ng-packagr": "^10.1.0", "npm-run-all": "^4.1.5", - "prettier": "2.0.4", + "prettier": "2.1.2", "pretty-quick": "^2.0.1", "standard-version": "^8.0.2", "ts-jest": "26.4.0", diff --git a/yarn.lock b/yarn.lock index 661641b..1de0e83 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1740,15 +1740,15 @@ dependencies: mkdirp "^1.0.4" -"@nrwl/angular@10.3.0": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@nrwl/angular/-/angular-10.3.0.tgz#89362dfe20b6e7cafccece5956aed844e526103f" - integrity sha512-19ubcuFf9gTA6vpCTJu3zyG531Q9m8IbIdv7t0lNnOXasrIUz0+71RuSqlh+dv7jXcoxylIDD2vPmuXxd/QaHg== +"@nrwl/angular@10.4.0": + version "10.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/angular/-/angular-10.4.0.tgz#4fa4dbcf2751091cb33b4f7501613f3e43a2540e" + integrity sha512-4k9lB4QxpCShXRNN9ko4CTOYKSL7Ml2SznR5wASyp+OYrlk+RvHV4bfoeudsPvPmkE+lBayJfuKNKxl6Y3tdlg== dependencies: "@angular-devkit/schematics" "~10.1.3" - "@nrwl/cypress" "10.3.0" - "@nrwl/jest" "10.3.0" - "@nrwl/linter" "10.3.0" + "@nrwl/cypress" "10.4.0" + "@nrwl/jest" "10.4.0" + "@nrwl/linter" "10.4.0" "@schematics/angular" "~10.1.3" jasmine-marbles "~0.6.0" tslib "^2.0.0" @@ -1764,10 +1764,21 @@ yargs "15.4.1" yargs-parser "20.0.0" -"@nrwl/cypress@10.3.0": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@nrwl/cypress/-/cypress-10.3.0.tgz#dee49ad95455b00a8e66782f1179373be73e3f5f" - integrity sha512-5JkCkiXcbCQsy3atf0iqqTVkXekAfSP0H025eAwTSQX+TCdLEJAQfBy+EUlUQPunnJLj/bJEV/pq8OKIOqP6uw== +"@nrwl/cli@10.4.0": + version "10.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/cli/-/cli-10.4.0.tgz#9db221170500ee8f76b26e94525eb15547327d66" + integrity sha512-je5ngS72c6Pktdt1xqN8ndl66dYGvtaYLTVanzYicttUcDDnlnycTpmlxhKKZ/1u19Q9OtWfDOgCzOeoYvwScg== + dependencies: + "@nrwl/tao" "10.4.0" + chalk "2.4.2" + tmp "0.0.33" + yargs "15.4.1" + yargs-parser "20.0.0" + +"@nrwl/cypress@10.4.0": + version "10.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/cypress/-/cypress-10.4.0.tgz#28ea226ab31c5ca2843a5b692d0c3132a294410c" + integrity sha512-aXPDFUPdHl83oXQeCT5ps+z4whvQAeAVCfRf3cLns1b89RO3CL/zJXQdvEQaBn6lBoQ6/Mal8Cx1n3Gutrp+0A== dependencies: "@angular-devkit/architect" "~0.1001.3" "@angular-devkit/core" "~10.1.3" @@ -1779,37 +1790,38 @@ tree-kill "1.2.2" ts-loader "5.4.5" tsconfig-paths-webpack-plugin "3.2.0" - tslib "^1.9.3" + tslib "^2.0.0" webpack-node-externals "1.7.2" yargs-parser "20.0.0" -"@nrwl/eslint-plugin-nx@10.3.0": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-10.3.0.tgz#e5964a47f9d9d151aab69c679af9404415bfc1df" - integrity sha512-CxpPsB+ydz1bdhYuihUHMZ10/mAC9QGhgUjMVZrkCvdgeyxNgqRmTPlxw+XGUjC6mWgep7omwLCrXnoy4WXHkQ== +"@nrwl/eslint-plugin-nx@10.4.0": + version "10.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/eslint-plugin-nx/-/eslint-plugin-nx-10.4.0.tgz#d4fe07ffffdc1d7e560e318307a1699a9fa17020" + integrity sha512-OyeyY4+EAcwRTC+7EmBfmtbANxbA1Tpvk9I94a/0Z3wUCwuSzbO0twrqGyrez66yF5liJCrlS9ztdqFHl5wGNA== dependencies: "@angular-devkit/core" "~10.1.3" "@typescript-eslint/experimental-utils" "^4.3.0" + confusing-browser-globals "^1.0.9" -"@nrwl/jest@10.3.0": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-10.3.0.tgz#b30f11770ab144552ff025733f17b87772b21a51" - integrity sha512-p7b/iUOdoC4n/1rCEthamkqlNAlk0anocwJfK9YiuWwZnNcV0xs15uEXltlv0Y3H+61wf4vTMG/FYmirVMOSwg== +"@nrwl/jest@10.4.0": + version "10.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/jest/-/jest-10.4.0.tgz#4373712b7a3af668f131c3b5ab9d75fc6d161f1a" + integrity sha512-subyJ70pHNESENZVWbYQudi/a+oz63MMBC41Tt97hWS1qnjP41rRXIJ04U00yaMy+Jcb4ZVJIq8GW1ruf9U1qg== dependencies: "@angular-devkit/architect" "~0.1001.3" "@angular-devkit/core" "~10.1.3" "@angular-devkit/schematics" "~10.1.3" rxjs "^6.5.4" -"@nrwl/linter@10.3.0": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-10.3.0.tgz#50d49bbcf9443411879d34bdb022a4e34437cdbf" - integrity sha512-gLIaKyEaUK1MzXUmdK/fablclw0dtSgzlerHCkM2VfhWFBdxs0gY/3cSHEldlMz0xe8vYvHj+o7R+A69C8nIgg== +"@nrwl/linter@10.4.0": + version "10.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/linter/-/linter-10.4.0.tgz#1006a77f94e4befc49fe652024add4e331ba7667" + integrity sha512-1lUSqbl4tE1e2/nEnoREJoRpwybONHoLguxuwsxQTtYgpK+jC1lA/s8ElC2n/uugzEfGj4g0miCfOUE2NmbWXQ== dependencies: "@angular-devkit/architect" "~0.1001.3" glob "7.1.4" minimatch "3.0.4" - tslib "^1.9.3" + tslib "^2.0.0" "@nrwl/tao@10.3.0": version "10.3.0" @@ -1827,15 +1839,31 @@ tslib "^1.9.3" yargs-parser "20.0.0" -"@nrwl/workspace@10.3.0": - version "10.3.0" - resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-10.3.0.tgz#a1fd6dda5676387e8d8ea86a0f4dc4fed056ea14" - integrity sha512-Q/GsxEMzNppSTAe9rzUNIxJm+5qn50KVVrbUkcUVMDLAW9JzCdELOAAXQf7wJuhAoUFu5ll1nHzjQ2iMGqREng== +"@nrwl/tao@10.4.0": + version "10.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-10.4.0.tgz#e766ae4f5212532a042086ad4f13ff364cd9a67e" + integrity sha512-mOaXKbbJsMdO4hxvFsBlyT67LjieOyXgGTBNpHvoVZRxwyYvy7dDUYGZBo853YcnuQIRtYUkn7QCITz/V1HGvw== + dependencies: + "@angular-devkit/architect" "~0.1001.3" + "@angular-devkit/core" "~10.1.3" + "@angular-devkit/schematics" "~10.1.3" + inquirer "^6.3.1" + minimist "^1.2.0" + semver "6.3.0" + strip-json-comments "2.0.1" + tmp "0.0.33" + tslib "^2.0.0" + yargs-parser "20.0.0" + +"@nrwl/workspace@10.4.0": + version "10.4.0" + resolved "https://registry.yarnpkg.com/@nrwl/workspace/-/workspace-10.4.0.tgz#60a24e8dc38ca3adf8f50ae5adb35839c85e94ba" + integrity sha512-eYzPHLq5wyscMXVn/pM26Jf/w09hej3clSv+/FG5kOG5VtoQiq5fpBWxtY0uxEZwS2m06lOhp6Zx2VEiQpFUFA== dependencies: "@angular-devkit/architect" "~0.1001.3" "@angular-devkit/core" "~10.1.3" "@angular-devkit/schematics" "~10.1.3" - "@nrwl/cli" "10.3.0" + "@nrwl/cli" "10.4.0" axios "0.19.2" chalk "2.4.2" cosmiconfig "^4.0.0" @@ -1852,7 +1880,7 @@ semver "6.3.0" strip-json-comments "2.0.1" tmp "0.0.33" - tslib "^1.9.3" + tslib "^2.0.0" yargs "15.4.1" yargs-parser "20.0.0" @@ -4099,6 +4127,11 @@ concat-stream@^2.0.0: readable-stream "^3.0.2" typedarray "^0.0.6" +confusing-browser-globals@^1.0.9: + version "1.0.10" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" + integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== + connect-history-api-fallback@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" @@ -10775,10 +10808,10 @@ prepend-http@^1.0.0: resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= -prettier@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.4.tgz#2d1bae173e355996ee355ec9830a7a1ee05457ef" - integrity sha512-SVJIQ51spzFDvh4fIbCLvciiDMCrRhlN3mbZvv/+ycjvmF5E73bKdGfU8QDLNmjYJf+lsGnDBC4UUnvTe5OO0w== +prettier@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.1.2.tgz#3050700dae2e4c8b67c4c3f666cdb8af405e1ce5" + integrity sha512-16c7K+x4qVlJg9rEbXl7HEGmQyZlG4R9AgP+oHKRMsMsuk8s+ATStlf1NpDqyBI1HpVyfjLOeMhH2LvuNvV5Vg== pretty-bytes@^5.3.0: version "5.4.1"