From d5b0b43bed82fc7e6bd9efaf270fd53c72e225ad Mon Sep 17 00:00:00 2001 From: Neli Diakonidze Date: Wed, 24 Mar 2021 12:16:02 +0100 Subject: [PATCH] chore: update deps --- .circleci/config.yml | 3 +- .editorconfig | 3 +- .eslintrc.json | 31 + .github/ISSUE_TEMPLATE.md | 42 +- .husky/commit-msg | 4 + .husky/pre-commit | 4 + .lintstagedrc | 4 - .prettierignore | 44 - .prettierrc | 20 +- CODE_OF_CONDUCT.md | 20 +- CONTRIBUTING.md | 39 +- LICENSE | 2 +- README.md | 22 +- angular.json | 250 +- apps/universal/.browserslistrc | 18 + apps/universal/.eslintrc.json | 1 + apps/universal/browserslist | 11 - apps/universal/jest.config.js | 14 +- apps/universal/server.ts | 5 +- .../src/app/+about/about.component.html | 22 +- .../apple-pear/apple-pear.component.html | 22 +- .../app/+about/banana/banana.component.html | 22 +- .../src/app/+about/us/us.component.html | 22 +- .../+air-universal/air-universal.module.ts | 8 +- .../airline-detail-form.component.html | 18 +- .../airline-detail-form.component.spec.ts | 6 +- .../airline-detail-form.component.ts | 16 +- .../airline-detail-header.component.html | 8 +- .../airline-detail-header.component.ts | 8 +- .../airline-detail.component.html | 35 +- .../airline-detail.component.spec.ts | 23 +- .../airline-detail.component.ts | 47 +- .../airline-header.component.html | 3 +- .../airline-header.component.ts | 16 +- .../airline-table.component.html | 22 +- .../airline-table.component.spec.ts | 9 +- .../airline-table/airline-table.component.ts | 12 +- .../airline/airline.component.html | 23 +- .../airline/airline.component.spec.ts | 10 +- .../airline/airline.component.ts | 29 +- .../src/app/+home/home.component.html | 22 +- .../src/app/+secure/secure.component.html | 22 +- apps/universal/src/app/app.browser.module.ts | 2 +- apps/universal/src/app/app.component.spec.ts | 7 +- apps/universal/src/app/app.component.ts | 2 +- apps/universal/src/app/app.module.ts | 10 +- apps/universal/src/app/app.server.module.ts | 29 +- .../app/layout/header/header.component.html | 86 +- .../layout/header/header.component.spec.ts | 10 +- .../src/app/layout/header/header.component.ts | 21 +- .../src/app/layout/main.component.html | 8 +- .../src/app/layout/main.component.spec.ts | 5 +- .../src/app/layout/main.component.ts | 2 +- .../src/app/login/login.component.html | 27 +- .../src/app/login/login.component.ts | 10 +- .../src/app/shared/falsy/falsy.pipe.spec.ts | 8 +- .../src/app/shared/falsy/falsy.pipe.ts | 2 +- apps/universal/src/hmr.ts | 6 +- apps/universal/src/index.html | 31 +- apps/universal/src/test-setup.ts | 1 - .../universal/tsconfig.editor.json | 4 +- apps/universal/tsconfig.json | 18 +- apps/universal/tsconfig.server-compile.json | 9 +- apps/universal/tslint.json | 3 - commitlint.config.js | 5 +- decorate-angular-cli.js | 109 + jest.config.js | 27 +- jest.preset.js | 3 + libs/shared/store-account/.eslintrc.json | 1 + libs/shared/store-account/jest.config.js | 14 +- .../src/lib/auth/auth.actions.ts | 4 +- .../src/lib/auth/auth.effects.spec.ts | 47 +- .../src/lib/auth/auth.effects.ts | 17 +- .../src/lib/auth/auth.reducer.spec.ts | 4 +- .../src/lib/auth/auth.reducer.ts | 34 +- .../store-account/src/lib/auth/auth.state.ts | 2 +- .../testing/auth/mocks/mock-auth.service.ts | 16 +- libs/shared/store-account/src/test-setup.ts | 1 - libs/shared/store-account/tsconfig.json | 16 +- libs/shared/store-account/tsconfig.lib.json | 7 +- libs/shared/store-account/tslint.json | 3 - .../shared/store-air-universal/.eslintrc.json | 1 + .../shared/store-air-universal/jest.config.js | 14 +- .../src/lib/airline/airline.effects.spec.ts | 108 +- .../src/lib/airline/airline.effects.ts | 28 +- .../src/lib/airline/airline.reducer.spec.ts | 7 +- .../src/lib/airline/airline.reducer.ts | 13 +- .../src/lib/airline/airline.selectors.ts | 6 +- .../src/lib/airline/airline.service.spec.ts | 147 +- .../src/lib/airline/airline.service.ts | 24 +- .../src/lib/airline/airline.state.ts | 3 +- .../testing/mocks/airline-service.mock.ts | 22 +- .../store-air-universal/src/test-setup.ts | 1 - libs/shared/store-air-universal/tsconfig.json | 16 +- .../store-air-universal/tsconfig.lib.json | 7 +- libs/shared/store-air-universal/tslint.json | 3 - libs/shared/store-i18n/.eslintrc.json | 1 + libs/shared/store-i18n/jest.config.js | 14 +- .../store-i18n/src/lib/language/i18n.model.ts | 6 + .../src/lib/language/language.actions.ts | 4 +- .../src/lib/language/language.effects.spec.ts | 62 +- .../src/lib/language/language.effects.ts | 2 +- .../src/lib/language/language.reducer.spec.ts | 4 +- .../src/lib/language/language.reducer.ts | 10 +- .../src/lib/language/language.state.ts | 2 +- libs/shared/store-i18n/src/test-setup.ts | 1 - libs/shared/store-i18n/tsconfig.json | 16 +- libs/shared/store-i18n/tsconfig.lib.json | 7 +- libs/shared/store-i18n/tslint.json | 3 - libs/shared/store/.eslintrc.json | 1 + libs/shared/store/jest.config.js | 14 +- libs/shared/store/src/lib/store.module.ts | 12 +- libs/shared/store/src/test-setup.ts | 1 - libs/shared/store/tsconfig.json | 16 +- libs/shared/store/tsconfig.lib.json | 7 +- libs/shared/store/tslint.json | 3 - libs/shared/ui-base/.eslintrc.json | 1 + libs/shared/ui-base/jest.config.js | 14 +- libs/shared/ui-base/src/lib/base.component.ts | 4 +- libs/shared/ui-base/src/test-setup.ts | 1 - libs/shared/ui-base/tsconfig.json | 16 +- libs/shared/ui-base/tsconfig.lib.json | 7 +- libs/shared/ui-base/tslint.json | 3 - libs/shared/ui-i18n/.eslintrc.json | 1 + libs/shared/ui-i18n/jest.config.js | 14 +- .../src/lib/change-language.component.spec.ts | 14 +- .../src/lib/change-language.component.ts | 12 +- libs/shared/ui-i18n/src/test-setup.ts | 1 - libs/shared/ui-i18n/tsconfig.json | 16 +- libs/shared/ui-i18n/tsconfig.lib.json | 7 +- libs/shared/ui-i18n/tslint.json | 3 - libs/shared/ui-material/.eslintrc.json | 1 + libs/shared/ui-material/jest.config.js | 14 +- libs/shared/ui-material/src/test-setup.ts | 1 - libs/shared/ui-material/tsconfig.json | 16 +- libs/shared/ui-material/tsconfig.lib.json | 7 +- libs/shared/ui-material/tslint.json | 3 - libs/shared/ui-store/.eslintrc.json | 1 + libs/shared/ui-store/jest.config.js | 14 +- .../src/lib/base-container.component.ts | 5 +- libs/shared/ui-store/src/test-setup.ts | 1 - libs/shared/ui-store/tsconfig.json | 16 +- libs/shared/ui-store/tsconfig.lib.json | 7 +- libs/shared/ui-store/tslint.json | 3 - libs/shared/util-analytics/.eslintrc.json | 1 + libs/shared/util-analytics/jest.config.js | 14 +- .../src/lib/analytics.module.ts | 6 +- .../src/lib/analytics.service.spec.ts | 112 +- .../src/lib/analytics.service.ts | 11 +- libs/shared/util-analytics/src/test-setup.ts | 1 - libs/shared/util-analytics/tsconfig.json | 16 +- libs/shared/util-analytics/tsconfig.lib.json | 7 +- libs/shared/util-analytics/tslint.json | 3 - libs/shared/util-auth/.eslintrc.json | 1 + libs/shared/util-auth/jest.config.js | 14 +- .../src/lib/testing/auth-testing.module.ts | 23 +- .../testing/mocks/backend-interceptor.mock.ts | 10 +- .../lib/testing/mocks/jwt-interceptor.mock.ts | 7 +- libs/shared/util-auth/src/test-setup.ts | 1 - libs/shared/util-auth/tsconfig.json | 16 +- libs/shared/util-auth/tsconfig.lib.json | 7 +- libs/shared/util-auth/tslint.json | 3 - libs/shared/util-core/.eslintrc.json | 1 + libs/shared/util-core/jest.config.js | 14 +- .../util-core/src/lib/console.service.ts | 10 +- libs/shared/util-core/src/lib/core.module.ts | 16 +- .../util-core/src/lib/func.util.spec.ts | 2 +- libs/shared/util-core/src/lib/func.util.ts | 17 +- .../util-core/src/lib/log.service.spec.ts | 16 - libs/shared/util-core/src/lib/log.service.ts | 13 +- .../util-core/src/lib/models/console.ts | 10 +- .../shared/util-core/src/lib/models/window.ts | 8 +- .../src/lib/testing/core-testing.module.ts | 6 +- .../lib/testing/mocks/cache-service.mock.ts | 4 +- .../lib/testing/mocks/config-service.mock.ts | 2 +- .../lib/testing/mocks/meta-service.mock.ts | 4 +- .../util-core/src/lib/window.service.ts | 8 +- libs/shared/util-core/src/test-setup.ts | 1 - libs/shared/util-core/tsconfig.json | 16 +- libs/shared/util-core/tsconfig.lib.json | 7 +- libs/shared/util-core/tslint.json | 3 - .../util-http-interceptor/.eslintrc.json | 1 + .../util-http-interceptor/jest.config.js | 14 +- .../src/lib/base-url.interceptor.spec.ts | 28 +- .../src/lib/base-url.interceptor.ts | 13 +- .../src/lib/testing/mocks/service.mock.ts | 3 +- .../src/lib/universal.interceptor.spec.ts | 43 +- .../src/lib/universal.interceptor.ts | 12 +- .../util-http-interceptor/src/test-setup.ts | 1 - .../util-http-interceptor/tsconfig.json | 16 +- .../util-http-interceptor/tsconfig.lib.json | 7 +- libs/shared/util-http-interceptor/tslint.json | 3 - libs/shared/util-i18n/.eslintrc.json | 1 + libs/shared/util-i18n/jest.config.js | 14 +- libs/shared/util-i18n/src/lib/i18n.module.ts | 9 +- .../util-i18n/src/lib/i18n.service.spec.ts | 9 +- libs/shared/util-i18n/src/lib/i18n.service.ts | 10 +- .../testing/mocks/translate-service.mock.ts | 16 +- libs/shared/util-i18n/src/test-setup.ts | 1 - libs/shared/util-i18n/tsconfig.json | 16 +- libs/shared/util-i18n/tsconfig.lib.json | 7 +- libs/shared/util-i18n/tslint.json | 3 - libs/shared/util-store/.eslintrc.json | 1 + libs/shared/util-store/jest.config.js | 14 +- .../util-store/src/lib/base-service.spec.ts | 281 +- .../shared/util-store/src/lib/base-service.ts | 23 +- .../src/lib/entity-reducer.util.spec.ts | 6 +- .../util-store/src/lib/entity-reducer.util.ts | 38 +- .../src/lib/models/base-document.ts | 2 +- .../util-store/src/lib/reducer.util.spec.ts | 5 +- .../shared/util-store/src/lib/reducer.util.ts | 20 +- .../src/lib/testing/mocks/resource.mock.ts | 1 - .../src/lib/testing/mocks/store.mock.ts | 8 +- .../src/lib/testing/store-testing.module.ts | 6 - libs/shared/util-store/src/test-setup.ts | 1 - libs/shared/util-store/src/testing.ts | 1 - libs/shared/util-store/tsconfig.json | 16 +- libs/shared/util-store/tsconfig.lib.json | 7 +- libs/shared/util-store/tslint.json | 3 - libs/shared/util-testing/.eslintrc.json | 1 + libs/shared/util-testing/jest.config.js | 14 +- libs/shared/util-testing/src/index.ts | 1 + .../src/lib/mocks/activated-route.mock.ts | 15 +- .../util-testing/src/lib/mocks/router.mock.ts | 3 +- libs/shared/util-testing/src/test-setup.ts | 1 - libs/shared/util-testing/tsconfig.json | 16 +- libs/shared/util-testing/tsconfig.lib.json | 7 +- libs/shared/util-testing/tslint.json | 3 - lint-staged.config.js | 13 + nx.json | 6 +- package.json | 140 +- tools/jest.setup.ts | 42 - tools/stylelint.config.js | 72 +- tools/webpack.config.js | 2 +- tsconfig.json => tsconfig.base.json | 4 +- tslint.angular.json | 24 - tslint.json | 50 - yarn.lock | 9558 +++++++++-------- 238 files changed, 7250 insertions(+), 6155 deletions(-) create mode 100644 .eslintrc.json create mode 100755 .husky/commit-msg create mode 100755 .husky/pre-commit delete mode 100644 .lintstagedrc create mode 100644 apps/universal/.browserslistrc create mode 100644 apps/universal/.eslintrc.json delete mode 100644 apps/universal/browserslist rename tsconfig.lint.json => apps/universal/tsconfig.editor.json (52%) delete mode 100644 apps/universal/tslint.json create mode 100644 decorate-angular-cli.js create mode 100644 jest.preset.js create mode 100644 libs/shared/store-account/.eslintrc.json delete mode 100644 libs/shared/store-account/tslint.json create mode 100644 libs/shared/store-air-universal/.eslintrc.json delete mode 100644 libs/shared/store-air-universal/tslint.json create mode 100644 libs/shared/store-i18n/.eslintrc.json create mode 100644 libs/shared/store-i18n/src/lib/language/i18n.model.ts delete mode 100644 libs/shared/store-i18n/tslint.json create mode 100644 libs/shared/store/.eslintrc.json delete mode 100644 libs/shared/store/tslint.json create mode 100644 libs/shared/ui-base/.eslintrc.json delete mode 100644 libs/shared/ui-base/tslint.json create mode 100644 libs/shared/ui-i18n/.eslintrc.json delete mode 100644 libs/shared/ui-i18n/tslint.json create mode 100644 libs/shared/ui-material/.eslintrc.json delete mode 100644 libs/shared/ui-material/tslint.json create mode 100644 libs/shared/ui-store/.eslintrc.json delete mode 100644 libs/shared/ui-store/tslint.json create mode 100644 libs/shared/util-analytics/.eslintrc.json delete mode 100644 libs/shared/util-analytics/tslint.json create mode 100644 libs/shared/util-auth/.eslintrc.json delete mode 100644 libs/shared/util-auth/tslint.json create mode 100644 libs/shared/util-core/.eslintrc.json delete mode 100644 libs/shared/util-core/tslint.json create mode 100644 libs/shared/util-http-interceptor/.eslintrc.json delete mode 100644 libs/shared/util-http-interceptor/tslint.json create mode 100644 libs/shared/util-i18n/.eslintrc.json delete mode 100644 libs/shared/util-i18n/tslint.json create mode 100644 libs/shared/util-store/.eslintrc.json delete mode 100644 libs/shared/util-store/src/lib/testing/mocks/resource.mock.ts delete mode 100644 libs/shared/util-store/tslint.json create mode 100644 libs/shared/util-testing/.eslintrc.json delete mode 100644 libs/shared/util-testing/tslint.json create mode 100644 lint-staged.config.js delete mode 100644 tools/jest.setup.ts rename tsconfig.json => tsconfig.base.json (96%) delete mode 100644 tslint.angular.json delete mode 100644 tslint.json diff --git a/.circleci/config.yml b/.circleci/config.yml index c366b810..535fa987 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,8 +7,7 @@ jobs: JOBS: 1 steps: - checkout - - run: sudo yarn global add @angular/cli@8 - - run: sudo yarn global add greenkeeper-lockfile@1 + - run: sudo yarn global add @angular/cli@10 - restore_cache: keys: - deps-{{ .Branch }}-{{ checksum "yarn.lock" }} diff --git a/.editorconfig b/.editorconfig index e3761532..6e87a003 100644 --- a/.editorconfig +++ b/.editorconfig @@ -3,12 +3,11 @@ root = true [*] charset = utf-8 -end_of_line = lf indent_style = space indent_size = 2 insert_final_newline = true trim_trailing_whitespace = true [*.md] -max_line_length = 140 +max_line_length = off trim_trailing_whitespace = false diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 00000000..0eea8b18 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,31 @@ +{ + "root": true, + "ignorePatterns": ["**/*"], + "plugins": ["@nrwl/nx"], + "overrides": [ + { + "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], + "rules": { + "@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/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 9d93bad8..3d2ce212 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -4,7 +4,8 @@ PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATI ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> -**I'm submitting a ...** (check one with "x") +**I'm submitting a ...** (check one with "x") + ``` [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report @@ -14,37 +15,44 @@ ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. ``` **Current behavior** + **Expected/desired behavior** + **Minimal reproduction of the problem with instructions** + **What is the motivation / use case for changing the behavior?** + **Environment** -* **Angular version:** X.Y.Z + +- **Angular version:** X.Y.Z -* **Browser:** -- [ ] Chrome (desktop) version XX -- [ ] Chrome (Android) version XX -- [ ] Chrome (iOS) version XX -- [ ] Firefox version XX -- [ ] Safari (desktop) version XX -- [ ] Safari (iOS) version XX -- [ ] IE version XX -- [ ] Edge version XX - -* **For Tooling issues:** -- Node version: XX -- Platform: - -* Others: +- **Browser:** + +* [ ] Chrome (desktop) version XX +* [ ] Chrome (Android) version XX +* [ ] Chrome (iOS) version XX +* [ ] Firefox version XX +* [ ] Safari (desktop) version XX +* [ ] Safari (iOS) version XX +* [ ] IE version XX +* [ ] Edge version XX + +- **For Tooling issues:** + +* Node version: XX +* Platform: + +- Others: diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 00000000..e8511eae --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..d37daa07 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +npx --no-install lint-staged diff --git a/.lintstagedrc b/.lintstagedrc deleted file mode 100644 index 0d670410..00000000 --- a/.lintstagedrc +++ /dev/null @@ -1,4 +0,0 @@ -{ - "*.{json,css,scss,md,js}": ["prettier --write", "git add"], - "*.(ts)": ["prettier-tslint fix", "git add"] -} diff --git a/.prettierignore b/.prettierignore index 5249a676..d0b804da 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,48 +1,4 @@ # Add files here to ignore them from prettier formatting -# compiled output /dist -/tmp -/out-tsc - -# dependencies -node_modules/ - -# IDEs and editors -/.idea -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# IDE - VSCode -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - -# misc -/.sass-cache -/connect.lock /coverage -/libpeerconnection.log -npm-debug.log -yarn-error.log -testem.log -/typings - -# System Files -.DS_Store -Thumbs.db - -# others -/.awcache -/.cache -/docs -/tools -angular.json -test-report.xml -yarn.lock diff --git a/.prettierrc b/.prettierrc index 6c70cb20..ec7608da 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,4 +1,20 @@ { - "printWidth": 140, - "singleQuote": true + "printWidth": 120, + "singleQuote": true, + "trailingComma": "none", + "arrowParens": "avoid", + "overrides": [ + { + "files": "*.component.html", + "options": { + "parser": "angular" + } + }, + { + "files": "*.html", + "options": { + "parser": "html" + } + } + ] } diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index f69e6d5e..6b15a30f 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo Examples of behavior that contributes to creating a positive environment include: -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members +- Using welcoming and inclusive language +- Being respectful of differing viewpoints and experiences +- Gracefully accepting constructive criticism +- Focusing on what is best for the community +- Showing empathy towards other community members Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or advances -* Trolling, insulting/derogatory comments, and personal or political attacks -* Public or private harassment -* Publishing others' private information, such as a physical or electronic address, without explicit permission -* Other conduct which could reasonably be considered inappropriate in a professional setting +- The use of sexualized language or imagery and unwelcome sexual attention or advances +- Trolling, insulting/derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or electronic address, without explicit permission +- Other conduct which could reasonably be considered inappropriate in a professional setting ## Our Responsibilities diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bdaea6fc..c464735f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -125,7 +125,7 @@ To ensure consistency throughout the source code, keep these rules in mind as yo - All features or bug fixes **must be tested** by one or more specs (unit-tests). - All public API methods **must be documented**. (Details TBC). -- We follow [fulls1z3's Angular TSLint rules][angular-tslint-rules]. +- We follow [eslint:recommended][eslint]. ## Commit message guidelines @@ -136,9 +136,7 @@ the `universal` change log**. ### Commit Message Format Each commit message consists of a **header**, a **body** and a **footer**. The header has a special format that includes -a **type**, an _optional_ **scope** (_when applicable_) and a **subject**: - -#### Without scope +a **type** and a **subject**: ``` : @@ -148,17 +146,7 @@ a **type**, an _optional_ **scope** (_when applicable_) and a **subject**: