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**: